newest_python_peps 

feeds.twtxt.net

No description provided.

PEP 743: Add Py_COMPAT_API_VERSION to the Python C API
Add Py_COMPAT_API_VERSION and Py_COMPAT_API_VERSION_MAX macros to opt-in for planned incompatible C API changes in a C extension. Maintainers can decide when they make their C extension compatible and also decide which future Python version they want to be compatible with. ⌘ Read more

⤋ Read More

PEP 742: Narrowing types with TypeNarrower
This PEP proposes a new special form, TypeNarrower, to allow annotating functions that can be used to narrow the type of a value, similar to the builtin isinstance(). Unlike the existing typing.TypeGuard special form, TypeNarrower can narrow the type in both the if and else branches of a conditional. ⌘ Read more

⤋ Read More

PEP 737: Unify type name formatting
Add new convenient APIs to format type names the same way in Python and in C. No longer format type names differently depending on how types are implemented. Also, put an end to truncating type names in C. The new C API is compatible with the limited C API. ⌘ Read more

⤋ Read More

PEP 734: Multiple Interpreters in the Stdlib
This PEP proposes to add a new module, interpreters, to support inspecting, creating, and running code in multiple interpreters in the current process. This includes Interpreter objects that represent the underlying interpreters. The module will also provide a basic Queue class for communication between interpreters. Finally, we will add a new concurrent.futures.InterpreterPoolExecutor based on the interpreters module. ⌘ Read more

⤋ Read More

PEP 730: Adding iOS as a supported platform
This PEP proposes adding iOS as a supported platform in CPython. The initial goal is to achieve Tier 3 support for Python 3.13. This PEP describes the technical aspects of the changes that are required to support iOS. It also describes the project management concerns related to adoption of iOS as a Tier 3 platform. ⌘ Read more

⤋ Read More

PEP 729: Typing governance process
This PEP proposes a new way to govern the Python type system: a council that is responsible for maintaining and developing the Python type system. The council will maintain a specification and conformance test suite and will initially be appointed by the Python Steering Council. ⌘ Read more

⤋ Read More

PEP 713: Callable Modules
Modules are currently not directly callable. Classes can define a __call__ method that makes instance objects callable, but defining a similarly named function in the global module scope has no effect, and that function can only be called by importing or referencing it directly as module.__call__. PEP 562 added support for :meth:`~object.__getattr__` and :meth:`~object.__dir__` for modules, but defining __getattr__ to return a value for __call__ still does not make a module callab … ⌘ Read more

⤋ Read More

PEP 710: Recording the provenance of installed packages
This PEP describes a way to record the provenance of installed Python distributions. The record is created by an installer and is available to users in the form of a JSON file provenance_url.json in the .dist-info directory. The mentioned JSON file captures additional metadata to allow recording a URL to a :term:`distribution package` together with the installed distribution hash. This proposal is built on top of PEP 610 following :ref:`its corresponding canonical PyPA spec … ⌘ Read more`

⤋ Read More

PEP 709: Inlined comprehensions
Comprehensions are currently compiled as nested functions, which provides isolation of the comprehension’s iteration variable, but is inefficient at runtime. This PEP proposes to inline list, dictionary, and set comprehensions into the function where they are defined, and provide the expected isolation by pushing/popping clashing locals on the stack. This change makes comprehensions much faster: up to 2x faster for a microbenchmark of a comprehension alone, translating to an 11% speedup for one sample … ⌘ Read more

⤋ Read More

PEP 708: Extending the Repository API to Mitigate Dependency Confusion Attacks
Dependency confusion attacks, in which a malicious package is installed instead of the one the user expected, are an increasingly common supply chain threat. Most such attacks against Python dependencies, including the recent PyTorch incident, occur with multiple package repositories, where a dependency expected to come from one repository (e.g. a custom index) is installed from another (e.g. PyPI). ⌘ Read more

⤋ Read More

PEP 706: Filter for tarfile.extractall
The extraction methods in :external+py3.11:mod:`tarfile` gain a filter argument, which allows rejecting files or modifying metadata as the archive is extracted. Three built-in named filters are provided, aimed at limiting features that might be surprising or dangerous. These can be used as-is, or serve as a base for custom filters. ⌘ Read more

⤋ Read More

PEP 703: Making the Global Interpreter Lock Optional in CPython
CPython’s global interpreter lock (“GIL”) prevents multiple threads from executing Python code at the same time. The GIL is an obstacle to using multi-core CPUs from Python efficiently. This PEP proposes adding a build configuration (–without-gil) to CPython to let it run Python code without the global interpreter lock and with the necessary changes needed to make the interpreter thread-safe. ⌘ Read more

⤋ Read More

PEP 701: Syntactic formalization of f-strings
This document proposes to lift some of the restrictions originally formulated in PEP 498 and to provide a formalized grammar for f-strings that can be integrated into the parser directly. The proposed syntactic formalization of f-strings will have some small side-effects on how f-strings are parsed and interpreted, allowing for a considerable number of advantages for end users and library developers, while also dramatically reducing the maintenance cost of the code dedicated to parsing f- … ⌘ Read more

⤋ Read More

PEP 699: Remove private dict version field added in PEP 509
PEP 509 introduced a private ma_version_tag field for dictionaries to allow optimizations in CPython and extension libraries. This PEP proposes to rescind PEP 509 and declare the field an implementation detail, as it has already been superseded by alternatives. This will further allow the field to be reused for future optimization. ⌘ Read more

⤋ Read More

PEP 691: JSON-based Simple API for Python Package Indexes
The “Simple Repository API” that was defined in PEP 503 (and was in use much longer than that) has served us reasonably well for a very long time. However, the reliance on using HTML as the data exchange mechanism has several shortcomings. ⌘ Read more

⤋ Read More

PEP 690: Lazy Imports
This PEP proposes a feature to transparently defer the execution of imported modules until the moment when an imported object is used. Since Python programs commonly import many more modules than a single invocation of the program is likely to use in practice, lazy imports can greatly reduce the overall number of modules loaded, improving startup time and memory usage. Lazy imports also mostly eliminate the risk of import cycles. ⌘ Read more

⤋ Read More

PEP 685: Comparison of extra names for optional distribution dependencies
This PEP specifies how to normalize distribution _extra_
names when performing comparisons.
This prevents tools from either failing to find an extra name or
accidentally matching against an unexpected name. ⌘ Read more

⤋ Read More

PEP 683: Immortal Objects, Using a Fixed Refcount
Under this proposal, any object may be marked as immortal.
“Immortal” means the object will never be cleaned up (at least until
runtime finalization). Specifically, the refcount for an immortal
object is set to a sentinel value, and that refcount is never changed
by Py_INCREF(), Py_DECREF(), or Py_SET_REFCNT().
For immortal containers, the PyGC_Head is never
changed by the garbage collector. ⌘ Read more

⤋ Read More

PEP 682: Format Specifier for Signed Zero
Though float and Decimal types can represent signed zero, in many
fields of mathematics negative zero is surprising or unwanted – especially
in the context of displaying an (often rounded) numerical result. This PEP
proposes an extension to the string format specification allowing negative
zero to be normalized to positive zero. ⌘ Read more

⤋ Read More

PEP 679: Allow parentheses in assert statements
This pep proposes to allow parentheses surrounding the two-subject form of
assert statements. This will cause the interpreter to reinterpret what before
would have been an assert with a two-element tuple that will always be True
(assert (expression, message)) to an assert statement with a subject and a
failure message, equivalent to the statement with the parentheses removed
(assert expression, message). ⌘ Read more

⤋ Read More

PEP 678: Enriching Exceptions with Notes
Exception objects are typically initialized with a message that describes the
error which has occurred. Because further information may be available when the
exception is caught and re-raised, this PEP proposes to add a .__note__
attribute and update the builtin traceback formatting code to include it in
the formatted traceback following the exception string. ⌘ Read more

⤋ Read More

PEP 677: Callable Type Syntax
This PEP introduces a concise and friendly syntax for callable types,
supporting the same functionality as typing.Callable but with an
arrow syntax inspired by the syntax for typed function
signatures. This allows types like Callable[[int, str], bool] to
be written (int, str) -> bool. ⌘ Read more

⤋ Read More

PEP 671: Syntax for late-bound function argument defaults
Function parameters can have default values which are calculated during
function definition and saved. This proposal introduces a new form of
argument default, defined by an expression to be evaluated at function
call time. ⌘ Read more

⤋ Read More