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
Depending on email-validator>=2 is backwards incompatible #8196
Comments
Version was bumped because of #3772.
I'm not sure I understand, I don't see any dependency to
There's an open PR to add a version check (that could prevent breaking user code without them knowing it): #6033 |
@Viicos it's a transitive dependency; Airflow depends on |
Best would be to have |
@Viicos you're definitely right - not really looking for |
Also related: #6033. Can clean that up and work on getting that across the line today. |
Initial Checks
Description
Pydantic v1 has code to check whether the installed version of
email-validator
is 1 or 2 and act accordingly. On the other hand, Pydantic v2 only works withemail-validator>=2
, which is a backwards incompatible change that is not in the migration guide, which seems like a bug to me. IMO, there're two possible resolutions to this issue:email-validator<2
(and therefore drop the constraint in the optional dependency)email-validator<2
installed and upgraded to Pydantic 2, your code will breakThis is not directly relevant, but I would really prefer 1, because currently I have Airflow, FastAPI, and Pydantic 2 installed in the same
pyproject.toml
. Airflow is preventing me from updatingemail-validator
, and FastAPI's/docs
endpoint is not displaying because it depends on Pydantic 2'sEmailStr
, which breaks withemail-validator<2
.Example Code
No response
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: