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

Bump Python version requirement? #2059

Closed
jeanas opened this issue Jan 31, 2022 · 8 comments
Closed

Bump Python version requirement? #2059

jeanas opened this issue Jan 31, 2022 · 8 comments

Comments

@jeanas
Copy link
Contributor

jeanas commented Jan 31, 2022

Currently, setup.cfg describes Pygments as supporting Python 3.5 and higher. This is also what CI tests. Python 3.5 went EOL in 2020 and 3.6 did the same two months ago. Perhaps it would be time to bump to 3.7 or 3.6? In particular, if it becomes at least 3.6, f-strings can be used.

@Anteru
Copy link
Collaborator

Anteru commented Jan 31, 2022

@birkenfeld any objections? I'm fine bumping it to 3.6, and we don't have an official policy in place. If we do bump it I'd like to add one though. Suggested wording (this would go into a future goals-non-goals document):

Pygments supports all supported Python versions as per the Python Developer's Guide. Supporting end-of-life versions is a non-goal of Pygments.

I just checked: Ubuntu 18.04 uses Python 3.6.9. That would be the only reason to support 3.6 and not go to 3.7 in my opinion, to not break old installations of Ubuntu. Debian Bullseye/stable is at Python 3.9. I could add a sentence like:

Additionally, we strive to support the current and previous LTS release of Ubuntu out of the box and their default Python versions.

In 3 months they'll ship Ubuntu 22.04 so we could drop 3.6.9. That said, I'm not sure it's worth picking one distro over another, and my personal preference would be to stick with supported versions to simplify our life. That said, we do support 3.5 and so far nobody had an issue with that, so it seemed "free", but I'm not sure what value add it's providing.

@birkenfeld
Copy link
Member

I'd prefer to stay on 3.6 for RHEL8. I don't think there are 3.7+ features we want to have?

@jeanas
Copy link
Contributor Author

jeanas commented Jan 31, 2022

Looking at https://docs.python.org/3/whatsnew/3.7.html, I don't see anything outstanding. 3.7 is famous for dataclasses but I don't think these are of much use to Pygments.

@Anteru
Copy link
Collaborator

Anteru commented Jan 31, 2022

Proposed wording:

Pygments supports all supported Python versions as per the Python Developer's Guide. Additionally, the default Python version of the latest stable version of RHEL, Ubuntu LTS, and Debian are supported, even if they're officially EOL. Supporting other end-of-life versions is a non-goal of Pygments.

That said, on CentOS 8 at least, the latest Python you can install is 3.9, but 3.6 is the default. I also tried redhat/ubi8 and that also sports newer Python releases, though 3.6 is the default there. Same for Ubuntu LTS 18.04.

@jeanas
Copy link
Contributor Author

jeanas commented Feb 1, 2022

Would a PR to do this be welcome? (The reason for asking in the first place is that I'm preparing a series of changes where f-strings will be useful.)

@Anteru
Copy link
Collaborator

Anteru commented Feb 1, 2022

I'll bump it to 3.6 and add the sentence above. Then you can go and knock yourself out with "f-strings" :)

@Anteru Anteru closed this as completed in f823d20 Feb 1, 2022
@jeanas
Copy link
Contributor Author

jeanas commented Feb 1, 2022

Thank you!

@birkenfeld
Copy link
Member

Great!

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

3 participants