summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [doc] Fix typo c-api/exceptions.rst (GH-27847)Miss Islington (bot)2021-08-231-1/+1
| | | | | | Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn> (cherry picked from commit dcbf7ff6a700b63e637a0445d68866670a398024) Co-authored-by: Sunny Bean <ptq008@gmail.com>
* Note that tp_clear and m_clear are not always called (GH-27581)Miss Islington (bot)2021-08-042-0/+12
| | | | | (cherry picked from commit 10faada709561663d6b1f623d308ff45e3808cca) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-41886: Fix documented type of PyType_Type (GH-22454)Miss Islington (bot)2021-08-031-1/+1
| | | | | (cherry picked from commit ac811f9b5a68ce8756911ef2c8be83b46696018f) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Document PyMember_GetOne and PyMember_SetOne (GH-27555)Miss Islington (bot)2021-08-021-0/+15
| | | | | (cherry picked from commit d382bde220b4c07cce2b924ffeb7525ea1a969f4) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-41103: Resurrect the old buffer protocol. (GH-27437) (GH-27441)Miss Islington (bot)2021-07-292-0/+56
| | | | | | | | 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>
* bpo-43565: Document PyUnicode_KIND's return type as an unsigned int ↵Miss Islington (bot)2021-07-291-1/+1
| | | | | | | (GH-25724) (GH-27439) (cherry picked from commit 47fd4726a2ce8599cc397ddeae40f70eb471e868) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Miss Islington (bot)2021-07-231-10/+1
| | | | | | | | | | | | | | | Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306) * Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG The field is always present in the type struct, as explained in the added comment. * Remove Py_TPFLAGS_HAVE_AM_SEND The flag is not needed, and since it was added in 3.10 it can be removed now. (cherry picked from commit a4760cc32d9e5dac7be262e9736eb30502cd7be3) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Fix a small typo in the docs (GH-26991) (GH-27003)Miss Islington (bot)2021-07-031-1/+1
| | | | | | | (cherry picked from commit a79e2b6497f7d31017c01a41a290a9b3349398fe) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com> Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
* bpo-40939: Remove documentation for `PyParser_*` & add porting notes ↵Miss Islington (bot)2021-06-281-36/+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-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)Victor Stinner2021-06-232-2/+9
| | | | | | | Py_RunMain() now resets PyImport_Inittab to its initial value at exit. It must be possible to call PyImport_AppendInittab() or PyImport_ExtendInittab() at each Python initialization. (cherry picked from commit 489699ca05bed5cfd10e847d8580840812b476cd)
* bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) ↵Miss Islington (bot)2021-06-191-2/+2
| | | | | (GH-26804) (cherry picked from commit 291848195f85e23c01adb76d5a0ff9c6eb7f2614)
* bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it ↵Miss Islington (bot)2021-06-161-2/+2
| | | | | | to 'num'. (GH-26744) (GH-26760) (cherry picked from commit 7247f6f433846c6e37308a550e8e5eb6be379856)
* bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)Miss Islington (bot)2021-06-162-0/+48
| | | | | | Also fix stable ABI type definitions (cherry picked from commit 6773c3eaa735b5061b4a97f2c730703a32d8c9ff) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-42085: [docs] Add versionadded for am_send in type object documentation ↵Miss Islington (bot)2021-05-291-0/+2
| | | | | | | (GH-25465) (GH-26453) (cherry picked from commit 0b11c429c7f1721d9ffb9ae19e3e8e2e7bd6444d) Co-authored-by: Martmists <mail@martmists.com>
* bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445) (#26446)Miss Islington (bot)2021-05-292-9/+12
| | | | | | | (cherry picked from commit 43cf7c864a2941b3f8f823e5928721dd286b7778) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases ↵Miss Islington (bot)2021-05-292-0/+18
| | | | | | | | | (GH-26442) (GH-26443) (cherry picked from commit 8b55bc3f93a655bc803bff79725d5fe3f124e2f0) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Reword paragraph on specific value for Py_LIMITED_API (GH-26101) (GH-26123)Miss Islington (bot)2021-05-141-12/+12
| | | | | (cherry picked from commit ddd30b2dd207c3c963874f0644cdff2ee5989575) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-43795: PEP 652 user documentation (GH-25668) (GH-26034)Miss Islington (bot)2021-05-142-62/+205
| | | | | | | | | | | - 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>
* bpo-43977: Document the new pattern matching type flags (GH-25734)Brandt Bucher2021-05-021-0/+44
|
* bpo-43928: Fix 'succesfully' typo in document (GH-25569)JT2021-04-301-1/+1
|
* bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag (GH-25721)Victor Stinner2021-04-301-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow creating type instances: set tp_new to NULL and don't create the "__new__" key in the type dictionary. The flag is set automatically on static types if tp_base is NULL or &PyBaseObject_Type and tp_new is NULL. Use the flag on the following types: * _curses.ncurses_version type * _curses_panel.panel * _tkinter.Tcl_Obj * _tkinter.tkapp * _tkinter.tktimertoken * _xxsubinterpretersmodule.ChannelID * sys.flags type * sys.getwindowsversion() type * sys.version_info type Update MyStr example in the C API documentation to use Py_TPFLAGS_DISALLOW_INSTANTIATION. Add _PyStructSequence_InitType() function to create a structseq type with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set. type_new() calls _PyType_CheckConsistency() at exit.
* bpo-43774: Enhance debug build documentation (GH-25712)Victor Stinner2021-04-292-48/+27
| | | | | * Add also references to --with-trace-refs option. * Move _ob_next and _ob_prev at the end, since they don't exist by default and are related to debug.
* bpo-43774: Remove unused PYMALLOC_DEBUG macro (GH-25711)Victor Stinner2021-04-292-46/+122
| | | Enhance also the documentation of debug hooks on memory allocators.
* bpo-43908: Document Static Types in the C API (GH-25710)Victor Stinner2021-04-292-43/+60
| | | Update also PyTypeObject structure definition in the doc.
* bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520)Erlend Egeberg Aasland2021-04-281-0/+12
| | | | | | Introduce Py_TPFLAGS_IMMUTABLETYPE flag for immutable type objects, and modify PyType_Ready() to set it for static types. Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-28254: Add a C-API for controlling the GC state (GH-25687)scoder2021-04-281-0/+43
| | | | | | | | 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-43959: clarify the documentation of the PyContextVar C-API (GH-25671)scoder2021-04-281-7/+6
| | | Automerge-Triggered-By: GH:scoder
* Fix typo in exceptions.rst (GH-25434)Ikko Ashimine2021-04-171-1/+1
| | | attemps -> attempts
* bpo-43862: Enhance -W cmdline option documentation (GH-25439)Victor Stinner2021-04-161-0/+7
| | | | | The -W format is "action:message:category:module:lineno". Update also the Python manual page.
* bpo-43774: Add more links to configure options (GH-25363)Victor Stinner2021-04-121-4/+4
|
* Fix Sphinx errors in the documentation and re-activate the suspicious check ↵Pablo Galindo2021-04-121-1/+1
| | | | | | | (GH-25368) The suspicious check is still executed as part of the release process and release managers have been lately fixing some actual errors that the suspicious target can find. For this reason, reactivate the suspicious until we decide what to do in a coordinated fashion.
* bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)Victor Stinner2021-04-101-0/+31
| | | | | | | 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-43774: Document configure options (GH-25283)Victor Stinner2021-04-083-17/+24
| | | | | | Add Doc/using/configure.rst documentation to document configure, preprocessor, compiler and linker options. Add a new section about the "Python debug build".
* Document PyCode_Addr2Line function. (GH-25111)Mark Shannon2021-04-021-0/+8
| | | | | * Document PyCode_Addr2Line function. * Clarify when to use PEP 626 line iterators.
* bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)Inada Naoki2021-03-291-0/+9
| | | | | | | | | | | See [PEP 597](https://www.python.org/dev/peps/pep-0597/). * Add `-X warn_default_encoding` and `PYTHONWARNDEFAULTENCODING`. * Add EncodingWarning * Add io.text_encoding() * open(), TextIOWrapper() emits EncodingWarning when encoding is omitted and warn_default_encoding is enabled. * _pyio.TextIOWrapper() uses UTF-8 as fallback default encoding used when failed to import locale module. (used during building Python) * bz2, configparser, gzip, lzma, pathlib, tempfile modules use io.text_encoding(). * What's new entry
* bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check ↵Pablo Galindo2021-03-232-0/+17
| | | | (GH-25004)
* bpo-43422: Revert _decimal C API addition (GH-24960)Antoine Pitrou2021-03-212-232/+0
| | | | | | | | | Stefan Krah requested the reversal of these (unreleased) changes, quoting him: > The capsule API does not meet my testing standards, since I've focused on the upstream mpdecimal in the last couple of months. > Additionally, I'd like to refine the API, perhaps together with the Arrow community. Automerge-Triggered-By: GH:pitrou
* bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)Inada Naoki2021-03-161-11/+15
| | | See PEP 624.
* bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755)Antoine Pitrou2021-03-111-13/+57
| | | | Also introduce a new C API ``PyErr_SetInterruptEx(int signum)``.
* bpo-3329: Fix typo in PyObjectArenaAllocator doc (GH-24795)Victor Stinner2021-03-091-1/+1
|
* bpo-36346: Document removal schedule of deprecate APIs (GH-20879)Inada Naoki2021-02-222-8/+7
| | | We will remove wstr cache in Python 3.12. See PEP 623.
* bpo-43277: Add PySet_CheckExact to the C-API (GH-24598)Pablo Galindo2021-02-201-0/+6
| | | For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact.
* closes bpo-43266: Improve array formatting. (GH-24573)Erlend Egeberg Aasland2021-02-191-4/+4
|
* closes bpo-43254: Fix *snprintf() man page refs. (GH-24563)Erlend Egeberg Aasland2021-02-191-2/+2
|
* bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)Victor Stinner2021-02-181-3/+5
| | | | | | | | | | | | * Refactor _PyFrame_New_NoTrack() and PyFunction_NewWithQualName() code. * PyFrame_New() checks for _PyEval_BuiltinsFromGlobals() failure. * Fix a ref leak in _PyEval_BuiltinsFromGlobals() error path. * Complete PyFunction_GetModule() documentation: it returns a borrowed reference and it can return NULL. * Move _PyEval_BuiltinsFromGlobals() definition to the internal C API. * PyFunction_NewWithQualName() uses _Py_IDENTIFIER() API for the "__name__" string to make it compatible with subinterpreters.
* bpo-40170: Always define PyIter_Check() as a function (GH-24548)Erlend Egeberg Aasland2021-02-161-2/+2
|
* bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)Erlend Egeberg Aasland2021-02-161-2/+2
|
* bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)Erlend Egeberg Aasland2021-02-151-2/+2
|
* Fix Sphynx syntax in the memory.rst documentv3.10.0a5Pablo Galindo2021-02-021-1/+1
|
* Add a clarification for the object-domain allocators regarding pointer ↵Pablo Galindo2021-01-191-0/+7
| | | | validity (GH-24253)