pyxdg-0.28 fails tests with python-3.12
Andrey G. Grozin
A.G.Grozin at inp.nsk.su
Sat Oct 28 16:01:19 UTC 2023
On Sat, 28 Oct 2023, Andrey G. Grozin wrote:
> The problem becomes clear. test_basedirectory.py contains the line
>
> from imp import reload
>
> with python3.11, it generates a deprecation warning: the module imp is
> deprecated, and will be removed in python3.12. Now in python3.12 it *has*
> been removed. And, instead of a warning, we get a fatal error.
Simply replacing
from imp import reload
by
from importlib import reload
solves the problem. Now the tests pass successfully. But 5 new deprecation
warnings are produced:
DeprecationWarning: ast.Str is deprecated and will be removed in Python
3.14; use ast.Constant instead
Probably, it would be better not to wait until things will break again (in
python3.14), but to fix this new problem now.
Andrey
More information about the xdg
mailing list