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

Add Python 3.11 support #9441

Closed
bmw opened this issue Oct 25, 2022 · 2 comments
Closed

Add Python 3.11 support #9441

bmw opened this issue Oct 25, 2022 · 2 comments
Assignees
Labels
area: code health area: pkging area: testing priority: high Issues that should be included in the current milestone if at all possible.
Milestone

Comments

@bmw
Copy link
Member

bmw commented Oct 25, 2022

Python 3.11 is out and I think we should support it. People on faster moving OSes will try to run Certbot on Python 3.11 if they haven't already.

I described the main difficulty in resolving this in Mattermost where I said:

Our pinned version of pylint doesn't work with Python 3.11. Upgrading pylint spews a ton of errors like normal. I've been poking around with black and flake8 this morning, but making these large code changes while maintaining both master and 2.0.x feels a little tricky to me.

We could block adding Python 3.11 support on #8818, however, that's a ton of work and like I said feels especially icky due to us maintaining two branches right now.

Alternatively, to fix pylint, we need to update our pinnings here to say we only want to support Python>=3.7.2. This is because all newer versions of pylint do this (which you can see here for pylint 2.14.0 which is the next oldest version of pylint) and poetry complains that it's impossible to upgrade pylint and satisfy our dependency for Python >= 3.7.0.

If we go this route, we could also go through the process of deprecating and dropping support for Python<3.7.2 or Python<3.8 (although Python 3.7 is supported by the Python team until July 2023) in Certbot itself like we did for Python 3.6 at #9160 and #9216 respectively, but I don't think it's worth it. pylint is only an optionally required test dependency of ours and I think we can realistically get by saying that we only support Python>=3.7.2 when generating our pinnings and still claim support for Python>=3.7.0 in Certbot. We're certainly not in the practice of testing against all patch versions of Python and have instead just focused on the major and minor version number.

What do people think? I'd like to get a +1 from someone before we start implementing something here.

@bmw bmw added area: testing area: pkging area: code health priority: high Issues that should be included in the current milestone if at all possible. labels Oct 25, 2022
@bmw bmw added this to the 1.32.0 milestone Oct 25, 2022
@bmw bmw self-assigned this Nov 1, 2022
@alexzorin
Copy link
Collaborator

Alternatively, to fix pylint, we need to update our pinnings here to say we only want to support Python>=3.7.2

What would be the difference between doing this and making pylint a Python restricted dependency? Would doing the latter allow repinning to work on Python <3.7.2, with the exclusion of pylint, which is optional anyway?

Overall, I think this plan sounds good. Debian 10 has Python 3.7.3 and older distros have Python 3.6 or older. My understanding of our use of Poetry is that doesn't affect anybody downstream (like packagers). I can't see any problems.

@alexzorin
Copy link
Collaborator

Completed via #9471.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: code health area: pkging area: testing priority: high Issues that should be included in the current milestone if at all possible.
Projects
None yet
Development

No branches or pull requests

2 participants