Python Language Summit 2026 Explores Dedicated std Namespace

A glowing crystal cube safely enclosed inside a clear glass display case on a neutral surface.

At the Python Language Summit 2026, Steering Council member and Release Manager Pablo Galindo Salgado opened discussions on introducing a dedicated top-level namespace for the Python standard library, according to a report by the Python project blog.

The Flat Namespace Problem

Python currently uses a flat module namespace, which frequently causes confusing AttributeError exceptions when local project files or third-party dependencies share names with standard library modules like json, math, or random. This shadowing occurs because higher-precedence locations in sys.path, such as the current working directory, take precedence over standard library imports. While Python 3.11 introduced the -P option to prevent prepending unsafe paths, most users do not enable it.

Beyond debugging friction for beginners, the flat namespace forces core developers to choose awkward names or add suffixes like lib (such as tomllib or graphlib) for new standard library modules to avoid conflicts with existing packages on PyPI.

The Proposed std Namespace and Unbundling

The proposed solution suggests a new top-level std namespace, allowing developers to explicitly import standard library modules as std.json or via syntax like from std import json. Existing imports would continue working indefinitely to avoid breaking backwards compatibility, while future modules could be restricted exclusively to the new namespace.

A potential side effect of reserving this namespace is the ability to unbundle the standard library, enabling modules to be distributed and upgraded independently through PyPI outside of core interpreter releases. However, participants noted potential trade-offs by pointing to Ruby's experience with gemified standard libraries, which encountered long deprecation cycles and unpatched vulnerabilities in unmanaged gems.

Summit Feedback and Alternative Syntax

During the summit discussions, attendees debated various implementation details. Stefan Behnel and Guido van Rossum discussed limiting the change to from imports, such as from std import random, to keep user code mostly unchanged and avoid duplicating modules in sys.modules. Following a temperature check, attendees showed positive reception toward exploring keyword-based syntax ideas.

Gregory P. Smith cautioned that the proposal aims to solve multiple distinct issues simultaneously, advising the core team to keep all ideas on the table while remaining precise about which core problems they intend to tackle first.

AI-generated editorial illustration; not a documentary photograph.

Source: One namespace to namespace them all (Python Language Summit 2026)

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *