-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
parse_known_args broken in python 3.12.8+ and 3.13.1+ #641
Labels
bug
Something isn't working
Comments
I am having the same issue, was able to fix by installing with python 3.12.7 |
Yes, I will fix it as soon as I can. Though I am currently traveling and unable to work on it. Probably I could create a release around Friday. |
Sounds good, thank you! |
FYI in the meantime I merged a change that patches the problem directly in PyTorch Lightning |
cody-mar10
added a commit
to cody-mar10/jsonargparse
that referenced
this issue
Dec 12, 2024
4 tasks
waldbaer
added a commit
to waldbaer/e3dc-cli
that referenced
this issue
Dec 16, 2024
In order to fix omni-us/jsonargparse#641
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug report
I'm using jsonargparse[signatures] via pytorch lightning, and found today that their CLI tool errors out with the following message:
I traced the issue to a change in the private interface method
_parse_known_args
from cpython's argparse package. This method is called by jsonargparse here:jsonargparse/jsonargparse/_core.py
Line 264 in 42c1cae
however, the upstream implementation of this function now expects a third mandatory positional argument,
intermixed
:https://github.com/python/cpython/blob/2dc476bcb9142cd25d7e1d52392b73a3dcdf1756/Lib/argparse.py#L1954
Although this is a breaking change after 15 years of stability, since that is a private method, I suppose the bug report belongs here rather than in cpython.
The relevant upstream issue can be found here: python/cpython/issues/125355
And the particular commits can be found here: python/cpython@da3d81d (python 3.12) and here: python/cpython@1fe63b1 (python 3.13)
To reproduce
Sorry I don't have a minimal standalone example, but it can be easily reproduced via pytorch lightning. Here's a simple main.py:
pip install lightning==2.4.0 pip install "jsonargparse[signatures]==4.34.1" python main.py
should exit with the error I described above
Expected behavior
It should not crash
Environment
The text was updated successfully, but these errors were encountered: