Monday, June 6, 2022

Python 3.10.5 is available

The latest bugfix drop for Python 3.10 is here: Python 3.10.5. This release packs more than 230 bugfixes and docs changes, so you surely want to update :) You can get it here:

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

This is the first maintenance release of Python 3.10


Python 3.10.5 is the newest major release of the Python programming language, and it contains many new features and optimizations.


Major new features of the 3.10 series, compared to 3.9

Among the new major new features and changes so far:

  • PEP 623 – Deprecate and prepare for the removal of the wstr member in PyUnicodeObject.
  • PEP 604 – Allow writing union types as X | Y
  • PEP 612 – Parameter Specification Variables
  • PEP 626 – Precise line numbers for debugging and other tools.
  • PEP 618 – Add Optional Length-Checking To zip.
  • bpo-12782: Parenthesized context managers are now officially allowed.
  • PEP 634 – Structural Pattern Matching: Specification
  • PEP 635 – Structural Pattern Matching: Motivation and Rationale
  • PEP 636 – Structural Pattern Matching: Tutorial

More resources

bpo-38605from __future__ import annotations (PEP 563) used to be on this list in previous pre-releases but it has been postponed to Python 3.11 due to some compatibility concerns. You can read the Steering Council communication about it here to learn more.

And now for something completely different

Strange quarks are the third lightest quarks, which are subatomic particles that are so small,  they are believed to be the fundamental particles, and not further divisible. Like down quarks, strange quarks have a charge of -1/3. Like all fermions (which are particles that can not exist in the same place at the same time), strange quarks have a spin of 1/2. What makes strange quarks different from down quarks–apart from having 25 times the mass of down quarks–is that they have something that scientists call "strangeness." Strangeness is basically a resistance to decay against strong force and electromagnetism. This means that any particle that contains a strange quark can not decay due to strong force (or electromagnetism), but instead with the much slower weak force. It was believed that this was a 'strange' method of decay, which is why the scientists gave the particles that name.

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, June 1, 2022

Expedited release of Python3.11.0b3

Due to a known incompatibility with pytest and the previous beta release (Python 3.11.0b2) and after some deliberation, I and the rest of the release team have decided to do an expedited release of Python 3.11.0b3 so the community can continue testing their packages with pytest and therefore testing the betas as expected.

 Where can I get the new release?



What happened? 

Pytest by default rewrites the AST nodes in the testing code to provide better diagnostics when something fails in the test. For doing this, it creates new AST nodes that are then compiled. In Python 3.11, after some changes in the compiler and AST nodes, these new AST nodes that pytest was creating were invalid. This causes CPython to crash in debug mode because we have several assert statements in the compiler, but in release mode this doesn't cause always a crash, but it creates potential corrupted structures in the compiler silently. In 3.11.0b3 we changed the compiler to reject invalid AST nodes, so what was a silent problem and a crash in debug mode turned into an exception being raised. 

We had a fix to allow the nodes that pytest is creating to work to preserve backwards compatibility but unfortunately, it didn't make it into 3.11.0b2. Is still possible to use pytest with 3.11.0b2 if you add "--assert=plain" to the pytest invocation but given how many users would have to modify their test suite invocation we decided to proceed with a new release that has the fix. 

What happens with future beta releases 

Python 3.11.0b3 should be considered as an extra beta release. Instead of four beta releases, we will have five and the next beta release (3.11.0b4) will happen as scheduled on Thursday, 2022-06-16. 

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.