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

Command line parsing error with Python 3.8 #5523

Closed
thorstenkampe opened this issue Jun 29, 2019 · 7 comments

Comments

Projects
None yet
5 participants
@thorstenkampe
Copy link

commented Jun 29, 2019

  • a detailed description of the bug or suggestion
    Command line parsing error with Python 3.8 when concatenating short options
  • pytest and operating system versions
    Pytest 5.0.0, Python 3.8.0b1, Windows 10
  • minimal example if possible
> pytest -vx
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -vx
  inifile: None
  rootdir: F:\Documents\Scripts\Runscript

pytest -v -x works

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jun 29, 2019

Hmmm indeed we only apply a workaround for that Python bug in Python < 3.8:

if sys.version_info[:2] < (3, 8): # pragma: no cover

@Zac-HD any thoughts? Perhaps we should use < 3.9 until the patch lands and a new 3.8 gets released?

@Zac-HD

This comment has been minimized.

Copy link
Member

commented Jun 29, 2019

Sure - we should probably drop in an assertion that we're running on Python < 3.9 too, with a message that will remind us what to follow up on if it's slipped until then 😄

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jun 29, 2019

Do you have some time to get to this later @Zac-HD? If you don't I can pick it up later in the weekend.

@Zac-HD

This comment has been minimized.

Copy link
Member

commented Jun 29, 2019

Probably not sorry - family commitments all Sunday and a lot of writing I'm already behind on...

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jun 29, 2019

No worries, thanks!

@nicoddemus nicoddemus self-assigned this Jun 29, 2019

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jun 29, 2019

Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix pytest-dev#5523

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jun 29, 2019

Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix pytest-dev#5523

@hugovk hugovk referenced this issue Jul 2, 2019

Closed

Python 3.8: error: unrecognized arguments: -rs #5536

4 of 4 tasks complete

hroncok added a commit to hroncok/pluggy that referenced this issue Jul 2, 2019

hroncok added a commit to hroncok/pluggy that referenced this issue Jul 2, 2019

@nicoddemus nicoddemus pinned this issue Jul 3, 2019

hroncok added a commit to hroncok/pytest that referenced this issue Jul 4, 2019

Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix pytest-dev#5523

hroncok added a commit to hroncok/pytest that referenced this issue Jul 4, 2019

Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix pytest-dev#5523
@asottile

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

going to unpin since 5.0.1 is out 👍

@asottile asottile unpinned this issue Jul 7, 2019

@encukou

This comment has been minimized.

Copy link

commented Jul 14, 2019

The Python fix should get into the upcoming 3.8 beta 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.