commit: 97e258600de0bcd413ff98f84c331908cc0b3788
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 28 05:55:47 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 28 05:55:47 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97e25860
dev-python/deprecated: Enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/deprecated/deprecated-1.2.14.ebuild | 6 +++-
.../deprecated/files/deprecated-1.2.14-py313.patch | 34 ++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/dev-python/deprecated/deprecated-1.2.14.ebuild
b/dev-python/deprecated/deprecated-1.2.14.ebuild
index 2503a4b7b259..9f120ca0b27b 100644
--- a/dev-python/deprecated/deprecated-1.2.14.ebuild
+++ b/dev-python/deprecated/deprecated-1.2.14.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN=${PN^}
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1 pypi
@@ -24,4 +24,8 @@ RDEPEND="
dev-python/wrapt[${PYTHON_USEDEP}]
"
+PATCHES=(
+ "${FILESDIR}/${P}-py313.patch"
+)
+
distutils_enable_tests pytest
diff --git a/dev-python/deprecated/files/deprecated-1.2.14-py313.patch
b/dev-python/deprecated/files/deprecated-1.2.14-py313.patch
new file mode 100644
index 000000000000..b0daead38417
--- /dev/null
+++ b/dev-python/deprecated/files/deprecated-1.2.14-py313.patch
@@ -0,0 +1,34 @@
+diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
+index 0e467ae..69b10c1 100644
+--- a/tests/test_deprecated.py
++++ b/tests/test_deprecated.py
+@@ -152,6 +152,7 @@ def
test_classic_deprecated_class__warns(classic_deprecated_class):
+ classic_deprecated_class()
+ assert len(warns) == 1
+ warn = warns[0]
++ print(warns)
+ assert issubclass(warn.category, DeprecationWarning)
+ assert "deprecated class" in str(warn.message)
+ assert warn.filename == __file__ or warn.category is
WrongStackLevelWarning, 'Incorrect warning stackLevel'
+@@ -191,7 +192,7 @@ def
test_classic_deprecated_class_method__warns(classic_deprecated_class_method)
+ assert len(warns) == 1
+ warn = warns[0]
+ assert issubclass(warn.category, DeprecationWarning)
+- if sys.version_info >= (3, 9):
++ if (3, 9) <= sys.version_info < (3, 13):
+ assert "deprecated class method" in str(warn.message)
+ else:
+ assert "deprecated function (or staticmethod)" in str(warn.message)
+diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py
+index a1d7753..8cf8e95 100644
+--- a/tests/test_sphinx.py
++++ b/tests/test_sphinx.py
+@@ -301,7 +301,7 @@ def
test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method):
+ assert len(warns) == 1
+ warn = warns[0]
+ assert issubclass(warn.category, DeprecationWarning)
+- if sys.version_info >= (3, 9):
++ if (3, 9) <= sys.version_info < (3, 13):
+ assert "deprecated class method" in str(warn.message)
+ else:
+ assert "deprecated function (or staticmethod)" in str(warn.message)