Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing locally due to missing py dependency #126

Closed
ddriddle opened this issue Jan 31, 2023 · 2 comments · Fixed by #128
Closed

Tests failing locally due to missing py dependency #126

ddriddle opened this issue Jan 31, 2023 · 2 comments · Fixed by #128
Assignees
Labels
blocker Other effort is blocked by this need bug Something isn't working

Comments

@ddriddle
Copy link
Collaborator

ddriddle commented Jan 31, 2023

Unit tests are failing to run locally due to a missing py package:

$ python -m venv venv
(venv) $ source venv/bin/activate
(venv) $ make deps-posix
(venv) $ make
...
tox -e wheel --notest --installpkg dist/awscli_login-0.2b2.dev25-py3-none-any.whl -vv
ROOT: 140 D setup logging to DEBUG on pid 66813 [tox/report.py:221]
Traceback (most recent call last):
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/bin/tox", line 8, in <module>
    sys.exit(run())
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/run.py", line 19, in run
    result = main(sys.argv[1:] if args is None else args)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/run.py", line 38, in main
    state = setup_state(args)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/run.py", line 53, in setup_state
    options = get_options(*args)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/config/cli/parse.py", line 38, in get_options
    guess_verbosity, log_handler, source = _get_base(args)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/config/cli/parse.py", line 61, in _get_base
    MANAGER.load_plugins(source.path)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/plugin/manager.py", line 90, in load_plugins
    self._register_plugins(inline)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox/plugin/manager.py", line 38, in _register_plugins
    self.manager.load_setuptools_entrypoints(NAME)
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/Users/ddriddle/.pyenv/versions/3.9.13/lib/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 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/ddriddle/src/github.com/techservicesillinois/awscli-login/venv/lib/python3.9/site-packages/tox_pyenv.py", line 47, in <module>
    import py
ModuleNotFoundError: No module named 'py'
make: *** [Makefile:59: .tox/wheel/pyvenv.cfg] Error 1
@ddriddle
Copy link
Collaborator Author

This error is caused by using tox-pyenv with tox 4.4.3. Unfortunately tox-pyenv has not seen a new release since 2017, and is documented to not work with tox 4.x here tox-dev/tox-pyenv#21 and here tox-dev/tox-pyenv#22.

ddriddle added a commit to ddriddle/awscli-login that referenced this issue Jan 31, 2023
* Drop incompatible and unsupported tox-pyenv

Closes techservicesillinois#126
@ddriddle ddriddle self-assigned this Jan 31, 2023
@ddriddle ddriddle added bug Something isn't working blocker Other effort is blocked by this need labels Jan 31, 2023
@ddriddle
Copy link
Collaborator Author

Simply removing tox-pyenv appears to resolve all issues. make and make tox both work fine without the plugin. It appears that modern versions of tox have better built in support for pyenv:

https://brandonrozek.com/blog/pyenvtox/

ddriddle added a commit that referenced this issue Jan 31, 2023
* Drop incompatible and unsupported tox-pyenv

Closes #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Other effort is blocked by this need bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant