This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
tox 4.x and tox-pyenv: ImportError: cannot import name 'hookimpl' from 'tox' #22
Comments
I was able to solve it (without tox-pyenv): |
tox 4 delegates the Python discovery job to virtualenv: https://tox.wiki/en/latest/plugins.html#tox-get-python-executable A special tox plugin like this is no longer needed. I just released a new version of the virtualenv-pyenv discovery plugin that is compatible with tox 4. How to migrate:
Sorry for the self-promotion. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Looks like the current release 1.1.0 does NOT play nicely with tox 4.x.
In addition to the bug documented here:
#21
On adding the "py" package, the next error uncovered is:
(tox) root@9cb1a471f174:~# tox --version
ROOT: No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini at /root
Traceback (most recent call last):
File "/root/tox/bin/tox", line 8, in
sys.exit(run())
File "/root/tox/lib/python3.8/site-packages/tox/run.py", line 19, in run
result = main(sys.argv[1:] if args is None else args)
File "/root/tox/lib/python3.8/site-packages/tox/run.py", line 38, in main
state = setup_state(args)
File "/root/tox/lib/python3.8/site-packages/tox/run.py", line 53, in setup_state
options = get_options(*args)
File "/root/tox/lib/python3.8/site-packages/tox/config/cli/parse.py", line 38, in get_options
guess_verbosity, log_handler, source = _get_base(args)
File "/root/tox/lib/python3.8/site-packages/tox/config/cli/parse.py", line 61, in _get_base
MANAGER.load_plugins(source.path)
File "/root/tox/lib/python3.8/site-packages/tox/plugin/manager.py", line 83, in load_plugins
self._register_plugins(inline)
File "/root/tox/lib/python3.8/site-packages/tox/plugin/manager.py", line 37, in _register_plugins
self.manager.load_setuptools_entrypoints(NAME)
File "/root/tox/lib/python3.8/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
plugin = ep.load()
File "/root/.pyenv/versions/3.8.13/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/root/.pyenv/versions/3.8.13/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/tox/lib/python3.8/site-packages/tox_pyenv.py", line 48, in
from tox import hookimpl as tox_hookimpl
ImportError: cannot import name 'hookimpl' from 'tox' (/root/tox/lib/python3.8/site-packages/tox/init.py)
The text was updated successfully, but these errors were encountered: