Support all official Python version #435
Replies: 3 comments 2 replies
-
I will let @henryiii comment on repo-review specifically, but some useful context for this discussion is SPEC 0. |
Beta Was this translation helpful? Give feedback.
-
See above for random rambling about SPEC 0. Now on to "technical reasons", which is two-fold; there are two libraries here; repo-review (the check runner) and sp-repo-review (these checks). I'll start with repo-review: I actually did try to extend repo-review back to 3.9. I worked through a bunch of things; there are some match statements and quite a few usages of Python 3.10 features, but I think it would be doable if someone persevered longer than I did. I gave up at some point, but would be happy to provide the branch (if it's not discoverable) if someone wants to pick it up, and I would accept a good PR. 3.8 would be harder, since the core of repo-review is the topological sorter introduced in 3.9. But there's probably a back port that could be used. There are also a few other 3.9 features, but the topological sorter is the big one at the core of repo-review. The reason I wasn't very dedicated in my branch is the most popular plugin, sp-repo-review, is very unlikely to support 3.9. The checks are almost all built around pattern matching, and making this work on older versions will make the checks uglier and harder to maintain. I think I'd stick by SPEC 0 (now that it is 3.10+) here - no 3.9 for sp-repo-review. If someone made the PR, and it looked clean enough, I might change my mind, but no promises. It would add technical debt that in a bit over a year won't matter anyway when official EoL for 3.9 hits. This is more noticeable here that in the usual libraries that follow SPEC 0 because there never was a 3.9 release of these. (I wrote the original some point shortly after pattern matching came to Python in 3.10, probably before the release of 3.11). IMO, repo-review and similar libraries (I do the same thing with flake8-errmsg1, it's also 3.10+) are developer focused, and developers should not be using old Python's as their primary drivers. You will get huge benefits upgrading (like better error messages, or even a new REPL in 3.13). And the system Python that ships on Linux distributions is not intended for users, it's there to support other apt/yum packages. If you are developer, hopefully you know how to install and use a proper Python. Hatch, PDM, Rye, and pyenv all provide easy ways to get a Python that is not tied to your system. And there's docker, etc. Also, it's totally okay to skip this check ( Footnotes
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed answer @henryiii From it, I don't think it is indeed worth the trouble of increasing Python version compatibility. As you mentioned, developer can upgrade their Python version. |
Beta Was this translation helpful? Give feedback.
-
repo-review requires Python >= 3.10. This is a bit annoying for older projects/installation.
What are the technical reasons for not supporting all officially supported Python version (meaning >=3.8)?
Xref: jupyterlab/jupyterlab_server#451
Beta Was this translation helpful? Give feedback.
All reactions