-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
AttributeError with pydantic 2.10.0 & 2.10.1 (fixed in 2.10.2) #411
Comments
We're getting the same error. Edit: it looks like this is an issue with Pydantic 2.10 which introduced a number of regressions being actively worked on that have bubbled up to pyairtable |
I backed off to 2.9 and it's working. |
Backing off to 2.9 worked for me as well. |
Pydantic 2.10.1 still doesn't fix this issue. |
This should be fixed in 2.10.2, coming next week. The reason you are getting this issue is because the following pyairtable/pyairtable/models/_base.py Lines 124 to 135 in 34eb78e
failed to be evaluated in Pydantic <= 2.9. In 2.10, we refactored our forward annotation evaluation logic to be more correct, meaning it does evaluate the forward annotation as expected. However, this leads to a circular import because the 2.10.2 will include a fix to not evaluate forward annotations for private fields, because we don't make use of the annotation any way. |
Note that as long as these circular issues happens in private attributes, it shouldn't be an issue anymore in the next patch release. But yeah, if they are used for "normal" Pydantic fields, this is going to be an issue. |
I got a same error as above while importing pyairtable, and solved with downgrading pydantic with 2.9.2. After solving issue I could reach this post. Anyway, thanks. |
Super painful issue. This should be prioritized asap. |
2.10.2 is now released, and fixes the issue. |
Thank you for the fix, @Viicos! I'll resolve this issue now.
Heard! I don't foresee us adding any more things like this, but it'll still be an interesting mental exercise to rethink the dependency graph within the library. Thanks again for your help. |
With pydantic v2.10.0, importing pyairtable causes the following error:
This error does not occur with earlier versions of pydantic.
The text was updated successfully, but these errors were encountered: