Tuesday, November 15, 2022

Python 3.12.0 alpha 2 released

I'm pleased to announce the release of Python 3.12 alpha 2.

https://www.python.org/downloads/release/python-3120a2/

This is an early developer preview of Python 3.12.

Major new features of the 3.12 series, compared to 3.11


Python 3.12 is still in development. This release, 3.12.0a2 is the second of seven planned alpha releases.

Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release process.

During the alpha phase, features may be added up until the start of the beta phase (2023-05-08) and, if necessary, may be modified or deleted up until the release candidate phase (2023-07-31). Please keep in mind that this is a preview release and its use is not recommended for production environments.

Many new features for Python 3.12 are still being planned and written. Among the new major new features and changes so far:
  • Even more improved error messages. More exceptions potentially caused by typos now make suggestions to the user.
  • Support for the Linux perf profiler to report Python function names in traces.
  • The deprecated wstr and wstr_length members of the C implementation of unicode objects were removed, per PEP 623.
  • In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2).
  • The deprecated smtpd and distutils modules have been removed (see PEP 594 and PEP 632). The setuptools package (installed by default in virtualenvs and many other places) continues to provide the distutils module.
  • A number of other old, broken and deprecated functions, classes and methods have been removed.
  • (Hey, fellow core developer, if a feature you find important is missing from this list, let Thomas know.)

For more details on the changes in Python 3.12, see What's New In Python 3.12. The next pre-release of Python 3.12 will be 3.12.0a3, currently scheduled for 2022-12-05.

More resources



And now for something completely different


Life, believe, is not a dream
So dark as sages say;
Oft a little morning rain
Foretells a pleasant day.
Sometimes there are clouds of gloom,
But these are transient all;
If the shower will make the roses bloom,
O why lament its fall?

Rapidly, merrily,
Life's sunny hours flit by,
Gratefully, cheerily,
Enjoy them as they fly!

What though Death at times steps in
And calls our Best away?
What though sorrow seems to win,
O'er hope, a heavy sway?
Yet hope again elastic springs,
Unconquered, though she fell;
Still buoyant are her golden wings,
Still strong to bear us well.

Manfully, fearlessly,
The day of trial bear,
For gloriously, victoriously,
Can courage quell despair!
Life, by Charlotte Brontë, from Poems by Currer, Ellis, and Acton Bell.

Charlotte wrote about the publishing under pseudonyms by her and her sisters, Emily and Anne, in a preface to Emily's Wuthering Heights:
Averse to personal publicity, we veiled our own names under those of Currer, Ellis and Acton Bell; the ambiguous choice being dictated by a sort of conscientious scruple at assuming Christian names positively masculine, while we did not like to declare ourselves women, because – without at that time suspecting that our mode of writing and thinking was not what is called "feminine" – we had a vague impression that authoresses are liable to be looked on with prejudice; we had noticed how critics sometimes use for their chastisement the weapon of personality, and for their reward, a flattery, which is not true praise.


Enjoy the new releases



Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.


Your release team,
Thomas Wouters
Ned Deily
Steve Dower

Tuesday, October 25, 2022

Python 3.12.0 alpha 1 released

 As Pablo released Python 3.11.0 final earlier today, now it's my turn to release Python 3.12.0 alpha 1.


This is an early developer preview of Python 3.12

Major new features of the 3.12 series, compared to 3.11


Python 3.12 is still in development. This release, 3.12.0a1, is the first of seven planned alpha releases.

Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release process.

During the alpha phase, features may be added up until the start of the beta phase (2023-05-08) and, if necessary, may be modified or deleted up until the release candidate phase (2023-07-31). Please keep in mind that this is a preview release and its use is not recommended for production environments.

Many new features for Python 3.12 are still being planned and written. Among the new major new features and changes so far:
  • The deprecated `wstr` and `wstr_length` members of the C implementation of unicode objects were removed, per PEP 623.
  • In the `unittest` module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2).
  • The deprecated `smtpd` module has been removed.
  • A number of other old, broken and deprecated functions, classes and methods have been removed.
  • (Hey, **fellow core developer,** if a feature you find important is missing from this list, let Thomas know.)
The next pre-release of Python 3.12 will be 3.12.0a2, currently scheduled for 2022-11-14.

More resources


And now for something completely different


This is Not the Poem that I Had Hoped to Write

This is not the poem that I had hoped to write
when I sat at my desk and the page was white.
You see, there were other words that I’d had in mind,
yet this is what I leave behind.

I thought it was a poem to eradicate war;
one of such power, it would heal all the sores
of a world torn apart by conflict and schism.
But it isn’t.

Lovers, I’d imagined, would quote from it daily,
Mothers would sing it to soothe crying babies.
And whole generations would be given new hope.
Nope.

I had grand aspirations. Believe me, I tried.
Humanity examined with lessons applied.
But the right words escaped me; so often they do.
Have these in lieu.


Brian Bilston

Enjoy the new releases

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.


Your release team,
Thomas Wouters
Ned Deily
Steve Dower

Monday, October 24, 2022

Python 3.11.0 is now available

 


This is the release of Python 3.11.0

Python 3.11 is finally released. In the CPython release team, we have put a lot of effort into making 3.11 the best version of Python possible. Better tracebacks, faster Python, exception groups and except*, typing improvements and much more. Get it here:

https://www.python.org/downloads/release/python-3110/

Major new features of the 3.11 series, compared to 3.10

Among the new major new features and changes so far:

  • PEP 657 – Include Fine-Grained Error Locations in Tracebacks
  • PEP 654 – Exception Groups and except*
  • PEP 673 – Self Type
  • PEP 646 – Variadic Generics
  • PEP 680 – tomllib: Support for Parsing TOML in the Standard Library
  • PEP 675 – Arbitrary Literal String Type
  • PEP 655 – Marking individual TypedDict items as required or potentially-missing
  • bpo-46752 – Introduce task groups to asyncio
  • PEP 681 – Data Class Transforms
  • bpo-433030– Atomic grouping ((?>…)) and possessive quantifiers (*+, ++, ?+, {m,n}+) are now supported in regular expressions.
  • The Faster Cpython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details.

More resources

And now for something completely different

When a spherical non-rotating body of a critical radius collapses under its own gravitation under general relativity, theory suggests it will collapse to a single point. This is not the case with a rotating black hole (a Kerr black hole). With a fluid rotating body, its distribution of mass is not spherical (it shows an equatorial bulge), and it has angular momentum. Since a point cannot support rotation or angular momentum in classical physics (general relativity being a classical theory), the minimal shape of the singularity that can support these properties is instead a ring with zero thickness but non-zero radius, and this is referred to as a ringularity or Kerr singularity.

This kind of singularity has the following peculiar property. The spacetime allows a geodesic curve (describing the movement of observers and photons in spacetime) to pass through the center of this ring singularity. The region beyond permits closed time-like curves. Since the trajectory of observers and particles in general relativity are described by time-like curves, it is possible for observers in this region to return to their past. This interior solution is not likely to be physical and is considered a purely mathematical artefact.

There are some other interesting free-fall trajectories. For example, there is a point in the axis of symmetry that has the property that if an observer is below this point, the pull from the singularity will force the observer to pass through the middle of the ring singularity to the region with closed time-like curves and it will experience repulsive gravity that will push it back to the original region, but then it will experience the pull from the singularity again and will repeat this process forever. This is, of course, only if the extreme gravity doesn’t destroy the observer first.

We hope you enjoy the new releases!

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Python Core Development Sprint 2022: 3.11 and beyond!

From October 3rd to October 7th a group of Python core developers gathered for a sprint hosted at Google. The event was mainly sponsored by Google and the Python Software Foundation. The core team used to do this annually between 2016 and 2019. It was high time to return to this tradition as the remote online sprints organized in years 2020 and 2021 proved to be a poor substitution for in-person collaboration.

A group photo of the sprint participants with 25 people, mostly smiling


Participating in a core sprint that isn't following a public tech conference is unique in many ways. We come fresh and ready to work on Python for the entire week, without the brain fog that builds up during a multi-day conference. With other contributors there with us, it's easier to focus on the task at hand without professional or private interruptions. Finally, on a human level, we really missed each other. And some of us never met in real life before.

The sprint was the most active week on the repository in five years. It managed to overshadow the sprint at Meta in 2016 which happened shortly before the 3.6 beta freeze, at the time said to be "the most productive [single] week for Python ever". During the five days of the sprint there were 344 commits to our five active branches that span versions of Python from 3.7 to 3.12. 157 of those were made to the main branch alone, which will end up being Python 3.12. Some fixes were pretty deep, like the sneaky 3.11 crasher that only reproduces when performing a full pytest run on a large async app, and disappears once you start diagnosing it. Progress was made on putting full f-string parsing into the grammar of the language, which will allow some new constructs that I'm sure will raise more than one eyebrow when the time comes!

Using the opportunity of meeting in person, the sprint week contained some additional events like a Q&A meeting between the core developers and the Steering Council. We discussed the process for core mentorship, open undecided PEPs like PEP 649, or the future of the C API. To be clear, no decisions about the Python programming language are made behind closed doors. The meetings during the sprint help reaching consensus but continue in our dedicated online communications channels like discuss.python.org and the python-dev mailing list. All changes require opening issues on GitHub, and larger ones require going through the PEP process.

A few interest groups gathered to meet during the sprint as well. Most of those meetings were hybrid, meaning that they included remote participants dialing in. The documentation experts, the core workflow experts, the asyncio experts, the code of conduct working group, and the C API interest group all met to discuss their respective topics.

One highlight of the event that most participants brought up is rapid knowledge sharing that it allowed. Pair programming, whiteboard design, or simply talking somebody through a problem, happened often. Among the topics in this vein the eval breaker came up often, as did asyncio and typing topics. Ken Jin presented a summary of the performance improvements coming in Python 3.11, and Dustin Ingram talked about Sigstore for Python releases. Speaking of security, Google provided core developers attending the sprint with FIDO2 hardware security keys to additionally secure their access to GitHub and PyPI.

Some work looks further into the future. Ken Jin and C.A.M. Gerlach authored a new PEP during the sprint as well, and PEP 688 received a rewrite from Jelle Zijlstra. Carl Meyer worked on dict watchers and callbacks when a type is modified, both needed to allow for a pluggable JIT.

A vote to nominate a new core developer, Alex Waygood, was opened during the sprint and passed unanimously. Alex was present at the sprint as a collaborating triager and mentee.

Huge thanks to everybody that participated! The list below is in alphabetical order, along with thanks to the organizations that helped finance their attendance. We also acknowledge that travel for a multi-day event separates people from their families. We're grateful for their understanding. In the end, we had 28 in-person participants from 8 countries on 3 continents:

  • Brandt Bucher
  • Brett Cannon (Microsoft)
  • Ned Deily
  • Martin Demello (Google)
  • C.A.M. Gerlach
  • Larry Hastings
  • Dustin Ingram (Google)
  • Ken Jin
  • Hugo van Kemenade
  • Senthil Kumaran
  • Łukasz Langa
  • Carl Meyer (Meta)
  • Joannah Nanjekye
  • Lysandros Nikolaou
  • Benjamin Peterson
  • Guido van Rossum (Microsoft)
  • Pablo Galindo Salgado (Bloomberg)
  • Yury Selivanov (EdgeDB)
  • Mariatta (Google)
  • Mark Shannon (Microsoft)
  • Eric Smith
  • Gregory P. Smith (Google)
  • Eric Snow (Microsoft)
  • Barry Warsaw (Microsoft)
  • Alex Waygood
  • Frank Wierzbicki
  • Thomas Wouters (Google)
  • Jelle Zijlstra (Quora)

Special thanks to Greg for making the event happen!

Tuesday, October 11, 2022

Python versions 3.10.8, 3.9.15, 3.8.15, 3.7.15 now available

Déjà vu? Right, a month after the expedited releases we are doing the dance again. This coincides with the regular scheduled time for 3.10.8 but since we accrued a few fixes in 3.7 - 3.9 as well, we’re again releasing all four editions at the same time. We’re not promising to continue at this pace :sweat_smile:

Security content this time

  • CVE-2022-40674: bundled libexpat was upgraded from 2.4.7 to 2.4.9 which fixes a heap use-after-free vulnerability in function doContent
  • gh-97616: a fix for a possible buffer overflow in list *= int
  • gh-97612: a fix for possible shell injection in the example script get-remote-certificate.py(this issue originally had a CVE assigned to it, which its author withdrew)
  • gh-96577: a fix for a potential buffer overrun in msilib

Python 3.10.8

Get it here: https://www.python.org/downloads/release/python-3108/

As a bugfix release coming a mere month after an out-of-schedule security release, 3.10.8 is somewhat smaller compared to 3.9.8 released at the same stage of the release cycle a year ago. There’s 151 commits vs 204 in 3.9. It’s still a larger release than 3.10.7 at 113 commits. One way or the other, it’s worth checking out the change log.

And now for something completely different

Granular convection is a phenomenon where granular material subjected to shaking or vibration will exhibit circulation patterns similar to types of fluid convection.

It is sometimes described as the Brazil nut effect when the largest particles end up on the surface of a granular material containing a mixture of variously sized objects; this derives from the example of a typical container of mixed nuts, where the largest will be Brazil nuts.

The phenomenon is also known as the muesli effect since it is seen in packets of breakfast cereal containing particles of different sizes but similar densities, such as muesli mix.

Under experimental conditions, granular convection of variously sized particles has been observed forming convection cells similar to fluid motion.

We hope you enjoy the new releases!

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Your friendly release team,

Ned Deily @nad
Steve Dower @steve.dower
Pablo Galindo Salgado @pablogsal
Łukasz Langa @ambv

Monday, September 12, 2022

Python 3.11.0rc2 is now available

This is the second release candidate of Python 3.11

https://www.python.org/downloads/release/python-3110rc2/

This release, 3.11.0rc2, is the last preview before the final release of Python 3.11.0 on 2022-10-24.

Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate and the last planned release preview is currently planned for Monday, 2022-09-05 while the official release is planned for Monday, 2022-10-24.

There will be no ABI changes from this point forward in the 3.11 series and the goal is that there will be as few code changes as possible.

Modification of the final release

Due to the fact that we needed to delay the last release candidate by a week and because of personal scheduling problems I am delaying the final release to 2022-10-24 (three weeks from the original date).

Call to action

:warning::warning::warning::warning::warning::warning::warning:
The 3.11 branch is now accepting changes for 3.11.1. To maximize stability, the final release will be cut from the v3.11.0rc2 tag. If you
need the release manager (me) to cherry-pick any critical fixes, mark issues as release blockers, and/or add me as a reviewer on a critical
backport PR on GitHub. To see which changes are currently cherry-picked for inclusion in 3.11.0, look at the short-lived branch-v3.11.0
https://github.com/python/cpython/tree/branch-v3.11.0 on GitHub.
:warning::warning::warning::warning::warning::warning::warning:

Core developers: all eyes on the docs now

* Are all your changes properly documented?

* Did you notice other changes you know of to have insufficient documentation?

Community members

We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.11 compatibilities during this phase. As always, report any issues to the Python bug tracker.

Please keep in mind that this is a preview release and its use is **not** recommended for production environments.

Major new features of the 3.11 series, compared to 3.10

Among the new major new features and changes so far:

  • PEP 657 – Include Fine-Grained Error Locations in Tracebacks
  • PEP 654 – Exception Groups and except*
  • PEP 673 – Self Type
  • PEP 646 – Variadic Generics
  • PEP 680 – tomllib: Support for Parsing TOML in the Standard Library
  • PEP 675 – Arbitrary Literal String Type
  • PEP 655 – Marking individual TypedDict items as required or potentially-missing
  • bpo-46752 – Introduce task groups to asyncio
  • PEP 681 – Data Class Transforms
  • bpo-433030– Atomic grouping ((?>…)) and possessive quantifiers (*+, ++, ?+, {m,n}+) are now supported in regular expressions.
  • The Faster Cpython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details.
  • (Hey, fellow core developer, if a feature you find important is missing from this list, let Pablo know.)

The next release will be the final release of Python 3.11.0, which is currently scheduled for Monday, 2022-10-24.

More resources

And now for something completely different

In general relativity, a white hole is a theoretical region of spacetime and singularity that cannot be entered from the outside, although energy-matter, light and information can escape from it. In this sense, it is the reverse of a black hole, which can be entered only from the outside and from which energy-matter, light and information cannot escape. White holes appear in the theory of eternal black holes. In addition to a black hole region in the future, such a solution of the Einstein field equations has a white hole region in its past. This region does not exist for black holes that have formed through gravitational collapse, however, nor are there any observed physical processes through which a white hole could be formed. Supermassive black holes are theoretically predicted to be at the centre of every galaxy and that possibly, a galaxy cannot form without one. Stephen Hawking and others have proposed that these supermassive black holes spawn a supermassive white hole.

We hope you enjoy the new releases!

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Wednesday, September 7, 2022

Python releases 3.10.7, 3.9.14, 3.8.14, and 3.7.14 are now available

CVE-2020-10735

Converting between int and str in bases other than 2 (binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) now raises a ValueError if the number of digits in string form is above a limit to avoid potential denial of service attacks due to the algorithmic complexity.

Security releases for 3.9.14, 3.8.14, and 3.7.14 are made available simultaneously to address this issue, along with some less urgent security content.

Upgrading your installations is highly recommended.

Python 3.10.7

Get it here:

https://www.python.org/downloads/release/python-3107/

This bugfix version of Python was released out-of-schedule to address the CVE, and as such contains a smaller number of changes compared to 3.10.6 (200 commits), or in fact 3.9.7 (187 commits) at the same stage of the release cycle a year ago. But there’s still over a 100 commits in this latest Python version so it’s worth checking out the change log.

And now for something completely different

In quantum mechanics, the uncertainty principle (also known as Heisenberg’s uncertainty principle) is any of a variety of mathematical inequalities asserting a fundamental limit to the accuracy with which the values for certain pairs of physical quantities of a particle, such as position and momentum or the time and the energy can be predicted from initial conditions.

Such variable pairs are known as complementary variables or canonically conjugate variables; and, depending on interpretation, the uncertainty principle limits to what extent such conjugate properties maintain their approximate meaning, as the mathematical framework of quantum physics does not support the notion of simultaneously well-defined conjugate properties expressed by a single value.

The uncertainty principle implies that it is in general not possible to predict the value of a quantity with arbitrary certainty, even if all initial conditions are specified.

We hope you enjoy the new releases!

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

https://www.python.org/psf/


Your friendly release team,

Ned Deily @nad
Steve Dower @steve.dower
Pablo Galindo Salgado @pablogsal
Łukasz Langa @ambv