summaryrefslogtreecommitdiffstats
path: root/Doc/data
Commit message (Collapse)AuthorAgeFilesLines
* 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.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96501)Gregory P. Smith2022-09-021-1/+4
| | | | | | | | | | | | | | | | | 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#).
* gh-91271: Document which parts of structs are in limited API/stable ABI ↵Petr Viktorin2022-08-051-863/+867
| | | | | (GH-32196) (GH-95711) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) ↵Miss Islington (bot)2021-12-121-758/+768
| | | | | | | | | (GH-30064) (cherry picked from commit 59435eea08d30796174552c0ca03c59b41adf8a5) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the ↵Serhiy Storchaka2021-10-141-289/+297
| | | | | | | | | | | "raw-unicode-escape" codec (GH-28944) (GH-28952) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.raw_unicode_escape_decode(). It is True by default to match the former behavior. (cherry picked from commit 39aa98346d5dd8ac591a7cafb467af21c53f1e5d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the ↵Miss Islington (bot)2021-10-141-5769/+10734
| | | | | | | | | | | | "unicode-escape" codec (GH-28939) (GH-28943) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.unicode_escape_decode(). It is True by default to match the former behavior. (cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) ↵Miss Islington (bot)2021-09-073-10777/+5853
| | | | | | | (GH-28199) Fix PyAiter_Check to only check for the `__anext__` presense (not for `__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`, `PyObject_GetAiter()` -> `PyObject_GetAIter()`.
* bpo-41103: Resurrect the old buffer protocol. (GH-27437) (GH-27441)Miss Islington (bot)2021-07-292-0/+22
| | | | | | | | Revert "bpo-41103: Remove old buffer protocol support (GH-21117)" This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed. (cherry picked from commit ce5e1a6809b714eb0383219190a076d9f883e008) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Correct the order of check-abidump (GH-27229)Pablo Galindo Salgado2021-07-181-4804/+9742
| | | The check was backwards so we were not correctly detecting removals.
* bpo-40939: Remove documentation for `PyParser_*` & add porting notes ↵Miss Islington (bot)2021-06-281-26/+0
| | | | | | | | | | | (GH-26855) (GH-26898) 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. (cherry picked from commit 29987f72650b7cccee4df216c8297e8484a44e6a) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)Miss Islington (bot)2021-06-161-1/+1
| | | | | | Also fix stable ABI type definitions (cherry picked from commit 6773c3eaa735b5061b4a97f2c730703a32d8c9ff) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-43795: Don't list private names in the limited API (GH-26740)Miss Islington (bot)2021-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 (cherry picked from commit 7cad9cb51bdae2144cbab330f13a607ba3471742) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI ↵Miss Islington (bot)2021-05-251-1/+0
| | | | | | | | | | | | | | | | | | (GH-26241) (GH-26353) 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. (cherry picked from commit d16856960e33bc5f64fc5b842f132058becafa37) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-43795: PEP 652 user documentation (GH-25668) (GH-26034)Miss Islington (bot)2021-05-141-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 (cherry picked from commit b05955d6f5f149523b5855a335444b7c6324bdb7) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Add CI step to check changes in the exported ABI (GH-25868)Pablo Galindo2021-05-041-0/+15722
|
* 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.
* bpo-38858: new_interpreter() reuses pycore_init_builtins() (GH-17351)Victor Stinner2019-11-221-2/+0
| | | | | | | | | new_interpreter() now calls _PyBuiltin_Init() to create the builtins module and calls _PyImport_FixupBuiltin(), rather than using _PyImport_FindBuiltin(tstate, "builtins"). pycore_init_builtins() is now responsible to initialize intepr->builtins_copy: inline _PyImport_Init() and remove this function.
* Fix typo: Pyssize_t => Py_ssize_t (GH-15411)Sergey Fedoseev2019-08-261-1/+1
|
* bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set ↵Pablo Galindo2019-07-011-1/+18
| | | | | | PyCode_New as a compatibility wrapper (GH-13959) Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper
* bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)Pablo Galindo2019-05-281-0/+1
| | | | | | | | | | | | | | | | | | * bpo-36540: Documentation for PEP570 - Python positional only arguments * fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments * Update reference for compound statements * Apply suggestions from Carol Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Update Doc/tutorial/controlflow.rst Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Add extra bullet point and minor edits
* bpo-36783: Add new references for C API Documentation changes (GH-13204)Edison A2019-05-131-0/+17
|
* bpo-18085: Update refcounts.dat. (GH-11247)Serhiy Storchaka2018-12-201-332/+1206
| | | | | Fixed some errors in refcounts.dat, remove functions removed in Python 3, and add more entries for documented functions. This will add several automatically generated notes about return values.
* bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243)Mat M2018-12-191-44/+231
| | | | | | | | Makes the documentation more comprehensive in terms of indicating whether or not a function returns a new reference. Also fixes some errors and adds missing functions.
* bpo-35475: Add more PyImport* functions in refcounts.dat. (GH-11142)Serhiy Storchaka2018-12-171-0/+28
|
* Add missed details of the C API introduced in 3.7. (GH-7047)Serhiy Storchaka2018-05-221-0/+76
| | | | | | * Set the limited API version for PyImport_GetModule and PyOS_*Fork functions. * Add PyImport_GetModule and Py_UTF8Mode in PC/python3.def. * Add several functions in Doc/data/refcounts.dat.
* Add PyThread_tss_* to Doc/data/refcounts.dat. (GH-7038)Masayuki Yamamoto2018-05-221-0/+21
| | | Thread Specific Storage (TSS) API is a public C API (new in 3.7).
* bpo-10381: Add timezone to datetime C API (#5032)Paul Ganssle2018-01-241-0/+8
| | | | | | | | | | | | | | | | | | * Add timezone to datetime C API * Add documentation for timezone C API macros * Add dedicated tests for datetime type check macros * Remove superfluous C API test * Drop support for TimeZoneType in datetime C API * Expose UTC singleton to the datetime C API * Update datetime C-API documentation to include links * Add reference count information for timezone constructors
* Mark PyDict_GetItemWithError() as returning a borrowed reference. (#1818)Eric Snow2017-06-011-0/+4
|
* Issue #27186: Document PyOS_FSPath().Brett Cannon2016-06-091-0/+3
|