summaryrefslogtreecommitdiffstats
path: root/Doc/data
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` ↵Miss Islington (bot)2024-01-171-0/+15
| | | | | | | | | (GH-112557) (GH-114120) gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557) (cherry picked from commit a482bc67ee786e60937a547776fcf9528810e1ce) Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-113696: Docs: Annotate PyObject_CallOneArg and PyObject_CallNoArgs ↵Miss Islington (bot)2024-01-051-0/+7
| | | | | | | as returning a strong reference (GH-113697) (#113699) (cherry picked from commit 1ae7ceba29771baf8f2e8d2d4c50a0355cb6b5c8) Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
* bpo-43327: Fix the docs for PyImport_ImportFrozenModuleObject() (GH-24659)Miss Islington (bot)2022-11-271-2/+2
| | | | | | | | | The docs stated that PyImport_ImportFrozenModuleObject() returns a new reference, but it actually returns an int. (cherry picked from commit 62a5dc13e941d01beb215db4218a10977914ab55) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)Gregory P. Smith2022-09-021-3/+6
| | | | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002 Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
* [3.11] gh-95185: Check recursion depth in the AST constructor (GH-95186) ↵Miss Islington (bot)2022-07-261-441/+446
| | | | | | | | (GH-95208) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 00474472944944b346d8409cfded84bb299f601a) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.11] GH-93516: Backport GH-93769 (GH-94231)Mark Shannon2022-06-281-157/+160
| | | * Store offset of first traceable instruction to avoid having to recompute it all the time when tracing.
* [3.11] gh-93382: Cache result of `PyCode_GetCode` in codeobject (GH-93383) ↵Ken Jin2022-06-231-524/+527
| | | | | | (#93493) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* [3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing ↵Mark Shannon2022-06-221-290/+308
| | | | | (GH-94127) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.11] gh-91162: Support splitting of unpacked arbitrary-length tuple over ↵Miss Islington (bot)2022-06-141-2166/+2182
| | | | | | | | | | | | TypeVar and TypeVarTuple parameters (alt) (GH-93412) (GH-93746) For example: A[T, *Ts][*tuple[int, ...]] -> A[int, *tuple[int, ...]] A[*Ts, T][*tuple[int, ...]] -> A[*tuple[int, ...], int] (cherry picked from commit 3473817106c23eca7341c931453da0341c367e1d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-91162: Fix substitution of unpacked tuples in generic aliases ↵Miss Islington (bot)2022-06-011-3109/+3138
| | | | | | | | | | | | | (GH-92335) (#92484) * gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335) (cherry picked from commit 9d25db9db1617f012d7dba118b5b8f2b9e25e116) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> * Regenerate ABI file Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.11] Add CI step to check changes in the exported ABI (#92442)Pablo Galindo Salgado2022-05-081-0/+16566
|
* gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531)Irit Katriel2022-04-151-0/+2
|
* Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition ↵Petr Viktorin2022-04-081-1/+1
| | | | (GH-32365)
* bpo-47115: Document which parts of structs are in limited API/stable ABI ↵Petr Viktorin2022-04-061-881/+885
| | | | | | (GH-32196) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45459: Add Py_buffer to limited API (GH-29991)Christian Heimes2022-02-021-0/+13
| | | | | | | | | | | - [x] ``Py_buffer`` struct - [x] ``PyBuffer_*()`` API functions - [x] ``PyBUF_*`` constants - [x] ``Py_bf_getbuffer`` and ``Py_bf_releasebuffer`` type slots - [x] ``PyMemoryView_FromBuffer()`` API - [x] tests for limited API - [x] ``make regen-limited-abi`` - [x] documentation update - [ ] export ``PyPickleBuffer*()`` API ???
* bpo-43931: Export Python version as API data (GH-25577)Gabriele N. Tornetta2021-12-101-0/+1
| | | | | When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...). Automerge-Triggered-By: GH:pablogsal
* bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes ↵Irit Katriel2021-10-221-0/+1
| | | | (GH-28569)
* bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331)Ken Jin2021-10-211-0/+1
|
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194)Yury Selivanov2021-09-072-6/+6
| | | | | | | | Fix PyAiter_Check to only check for the `__anext__` presense (not for `__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`, `PyObject_GetAiter()` -> `PyObject_GetAIter()`. Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)Hai Shi2021-08-172-0/+4
|
* bpo-41103: Resurrect the old buffer protocol. (GH-27437)Inada Naoki2021-07-292-0/+22
| | | | | Revert "bpo-41103: Remove old buffer protocol support (#21117)" This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.
* bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)Hai Shi2021-07-292-0/+4
|
* bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855)Petr Viktorin2021-06-241-26/+0
| | | | | | I tried to be relatively thorough and give lots of links. One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs. Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)Ken Jin2021-06-161-1/+1
| | | | Also fix stable ABI type definitions
* bpo-43795: Don't list private names in the limited API (GH-26740)Petr Viktorin2021-06-161-2/+1
| | | | | | | | | | | | | * Remove struct _node from the stable ABI list This struct was removed along with the old parser in Python 3.9 (PEP 617) * Stable ABI list: Use the public name "PyFrameObject" rather than "_frame" * Ensure limited API doesn't contain private names Names prefixed by an underscore are private by definition. * Add a blurb
* bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI (GH-26241)Petr Viktorin2021-05-251-1/+0
| | | | | | | | | | | Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4); but to fix that issue it would be enough to add it to the regular C API. The function is undocumented, tests were added very recently ([bpo-44131]()), and most importantly, it is not present in all builds of Python, as the linker sometimes omits it as unused. It should be added back when these issues are fixed. Note that this does not affect Python's regular C API.
* bpo-43795: PEP 652 user documentation (GH-25668)Petr Viktorin2021-05-111-953/+861
| | | | | | - Reformat the C API and ABI Versioning page (and extend/clarify a bit) - Rewrite the stable ABI docs into a general text on C API Compatibility - Add a list of Limited API contents, and notes for the individual items. - Replace `Include/README.rst` with a link to a devguide page with the same info
* bpo-44029: Remove Py_UNICODE APIs (GH-25881)Inada Naoki2021-05-071-84/+0
| | | | | | | | | | | | Remove deprecated `Py_UNICODE` APIs: `PyUnicode_Encode`, `PyUnicode_EncodeUTF7`, `PyUnicode_EncodeUTF8`, `PyUnicode_EncodeUTF16`, `PyUnicode_EncodeUTF32`, `PyUnicode_EncodeLatin1`, `PyUnicode_EncodeMBCS`, `PyUnicode_EncodeDecimal`, `PyUnicode_EncodeRawUnicodeEscape`, `PyUnicode_EncodeCharmap`, `PyUnicode_EncodeUnicodeEscape`, `PyUnicode_TransformDecimalToASCII`, `PyUnicode_TranslateCharmap`, `PyUnicodeEncodeError_Create`, `PyUnicodeTranslateError_Create`. See :pep:`393` and :pep:`624` for reference.
* bpo-43916: Move the _PyStructSequence_InitType function to the internal API ↵Pablo Galindo2021-05-031-1/+0
| | | | (GH-25854)
* bpo-43916: Export the _PyStructSequence_InitType to fix build errors in the ↵Pablo Galindo2021-05-011-0/+1
| | | | curses module (GH-25768)
* bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)Petr Viktorin2021-04-291-2/+169
|
* bpo-28254: Add a C-API for controlling the GC state (GH-25687)scoder2021-04-281-0/+3
| | | | | | | | Add new C-API functions to control the state of the garbage collector: PyGC_Enable(), PyGC_Disable(), PyGC_IsEnabled(), corresponding to the functions in the gc module. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-43795: PEP-652: Clean up the stable ABI/limited API (GH-25482)Petr Viktorin2021-04-231-6/+1
| | | | | | | | | | | | | | | | | | - `_Py_EncodeLocaleRaw`, which is private by name, undocumented, and wasn't exported in `python3.dll`, is moved to a private header. - `_Py_HashSecret_Initialized`, again private by name, undocumented, and not exported in `python3.dll`, is excluded with `Py_LIMITED_API`. - `PyMarshal_*` and `PyMember_*One` functions, declared in private headers and not exported in `python3.dll`, are removed from `Doc/data/stable_abi.dat`. - `PyMem_Calloc` which *was* exported in `python3dll.c`, is moved to public headers where it joins its other `PyMem_*` friends. Only the last change is documented in the blurb; others are not user-visible. (Nothing uses `Doc/data/stable_abi.dat` yet.) https://bugs.python.org/issue43795
* bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)Victor Stinner2021-04-101-0/+4
| | | | | | | Add the Py_Is(x, y) function to test if the 'x' object is the 'y' object, the same as "x is y" in Python. Add also the Py_IsNone(), Py_IsTrue(), Py_IsFalse() functions to test if an object is, respectively, the None singleton, the True singleton or the False singleton.
* bpo-43690: stable_abi.py no longer parses macros (GH-25136)Victor Stinner2021-04-011-1/+0
| | | | | | | | The stable_abi.py script no longer parse macros. Macro targets can be static inline functions which are not part of the stable ABI, only part of the limited C API. Run "make regen-limited-abi" to exclude PyType_HasFeature from Doc/data/stable_abi.dat.
* bpo-43688: Run make regen-limited-abi (GH-25134)Victor Stinner2021-04-011-0/+2
|
* bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check ↵Pablo Galindo2021-03-232-0/+8
| | | | (GH-25004)
* bpo-43244: Remove symtable.h header file (GH-24910)Victor Stinner2021-03-191-1/+0
| | | | | | | | | | | | | | | | | | Rename Include/symtable.h to to Include/internal/pycore_symtable.h, don't export symbols anymore (replace PyAPI_FUNC and PyAPI_DATA with extern) and rename functions: * PyST_GetScope() to _PyST_GetScope() * PySymtable_BuildObject() to _PySymtable_Build() * PySymtable_Free() to _PySymtable_Free() Remove PySymtable_Build(), Py_SymtableString() and Py_SymtableStringObject() functions. The Py_SymtableString() function was part the stable ABI by mistake but it could not be used, since the symtable.h header file was excluded from the limited C API. The Python symtable module remains available and is unchanged.
* bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755)Antoine Pitrou2021-03-111-0/+2
| | | | Also introduce a new C API ``PyErr_SetInterruptEx(int signum)``.
* Update stable ABI script for MacOS and update list of exported symbols ↵Pablo Galindo2020-12-151-0/+1
| | | | (GH-23783)
* bpo-42545: Check that all symbols in the limited ABI are exported (GH-23616)Pablo Galindo2020-12-041-0/+779
|
* bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206)Victor Stinner2020-11-091-0/+6
| | | | | | Add "borrowed reference" and "strong reference" to the documentation glossary. Enhance also Py_INCREF() and Py_NewRef() documentation.
* Delete PyGen_Send (#22663)Vladimir Matveev2020-10-121-5/+0
|
* bpo-41756: Add PyIter_Send function (#22443)Vladimir Matveev2020-10-101-0/+5
|
* bpo-41756: Introduce PyGen_Send C API (GH-22196)Vladimir Matveev2020-09-191-0/+5
| | | | | | | | | | | | | The new API allows to efficiently send values into native generators and coroutines avoiding use of StopIteration exceptions to signal returns. ceval loop now uses this method instead of the old "private" _PyGen_Send C API. This translates to 1.6x increased performance of 'await' calls in micro-benchmarks. Aside from CPython core improvements, this new API will also allow Cython to generate more efficient code, benefiting high-performance IO libraries like uvloop.
* bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in ↵Hai Shi2020-09-091-0/+5
| | | | | refcounts.dat (GH-22112) Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat
* bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)Inada Naoki2020-06-301-3/+0
|
* bpo-41123: Remove PyLong_FromUnicode() (GH-21204)Inada Naoki2020-06-291-5/+0
|
* bpo-41103: Remove old buffer protocol support (#21117)Inada Naoki2020-06-251-18/+0
| | | They are deprecated since Python 3.0.
* bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)Zackery Spytz2020-03-171-1/+2
| | | | PyObject_GenericSetDict() takes three arguments, not two.