From c556e0fd82b453771bb36eb8ed724bf9057d9e1f Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Dec 14 2023 20:08:30 +0000 Subject: updating to upsteam 18.9.0 rhbz#2254371 --- diff --git a/0001-GitHub-Issue-1973-RFE-Replace-use-of-pkg_resources-w.patch b/0001-GitHub-Issue-1973-RFE-Replace-use-of-pkg_resources-w.patch index dd6519e..bdaa874 100644 --- a/0001-GitHub-Issue-1973-RFE-Replace-use-of-pkg_resources-w.patch +++ b/0001-GitHub-Issue-1973-RFE-Replace-use-of-pkg_resources-w.patch @@ -1,41 +1,44 @@ -From 72df1c58f9d9901de136ca9b81e9724a5eb8ef0a Mon Sep 17 00:00:00 2001 -From: Dan Radez -Date: Tue, 4 Apr 2023 09:39:44 -0400 -Subject: [PATCH] GitHub Issue #1973: RFE: Replace use of pkg_resources with - importlib.metadata +commit 40969c2e254c39d00243bb1b55145dc779c42316 +Author: Dan Radez +Date: Tue Apr 4 09:39:44 2023 -0400 -Replaces references to pkg_resources with importlib.metadata -Latest setuptools reports: DeprecationWarning: pkg_resources is deprecated as an API ---- - cherrypy/__init__.py | 4 ++-- - cherrypy/test/helper.py | 5 ++--- - docs/conf.py | 8 ++------ - 3 files changed, 6 insertions(+), 11 deletions(-) + GitHub Issue #1973: RFE: Replace use of pkg_resources with importlib.metadata + + Replaces references to pkg_resources with importlib.metadata + Latest setuptools reports: DeprecationWarning: pkg_resources is deprecated as an API diff --git a/cherrypy/__init__.py b/cherrypy/__init__.py -index 8e27c812..f329aa73 100644 +index 8e27c812..50e715a9 100644 --- a/cherrypy/__init__.py +++ b/cherrypy/__init__.py -@@ -57,7 +57,7 @@ These API's are described in the `CherryPy specification +@@ -57,9 +57,14 @@ These API's are described in the `CherryPy specification """ try: - import pkg_resources -+ import importlib ++ import importlib.metadata as importlib_metadata except ImportError: - pass +- pass ++ # fall back for python <= 3.7 ++ # can simply pass when py 3.6/3.7 no longer supported ++ try: ++ import importlib_metadata ++ except ImportError: ++ pass -@@ -109,7 +109,7 @@ tree = _cptree.Tree() + from threading import local as _local + +@@ -109,7 +114,7 @@ tree = _cptree.Tree() try: - __version__ = pkg_resources.require('cherrypy')[0].version -+ __version__ = importlib.metadata.version('cherrypy') ++ __version__ = importlib_metadata.version('cherrypy') except Exception: __version__ = 'unknown' diff --git a/cherrypy/test/helper.py b/cherrypy/test/helper.py -index cae49533..983f6be4 100644 +index cae49533..9b7cb274 100644 --- a/cherrypy/test/helper.py +++ b/cherrypy/test/helper.py @@ -461,11 +461,10 @@ server.ssl_private_key: r'%s' @@ -43,7 +46,7 @@ index cae49533..983f6be4 100644 ['-c', "__requires__ = 'CherryPy'; \ - import pkg_resources, re, sys; \ -+ import importlib, re, sys; \ ++ import importlib.metadata, re, sys; \ sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]); \ sys.exit(\ - pkg_resources.load_entry_point(\ @@ -53,7 +56,7 @@ index cae49533..983f6be4 100644 doesn't work as it's impossible to reconstruct the `-c`'s contents. diff --git a/docs/conf.py b/docs/conf.py -index 480edef4..64b2028a 100644 +index a45e632d..4a0ceb54 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,9 +13,7 @@ @@ -78,7 +81,7 @@ index 480edef4..64b2028a 100644 prj_license = prj_meta['License'] prj_description = prj_meta['Description'] @@ -54,7 +50,7 @@ prj_py_min_supported, prj_py_max_supported = map( - lambda v: '.'.join(v), prj_py_ver_range + lambda v: '.'.join(map(str, v)), prj_py_ver_range ) -project = prj_dist.project_name @@ -86,6 +89,3 @@ index 480edef4..64b2028a 100644 github_url = 'https://github.com' github_repo_org = project.lower() --- -2.40.0 - diff --git a/python-cherrypy.spec b/python-cherrypy.spec index 09700fe..2149e2a 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -9,8 +9,8 @@ Name: python-cherrypy %global camelname CherryPy -Version: 18.8.0 -Release: 7%{?dist} +Version: 18.9.0 +Release: 1%{?dist} Summary: Pythonic, object-oriented web development framework License: BSD URL: https://cherrypy.dev/ @@ -27,6 +27,10 @@ Patch2: pytest-ignore-urllib3-pyopenssl-DeprecationWarnings.patch # github pr https://github.com/cherrypy/cherrypy/pull/1993 Patch3: 0001-GitHub-Issue-1973-RFE-Replace-use-of-pkg_resources-w.patch +# replace utcnow with datetime.UTC +# github pr https://github.com/cherrypy/cherrypy/pull/2007 +Patch4: 0001-Replace-deprecated-utcnow-datetime-function.patch + BuildArch: noarch BuildRequires: dos2unix @@ -110,6 +114,9 @@ export WEBTEST_INTERACTIVE=false %{python3_sitelib}/cherrypy/tutorial %changelog +* Thu Dec 14 2023 Dan Radez - 18.9.0-1 +- updating to upsteam 18.9.0 rhbz#2254371 + * Tue Oct 10 2023 Dan Radez - 18.8.0-8 - adding -devel package to provide test and tutorial modules diff --git a/sources b/sources index c8fdb31..c278671 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (CherryPy-18.8.0.tar.gz) = abacc995c1757b8d0171d57eb59b6e5931c46019d8f0f43479e334bb4f58b61a27541d9d0997d665f81905bc3c89e42d40d8e5a6e3a5f9bf251bc9089ceb5249 +SHA512 (CherryPy-18.9.0.tar.gz) = ed2beacedd3417214f45e59567f2a1faf5964745a545360db2f61251a39f50f2a833745832a2c900673029d98062f7e1813db6c342585f8d2bbae0be423edb3a