* Fix #78: Fix configuration for Packit 1.0.0 * Fix #79: Fix the configuration for the intersphinx mapping in the Sphinx documentation. See How to link to other documentation projects with Intersphinx. * Drop support for Python older than 3.7 in GitHub Actions. * Resolve Python 2.7 support issue introduced in v1.2.14 in sphinx.py. * Fix #69: Add extra_stacklevel argument for interoperating with other wrapper functions (refer to #68 for a concrete use case). * Fix #73: Update class method deprecation warnings for Python 3.13. * Fix #75: Update GitHub workflows and fix development dependencies for Python 3.12. * Fix #66: discontinue TravisCI and AppVeyor due to end of free support. * Fix #60: return a correctly dedented docstring when long docstring are using the D212 or D213 format. * Add support for Python 3.11. * Drop support for Python older than 3.7 in build systems like pytest and tox, while ensuring the library remains production-compatible. * Update GitHub workflow to run in recent Python versions. * Fix #45: Change the signature of the :func:`~deprecated.sphinx.deprecated` decorator to reflect the valid use cases. * Fix #48: Fix versionadded and versionchanged decorators: do not return a decorator factory, but a Wrapt adapter. * Fix configuration for AppVeyor: simplify the test scripts and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Deprecated?expand=0&rev=26
43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
From 3b1aec9b8ff43f81cf7df9be92d0d383d759792e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
|
Date: Fri, 28 Jun 2024 07:52:59 +0200
|
|
Subject: [PATCH] Update class method deprecation warnings for Python 3.13
|
|
|
|
Update the version range for modified deprecation warnings that was
|
|
introduced in efb3e60623e1dda88c2725a93223d290924e8666, since Python
|
|
3.13 reverted the change originally introduced in 3.9 and is back to
|
|
the old messages. This fixes tests with Python 3.13.
|
|
|
|
See also https://github.com/GrahamDumpleton/wrapt/pull/260.
|
|
---
|
|
tests/test_deprecated.py | 2 +-
|
|
tests/test_sphinx.py | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
|
|
index 0e467ae..c39229b 100644
|
|
--- a/tests/test_deprecated.py
|
|
+++ b/tests/test_deprecated.py
|
|
@@ -191,7 +191,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)
|