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

[BUG] using -v and -e connected (as -ve) fails in 3.8.0 #1218

Closed
harpaj opened this issue Mar 28, 2019 · 3 comments
Closed

[BUG] using -v and -e connected (as -ve) fails in 3.8.0 #1218

harpaj opened this issue Mar 28, 2019 · 3 comments
Labels
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@harpaj
Copy link

harpaj commented Mar 28, 2019

In our CI environment, we start tox like tox -vve py27.
This worked before the release of 3.8.0 without problems, but now fails with this error:

$ tox -vve py27
usage: tox [-v] [-q]
tox: error: argument -v: ignored explicit argument 'e'

tox -vv -e py27 still works without problem, so it's not a big issue; but as it breaks backwards compatibility, it might at least warrant a message in the release notes.

@harpaj harpaj added the bug:normal affects many people or has quite an impact label Mar 28, 2019
@gaborbernat
Copy link
Member

gaborbernat commented Mar 28, 2019

😢 seems https://docs.python.org/3.4/library/argparse.html#argparse.ArgumentParser.parse_known_args is not smart enough to parse that; we'll need to catch the error and ignore it (while redirecting the output to null - as the error message is non optional) - related section https://github.com/tox-dev/tox/blob/master/src/tox/session/__init__.py#L45-L52

@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label Mar 28, 2019
@rpkilby
Copy link
Member

rpkilby commented Mar 29, 2019

The prefix matching behavior can be disabled in Python 3.5+ with allow_abbrev=False. Of course, this doesn't help Python 3.4 and earlier, but Python 3.4 is now EOL and Python 2.7 is EOL at the end of the year? Meh? ¯\_(ツ)_/¯

@gaborbernat
Copy link
Member

@rpkilby sadly that does not help us, disable-ing the abbreviation will also disable detecting the -v flags passed in the above which is the whole goal. At that point, we might just suppress the error.

@tox-dev tox-dev 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
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

3 participants