summaryrefslogtreecommitdiffstats
path: root/Doc/data/refcounts.dat
Commit message (Collapse)AuthorAgeFilesLines
* gh-140550: PEP 793 reference documentation (GH-141197)Petr Viktorin2025-11-261-0/+19
| | | | | | | | | | | * 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.)
* Document that `PyInterpreterState_GetDict` returns a borrowed reference ↵Petr Viktorin2025-10-011-0/+3
| | | | (#139451)
* gh-133644: remove `PyWeakref_GetObject` and `PyWeakref_GET_OBJECT` (GH-133657)Bénédikt Tran2025-09-241-6/+0
|
* gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762)Peter Bierma2025-06-251-0/+24
| | | | Co-authored-by: Brian Schubert <brianm.schubert@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666)Petr Viktorin2025-06-191-0/+4
|
* gh-134160: Split extension module init from PyModule docs; emphasize ↵Petr Viktorin2025-06-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gh-46236: Document PyUnicode_BuildEncodingMap (#133270)Stan Ulbrych2025-05-091-0/+3
|
* gh-133644: Remove deprecated Python initialization getter functions (#133661)Bénédikt Tran2025-05-091-10/+0
| | | | | | | | | | Remove functions: * Py_GetExecPrefix() * Py_GetPath() * Py_GetPrefix() * Py_GetProgramFullPath() * Py_GetProgramName() * Py_GetPythonHome()
* gh-133644: remove deprecated `PyImport_ImportModuleNoBlock` (#133655)Bénédikt Tran2025-05-081-3/+0
|
* gh-46236: Add PyUnicode_Resize() doc (#132628)RUANG (James Roy)2025-04-221-0/+4
| | | Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)RUANG (James Roy)2025-04-141-0/+3
|
* gh-46236: Add missing PyUnicode_Append() doc (#130531)RUANG (James Roy)2025-03-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335)RUANG (James Roy)2025-02-241-0/+3
| | | | | | | * Clarify sys.getdefaultencoding() documentation * Add missing documentation for PyUnicode_GetDefaultEncoding, the C equivalent of sys.getdefaultencoding
* gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and ↵Marc Mueller2025-02-201-3/+16
| | | | | PyUnicode_RPartition (#130191) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)Yuki Kobayashi2025-02-101-0/+7
| | | | Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-128911: Add PyImport_ImportModuleAttr() function (#128912)Victor Stinner2025-01-301-0/+8
| | | | | | | | | | | 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.
* gh-102471, PEP 757: Add PyLong import and export API (#121339)Victor Stinner2024-12-131-0/+7
| | | | | 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>
* Document PyObject_SelfIter (#127861)Miro Hrončok2024-12-131-0/+3
|
* gh-127443: Fix some entries in `Doc/data/refcounts.dat` (#127451)Bénédikt Tran2024-12-021-19/+21
| | | Fix incorrect entries in `Doc/data/refcounts.dat`
* gh-126061: add new functions to `refcounts.dat` (#126788)RUANG (James Roy)2024-11-141-0/+13
|
* gh-105201: Add PyIter_NextItem() (#122331)Erlend E. Aasland2024-08-071-0/+4
| | | | | | | | | 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>
* gh-122555: Remove removed functions from `Doc/data/refcounts.dat` (#122556)Bénédikt Tran2024-08-011-10/+0
|
* gh-74929: PEP 667 C API documentation (gh-119379)Alyssa Coghlan2024-06-011-0/+32
| | | | | | | | * 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
* gh-114329: Add `PyList_GetItemRef` function (GH-114504)Sam Gross2024-02-021-0/+4
| | | | | | | The new `PyList_GetItemRef` is similar to `PyList_GetItem`, but returns a strong reference instead of a borrowed reference. Additionally, if the passed "list" object is not a list, the function sets a `TypeError` instead of calling `PyErr_BadInternalCall()`.
* gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)AN Long2024-01-161-0/+15
| | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-113696: Docs: Annotate PyObject_CallOneArg and PyObject_CallNoArgs as ↵Jamie Phan2024-01-041-0/+7
| | | | returning a strong reference (#113697)
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-211-0/+4
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* Add Py_TYPE() to Doc/data/refcounts.dat (#105949)Victor Stinner2023-06-201-0/+3
|
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-201-0/+3
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-85275: Remove old buffer APIs (#105137)Inada Naoki2023-06-021-15/+0
| | | | | They are now abi-only. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-105182: Remove PyEval_AcquireLock() and PyEval_InitThreads() (#105183)Victor Stinner2023-06-011-6/+0
| | | | | | | | | | | | Remove functions in the C API: * PyEval_AcquireLock() * PyEval_ReleaseLock() * PyEval_InitThreads() * PyEval_ThreadsInitialized() But keep these functions in the stable ABI. Mention "make regen-limited-abi" in "make regen-all".
* gh-105156: Cleanup usage of old Py_UNICODE type (#105158)Victor Stinner2023-06-011-40/+20
| | | | | | | | | | | | * refcounts.dat: * Remove Py_UNICODE functions. * Replace Py_UNICODE argument type with wchar_t. * _PyUnicode_ToLowercase(), _PyUnicode_ToUppercase(), _PyUnicode_ToTitlecase() are no longer deprecated in comments. It's no longer needed since they now use Py_UCS4 type, rather than the deprecated Py_UNICODE type. * gdb: Remove unused char_width() method.
* gh-101578: Amend exception docs (#102057)Erlend E. Aasland2023-02-211-0/+2
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-101578: Amend PyErr_{Set,Get}RaisedException docs (#101962)Erlend E. Aasland2023-02-191-0/+3
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* bpo-43327: Fix the docs for PyImport_ImportFrozenModuleObject() (#24659)Zackery Spytz2022-11-271-2/+2
| | | | | | The docs stated that PyImport_ImportFrozenModuleObject() returns a new reference, but it actually returns an int. Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-93503: Add thread-specific APIs to set profiling and tracing functions in ↵Pablo Galindo Salgado2022-08-241-0/+8
| | | | | | | | | | | | | | | | | the C-API (#93504) * gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API * Use a separate API * Fix NEWS entry * Add locks around the loop * Document ignoring exceptions * Use the new APIs in the sys module * Update docs
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194)Yury Selivanov2021-09-071-4/+4
| | | | | | | | 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-171-0/+3
|
* bpo-41103: Resurrect the old buffer protocol. (GH-27437)Inada Naoki2021-07-291-0/+18
| | | | | 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-291-0/+3
|
* 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-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-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check ↵Pablo Galindo2021-03-231-0/+6
| | | | (GH-25004)
* 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
|