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 prints spurious error as of 20.0.24 #1885

Closed
benkehoe opened this issue Jul 3, 2020 · 2 comments · Fixed by #1886
Closed

virtualenv --version prints spurious error as of 20.0.24 #1885

benkehoe opened this issue Jul 3, 2020 · 2 comments · Fixed by #1886
Labels

Comments

@benkehoe
Copy link

benkehoe commented Jul 3, 2020

Issue

When running virtualenv --version, a logger error is printed to stderr, though the return code is still 0.

Environment

Tested with Python 3.7 and 3.8, virtualenvs managed with pipenv
Ubuntu 18.04 on WSL

$ rm-rf tmp && mkdir tmp && cd tmp
$ pipenv install "virtualenv==20.0.23"
$ pipenv run virtualenv --version
virtualenv 20.0.23 from tmp/.venv/lib/python3.7/site-packages/virtualenv/__init__.py

$ rm-rf tmp && mkdir tmp && cd tmp
$ pipenv install "virtualenv==20.0.24"
$ pipenv run virtualenv --version
virtualenv 20.0.24 from tmp/.venv/lib/python3.7/site-packages/virtualenv/__init__.py
ERROR:root:SystemExit: 0
$ pipenv run virtualenv --version > /dev/null
ERROR:root:SystemExit: 0
$ echo $?
0

Nothing else is printed with -vvv --with-traceback

@benkehoe
Copy link
Author

benkehoe commented Jul 4, 2020

Quick followup question: is it intended behavior for it to print out virtualenv 20.0.24 from tmp/.venv/lib/python3.7/site-packages/virtualenv/__init__.py when previous major versions before 20 simply printed the version number? I ask because I discovered this when a script I don't own broke as it parsed the output expecting a bare version number.

@gaborbernat
Copy link
Contributor

It's expected, and the new contract with version 20.

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants