pyxdg-0.28 fails tests with python-3.12

Andrey G. Grozin A.G.Grozin at inp.nsk.su
Sat Oct 28 13:21:50 UTC 2023


python3.12 -m pytest -vv -ra -l -Wdefault --color=yes -o
console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p 
no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:pytest-describe -p plus -p
no:no:tavern
========================================================= test session starts
=========================================================
platform linux -- Python 3.12.0, pytest-7.4.3, pluggy-1.3.0 --
/var/tmp/portage/dev-python/pyxdg-0.28/work/pyxdg-rel-0.28-python3_12/install/usr/bin/python3.12
cachedir: .pytest_cache
hypothesis profile 'default' ->
database=DirectoryBasedExampleDatabase(PosixPath('/var/tmp/portage/dev-python/pyxdg-0.28/work/pyxdg-rel-0.28/.hypothesis/examples'))
rootdir: /var/tmp/portage/dev-python/pyxdg-0.28/work/pyxdg-rel-0.28
plugins: timeout-2.2.0, anyio-4.0.0, hypothesis-6.88.1, pkgcore-0.12.23
collecting ... collected 49 items / 1 error

=============================================================== ERRORS
================================================================
_____________________________________________ ERROR collecting
test/test_basedirectory.py _____________________________________________
ImportError while importing test module
'/var/tmp/portage/dev-python/pyxdg-0.28/work/pyxdg-rel-0.28/test/test_basedirectory.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test/test_basedirectory.py:10: in <module>
     reload
E   NameError: name 'reload' is not defined

During handling of the above exception, another exception occurred:
/usr/lib/python3.12/site-packages/_pytest/python.py:617: in _importtestmodule
     mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/lib/python3.12/site-packages/_pytest/pathlib.py:567: in import_path
     importlib.import_module(module_name)
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1381: in _gcd_import
     ???
<frozen importlib._bootstrap>:1354: in _find_and_load
     ???
<frozen importlib._bootstrap>:1325: in _find_and_load_unlocked
     ???
<frozen importlib._bootstrap>:929: in _load_unlocked
     ???
/usr/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:186: in
exec_module
     exec(co, module.__dict__)
test/test_basedirectory.py:12: in <module>
     from imp import reload
E   ModuleNotFoundError: No module named 'imp'
======================================================= short test summary info
=======================================================
ERROR test/test_basedirectory.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during
collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


More information about the xdg mailing list