mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-python/deprecated: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
34
dev-python/deprecated/files/deprecated-1.2.14-py313.patch
Normal file
34
dev-python/deprecated/files/deprecated-1.2.14-py313.patch
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user