What’s in Which Python
nedbatchelder.com
nedbatchelder.com
Edit: D'oh, I was mixing these up non-backtracking subexpressions with lazy ones. Thanks!
Possessive on the other hand will not backtrack (unless it is part of a group having lazy/greedy quantifiers).
A simple example: `error.*valid` or `error.*?valid` will match `error: invalid input` but `error.*+valid` will no match because `.*+` will consume rest of the characters without giving back to allow overall regex to match.
> Q: Is there a JIT compiler?
> A: No. We’re still exploring other optimizations.
[0]: https://docs.python.org/3.11/whatsnew/3.11.html#faster-cpyth...
I install python using asdf on both MacOS and various flavours of Linux.
PyPy manages far more.
The entire ecosystem is great at marketing. Critical people like Armin Ronacher have left long ago.
I'd like to see truly independent benchmarks from unbiased or critical outsiders. But in general those do not have any interest in Python.
Those are serious allegations. Can you back up these claims?
I’m kidding of course but that seems like the camel who broke the bridge too far.
Is it better about breaking changes than the 2 to 3 adventure was?
But there are lots of companies that release software using Python. To ensure a stable production environment, they upgrade more slowly, or on a schedule that's distinct from the Python release cycle.
Also, companies often don't just let people upgrade things themselves. The IT department schedules a company-wide Python upgrade, for example, testing the effects beforehand. I have several training clients still using 3.7 and 3.8, not because things would break with 3.10, but because they haven't fully vetted the newest version, and they're being super conservative.
I do wonder if companies will be a bit faster to upgrade over the coming years, given that execution speed is expected to improve rather dramatically. Upgrading won't be a matter of some nice-to-have features, but rather of real savings in system usage.
But will structural pattern matching be back-ported, though?
Certainly an incompatibility, if not a breaking change per se.
But they are soft keywords, so there's no issue.
Python does sometimes have backwards-incompatible changes, e.g. for 3.10 they removed a bunch of stdlib modules and methods, like the "formatter" and "parser" module [0].
So if you used those, your code wouldn't work in 3.10.
But the main reason to wait for wheels (which is pythonese for "pre-built packages") is if they use native code (like C or rust) and you would have to compile them yourself otherwise, which increases installation time quite a bit.
(this was also the reason why Alpine was a bad choice for python containers for a long time because it uses musl and there were only wheels for glibc available. AFAIK musl wheels exist now so that isn't relevant anymore)
I imagine often it’s just another parameter in a CI somewhere, where things mostly “just work” because backward-incompatible breakages have become much rarer.
Pillow used to _always_ get this when a new Python release came out, because while we were generally following the betas and build away, our quarterly releases weren't sync'd with the Python ones. So there's be a gap, and every. single. time. we'd get support issues with people pip installing on the newest python and not having a compiler or the basic dependencies. (Aside: even if the last line is "Couldn't find required dependency libjpeg" many many people just don't get that it's requiring additional libraries).
So, we just shifted our fall releases to come after the Python releases.
However, as the page you link also mentions, a C extension may also opt to use the "Stable ABI", which does not change across major releases (with some caveats).
If writing small tools, consder limiting yourself to system python and its stdlib / system-packaged libraries. A script which ypu can download as a single file, immediately run, and immediately make some changes in, all without worrying about venvs or other setup, is a beautiful thing.
This works especially well if you are writing internal tools and your company has standarts like "Everyone is on Ubuntu 20.04 or 22.04"
The other issue is the more dependencies you have, the more likely one of them will not work with the newest version. Usually these things get sorted out pretty quickly, but it's frustrating to get a bunch of errors.
I typically wait until at least the first bug fix release (3.11.1 for example) to try out a new Python version. These often have most of the common issues fixed, and give enough time for all the popular dependencies to catch up.
This is from my experience maintaining a million+ line codebase that started at Python 2.6 and was updated to 3.8 as new versions came out.
I'm sure using 3.10 instead of 3.9 would be fine for most packages, but I don't know if it can be "forced"
Wheels typically lag however.
Release[-2] or Release[-3] are good choices. Definitely upgrade from [-4] or lower.
We work often with 3rd party libraries and images provided by those third parties. These are often based straight up on Ubuntu. Nvidia CUDA image is an example of this. Then you are stuck with their python version.
And it’s not as easy as installing your own python version into the image because python dependencies inside those 3rd party images might be installed using OS package managers and not pip so then they are installed to the wrong python version etc. It’s a rabbit hole.
The problem is that at some point Debian/ubuntu decided to repackage python dependencies as apt packages.
If I recall correctly, 1.6 was when it started to get attention on mainstream with Zope and co.
Still, add the standard library changes as well, and there is plenty of inspiration for pub quizzes.
Python 1.6 was a "contractual obligation" release that few used, when compared to 1.5.2 or 2.0. See https://python.readthedocs.io/en/v2.7.2/whatsnew/2.0.html#wh... .
1.6final and 2.0beta1 were released on the same day, and 2.0final was released a month later. The 2.x series was almost completely backwards compatible to 1.x.
The only option, imo, is to make multiple GIL pools and use actors or message passing to work around this. However, this means the super cheap FFI that Python enjoys will be mitigated as it has to find a solution like go (stack swapping), or react (bridge to underlying platfom).
If it fails make sure to let me know (I have no analytics)