Skip to content

Commit

Permalink
Apply workaround for multiple short options for Python <= 3.8 (#5526)
Browse files Browse the repository at this point in the history
Apply workaround for multiple short options for Python <= 3.8
  • Loading branch information
nicoddemus authored Jun 29, 2019
2 parents d4a76a0 + 94a05e5 commit 497cd87
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
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

0 comments on commit 497cd87

Please sign in to comment.