Source: python-deprecated Version: 1.2.14-1 Severity: normal User: [email protected] Usertags: python3.13 Forwarded: https://github.com/laurent-laporte-pro/deprecated/pull/73
This package failed build from source when test-built against a version of python3-defaults that includes 3.13 as a supported version. To reproduce this issue, build against python3-defaults (python3-all-dev etc.) from Debian experimental. What's new in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html Log snippet: I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build; python3.13 -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0 rootdir: /<<PKGBUILDDIR>> configfile: setup.cfg plugins: typeguard-4.3.0, cov-5.0.0 collected 171 items tests/test.py .. [ 1%] tests/test_deprecated.py ............................FFFFFFF...... [ 25%] tests/test_deprecated_class.py ....... [ 29%] tests/test_deprecated_metaclass.py .... [ 31%] tests/test_sphinx.py ................................................... [ 61%] .............FFFF.......................... [ 86%] tests/test_sphinx_adapter.py ............ [ 93%] tests/test_sphinx_class.py ....... [ 97%] tests/test_sphinx_metaclass.py .... [100%] =================================== FAILURES =================================== ______________ test_classic_deprecated_class_method__warns[None] _______________ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5.' E + where 'Call to deprecated function (or staticmethod) foo5.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5.') = <warnings.WarningMessage object at 0xffff9a38fda0>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method1] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5.' E + where 'Call to deprecated function (or staticmethod) foo5.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5.') = <warnings.WarningMessage object at 0xffff9a38dd00>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method2] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. (Good reason)' E + where 'Call to deprecated function (or staticmethod) foo5. (Good reason)' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason)')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason)') = <warnings.WarningMessage object at 0xffff9a38e3c0>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method3] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. (Good reason)' E + where 'Call to deprecated function (or staticmethod) foo5. (Good reason)' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason)')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason)') = <warnings.WarningMessage object at 0xffff9a38d640>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method4] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' E + where 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.') = <warnings.WarningMessage object at 0xffff9a38e840>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method5] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5.' E + where 'Call to deprecated function (or staticmethod) foo5.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5.') = <warnings.WarningMessage object at 0xffff9a38ede0>.message tests/test_deprecated.py:189: AssertionError _ test_classic_deprecated_class_method__warns[classic_deprecated_class_method6] _ classic_deprecated_class_method = <class 'tests.test_deprecated.classic_deprecated_class_method.<locals>.Foo5'> def test_classic_deprecated_class_method__warns(classic_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = classic_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5.' E + where 'Call to deprecated function (or staticmethod) foo5.' = str(MyDeprecationWarning('Call to deprecated function (or staticmethod) foo5.')) E + where MyDeprecationWarning('Call to deprecated function (or staticmethod) foo5.') = <warnings.WarningMessage object at 0xffff9a38ed50>.message tests/test_deprecated.py:189: AssertionError _ test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method0] __ sphinx_deprecated_class_method = <class 'tests.test_sphinx.sphinx_deprecated_class_method.<locals>.Foo5'> def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = sphinx_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' E + where 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.') = <warnings.WarningMessage object at 0xffff9a38eba0>.message tests/test_sphinx.py:305: AssertionError _ test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method1] __ sphinx_deprecated_class_method = <class 'tests.test_sphinx.sphinx_deprecated_class_method.<locals>.Foo5'> def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = sphinx_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. (Good reason) -- Deprecated since version 1.2.3.' E + where 'Call to deprecated function (or staticmethod) foo5. (Good reason) -- Deprecated since version 1.2.3.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason) -- Deprecated since version 1.2.3.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. (Good reason) -- Deprecated since version 1.2.3.') = <warnings.WarningMessage object at 0xffff9a38e8d0>.message tests/test_sphinx.py:305: AssertionError _ test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method2] __ sphinx_deprecated_class_method = <class 'tests.test_sphinx.sphinx_deprecated_class_method.<locals>.Foo5'> def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = sphinx_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' E + where 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' = str(DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.')) E + where DeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.') = <warnings.WarningMessage object at 0xffff9a38f4a0>.message tests/test_sphinx.py:305: AssertionError _ test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method3] __ sphinx_deprecated_class_method = <class 'tests.test_sphinx.sphinx_deprecated_class_method.<locals>.Foo5'> def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method): with warnings.catch_warnings(record=True) as warns: warnings.simplefilter("always") cls = sphinx_deprecated_class_method() cls.foo5() assert len(warns) == 1 warn = warns[0] assert issubclass(warn.category, DeprecationWarning) if sys.version_info >= (3, 9): > assert "deprecated class method" in str(warn.message) E AssertionError: assert 'deprecated class method' in 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' E + where 'Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.' = str(MyDeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.')) E + where MyDeprecationWarning('Call to deprecated function (or staticmethod) foo5. -- Deprecated since version 1.2.3.') = <warnings.WarningMessage object at 0xffff9a38d1c0>.message tests/test_sphinx.py:305: AssertionError =============================== warnings summary =============================== tests/test.py:2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build/tests/test.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources .pybuild/cpython3_3.13_deprecated/build/tests/test_deprecated_class.py::test_simple_class_deprecation_with_args /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build/tests/test_deprecated_class.py:148: DeprecationWarning: Call to deprecated class MyClass. (kwargs class) MyClass(5) .pybuild/cpython3_3.13_deprecated/build/tests/test_sphinx_class.py::test_isinstance_deprecated /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build/tests/test_sphinx_class.py:134: DeprecationWarning: Call to deprecated class DeprecatedChildCls. (some reason) -- Deprecated since version Y.Z. instance = DeprecatedChildCls() .pybuild/cpython3_3.13_deprecated/build/tests/test_sphinx_class.py::test_isinstance_deprecated /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build/deprecated/classic.py:173: DeprecationWarning: Call to deprecated class DeprecatedCls. (some reason) -- Deprecated since version X.Y. return old_new1(cls, *args, **kwargs) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[None] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method1] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method2] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method3] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method4] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method5] FAILED tests/test_deprecated.py::test_classic_deprecated_class_method__warns[classic_deprecated_class_method6] FAILED tests/test_sphinx.py::test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method0] FAILED tests/test_sphinx.py::test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method1] FAILED tests/test_sphinx.py::test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method2] FAILED tests/test_sphinx.py::test_sphinx_deprecated_class_method__warns[sphinx_deprecated_class_method3] ================== 11 failed, 160 passed, 4 warnings in 0.35s ================== E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_deprecated/build; python3.13 -m pytest tests I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_deprecated/build; python3.12 -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 rootdir: /<<PKGBUILDDIR>> configfile: setup.cfg plugins: typeguard-4.3.0, cov-5.0.0 collected 171 items tests/test.py .. [ 1%] tests/test_deprecated.py ......................................... [ 25%] tests/test_deprecated_class.py ....... [ 29%] tests/test_deprecated_metaclass.py .... [ 31%] tests/test_sphinx.py ................................................... [ 61%] ........................................... [ 86%] tests/test_sphinx_adapter.py ............ [ 93%] tests/test_sphinx_class.py ....... [ 97%] tests/test_sphinx_metaclass.py .... [100%] =============================== warnings summary =============================== tests/test.py:2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_deprecated/build/tests/test.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources .pybuild/cpython3_3.12_deprecated/build/tests/test_deprecated_class.py::test_simple_class_deprecation_with_args /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_deprecated/build/tests/test_deprecated_class.py:148: DeprecationWarning: Call to deprecated class MyClass. (kwargs class) MyClass(5) .pybuild/cpython3_3.12_deprecated/build/tests/test_sphinx_class.py::test_isinstance_deprecated /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_deprecated/build/tests/test_sphinx_class.py:134: DeprecationWarning: Call to deprecated class DeprecatedChildCls. (some reason) -- Deprecated since version Y.Z. instance = DeprecatedChildCls() .pybuild/cpython3_3.12_deprecated/build/tests/test_sphinx_class.py::test_isinstance_deprecated /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_deprecated/build/deprecated/classic.py:173: DeprecationWarning: Call to deprecated class DeprecatedCls. (some reason) -- Deprecated since version X.Y. return old_new1(cls, *args, **kwargs) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ======================= 171 passed, 4 warnings in 0.30s ======================== dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 make: *** [debian/rules:10: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2024-09-19T00:22:25Z If required, the full build log is available here (for the next 30 days): https://debusine.debian.net/artifact/782368/ This bug has been filed at "normal" severity, as we haven't started the transition to add 3.13 as a supported version, yet. This will be raised to RC as soon as that happens, hopefully well before trixie. Thanks, Stefano

