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

Crashes on Python 3.11 #234

Closed
Bobronium opened this issue May 29, 2022 · 14 comments
Closed

Crashes on Python 3.11 #234

Bobronium opened this issue May 29, 2022 · 14 comments

Comments

@Bobronium
Copy link

Bobronium commented May 29, 2022

Official support for python 3.10 was added only to pydantic in version 1.9, however in lib requirements lower version is pinned:

install_requires = pydantic>=1.7,<1.9; typeguard>=2.10.0,<3

Might be fixed in #229
Causes microsoft/vscode-black-formatter#67

Initially I thought it crashes on Python 3.10, but as it turned out, I got it wrong.

@pfmoore
Copy link

pfmoore commented Oct 24, 2022

Is there any progress on Python 3.11 support? With the official release in a day or so, this (or more specifically the related issue in vscode-isort) will become a more significant problem.

@karthiknadig
Copy link
Contributor

@tombh @alcarney Can this issue be prioritized, this is currently impacting about 8 different servers? We might need a temporary solution until pygls 1.0.0 can hit final release.

@tombh
Copy link
Collaborator

tombh commented Oct 24, 2022

I have time today, I'll look into it and either fix it or find a temporary workaround.

BTW, what are those servers?

@karthiknadig
Copy link
Contributor

Following are from Microsoft:

@tombh
Copy link
Collaborator

tombh commented Oct 24, 2022

Quick question, it seems like the fix is to set pydantic>=1.10.2 in order to include their pydantic/pydantic#4012 PR. It seems easy, so I'm wondering if this wasn't suggested before because upgrading Pydantic would break other projects' dependencies?

BTW thanks for the list, could we add them to https://github.com/openlawlibrary/pygls/blob/master/Implementations.md ?

@karthiknadig
Copy link
Contributor

Looking at other issues, it seems like potential breaking changes in pydantic were the reason.

@tombh
Copy link
Collaborator

tombh commented Oct 24, 2022

So how about if Pygls set its dependency to pydantic>=1.19.1,<=1.10.2? I'm not familiar enough with Python to know if that's helpful? The idea being that most users will remain unaffected, but that if somebody really needs to use Python 3.11 then they'll need to explicitly install Pydantic 1.10.2.

@brettcannon
Copy link
Contributor

So how about if Pygls set its dependency to pydantic>=1.19.1,<=1.10.2? I'm not familiar enough with Python to know if that's helpful?

You can also do pydantic!=1.9.2,!=1.10.1 .

@brettcannon
Copy link
Contributor

You can also specify that Python 3.11 needs a newer version with pydantic>=1.10.2; python_version>=3.11

@tombh
Copy link
Collaborator

tombh commented Oct 24, 2022

Made PR at #279 If it all looks good I can publish today.

@karthiknadig
Copy link
Contributor

#279 looks good

@tombh tombh closed this as completed in 00790cb Oct 24, 2022
@tombh
Copy link
Collaborator

tombh commented Oct 24, 2022

Released https://pypi.org/project/pygls/0.12.3 🚀

@karthiknadig
Copy link
Contributor

@tombh I have a PR to loosen the upper bound on python <3.11 for pydantic, #280 . The upper bound on py<3.11 means that there is no pydantic version that woks for all 3.7-3.11.

@brettcannon
Copy link
Contributor

FYI Python 3.11.0 is now out: https://www.python.org/downloads/release/python-3110/ .

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

No branches or pull requests

5 participants