Python 3.9
python.org
python.org
A change in Python 3.9.0 introduces undefined behavior in combination with pybind11 (rarely occurring crashes, but could be arbitrarily bad). We will work around it in an upcoming version of pybind11, and Python will separately also fix this problem in 3.9.1 slated for release in December.
Details available here: https://pybind11.readthedocs.io/en/latest and https://github.com/python/cpython/pull/22670.
But nevermind, the 3.9 release was 15 days ago and the bug was identified 8 days ago. I guess there has to be a release before people will start using it and find bugs/regressions.
There's a saying to always wait for the .1 release, this is a good illustration of why.
As the top-level comment says, it rarely causes crashes.
NumPy, SciPy, and friends are, individually and collectively flagship libraries, and depend on pibind11.
> If it was very widely used this bug probably would've been caught by people testing the alpha/beta/rc versions of 3.9.
They are very widely used, but “probably” means “do enough releases and you will find exceptions”. Welcome to an exception.
I was just using the expit function from scipy yesterday by the way, because that's where it was implemented.
But yes, never ever jump on a new release of anything, at least in production. Always stand back and wait for someone more optimistic to find the bugs
I mean, sure NumPy is integral to python finance and scientific computing...but it's also right at the heart of the popular Python roguelike tutorial, too.
There's Python code that doesn't use NumPy, sure (I've got some in production right now), but I can't personally think of a Python library with nearly as deep dependencies across nearly as diverse a range of use cases.
Sure ci will catch most of these but maintaining 100% code coverage is a significant burden and very rare in practice.
This hardly seems like a Python specific issue.
I thought this was standard practice?
Unlike 2.7, I do not see a consensus on a 'standard' version for python 3 between 3.4-3.7. (not any of the others, that's for sure)
Have been using Python on and off since 1.6 and not only is the documentation also quite impressive, when one sums up language reference + library, just like ISO documents, its changes between versions make a Pub Quiz a very easy task.
The language is probably the new Basic, but to achieve 10 dan in Python there is plenty of stuff to chew on.
Discussion here:
“We did not seriously consider alternative ways to implement the new parser, but here's a brief discussion of LALR(1). [...] Other variants of LR were not considered, nor was LL (e.g. ANTLR).”
“LL(1) makes it too hard to add complex new features to the language, we must change to something else; PEG is something else; therefore we must change to PEG”.
[https://discuss.python.org/t/should-there-be-a-check-whether...]
Things should last for lifetimes before they break, not 12 months.
I think this is a rather innovative choice among the mainstream languages?
Mainly making it easier to do syntax extensions...
For Python devs there will be no real-world effects...
Yes, AFAICT the main reason for the parser change is to enable the pattern matching feature [0] that’s likely coming in 3.10.