-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
In python 3.11, add_subclass_arguments with list[Class] is not working. #456
Labels
bug
Something isn't working
Comments
Merged
8 tasks
harimkang
changed the title
In python 3.11, add_subclass_arguments with list[Optimizer] is not working.
In python 3.11, add_subclass_arguments with list[Class] is not working.
Feb 22, 2024
Thank you for reporting! It does seem to be a bug. I will look at it. |
mauvilsa
added a commit
that referenced
this issue
Feb 25, 2024
…rom_function from a classmethod without parameter types (#456).
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug report
Hi all, I'm working on a project that utilizes this great library.
However, I ran into a problem with python 3.11.
I've been configuring arguments like the one above in project, which is mainly python 3.10 (& 3.9), but this doesn't work since python 3.11.
The reason for this is that as of python 3.11,
list[Optimizer]
is False ininspect.isclass()
.jsonargparse/jsonargparse/_signatures.py
Lines 502 to 503 in 88fc9c8
If I comment out that if statement and the raise statement, this works fine.
Do I need to use a different method to use
list[Optimizer]
orlist[Scheduler]
?This used to work in python 3.9 and 3.10, but a new workaround is needed in 3.11.
I was wondering if could relax that if statement to make it more flexible.
To reproduce
Expected behavior
Environment
pip install jsonargparse[all]
):The text was updated successfully, but these errors were encountered: