Open
Description
Using mail_parser I guess.
Rationale:
- remove the
email-validator
optional dependency from pydantic, and its descendant dependencies -dnspython
andidna
- should be faster
- the
NameEmail
"My Name <[email protected]>"
parsing can be improved, seeNameEmail
should support quoted names pydantic#3173 - rust is much better for this kind of parsing than python (actually looks likemail_parser
supports this out of the box)
We just need to make sure that adding mail_parser
dependency doesn't significantly increase binary size - any one working on this. I encourage you to do a very simple POC implementation, create a PR and ask us to add the "Full Build" lable to see how much binary size has increased before completing the PR, in case we have to abandon the idea due to this.
To be clear we need two validators EmailValidator
and NameEmailValidator
which will be represented by EmailStr
and NameEmail
in pydantic.