-
-
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
fix: Require Pydantic 1.10.2 when Python is 3.11 #279
Conversation
If I'm reading this correctly, there is no single version of Pydantic that pygls can use which is compatible with all supported versions of Python? It looks like you have it set so that Python 3.10 and older use Pydantic 1.9.1 or 1.9.2, while Python 3.11 is 1.10 or newer. Is Pydantic 1.10 not usable for Python 3.7 - 3.10? |
Or put another way, upper bounds on dependencies is typically considered bad practice for libraries. I can find you a blog post reference if you want all the gory details. |
I fully agree it's bad practice. The main excuse is that we are close to releasing a major version bump that completely removes Pydantic: #273. It certainly may be possible to release Pygls with a single version of I'm curious if those points didn't come across clearly in #234? If I misunderstood something or moved too hastily, it'd be good to know. At the very least I would hope that Pygls isn't adding more unnecessary inconveniences of bad practice to the ecosystem. |
Right, but you haven't released it yet and it seems far out enough you are making this fix. 😉 If you weren't bothering with the fix I would understand, but if you are then folks like us are going to take this fixed release and bump up against issues if you install a single version of pygls to service multiple versions of Python (e.g. we install a copy copy of pygls for our Black formatter extension in VS Code that needs to work across Python 3.7 - 3.11; this PR technically means we can't get a version of pydantic in there that meets that criteria with pygls). |
This finally gives us Python 3.11 support.
See #234 for more discussion.
- [ ] [CONTRIBUTORS.md][contributors] was updated, as appropriate