Last month brought significant progress toward Python 3.14, exciting news from PyCon US, notable community awards, and important updates to several popular Python libraries.
In this news roundup, you’ll catch up on the latest Python 3.14.0a6 developments, discover which PEP has been accepted, celebrate record-breaking community support for PyCon travel grants, and explore recent updates to popular libraries. Let’s dive in!
Join Now: Click here to join the Real Python Newsletter and you'll never miss another Python tutorial, course update, or post.
Python 3.14.0a6 Released on Pi Day
The Python development team has rolled out the sixth alpha version of Python 3.14, marking the penultimate release in the planned alpha series. The date of this particular preview release coincided with Pi Day, which is celebrated annually on March 14 (3/14) in the honor of the mathematical constant π, traditionally marked by eating pies.
As always, the changes and improvements planned for the final Python 3.14 release, which is slated for October later this year, are outlined in the changelog and the online documentation. The major new features include:
- PEP 649: Deferred Evaluation of Annotations
- PEP 741: Python Configuration C API
- PEP 761: Deprecating PGP Signatures for CPython Artifacts
- Improved Error Messages
- A New Type of Interpreter
- Support for UUID Versions 6, 7, and 8
- Python Removals and Deprecations
- C API Removals and Deprecations
Compared to the previous alpha release last month, Python 3.14.0a6 brings a broad mix of bug fixes, performance improvements, new features, and continued enhancements for tests and documentation. Overall, this release packs nearly five hundred commits, most of which address specific pull requests and issues.
Remember that alpha releases aren’t meant to be used in production! That said, if you’d like to get your hands dirty and give this early preview a try, then you have several choices when it comes to installing preview releases.
If you’re a macOS or Windows user, then you can download the Python 3.14.0a6 installer straight from the official release page. To run Python without installation, which might be preferable in corporate environments, you can also download a slimmed-down, embeddable package that’s been precompiled for Windows. In such a case, you simply unpack the archive and double-click the Python executable.
If you’re on Linux, then you may find it quicker to install the latest alpha release through pyenv
, which helps manage multiple Python versions alongside each other:
$ pyenv update
$ pyenv install 3.14.0a6
$ pyenv shell 3.14.0a6
$ python --version
Python 3.14.0a6
Don’t forget to update pyenv
itself first to fetch the list of available versions. Next, install Python 3.14.0a6 and set it as the default version for your current shell session. That way, when you enter python
, you’ll be running the sixth alpha release until you decide to close the terminal window.
Alternatively, you can use Docker to pull the corresponding image and run a container with Python 3.14.0a6 by using the following commands:
$ docker run -it --rm python:3.14.0a6
Python 3.14.0a6 (main, Mar 18 2025, 03:31:04) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit
$ docker run -it --rm -v $(pwd):/app python:3.14.0a6 python /app/hello.py
Hello, World!
The first command drops you into the Python REPL, where you can interactively execute Python code and test snippets in real time. The other command mounts your current directory into the container and runs a Python script named hello.py
from that directory. This lets you run local Python scripts within the containerized environment.
Finally, if none of the methods above work for you, then you can build the release from source code. You can get the Python source code from the downloads page mentioned earlier or by cloning the python/cpython
repository from GitHub:
$ git clone git@github.com:python/cpython.git --branch v3.14.0a6 --single-branch
$ cd cpython/
$ ./configure --enable-optimizations
$ make -j $(nproc)
$ ./python
Python 3.14.0a6 (tags/v3.14.0a6:77b2c933ca, Mar 26 2025, 17:43:06) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
The --single-branch
option tells your Git client to clone only the specified tag (v3.14.0a6
) and its history without downloading all the other branches from the remote repository. The make -j $(nproc)
command compiles Python using all available CPU cores, which speeds up the build process significantly. Once the build is complete, you can run the newly compiled Python interpreter with ./python
.
Note: To continue with the π theme, Python 3.14 includes a new Easter egg. Do you think you can find it? Let us know in the comments below!
PEP 758: Parenthesized Exceptions (Accepted)
After extensive discussions on the Python forum, the community has reached an agreement on the final shape of PEP 758, which proposes to drop the mandatory parentheses around multiple exception types being intercepted. This proposal has been accepted by the Steering Council and is expected to be delivered with Python 3.14 later this year.
Currently, when you want to catch multiple exceptions and handle them with the same block of code, Python requires you to enclose the exception types in parentheses. This applies to both the standard except
clause and the newer except*
expression used for exception groups. Omitting the parentheses results in an immediate syntax error:
>>> from pathlib import Path
>>> path = Path("/root/.python_history")
>>> try:
... print(path.read_text(encoding="utf-8"))
... except FileNotFoundError, PermissionError:
... print(f"Couldn't open the file: {path}")
...
File "<python-input-4>", line 3
except FileNotFoundError, PermissionError:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
Fixing this problem boils down to adding a pair of parentheses around the listed exceptions, just as the error message above suggests:
>>> try:
... print(path.read_text(encoding="utf-8"))
... except (FileNotFoundError, PermissionError):
... print(f"Couldn't read the file: {path}")
...
Couldn't open the file: /root/.python history
One could argue that this requirement makes the syntax inconsistent with other comma-separated constructs in Python, where parentheses are optional. For example, tuple literals and generator expressions can sometimes get away without them.
This somewhat surprising behavior was carried over from legacy Python 2, where parentheses were necessary to avoid ambiguity due to the language’s peculiar syntax. You can expand the collapsible section below to find out more details about it:
In this example, you must use parentheses to group the exceptions:
legacy_code.py
# Python 2.x
import codecs
path = "/root/.python_history"
try:
with codecs.open(path, mode="rb", encoding="utf-8") as file:
print file.read().decode("utf-8")
except (IOError, LookupError), ex:
print ex
The last comma in the highlighted Python 2 expression separates a group of exceptions from the variable that captures the underlying exception object. Without the parentheses, the interpreter would deem this as invalid syntax.
However, Python 2 allowed you to omit the parentheses when catching a single exception:
legacy_code.py
# ...
try:
with codecs.open(path, mode="rb", encoding="utf-8") as file:
print file.read().decode("utf-8")
except IOError, ex:
print ex
In this shorthand notation, the first element represents the exception type, while the second specifies the variable used to capture the exception. The same expression will have different semantics under the new PEP 758.
This old quirk was one of many changes addressed in Python 3. Now, the equivalent syntax for intercepting raised exceptions looks like this:
>>> try:
... print(path.read_text(encoding="utf-8"))
... except (FileNotFoundError, PermissionError) as error:
... print(error)
...
[Errno 13] Permission denied: '/root/.python_history'
Instead of a comma, you use the as
keyword to declare a variable scoped to the immediate except
block. In this case, parentheses help communicate that Python binds one of the listed exception types to the variable error
.
Now, imagine skipping the parentheses for the same expression:
except FileNotFoundError, PermissionError as error:
Which of the two exception types does the as
statement bind the variable to? If you followed the same logic as used in structural pattern matching, then only the last exception type, PermissionError
, would be bound to the variable error
. But that’s not what actually happens in this context!
To prevent confusion, the new PEP 758 will only allow skipping the parentheses when the expression appears without the as
keyword, like in the first example in this section. Otherwise, the code will result in the same syntax error you saw earlier.
Going forward, you’ll have a choice whether to use the parentheses or not when catching multiple exceptions. But you won’t have easy access to the raised exception without them. In practice, this PEP introduces a cosmetic change that will probably make the language slightly more appealing to beginners, though experienced programmers are unlikely to notice much difference.
PyCon US Travel Grants Break Records
The organizers of PyCon US 2025 received an unprecedented number of travel grant applications, breaking another record with 952 submissions from 87 countries, totaling nearly $1.7 million in requested aid. Despite a budget of $266,000 for travel grants, the team was able to offer 272 full travel grants and 33 ticket-only grants, amounting to approximately $384,000—about 23% of the total requests.
Funding for these grants comes from various sources, including PyCon US ticket sales, sponsorships, contributions from Python Core Developers, the Packaging Working Group, the Python Software Foundation (PSF), and generous donations from PyLadies. Additionally, the OpenEDG Python Institute provided direct sponsorship for the 2025 travel grants.
The selection process prioritized global representation, first-time attendees, individuals seeking job opportunities, as well as students, educators, and community organizers. Notably, about 75% of the awarded funds were allocated to applicants from 58 countries outside the United States, emphasizing PyCon US’s commitment to fostering a diverse and international Python community.
For more details on the travel grant process, you can read the full blog post.
The PSF Awards Thomas Wouters
The Python Software Foundation (PSF) has awarded Thomas Wouters with a Distinguished Service Award in recognition of his exceptional contributions spanning over 25 years. Thomas has helped lead important projects, including managing the releases of Python 3.12, 3.13, and 3.14. He has also served on key leadership groups like the Python Steering Council and the PSF Board.
In addition to his technical achievements, Thomas is widely admired for his efforts to make the Python community friendly and open to everyone. His work continues to inspire developers around the world, helping to ensure Python remains accessible and welcoming to all.
Read more in the PSF blog announcement.
Major Python Libraries Updated
The Python ecosystem is constantly evolving, with ongoing improvements to tools, frameworks, and libraries. Several important Python projects released updated versions last month.
Pydantic Gets Major Performance Gains
Pydantic is a powerful data validation and settings management library for Python. It’s easy-to-use, fast, and a widely-trusted tool for validating data.
At the end of March 2025, Pydantic 2.11 was released, bringing significant improvements in both speed and functionality. This version, contributed to by over 50 developers, focuses on dramatically faster schema generation and reduced memory usage for Pydantic models. It also introduces an improved alias configuration API and official support for newer Python typing features (PEP 695 and PEP 696), while dropping support for Python 3.8.
These changes mean Pydantic models build their internal schemas much more efficiently, which can noticeably cut down application startup time and memory overhead in large projects. Developers are advised to upgrade to take advantage of these performance gains.
You can read more about this release in the official blog post.
FastAPI Strengthens Pydantic Integration
FastAPI is a modern, high-performance web framework for building APIs with Python, based on standard type hints. It’s designed to optimize your developer experience so that you can write simple code to build production-ready APIs with best practices built in.
The FastAPI web framework saw a series of 0.115.x releases in March 2025 that refine its integration with Pydantic v2. FastAPI 0.115.11 added first-class support for using Pydantic’s Annotated
type hints with custom validators, such as the new AfterValidator
decorator, including new documentation and examples on custom request validation.
Shortly after, FastAPI 0.115.12 was released as a maintenance update, fixing a bug in how header parameters are handled. Together, these updates smooth out FastAPI’s adoption of Pydantic 2.x features and fix minor regressions from earlier releases. Developers using FastAPI to build APIs can now take advantage of more powerful validation patterns and can expect more consistent behavior for edge cases in request parsing.
You can check out the official release notes to learn more about these updates.
NumPy Continues Stabilization Efforts
NumPy is a powerful Python library that provides the n-dimensional array data structure. It’s the backbone of scientific computing in Python.
NumPy 2.2.4 was released on March 16 as the latest patch update in the NumPy 2.x series. This release focused on stability. It includes a large number of typing improvements and a typical assortment of bug fixes and platform maintenance updates.
Notably, work continues on ensuring free-threaded Python support and ironing out any issues that arose after the major 2.0 transition last year. While NumPy 2.2.4 doesn’t introduce new user-facing features, the internal improvements contribute to making the library more robust. Users are encouraged to upgrade to benefit from these fixes, which make NumPy’s new major version more reliable.
Read more on NumPy’s GitHub releases page.
Django Previews Upcoming Features
Django is a popular web framework for creating complex applications with Python as a backend. It includes built-in features like authentication, an admin interface, and database management.
The Django team released version 5.1.7 on March 6, delivering the latest batch of bug fixes for the current stable branch. This patch release includes routine fixes and security patches, ensuring that projects on the 5.1 line remain secure and stable.
Meanwhile, Django’s next version is on the horizon. Django 5.2, designated as a long-term support (LTS) release, had its release candidate published in mid-March.
Django 5.2, expected in April 2025, is set to bring some notable new features, such as automatic model importing in the Django shell and support for composite primary keys in models. It also extends compatibility to Python 3.13 and introduces built-in support for PostgreSQL connection pooling for more efficient database usage.
Developers can start testing their applications with Django 5.2 RC now, while those staying on 5.1.x should apply the 5.1.7 update to keep their Django projects up-to-date with the latest fixes.
The release notes for both Django 5.7.1 and 5.2rc1 contain more details.
SQLAlchemy Enhances Window Functions
SQLAlchemy is a SQL toolkit and object-relational mapping (ORM) library for Python. It provides a flexible and powerful way to interact with databases using Python code rather than raw SQL statements.
The SQLAlchemy project continued its rapid release cadence with two updates in March 2025—versions 2.0.39 and 2.0.40. These releases are part of the 2.0 series that debuted in early 2023, and they mainly deliver bug fixes and regression resolutions to ensure ORM stability.
For example, version 2.0.40 fixes an edge-case regression in the ORM’s handling of Mapped
type annotations and unifies related error scenarios under a new MappedAnnotationError
class. It also introduces support for the SQL standard GROUPS
window frame specification, which developers can use on window functions for advanced window query definitions.
Users of SQLAlchemy 2.x should upgrade to these latest versions to benefit from the fixes and new capabilities while preparing for the upcoming 2.1 major update, currently in development.
You’ll find more information on the official releases page.
What’s Next for Python?
With the Python 3.14 alpha series nearing completion, the next significant milestone will be the first beta release, bringing us one step closer to the stable release scheduled for October. The recently accepted PEP 758 and the enhancements outlined in Python 3.14’s roadmap promise to make Python more intuitive and robust.
Also, keep an eye out for Django 5.2, scheduled for release later this month. This long-term support version includes eagerly anticipated features like native support for composite primary keys, making your web applications more efficient and powerful.
Stay tuned for more updates, and as always, happy Pythoning!