| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* gh-140550: PEP 793 reference documentation
Since the PEP calls for soft-deprecation of the existing initialization
function, this reorganizes the relevant docs to put the new way of
doing things first, and de-emphasize the old.
Some bits, like the tutorial, are left out of this patch. (See the
issue for a list.)
|
| |
|
|
|
|
|
|
| |
ABI manifest (#141910)
These were added to the limited API in 3.5.
Not including them in `Misc/stable_abi.toml` was a bug.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ABI (GH-139166)
* Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI
Group them together with Py_TYPE & Py_SET_TYPE to cut down
on repetitive preprocessor macros.
Format repetitive definitions in object.c more concisely.
Py_SET_TYPE is still left out of the Limited API.
|
| |
|
| |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
|
| | |
|
| |
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
|
|
| |
(GH-138190)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
| |
(#139451)
|
| | |
|
| | |
|
| |
|
|
|
| |
(GH-137212)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
| |
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multi-phase init (GH-135126)
Document behaviour of single-phase init. Call it "legacy".
Reorganize PyModule docs.
Move PyInit_modulename docs from the tutorial to reference documentation.
Move PyMODINIT_FUNC docs from generic macros to the new page.
Add doc stubs for `PYTHON_API_VERSION` & `PYTHON_ABI_VERSION`
Remove incorrect refcounts.dat entry for `PyModuleDef_Init`.
This removes the "Return value: Borrowed reference." note.
Instead, note that the function sometimes returns a borrowed reference,
sometimes as strong one.
(IMO, it's best to not think of `PyModuleDef` as a `PyObject` at all,
and act like it can't be reference-counted.)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
| |
Add functions PySys_GetAttr(), PySys_GetAttrString(),
PySys_GetOptionalAttr() and PySys_GetOptionalAttrString().
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Remove functions:
* Py_GetExecPrefix()
* Py_GetPath()
* Py_GetPrefix()
* Py_GetProgramFullPath()
* Py_GetProgramName()
* Py_GetPythonHome()
|
| | |
|
| |
|
| |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
|
| |
|
|
| |
PyLong_FromUnsignedNativeBytes to the limited API (GH-132640)
|
| | |
|
| |
|
|
|
| |
Add again PySequence_Fast() to the limited C API.
Add unit tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add missing PyUnicode_Append() doc
* Change the copied content
* Add '`` ``'
* Change doc
* Add PyUnicode_AppendAndDel function doc
* Change doc
* Add PyUnicode_AppendAndDel to refcounts
* Change doc
* Change doc
Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Change doc
---------
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
| |
* Clarify sys.getdefaultencoding() documentation
* Add missing documentation for PyUnicode_GetDefaultEncoding,
the C equivalent of sys.getdefaultencoding
|
| |
|
|
|
| |
PyUnicode_RPartition (#130191)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
| |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
| |
The function never worked with the limited C API. It was added by
mistake.
|
| |
|
|
|
|
|
|
|
|
|
| |
Add PyImport_ImportModuleAttr() and
PyImport_ImportModuleAttrString() functions.
* Add unit tests.
* Replace _PyImport_GetModuleAttr()
with PyImport_ImportModuleAttr().
* Replace _PyImport_GetModuleAttrString()
with PyImport_ImportModuleAttrString().
* Remove "pycore_import.h" includes, no longer needed.
|
| | |
|
| |
|
|
|
| |
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| | |
|
| |
|
| |
Fix incorrect entries in `Doc/data/refcounts.dat`
|
| | |
|
| |
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| | |
|
| | |
|
| |
|
|
| |
(GH-124163)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add new functions to convert C <stdint.h> numbers from/to Python int:
* PyLong_FromInt32()
* PyLong_FromUInt32()
* PyLong_FromInt64()
* PyLong_FromUInt64()
* PyLong_AsInt32()
* PyLong_AsUInt32()
* PyLong_AsInt64()
* PyLong_AsUInt64()
|
| |
|
|
|
|
|
|
|
| |
Return -1 and set an exception on error; return 0 if the iterator is
exhausted, and return 1 if the next item was fetched successfully.
Prefer this API to PyIter_Next(), which requires the caller to use
PyErr_Occurred() to differentiate between iterator exhaustion and errors.
Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
|
| | |
|
| |
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
| |
from public API/ABI (GH-119680)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
| |
In the limited C API 3.14 and newer, Py_TYPE() is now implemented as
an opaque function call to hide implementation details.
|
| |
|
|
|
|
|
|
| |
* Add docs for new APIs
* Add soft-deprecation notices
* Add What's New porting entries
* Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead
* Other related cleanups found when looking for refs to the deprecated APIs
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Restore these functions removed in Python 3.13 alpha 1:
* Py_SetPythonHome()
* Py_SetProgramName()
* PySys_SetArgvEx()
* PySys_SetArgv()
|
| | |
|
| | |
|