-
Notifications
You must be signed in to change notification settings - Fork 64
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 support for Python 3.12 and drop EOL 3.7 #283
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #283 +/- ##
==========================================
- Coverage 98.05% 98.04% -0.01%
==========================================
Files 27 27
Lines 4362 4356 -6
Branches 765 765
==========================================
- Hits 4277 4271 -6
Misses 54 54
Partials 31 31 ☔ View full report in Codecov by Sentry. |
Hey Hugo! This is awesome. I knew about pyupgrade, but this is the first I'm seeing flynt, thanks for this. So what I usually do before removing a version is ask:
For I think you know it ;) Anyways, 3.7 is weirdly popular with glom right now. Funky traffic pattern. Before recently it was ~4% which is nice and low. For Overall I'm leaning +1, just because you did such a great job refreshing the codebase. I'll let @kurtbrose weigh in, as well. Thanks again! |
I do know https://pypistats.org/, but I don't maintain it, just the CLI: https://github.com/hugovk/pypistats :) Yeah, there's something a bit odd with 3.7, for some reason lots of downloads are coming from Amazon Linux: https://dev.to/hugovk/why-are-there-still-so-many-downloads-for-eol-python-37-30cp Same for glom. Here's 30 days: ❯ pypinfo --days 30 --limit 20 --percent --markdown "glom" system distro pyversion
Served from cache: False
Data processed: 2.71 GiB
Data billed: 2.71 GiB
Estimated cost: $0.02
Limiting to just one day to avoid that peak, things look more "normal": ❯ pypinfo --days 1 --limit 20 --percent --markdown "glom" system distro pyversion
Served from cache: False
Data processed: 138.00 MiB
Data billed: 138.00 MiB
Estimated cost: $0.01
Anyway, my projects tend to follow the EOLs of Python itself: https://devguide.python.org/versions/ One clear benefit is reducing resource use on the CI, allowing us to add test newer versions without worry about resource waste. And 3.13 will be in beta soon, so it will be good to add that. Another is being able to adopt newer syntax. More that this, I find it much easier to follow upstream, than to have an annual discussion over the pros and cons. People shouldn't be using EOL Pythons, they no longer receive security updates, so we shouldn't be encouraging it. But most of all, following upstream is good for communication: there's a clear schedule published by a third-party that we can all follow. (The Scientific Python community go one further, and have agreed on a standard to drop Pythons even sooner. Currently they recommend 3.10+: https://scientific-python.org/specs/spec-0000/) |
Hey Hugo, I really appreciate the refresher on the Python release cycle, and the great dev.to posts you've done on the relevant stats. Still deciding here, but figured I'd share some relevant thoughts. Personally, having worked in many enterprise environments where a given Python is supported long after the core devs decide it's EOL, I'm inclined to retain library support longer, until there's a clear advantage to dropping a version. (For my application work, I'm more of an early adopter.) I think the comments on this point capture the concerns well: https://dev.to/hugovk/why-are-there-still-so-many-downloads-for-eol-python-37-30cp In short (for anyone else reading this), it's not accurate to say that because the core team aren't backporting security fixes that a given version doesn't get security fixes, because the Python provider might be backporting their own security fixes. I do wish more distros were more public about how long they planned to support various Python versions. I still have libraries that support Python 2, and pypistats is my main source of info on the topic! |
Here's a summary of some new things in 3.8: https://www.nicholashairs.com/posts/major-changes-between-python-versions/ There less "big" reasons to drop 3.7 and move up to 3.8 than for earlier releases, so happy to drop those commits and only add support to 3.12.
🙀 Well, there's many, many compelling reasons to drop 2.7, but I'm sure you know and won't go into it here, beyond to say that library's download numbers for 2.7 (0.41% for v23.1.1) probably doesn't justify holding on :) |
I saw mahmoud/boltons#339 so I opened mahmoud/boltons#362 :) |
+1 to at least testing/declaring official support for 3.12 |
It's also time to start testing 3.13: https://discuss.python.org/t/python-3-13-0-release-candidate-1-released/59703 But let's get this dealt with first. I can ditch the dropping of 3.7 if you like. |
I'm just a drive-by commenter (not affiliated with this project). FWIW I agree with dropping 3.7 ( |
Fixed in #285. Great call on flynt and pyupgrade. |
🎉 Don't forget to add 3.13, it was released last month 🚀 |
Re: https://devguide.python.org/versions/
Also upgrade Python syntax with https://github.com/asottile/pyupgrade and convert to f-strings with https://github.com/ikamensh/flynt.