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

Comments

@harpaj
Copy link

@harpaj 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.

@gaborbernat
Copy link
Member

@gaborbernat 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

@rpkilby
Copy link
Member

@rpkilby 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 added a commit to gaborbernat/tox that referenced this issue Mar 29, 2019
@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Mar 29, 2019

@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.

gaborbernat added a commit to gaborbernat/tox that referenced this issue Mar 29, 2019
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants