diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-11-07 22:09:23 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-11-07 22:10:23 +0100 |
commit | 95de5d8c544fd616ceca0dfb83e1e0cd386e3840 (patch) | |
tree | e5d47cbab6b6a9a1b40fb007cf104f96cf2b0c97 /dev-python/cherrypy | |
parent | net-im/telegram-desktop-bin: add 4.11.5 (diff) | |
download | gentoo-95de5d8c544fd616ceca0dfb83e1e0cd386e3840.tar.gz gentoo-95de5d8c544fd616ceca0dfb83e1e0cd386e3840.tar.bz2 gentoo-95de5d8c544fd616ceca0dfb83e1e0cd386e3840.zip |
dev-python/cherrypy: Enable py3.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/cherrypy')
-rw-r--r-- | dev-python/cherrypy/cherrypy-18.8.0.ebuild | 7 | ||||
-rw-r--r-- | dev-python/cherrypy/files/cherrypy-18.8.0-py312.patch | 30 |
2 files changed, 36 insertions, 1 deletions
diff --git a/dev-python/cherrypy/cherrypy-18.8.0.ebuild b/dev-python/cherrypy/cherrypy-18.8.0.ebuild index bc25b0613a09..f1daafcdd228 100644 --- a/dev-python/cherrypy/cherrypy-18.8.0.ebuild +++ b/dev-python/cherrypy/cherrypy-18.8.0.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYPI_NO_NORMALIZE=1 PYPI_PN="CherryPy" -PYTHON_COMPAT=( python3_{9..11} pypy3 ) +PYTHON_COMPAT=( python3_{10..12} pypy3 ) inherit distutils-r1 pypi @@ -47,6 +47,11 @@ BDEPEND=" distutils_enable_tests pytest python_prepare_all() { + local PATCHES=( + # https://github.com/cherrypy/cherrypy/pull/1959 + "${FILESDIR}/${P}-py312.patch" + ) + sed -i -e '/cov/d' pytest.ini || die # upstream has been using xfail to mark flaky tests, then added # xfail_strict... not a good idea diff --git a/dev-python/cherrypy/files/cherrypy-18.8.0-py312.patch b/dev-python/cherrypy/files/cherrypy-18.8.0-py312.patch new file mode 100644 index 000000000000..90e63a763f99 --- /dev/null +++ b/dev-python/cherrypy/files/cherrypy-18.8.0-py312.patch @@ -0,0 +1,30 @@ +From d2bc527c12a74675d67ba5fbf9de0d014af929cb Mon Sep 17 00:00:00 2001 +From: Dan Radez <dradez@redhat.com> +Date: Tue, 12 Apr 2022 09:40:46 -0400 +Subject: [PATCH] Replace readfp with read_file + +Getting Deprecation Warning in python 3.11: +DeprecationWarning: This method will be removed in Python 3.12. +Use 'parser.read_file()' instead. + +https://github.com/python/cpython/commit/e8659b47dece5a272111c0af5e340c364a9f807b#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777R757 + +If I'm reading this correct read_file has been around since Python 2.7 +https://github.com/python/cpython/commit/a492362f9a2a44e411147fd7b2886466bb0bb17f +--- + cherrypy/lib/reprconf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cherrypy/lib/reprconf.py b/cherrypy/lib/reprconf.py +index 76381d7b7..536b94173 100644 +--- a/cherrypy/lib/reprconf.py ++++ b/cherrypy/lib/reprconf.py +@@ -188,7 +188,7 @@ def as_dict(self, raw=False, vars=None): + + def dict_from_file(self, file): + if hasattr(file, 'read'): +- self.readfp(file) ++ self.read_file(file) + else: + self.read(file) + return self.as_dict() |