-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Why Pydantic? #221
Comments
I'd also like to know why |
@doronbehar < 1.9 version add by this PR: #148 |
That PR is missing an explanation why the version was limited to < 1.9. Current upstream version is 1.9. |
There's quote of PR's description:
limited to < 1.9 broke our (NixOS packages) |
This affects packages that use There is no way to have VS Code autocomplete (Pydantic 1.9.0) and the Esbonio language server (for documentation using Sphinx) running at the same time. |
update other dependencies, including dev depenedencies
Sort of vaguely related, I just added pygls to CrossHair. (really thankful for this package!) But since CrossHair needs to run in the developer's Python environment, it's most likely to work when pygls has few dependencies and has few restrictions on dependency versions. (else they'll conflict with the developer's project) Finally, this is an esoteric use case, so I don't think my vote should matter that much! |
Latest master now specifies |
imo best practice is what I did in #148: set an upper bound at the point where it is reasonable to believe that breaking changes would be likely to happen. That's the way to protect your users from unexpected breakage if and when pydantic (or whatever) does release a breaking change. However, I acknowledge that
|
Thanks for the reply @dimbleby So it looks like we're going to be completely removing Pydantic in the upcoming #273 release. So I'm not sure how relevant this issue is now? But there's 2 separate themes I'm still curious about.
No need to answer these unless anything obvious comes up. Just wondering out loud about the general expectations in the Python ecosystem. Either way, the fact that Pydantic seems to make breaking changes on minor version bumps would be a faux pas in any ecosystem. |
pydantic is just an example of the general question: this project has other dependencies and will continue to have to decide whether or not to put upper bounds on those dependencies. There are pros and cons, which I tried to set out fairly above. vendoring is typically an exceptional-circumstances-only choice in the python world. |
Pygls has now migrated to |
Is there any reason why you use Pydantic internally? Compared to attrs+cattrs it's at least 5 times slower and doesn't provide any benefits.
https://stefan.sofa-rockers.org/2020/05/29/attrs-dataclasses-pydantic/
https://threeofwands.com/why-i-use-attrs-instead-of-pydantic/
The text was updated successfully, but these errors were encountered: