Bug#1147555: dolfin: using the removed pkg_resources module in the autopkg tests, also stderr output

Matthias Klose doko at debian.org
Sun Sep 13 06:30:40 BST 2026


Package: src:dolfin
Version: 2019.2.0~legacy20240219.1c52e83-30
Severity: serious
Tags: sid forky
User: debian-python at lists.debian.org
Usertags: pkg-resources-deprecation

using the removed pkg_resources module in the autopkg tests, please also 
see the stderr output:

[...]

6104s DEPRECATION: the --wheel and --no-wheel options do nothing; 
virtualenv no longer bundles wheel. They will be removed in a release 
after 2026-12. Stop passing them.
6104s _ 
test_dolfin_import_success_with_allowed_local_packages[dependencies_import_name0-dependencies_pypi_name0] 
_
6104s
6104s dependencies_import_name = ['ufl_legacy']
6104s dependencies_pypi_name = ['fenics-ufl-legacy']
6104s
6104s     @pytest.mark.skipif(not has_internet, reason="Requires 
downloading from pypi.org")
6104s 
@pytest.mark.parametrize("dependencies_import_name,dependencies_pypi_name", 
[
6104s         (["ufl_legacy"], ["fenics-ufl-legacy"]),
6104s         (["ufl"], ["fenics-ufl"])
6104s     ])
6104s     def test_dolfin_import_success_with_allowed_local_packages(
6104s         dependencies_import_name: typing.List[str], 
dependencies_pypi_name: typing.List[str]
6104s     ) -> None:
6104s         """Test that dolfin imports correctly even with extra 
local packages when asked to allow user-site imports."""
6104s >       assert_package_import_success_with_allowed_local_packages(
6104s             "dolfin", 
"/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py",
6104s             dependencies_import_name, dependencies_pypi_name, 
pip_install_call
6104s         )
6104s
6104s python/test/debian-only/test_pusimp.py:79:
6104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _
6104s /usr/lib/python3/dist-packages/pusimp/utils.py:262: in 
assert_package_import_success_with_allowed_local_packages
6104s     assert_package_location(
6104s /usr/lib/python3/dist-packages/pusimp/utils.py:47: in 
assert_package_location
6104s     assert_has_package(executable, package)
6104s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _
6104s
6104s executable = '/tmp/tmpzx2unzun/venv/bin/python3', package = 
'ufl_legacy'
6104s
6104s     def assert_has_package(executable: str, package: str) -> None:
6104s         """Assert that a package is installed.
6104s
6104s         Note that it is not safe to simply import the package in 
the current pytest environment,
6104s         since the environment itself might change from one test to 
the other, but python packages
6104s         can be imported only once and not unloaded.
6104s         """
6104s         run_import = subprocess.run(f"{executable} -c 'import 
{package}'", shell=True, capture_output=True)
6104s >       assert run_import.returncode == 0, (
6104s                ^^^^^^^^^^^^^^^^^^^^^^^^^^
6104s             f"Importing {package} was not successful.\n"
6104s             f"stdout contains {run_import.stdout.decode().strip()}\n"
6104s             f"stderr contains {run_import.stderr.decode().strip()}"
6104s         )
6104s E       AssertionError: Importing ufl_legacy was not successful.
6104s E       stdout contains
6104s E       stderr contains Traceback (most recent call last):
6104s E         File "<string>", line 1, in <module>
6104s E           import ufl_legacy
6104s E         File 
"/tmp/tmpzx2unzun/venv/lib/python3.14/site-packages/ufl_legacy/__init__.py", 
line 243, in <module>
6104s E           import pkg_resources
6104s E       ModuleNotFoundError: No module named 'pkg_resources'
6104s
6104s /usr/lib/python3/dist-packages/pusimp/utils.py:32: AssertionError
6104s ----------------------------- Captured stdout call 
-----------------------------
6104s DEPRECATION: the --wheel and --no-wheel options do nothing; 
virtualenv no longer bundles wheel. They will be removed in a release 
after 2026-12. Stop passing them.
6104s =========================== short test summary info 
============================
6104s FAILED 
python/test/debian-only/test_pusimp.py::test_dolfin_import_errors_with_local_packages[dependencies_import_name0-dependencies_pypi_name0-dependencies_extra_error_message0]
6104s FAILED 
python/test/debian-only/test_pusimp.py::test_dolfin_import_errors_with_local_packages[dependencies_import_name2-dependencies_pypi_name2-dependencies_extra_error_message2]
6104s FAILED 
python/test/debian-only/test_pusimp.py::test_dolfin_import_errors_with_local_packages[dependencies_import_name3-dependencies_pypi_name3-dependencies_extra_error_message3]
6104s FAILED 
python/test/debian-only/test_pusimp.py::test_dolfin_import_success_with_allowed_local_packages[dependencies_import_name0-dependencies_pypi_name0]
6104s =================== 4 failed, 6 passed in 114.33s (0:01:54) 
====================



More information about the debian-science-maintainers mailing list