Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...Interfaces Any backwards compatibility guarantees apply only to public interfaces. Accordingly, it is important that users be able to clearly distinguish between public and internal interfaces. Documented interfaces are considered public, unless the documentation explicitly declares them to be provisional or internal interfaces exempt from the usual backwards compatibility guarantees. All undocumented interfaces should be assumed to be internal. To better support introspection, modules should ex...
...interface for pip [1] and other distribution or installation tools to use when working with Python source trees (both the developer tree - e.g. the git tree - and source distributions). The programmatic interface allows decoupling of pip from its current hard dependency on setuptools [2] able for two key reasons: It enables new build systems that may be much easier to use without requiring them to even appear to be setuptools. It facilitates setuptools itself changing its user interface without...
PEP 406 -- Improved Encapsulation of Import State PEP:406 Title:Improved Encapsulation of Import State Author:Nick Coghlan <ncoghlan at gmail.com>, Greg Slodkowicz <jergosh at gmail.com> Status:Withdrawn Type:Standards Track Created:04-Jul-2011 Python-Version:3.4 Post-History:31-Jul-2011, 13-Nov-2011, 04-Dec-2011 Contents Abstract PEP Withdrawal Rationale Proposal Specification ImportEngine API Global variables No changes to finder/loader interfaces Open Issues A...
...interface Replacing Token with ContextVar.unset() Having Token.reset() instead of ContextVar.reset() Making Context objects picklable Making Context a MutableMapping Having initial values for ContextVars Backwards Compatibility Examples Converting code that uses threading.local() Offloading execution to other threads Reference Implementation Acceptance References Acknowledgments Copyright Abstract This PEP proposes a new contextvars module and a set of new CPython C APIs to support contex...
...interface that describes the attribute for documentation and introspection purposes. There is little prior art in Python for designing the descriptor's interface, neither for getting/setting the value nor for describing the attribute otherwise, except some trivial properties (it's reasonable to assume that __name__ and __doc__ should be the attribute's name and docstring). I will propose such an API below. If an object found in the meta-object's __dict__ is not an attribute descriptor, backward...
...Interfaces ABCs are not intrinsically incompatible with Interfaces, but there is considerable overlap. For now, I'll leave it to proponents of Interfaces to explain why Interfaces are better. I expect that much of the work that went into e.g. defining the various shades of "mapping-ness" and the nomenclature could easily be adapted for a proposal to use Interfaces instead of ABCs. "Interfaces" in this context refers to a set of proposals for additional metadata elements attached to a class whi...
...interfaces when installed. The python.exports extension contains three custom subfields: modules: modules exported by the distribution namespaces: namespace packages that the distribution contributes to exports: other Python interfaces exported by the distribution Export specifiers An export specifier is a string consisting of a fully qualified name, as well as an optional extra name enclosed in square brackets. This gives the following four possible forms for an export specifier: module mod...
...declaration, specifying the metaclass to be used to create the new class a class statement can contain a __slots__ declaration, specifying the specific names of the instance variables supported This PEP builds on PEP 252, which adds standard introspection to types; for example, when a particular type object initializes the tp_hash slot, that type object has a __hash__ method when introspected. PEP 252 also adds a dictionary to type objects which contains all methods. At the Python level, this...
...interface to lookup attributes using array offsets. For globals, builtins, and attributes of imported modules, the compiler will generate code that uses the array offsets for fast access. [describe the key parts of the design: dlict, compiler support, stupid name trick workarounds, optimization of other module's globals] The implementation will preserve existing semantics for module namespaces, including the ability to modify module namespaces at runtime in ways that affect the visibility of bui...
...interface to the bz2 compression library, by Gustavo Niemeyer. datetime - a fast, compact implementation in C of date and time calculations ranging from the year 1 to 9999, with optional timezone support; written by Tim Peters. (New in 2.3a2: too much to list here; see Misc/NEWS.) heapq - implements the heap queue algoritm known from 1st year algorithms classes. Code by Kevin O'Connor, write-up by François Pinard, many improvements by Tim Peters. imaplib - added SSL support. imp - exposed ...
...interface: important details like the layout of structures in memory or function calling conventions are determined by the platform and the compiler and its settings. The Stable ABI promise only applies if these lower-details are also stable. For example, an extension built with the CPython 3.10 Stable ABI will be usable with CPython 3.11, 3.12, etc. It will not necessarily be compatible with CPython 4.0, nor with CPython 3.10 on a different platform. The Stable ABI is not generally forward-comp...
...interface is simply a set of directional cursors (near center) Zoom in Choosing Python I had used Python for small scripting projects before, and liked its quick-off-the-blocks feel. It would provide me with a malleable environment in which to experiment with features, to see what Nat would find interesting. Although this was an at-home project to be used only by my son, it shared issues with larger, supposedly more serious projects: unclear requirements, unpredictable customers, and limited...
...interfaces For interoperability with interfaces that only accept strings, interpolation templates can still be prerendered with format, rather than delegating the rendering to the called function. This reflects the key difference from PEP 498, which always eagerly applies the default rendering, without any way to delegate the choice of renderer to another section of the code. Preserving the raw template string Earlier versions of this PEP failed to make the raw template string available on the...
...interface is implemented with classes, i.e., at runtime it is possible to evaluate, e.g., Generic[T].__bases__. But to emphasize the distinction between classes and types the following general rules apply: No types defined below (i.e. Any, Union, etc.) can be instantiated, an attempt to do so will raise TypeError. (But non-abstract subclasses of Generic can be.) No types defined below can be subclassed, except for Generic and classes derived from it. All of these will raise TypeError if they ap...
...Declaration A parameter specification variable is defined in a similar manner to how a normal type variable is defined with typing.TypeVar. from typing import ParamSpec P = ParamSpec("P") # Accepted P = ParamSpec("WrongName") # Rejected because P =/= WrongName The runtime should accept bounds and covariant and contravariant arguments in the declaration just as typing.TypeVar does, but for now we will defer the standardization of the semantics of those options to a later PEP. Valid us...
...interface Movie { title: string; year?: number; // ? marks potentially-missing keys } The difficulty is that the best word for marking a potentially-missing key, Optional[], is already used in Python for a completely different purpose: marking values that could be either of a particular type or None. In particular the following does not work: class Movie(TypedDict): ... year: Optional[int] # means int|None, not potentially-missing! Attempting to use any synonym of “optional”...
...Interfaces Configuration Context Buffer Socket Cipher Suites OpenSSL SecureTransport SChannel Network Security Services (NSS) Proposed Interface Protocol Negotiation TLS Versions Errors Certificates Private Keys Trust Store Runtime Access Changes to the Standard Library Migration of the ssl module Future Credits Copyright Abstract This PEP would define a standard TLS interface in the form of a collection of abstract base classes. This interface would allow Python implementations and t...
...interface. So, basically, you download it, and run: $ python setup.py --name Distribute $ python setup.py --version 0.6.4 Where name and version are metadata fields. This is working fine but as soon as the developers add more code in setup.py, this feature might break or in worst cases might do unwanted things on the target system. Moreover, when an OS packager wants to get the metadata of a distribution he is re-packaging, he might encounter some problems to understand the setup.py file he's...
...Interface in Python and supporting that code and Windows users generally on comp.lang.python Approved, 11-0-0. 15 Other Business Task assignments for new Board Members. Moved to mailing list. Moving E-Vote to PSF controlled servers (Noah and Infrastructure Committee seem on-board here). Should we offer voting services via our hosting to other FLOSS organizations? (DQM opines +1). Moved to mailing list for further discussion. Discuss implementing a formal procedures for member...
...Interface eXtension, a powerful set of user interface components that expands the capabilities of your Tcl/Tk and Python applications. Build Bug #929689: Don't define _XOPEN_SOURCE on UnixWare 7.1.4. What's New in Python 2.3.3 (final)? Release date: 19-Dec-2003 Core and builtins Removed PendingDeprecationWarning from apply(). apply() remains deprecated, but the nuisance warning will not be issued. Library A couple of bugs were squished in trace.py What's New in Python 2.3.3c1...