$ py.test
Plugin: helpconfig, Hook: pytest_cmdline_parse
ImportError: cannot import name 'mark_to_str' from 'allure_pytest.utils' (/home/user/.venv/lib/python3.11/site-packages/allure_pytest/utils.py)
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
config = pluginmanager.hook.pytest_cmdline_parse(
Traceback (most recent call last):
File "/home/user/.venv/bin/py.test", line 8, in <module>
sys.exit(console_main())
^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 192, in console_main
code = main()
^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 150, in main
config = _prepareconfig(args, plugins)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 331, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 512, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 167, in _multicall
raise exception
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 43, in run_old_style_hookwrapper
teardown.send(result)
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/helpconfig.py", line 104, in pytest_cmdline_parse
config: Config = outcome.get_result()
^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_result.py", line 103, in get_result
raise exc.with_traceback(tb)
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 38, in run_old_style_hookwrapper
res = yield
^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 121, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1075, in pytest_cmdline_parse
self.parse(args)
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1425, in parse
self._preparse(args, addopts=addopts)
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1305, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/home/user/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 416, in load_setuptools_entrypoints
plugin = ep.load()
^^^^^^^^^
File "/usr/local/Cellar/python@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/assertion/rewrite.py", line 186, in exec_module
exec(co, module.__dict__)
File "/home/user/.venv/lib/python3.11/site-packages/pytest_glamor_allure/plugin.py", line 12, in <module>
from glamor.patches import PatchHelper
File "/home/user/.venv/lib/python3.11/site-packages/_pytest/assertion/rewrite.py", line 186, in exec_module
exec(co, module.__dict__)
File "/home/user/.venv/lib/python3.11/site-packages/glamor/__init__.py", line 40, in <module>
from allure_pytest.utils import (
ImportError: cannot import name 'mark_to_str' from 'allure_pytest.utils' (/home/user/.venv/lib/python3.11/site-packages/allure_pytest/utils.py)
after recent [1] update of
allure-python, following exception occur when running python tests that use glamor.The mentioned
mark_to_stris not used at all in theglamorpackage, would be safe to simply delete it or would it be better to use some version based import?[1] - allure-framework/allure-python#862