basic-computer-games
basic-computer-games copied to clipboard
Which Python version should I use?
There was already a bit of discussion on the Python version to use for this project. I would be happy if we could find a general rule for the whole project.
Important Facts
Which Python versions are still officially supported? 3.7, 3.8, 3.9, 3.10. 3.6 no longer receives security updates and 3.11 is not stable jet.
What do people run? Using pyenv it's pretty easy to switch between Python versions. However, for beginners it might not be so easy. They might use whatever their system has installed. For Ubuntu 20.04, the default Python 3 version is 3.8 (link)
My article Killer Features by Python version lists a few more, but those are the ones I think are interesting for this project:
- 3.7: Dataclasses
- 3.8: f-strings❗❗, TypedDict,
- 3.9: -
- 3.10: structural pattern matching - we have one project that (79 slalom)
Proposal
My proposal would be the following:
- Try to keep code runnable on Python 3.8+ to make it easy for people to run.
- If the original author makes use of a feature like structural pattern matching, the support for older Python versions can be dropped, but it must be clearly stated in the README that this is Python 3.10 only (or similar)
- PRs which just would adjust existing code and remove support for Python 3.8 / Python 3.9 would be declined, if the new version is not noticably simpler to understand.
Thus CI should support 3.10 so that people are free to use it.
https://en.wikipedia.org/wiki/History_of_Python#Version_3
I think 3.8 seems like a reasonable choice.. 3.8 was released late 2019.