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.
...API (application programming interface). The Limited API is a subset of CPython's C API. Extensions that target the Limited API should define the preprocessor macro Py_LIMITED_API to either 3 or the current PYTHON_API_VERSION. This will enable Stable ABI versions of several functions and limit definitions to the Limited API. (However, note that the macro is not perfect: due to technical issues or oversights, some non-limited API might be exposed even with it defined.) The Limited API is not guar...
...APIs using it has been deprecated since Python 3.3. Inefficient All of these APIs are implemented using PyUnicode_FromWideChar. So these APIs are inefficient when user want to encode Unicode object. Not used widely When searching from the top 4000 PyPI packages [1], only pyodbc use these APIs. PyUnicode_EncodeUTF8() PyUnicode_EncodeUTF16() pyodbc uses these APIs to encode Unicode object into bytes object. So it is easy to fix it. [2] Alternative APIs There are alternative APIs to accept...
...API": a subset of the C API. When the limited C API is used, it becomes possible to build a C extension only once and use it on multiple Python versions: that's the stable ABI. The main limitation of the PEP 384 is that C extensions have to opt-in for the limited C API. Only very few projects made this choice, usually to ease distribution of binaries, especially on Windows. This PEP moves the C API towards the limited C API. Ideally, the C API will become the limited C API and all C extensions w...
...API evolutions would utilize a different mechanism for API evolution. However the major version is included to disambiguate with future versions (e.g. a hypothetical simple api v2 that lived at /v2/, but which would be confusing if the repository-version was set to a version >= 2). This PEP sets the current API version to "1.0", and expects that future PEPs that further evolve the simple API will increment the minor version number. Clients Clients interacting with the simple API SHOULD intro...
...API for TLS used inside the CPython interpreter consists of 6 functions: PyAPI_FUNC(int) PyThread_create_key(void) PyAPI_FUNC(void) PyThread_delete_key(int key) PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) PyAPI_FUNC(void *) PyThread_get_key_value(int key) PyAPI_FUNC(void) PyThread_delete_key_value(int key) PyAPI_FUNC(void) PyThread_ReInitTLS(void) These would be superseded by a new set of analogous functions: PyAPI_FUNC(int) PyThread_tss_create(Py_tss_t *key) PyAPI_FUNC(void)...
...API to implement interfaces to application functionality. This required little interaction with our API development team, and it could be done without fear of misusing the API. While we designed the API primarily for CORE, the central enterprise application, it is reused in a number of other systems at Rackspace. For example, one group built a SOAP server on top of the API, in order to access it from their PHP applications. Other applications use the API directly, and it has been extremely grati...
...API (https://docs.python.org/3/c-api/index.html) [3](1, 2) PyCodeObject (https://docs.python.org/3/c-api/code.html#c.PyCodeObject) [4].NET Core Runtime (CoreCLR) (https://github.com/dotnet/coreclr) [5](1, 2, 3) PyEval_EvalFrameEx() (https://docs.python.org/3/c-api/veryhigh.html?highlight=pyframeobject#c.PyEval_EvalFrameEx) [6](1, 2) Numba (http://numba.pydata.org/) [7]numba-users mailing list: "Would the C API for a JIT entrypoint being proposed by Pyjion help out Numba?...
...API. In the proxy implementation proposed in PEP 667, users of the new frame API will not see changes made to additional variables by users of the old API, and changes made to additional variables via the old API will be overwritten on subsequent calls to PyEval_GetLocals(). the PyLocals_Get() API in this PEP is called PyEval_Locals() in PEP 667. This function name is a bit strange as it lacks a verb, making it look more like a type name than a data access API. this PEP adds PyLocals_GetCopy() a...
...API SIG for Supporting Use of the Python/C API The Python/C API SIG is a forum for discussions about the discussion and support using the Python/C API in extending or embedding python.
...API be all that is necessary to acquire the Python GIL. Apart from the existing, standard Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros, it is assumed that no additional thread state API functions will be used by the extension. Extensions with such complicated requirements are free to continue to use the existing thread state API. Proposal This proposal recommends a new API be added to Python to simplify the management of the GIL. This API will be available on all platforms built w...
16 Sept. from 7am UTC to 11am UTC, 2023
Location: Maputo, Mozambique
PyTraining: Getting Started with API Design using Python
...API, which may change for the next release. While it is considered an unlikely outcome, such packages may even be removed from the standard library without a deprecation period if the concerns regarding their API or maintenance prove well-founded. Proposal - a documented provisional state Whenever the Python core development team decides that a new package should be included into the standard library, but isn't entirely sure about whether the package's API is optimal, the package can be inclu...
...API, this includes the /serverkey URL and all of the URLs under /serversig. Rationale The PyPI mirroring infrastructure (defined in PEP 381) provides a means to mirror the content of PyPI used by the automatic installers, and as a component of that, it provides a method for verifying the authenticity of the mirrored content. This PEP proposes the removal of this API due to: There are no known implementations that utilize this API, this includes pip and setuptools. Because this API uses DSA it...
...API (no toml.dump[s]) This PEP currently proposes not including a write API; that is, there will be no equivalent of toml.dump or toml.dumps, as discussed at Including an API for writing TOML. If we included a write API, it would be relatively straightforward to convert most code that uses toml to the new standard library module (acknowledging that this is very different from a compatible API, as it would still require code changes). A significant fraction of toml users rely on this, based on co...
...APIs Introspection concerns itself with finding out what attributes an object has. Python's very general getattr/setattr API makes it impossible to guarantee that there always is a way to get a list of all attributes supported by a specific object, but in practice two conventions have appeared that together work for almost all objects. I'll call them the class-based introspection API and the type-based introspection API; class API and type API for short. The class-based introspection API is us...
...API, as the existing API will continue to work correctly. In particular, modules that need to support both Python 2 and Python 3 might get too complicated when simultaneously supporting this new API and the old Unicode API. In order to port modules to the new API, try to eliminate the use of these API elements: the Py_UNICODE type, PyUnicode_AS_UNICODE and PyUnicode_AsUnicode, PyUnicode_GET_SIZE and PyUnicode_GetSize, and PyUnicode_FromUnicode. When iterating over an existing string, or lookin...
...API. They can change or be removed at any time in any way. These include: Function, class, module, attribute, method, and C-API names and types that are prefixed by "_" (except special names). Anything documented publicly as being private. Imported modules (unless explicitly documented as part of the public API; e.g. importing the bacon module in the spam does not automatically mean spam.bacon is part of the public API unless it is documented as such). Inheritance patterns of internal classes...
...API for this is TBD (but will probably use a distinct context management object, along the lines of that created by decimal.localcontext). Open Issues API design for falling back to global import state The current proposal relies on the from_engine() API to fall back to the global import state. It may be desirable to offer a variant that instead falls back to the global import state dynamically. However, one big advantage of starting with an "as isolated as possible" design is that it become...
...API Extensions to the API Changes to existing APIs Behavior of f_locals for optimized functions Backwards Compatibility Python C-API PyEval_GetLocals PyFrame_FastToLocals, etc. Implementation C API Comparison with PEP 558 Open Issues References Copyright Abstract In early versions of Python all namespaces, whether in functions, classes or modules, were all implemented the same way: as a dictionary. For performance reasons, the implementation of function namespaces was changed. Unfor...
...API PEP:592 Title:Adding "Yank" Support to the Simple API Author:Donald Stufft <donald at stufft.io> BDFL-Delegate:Paul Moore <p.f.moore at gmail.com> Discussions-To:https://discuss.python.org/c/packaging Status:Final Type:Standards Track Created:07-May-2019 Resolution:https://discuss.python.org/t/pep-592-support-for-yanked-files-in-the-simple-repository-api/1629/30 Contents Abstract Motivation Specification Installers Mirrors Rejected Ideas Warehouse/PyPI Imple...