[Debian-astro-maintainers] Bug#1125866: python3-pytest-cython: undeclared runtime usage of deprecated python3-pkg-resources
Alexandre Detiste
alexandre.detiste at gmail.com
Sun Jan 18 13:36:46 GMT 2026
Package: python3-pytest-cython
Version: 0.3.1-1
Severity: serious
Justification: FTBFS
Dear Maintainer,
The undeclared runtime usage of pkg_resources makes healpy's autopkgtest fail.
Please patch it out and use importlib.metadata instead.
Greetings
Alexandre
--------------
src/pytest_cython/__init__.py-try:
src/pytest_cython/__init__.py: from pkg_resources import get_distribution
src/pytest_cython/__init__.py- __version__ = get_distribution('pytest-cython').version
src/pytest_cython/__init__.py- del get_distribution
src/pytest_cython/__init__.py-except Exception:
src/pytest_cython/__init__.py- import warnings
src/pytest_cython/__init__.py: warnings.warn('could not get pytest-cython version; pkg_resources '
src/pytest_cython/__init__.py- 'not available or package not installed')
src/pytest_cython/__init__.py- __version__ = '0.0.0'
https://salsa.debian.org/debian-astro-team/healpy/-/jobs/8904483
============ 248 passed, 7 skipped, 12 warnings in 63.80s (0:01:03) ============
autopkgtest [13:27:46]: test python3-healpy: -----------------------]
autopkgtest [13:27:47]: test python3-healpy: - - - - - - - - - - results - - - - - - - - - -
python3-healpy FAIL stderr: /usr/lib/python3/dist-packages/pytest_cython/__init__.py:7: UserWarning: could not get pytest-cython version; pkg_resources not available or package not installed
autopkgtest [13:27:47]: test python3-healpy: - - - - - - - - - - stderr - - - - - - - - - -
/usr/lib/python3/dist-packages/pytest_cython/__init__.py:7: UserWarning: could not get pytest-cython version; pkg_resources not available or package not installed
warnings.warn('could not get pytest-cython version; pkg_resources '
/usr/lib/python3/dist-packages/pytest_cython/__init__.py:7: UserWarning: could not get pytest-cython version; pkg_resources not available or package not installed
warnings.warn('could not get pytest-cython version; pkg_resources '
autopkgtest [13:27:47]: @@@@@@@@@@@@@@@@@@@@ summary
python3-healpy FAIL stderr: /usr/lib/python3/dist-packages/pytest_cython/__init__.py:7: UserWarning: could not get pytest-cython version; pkg_resources not available or package not installed
------
[This bug is targeted to the upcoming forky release]
The package build-depends or depends on python3-pkg-resources, which is
deprecated upstream. Details can be found at
https://setuptools.pypa.io/en/latest/pkg_resources.html
Use of pkg_resources is deprecated in favor of importlib.resources
and importlib.metadata.
Some useful APIs are also provided by packaging (e.g. requirements and version
parsing). Users should refrain from new usage of pkg_resources and should work
to port to importlib-based solutions.
Python 3.13 in unstable provides both importlib.resources and
importlib.metadata, so no additional dependencies on those packages are needed.
If the package is a namespace package, then please lower
the severity again to normal.
More information about the Debian-astro-maintainers
mailing list