-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
TypeError: issubclass() arg 1 must be a class
when upgrading to 2.5
#390
Comments
I'm having the same issue with python3.10 and pydantic_settings 2.5.0. This line fails for any list[XXX] fields, since
|
Thanks for reporting this issue. I try to fix the problem and prepare a new release soon. |
Just made a quick fix #392 Can you confirm that the fix is correct? |
I can confirm that it works on my config. |
Thanks @shedar for checking. It shouldn't effect other things. I will wait until tomorrow and then will prepare a patch release. |
|
It looks like the simple example provided by @antazoey is still failing with |
The example can even be simplified to: from pydantic_settings import BaseSettings
class Bar(BaseSettings):
foo: list[str] = []
cfg = Bar() This fails with |
I created the second patch to fix the problem. Thanks all for reporting! |
|
Thanks for this having looked at this quickly @hramezani. It also affected some of the software stack we are using. I will check if 2.5.2 indeed solves our issues. Maybe versions 2.5.0 and 2.5.1 could/should be yanked on pypi ? |
Thanks @davidwaroquiers for confirming. I think we don't need to yank the previous version |
Hi @hramezani, Seems that 2.5.2 indeed solves our issues. Thanks again, Best, David |
Confirmed 2.5.2 fixed it for us. |
Thasnk all for reporting and helping to resolve the bug. |
Hello,
Ever since 2.5 was released, all of our CI/CD fails on Python 3.9 and 3.10 with the following error:
We are using a config setup like the following (simple reproduction):
^ When I run the above script, I basically get the same error as ours. I tried to make it as simple as possible.
The text was updated successfully, but these errors were encountered: