Skip to content
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

[REF-3266] Check for pydantic v1 outside of try/except #3643

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

masenf
Copy link
Collaborator

@masenf masenf commented Jul 9, 2024

If pydantic v1 is already installed, there is no reason to restore the original pydantic modules, which seems to introduce subtle incompatibilities with some pydantic versions.

Perform the pydantic version check early on and exit for v1 before doing anything with the sys.modules.

Fix #3642

If pydantic v1 is already installed, there is no reason to restore the original
pydantic modules, which seems to introduce subtle incompatibilities with some
pydantic versions.

Perform the pydantic version check early on and exit for v1 before doing
anything with the sys.modules.

Fix #3642
Copy link

linear bot commented Jul 9, 2024

@masenf masenf merged commit 1cfc811 into main Jul 10, 2024
47 checks passed
@masenf masenf deleted the masenf/pydantic-v1.10-compat branch July 10, 2024 19:28
Alek99 pushed a commit that referenced this pull request Jul 15, 2024
If pydantic v1 is already installed, there is no reason to restore the original
pydantic modules, which seems to introduce subtle incompatibilities with some
pydantic versions.

Perform the pydantic version check early on and exit for v1 before doing
anything with the sys.modules.

Fix #3642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REF-3266] AttributeError: 'ModelPrivateAttr' object has no attribute 'update'
2 participants