You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The argparse module misparses options in certain complex situations. I am not sure what the exact prerequisites are, but Qubes OS does manage to trigger the issue. QubesOS/qubes-core-admin-client#214 has the details. Sorry for the lack of a minimal reproducer.
Edit: One case where the bug happens is when an option X (which takes an optional argument) is followed by an optional positional parameter, and the two are mutually exclusive. Argparse thinks that --dispvm A B C is --dispvm=A -- B C and considers B to be the optional positional parameter. Since it is mutually incompatible with --dispvm, an exception is thrown.
Your environment
CPython versions tested on: 3.8 through 3.10 inclusive
Operating system and architecture: Linux x86_64
The text was updated successfully, but these errors were encountered:
If I understand this correctly, the original issue was fixed in #81691 and #53780.
The case mentioned in the second paragraph seems unrelated to the bug and is a new feature request. Please open a new issue if you still want it to be implemented. Please be more concrete in the title and provide more details of expected behavior, preferably with a sample code.
Uh oh!
There was an error while loading. Please reload this page.
Bug report
The argparse module misparses options in certain complex situations. I am not sure what the exact prerequisites are, but Qubes OS does manage to trigger the issue. QubesOS/qubes-core-admin-client#214 has the details. Sorry for the lack of a minimal reproducer.
Edit: One case where the bug happens is when an option X (which takes an optional argument) is followed by an optional positional parameter, and the two are mutually exclusive. Argparse thinks that
--dispvm A B C
is--dispvm=A -- B C
and considersB
to be the optional positional parameter. Since it is mutually incompatible with--dispvm
, an exception is thrown.Your environment
The text was updated successfully, but these errors were encountered: