5 ms·
PyO3 0.23.0 was a big release I’ve been tinkering with extensively. Support for “free-threaded Python” is a headline feature, and I imagine NoGIL Python will be
by bionhoward 2y ago
PyO3 0.23.0 was a big release I’ve been tinkering with extensively. Support for “free-threaded Python” is a headline feature, and I imagine NoGIL Python will be extremely nice for Rust interoperability, so there is definitely interest in that crate. Also could be huge for queueing data for GPUs, api servers, and bulk data fetching.
For whatever reason (maybe post 2to3 PTSD), Python community seems not extremely eager to jump on latest versions of Python and it often takes a long time for popular libraries to support the latest and greatest, so I’d recommend patience and baby steps
https://github.com/PyO3/pyo3/releases/tag/v0.23.0 https://github.com/PyO3/pyo3/releases/tag/v0.23.0
- hamandcheese 2y ago> For whatever reason (maybe post 2to3 PTSD), Python community seems not extremely eager to jump on latest versions of Python Well, you'd think after the 2 to 3 debacle, python might take backwards compatibility more seriously, but they don't. Follow semver, and stop breaking things on 3.x. If it's deprecated in 3.x, don't remove it until 4.
- brianwawok 2y agoMeh. I’d rather we move faster and make the world better even if we have to update code a bit more. Never that hard.
- KronisLV 2y agoI’ve seen woefully outdated enterprise projects that are unlikely to ever be updated to new runtimes (think Java 8 to anything newer, alongside the limitations JDK version support brings), due to nobody having the manpower to port up to a million lines over while hoping for it to be bug for bug compatible. Moving fast is really nice when you can get paid for shipping and have the project either be retired or someone else’s problem in a decade.
- KaiserPro 2y agoUpdates cost money, or time. Most places don't have the resources to keep updating everything for little benefit. (just look at node its terrible to support. )
- throwaway127482 2y agoWhat have they broken on 3.x? Genuine question as I haven't followed python's development super closely
- skeledrew 2y agoSome seldom used standard modules have been deprecated and later removed. Like recently I revisited a project I initially made using v3.6, but it broke on v3.13 due to an indirect dependency no longer present in the stdlib. It was a simple fix though as a quick search identified the issue and pointed to the removed module in a package on PyPI.
- hamandcheese 2y agoYeah, it's nothing crazy, but it makes upgrades a lot more unpredictable. It's harder to communicate to management why the 3.x update took a day and the 3.y upgrade took a whole quarter. It's harder to upgrade services in a central way with any amount of leverage, and generally requires more coordination overhead, and moving more carefully. Compare with, say, golang, where it's pretty much a non-issue. My experience with Ruby was a lot better too, until Ruby 3, but hey, that was a major version bump!
- fulafel 2y agoPython 3.6 is from 2016 and 3.13 is from 2024. Similar things happen on most platforms on this timescale, eg on the Java side[1], you'd be going from Java 8 to Java 23. Clojure is pretty good even on that timescale though. [1] See eg https://stackoverflow.com/a/50445603 https://stackoverflow.com/a/50445603 up until 2021
- skeledrew 2y agoYep it's totally understandable, and OK by me as these changes are documented in the release docs and the fix a pip install away.
- trallnag 2y agoI often see people recommending Python as a replacement for Bash scripts (utilizing common Unix tools like grep and awk). I'm pretty sure a script from 2016 will still be working fine now.
- skeledrew 2y agoI don't think there's even a plan for a v4. The fallout from 2 to 3 was that bad. So to keep improvements going takes deprecating something several versions before removing, and research is done to find how popular that particular thing is to determine its candidacy for removal. Thus it's best practice to pin all dependencies, and read the release notes before doing a version update.
- Numerlor 2y agoYeah it'd be better if the name was understood as python 3 instead of just python to avoid mixing in semver
- Uptrenda 2y agoMy thoughts exactly. Python was supposed to be this ultra-portable thing. But... I am finding myself having to write patches to get my software to work on different Python versions. People who have Python 3 installed can be on many different versions. The thing is, depending on the version, quite often bug fixes included in later versions aren't in older versions. So if you want to make your code work -- got to get the patches in manually, monkey patch broken code, and do it that way. Then there's the seemingly random deprecation of standard library modules / other breaking changes. I take python version support seriously because if people install your packages you'll be outsourcing all of the above crap to the user. They might not even know how to 'upgrade' python. Or end up on the wrong version. If your package doesn't work when they install it they'll just move on to something else. Python is a total shit show for packaging.
- trollbridge 2y agoI use Poetry and pin the Python version. Ugly, but it works.
- holdenweb 2y agoGiven the many ways of creating virtual environments it's becoming more usual for a program's installation to create a specialist virtual environment just to support that application (pre-commit is. good example of this technique). Perhaps that'a a way ahead?
- pjc50 2y agoThis is almost mandatory if you want to ship something which might be considered "standalone" on Python.
- trollbridge 2y agoIt's quite ugly, and I try to make sure I write modules that can be built to a standard wheel and installed that way. (Poetry makes this fairly easy, incidentally.) Doing development on the projects without a specialised build environment, though, is almost hopeless. You either have to manually install a bunch of stuff (e.g. I use ruff, used to use ruff and black, used pre-commit, and a few other things), and then there's the non-Python things that need to be installed (like specific fonts in my case). At this point I just impose Poetry as basically a requirement for development. The program does build and function in a non-Poetry environment which is what I use for production.
- sgarland 2y agoPython doesn’t follow semver [0], it follows a general major.minor.bugfix, but with an extremely liberal definition of minor (“less earth-shattering,” as they describe it). PEP387 requires that introduced incompatibilities have a “large benefit to breakage ratio,” and that any deprecations last a minimum of two years. FWIW, Kubernetes has a similar approach. Breaking changes occur all the time with “minor” version updates. [0]: https://docs.python.org/3/faq/general.html https://docs.python.org/3/faq/general.html [1]: https://peps.python.org/pep-0387/ https://peps.python.org/pep-0387/
- ensignavenger 2y agoWhy should Python follow semver? There are plenty of successful projects that don't use semver. If you feel so strongly about them making the change, than make a case for it.
- weinzierl 2y agoOh, what a surprise, I thought PyO3 was dead. Glad to see it's not!
- CamouflagedKiwi 2y ago> For whatever reason (maybe post 2to3 PTSD), Python community seems not extremely eager to jump on latest versions of Python I don't think it's the 2 -> 3 thing any more, that was a while ago. Honestly there are just a lot of things that don't work well in 3.x.0 Python releases. For example, 3.12.0 had the per-interpreter GIL thing; I tried that in 3.12.0 and ran into a completely breaking issue almost immediately. They were responsive & helpful and did fix the first issue in 3.12.1, but we still had more issues with parts of the C API which seemed to work in 3.11 and better again in 3.13, but it really felt like that needed another release to solidify. (Also you can't import datetime in that setup in 3.12, which is also a pretty big deal-breaker). I can only imagine the free-threading thing will need at least the same kind of time to work the kinks out, although it is nice to see them moving in that direction.
- scott_w 2y ago> For whatever reason (maybe post 2to3 PTSD), Python community seems not extremely eager to jump on latest versions of Python I suspect this is a mix of Python 3 being “good enough” for most cases and companies not updating their stacks that often. I think most of us came into Python professionally around 2.7 so the need to keep updating our version hasn’t been heavily ingrained into our thinking.