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

Apply workaround for multiple short options for Python <= 3.8 #5526

Merged
merged 2 commits into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ jobs:
- env: TOXENV=py37-pluggymaster-xdist
- env: TOXENV=py37-freeze

# Jobs only run via Travis cron jobs (currently daily).
- env: TOXENV=py38-xdist
python: '3.8-dev'
if: type = cron

- stage: baseline
env: TOXENV=py36-xdist
Expand Down
1 change: 1 addition & 0 deletions changelog/5523.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+.
2 changes: 1 addition & 1 deletion src/_pytest/config/argparsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def parse_args(self, args=None, namespace=None):
getattr(args, FILE_OR_DIR).extend(argv)
return args

if sys.version_info[:2] < (3, 8): # pragma: no cover
if sys.version_info[:2] < (3, 9): # pragma: no cover
# Backport of https://github.com/python/cpython/pull/14316 so we can
# disable long --argument abbreviations without breaking short flags.
def _parse_optional(self, arg_string):
Expand Down