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

'virtualenv.version' has no attribute 'version' in test_virtualenv.py #779

Closed
nieder opened this issue Feb 22, 2024 · 1 comment · Fixed by #782
Closed

'virtualenv.version' has no attribute 'version' in test_virtualenv.py #779

nieder opened this issue Feb 22, 2024 · 1 comment · Fixed by #782
Labels

Comments

@nieder
Copy link

nieder commented Feb 22, 2024

Current Behavior

running the tests for 2023.4.22, I get this error:

______________________________________________________________ ERROR collecting tests/test_virtualenv.py ______________________________________________________________
tests/test_virtualenv.py:35: in <module>
    VIRTUALENV_VERSION = virtualenv.version.version
E   AttributeError: module 'virtualenv.version' has no attribute 'version'

virtualenv.version doesn't have 'version', but does have '__version__'

Expected Behavior

No response

Steps To Reproduce

$ /sw/bin/python3.10
Python 3.10.4 (main, Feb 18 2023, 04:48:29) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import virtualenv
>>> print(virtualenv.version.version)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'virtualenv.version' has no attribute 'version'
>>> print(virtualenv.version.__version__)
20.13.0
>>> 

Environment

- OS: macOS 10.14.6
- Python: 3.8 and 3.10
- Nox: 2023.4.22

Anything else?

No response

@nieder nieder added the bug label Feb 22, 2024
@henryiii
Copy link
Collaborator

That seem fine in main, though we shouldn't be getting the version like that, we should be using importlib.metadata.version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants