15.1.0: pytest fails onscanning units
kloczek opened this issue · 5 comments
kloczek commented
python 3.9.18 and pytest 8.1.1.
Looks like last release is no t ready for env with that pair.
+ /usr/bin/pytest -ra
Traceback (most recent call last):
File "/usr/bin/pytest", line 8, in <module>
sys.exit(console_main())
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 197, in console_main
code = main()
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 155, in main
config = _prepareconfig(args, plugins)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 337, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/usr/lib/python3.9/site-packages/pluggy/_hooks.py", line 501, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 119, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 138, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 121, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/usr/lib/python3.9/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
config = yield
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 102, in _multicall
res = hook_impl.function(*args)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1143, in pytest_cmdline_parse
self.parse(args)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1492, in parse
self._preparse(args, addopts=addopts)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1379, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 414, in load_setuptools_entrypoints
plugin = ep.load()
File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "/usr/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
exec(co, module.__dict__)
File "/home/tkloczko/rpmbuild/BUILDROOT/python-mimesis-15.1.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/mimesis/__init__.py", line 10, in <module>
from mimesis import keys
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "/usr/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
exec(co, module.__dict__)
File "/home/tkloczko/rpmbuild/BUILDROOT/python-mimesis-15.1.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/mimesis/keys.py", line 11, in <module>
from mimesis.locales import Locale, validate_locale
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "/usr/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
exec(co, module.__dict__)
File "/home/tkloczko/rpmbuild/BUILDROOT/python-mimesis-15.1.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/mimesis/locales.py", line 4, in <module>
from mimesis.exceptions import LocaleError
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "/usr/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
exec(co, module.__dict__)
File "/home/tkloczko/rpmbuild/BUILDROOT/python-mimesis-15.1.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/mimesis/exceptions.py", line 8, in <module>
class LocaleError(ValueError):
File "/home/tkloczko/rpmbuild/BUILDROOT/python-mimesis-15.1.0-2.fc36.x86_64/usr/lib/python3.9/site-packages/mimesis/exceptions.py", line 11, in LocaleError
def __init__(self, locale: Locale | str) -> None:
TypeError: unsupported operand type(s) for |: 'EnumMeta' and 'type'
lk-geimfari commented
Please, have a look: https://mimesis.name/en/master/installation.html#compatibility
lk-geimfari commented
I'm closing this issue. I reccomend that you downgrade your Mimesis version or upgrade Python.
kloczek commented
Issue is that only this year 3.8 will be EOSed, and 3.9 in 2025/10.
lk-geimfari commented
I understand that. But, anyway, there are no plans to support Python lower than 3.10.
kloczek commented
OK.
Soon will be moving to 3.10 because ATM it is not possible to build whole distro with desktop support without +3.10 (mesa requires some rust tools which is possible to build only with python +3.10).