Python Monthly News

Lazy Imports Land in Python and Other Python News for December 2025

by Martin Breuss 0 Comments community news

A lot happened last month in the world of Python! The core developers pushed ahead on Python 3.15, accepting PEP 810 to bring explicit lazy imports to the language. PyPI tightened account security, Django 6.0 landed with a slew of new features while celebrating twenty years of releases, and the Python Software Foundation (PSF) laid out its financial outlook and kicked off a year-end fundraiser.

Let’s dive into the biggest Python news from the past month!

Python Releases and PEP Highlights

Last month brought forward movement on Python 3.15, with a new alpha release and a major PEP acceptance. Windows users also got an update to the new Python install manager that’s set to replace the traditional installers.

Python 3.15.0 Alpha 2 Keeps the Train Moving

Python 3.15’s second alpha, 3.15.0a2, arrived on November 19 as part of the language’s regular annual release cadence. It’s an early developer preview that isn’t intended for production, but it shows how 3.15 is shaping up and gives library authors something concrete to test against.

Like alpha 1, this release is still relatively small in user-visible features, but it continues the work of:

  • Making UTF-8 the default text encoding for files that don’t specify an encoding, via PEP 686
  • Providing a dedicated profiling API designed to work better with modern profilers and monitoring tools, via PEP 799
  • Exposing lower-level C APIs for creating bytes objects more efficiently, via PEP 782

If you maintain packages, now is a good time to start running tests against the alphas in a separate environment so you can catch regressions early.

You can always confirm which Python you’re running with python -VV:

Shell
$ python -VV
Python 3.15.0a2 (main, Nov 19 2025, 10:42:00) [GCC ...]

Just remember to keep the alpha builds isolated from your everyday projects!

PEP 810 Accepted: Explicit Lazy Imports

One of the month’s most consequential decisions for the language was the acceptance of PEP 810 – Explicit lazy imports, which you may have read about in last month’s news. The Python Steering Council accepted the proposal on November 3, only a month after its formal creation on October 2. With the PEP moving from Draft to Accepted, it’s now targeted for inclusion in Python 3.15!

PEP 810 introduces new syntax for imports that are evaluated only when first used, rather than at module import time. At a high level, you’ll be able to write:

Python
lazy import json

def parse():
    return json.loads(payload)

In this example, Python loads the json module only if parse() runs.

The goals of explicit lazy imports are to:

  • Improve startup time for large applications with many rarely used imports
  • Break tricky import cycles without resorting to local imports inside functions
  • Give frameworks and tools a clear, explicit way to defer expensive imports

Lazy imports are entirely opt-in, meaning that only imports marked as lazy change their behavior. The PEP is also careful to spell out how lazy modules interact with attributes like __all__, exception reporting, and tools such as debuggers.

If you maintain a framework, CLI tool, or large application, it’s worth reading through the PEP and thinking about where lazy imports could simplify your startup path or trim cold-start latency.

Python’s New Install Manager Moves Forward on Windows

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Article

Already a member? Sign-In

Locked learning resources

The full article is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Article

Already a member? Sign-In

About Martin Breuss

Martin is Real Python's Head of Content Strategy. With a background in education, he's worked as a coding mentor, code reviewer, curriculum developer, bootcamp instructor, and instructional designer.

» More about Martin

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

What Do You Think?

What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment below and let us know.

Commenting Tips: The most useful comments are those written with the goal of learning from or helping out other students. Get tips for asking good questions and get answers to common questions in our support portal.


Looking for a real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!

Become a Member to join the conversation.

Keep Learning

Related Topics: community news