| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
| |
reference (GH-139451) (#139464)
Document that `PyInterpreterState_GetDict` returns a borrowed reference (GH-139451)
(cherry picked from commit 80cdf3ef74f6622899c1c82af1e08492e4ab7a00)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-139117) (GH-139119)
Document `Py_AddPendingCall()` change with subinterpreters in 3.12 (GH-139117)
Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In GH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.
(cherry picked from commit 89ff88be89328964dbc50a474a84c566fe920b46)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-129935) (#139043)
(cherry picked from commit e1eca8b308a585af45e9ebf4f605c9f67b7115d8)
Co-authored-by: Rajhans Jadhao <rajhans.jadhao@gmail.com>
|
| |
|
|
|
|
|
| |
Add impl-detail block for PyLong_FromLong docs (GH-126422)
(cherry picked from commit fd2e3d163340a29fc3ad1e9be3289fee64979dbd)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-138651) (#138658)
gh-138644: Update c-api docs of `PyInterpreterState` about PEP-684 (GH-138651)
(cherry picked from commit 4f0c267b40e52b83b2e1515aa0dd74eda31ae18a)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
| |
enhance docs for critical sections (GH-137334)
(cherry picked from commit 5ae8b97f6bdcadd0cc15e0046b0db09e4c6e0d6b)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
during finalization (GH-105805) (GH-137827)
* [3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805)
Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option.
(cherry picked from commit 8cc5aa47ee464ddfd8da5461edecf4a5c72df2ff)
Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* state "3.13.7 and earlier"
* backport: do not add the deprecated marker
* fix Py_IsFinalizing doc ref
---------
Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
|
| |
|
|
|
|
|
|
| |
Fix documentation of hash in PyHash_FuncDef (GH-137595)
Because of a small typo, it wasn't showing up in the generated docs.
(cherry picked from commit 70218b40082396d68c277667fc9bb7f87d095e3c)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-135980) (GH-136371)
* Turn the __future__ table to list-table.
This'll make it easier to add entries that need longer markup
* Semantic markup for __future__ feature descriptions.
* Document CO_* C macros.
(cherry picked from commit 2468aafe984fdf923811ef0c6969e3d6c1b92a82)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
information (GH-136790) (#136799)
Extends the documentation for disabling pymalloc with the `--without-pymalloc` flag regarding why it is worth to use it when enabling AddressSanitizer for Python build (which is done, e.g., in CPython's CI builds).
(cherry picked from commit d19bb4471331ca2cb87b86e4c904bc9a2bafb044)
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
| |
(#136667)
gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664)
(cherry picked from commit e4654e0b3e7d802c8fe984cf39a36a42b67de1ad)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-136210) (GH-136503)
(cherry picked from commit 85bc89f35f40c844df74d913fd32b2b1475fc942)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
| |
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
(cherry picked from commit 579acf45629fa0b7787ec78fa4049fc6a6388b71)
Co-authored-by: Nicolas Trangez <ikke@nicolast.be>
|
| |
|
| |
(cherry picked from commit 34ce1920ca33c11ca2c379ed0ef30a91010bef4f)
|
| |
|
|
|
|
|
|
|
| |
(GH-135762) (GH-135917)
(cherry picked from commit ca87a47b3d92aabaefbbe79c0493d66602184b41)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-135758)
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)
* Docs: Document `PyExceptionClass_Name`
`PyExceptionClass_Name` is an undocumented function in the limited API.
* Document `PyExceptionClass_Check`
(cherry picked from commit 59963e866a1bb8128a50cd53d1b13eeab03df06e)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-135666) (GH-135702)
(cherry picked from commit 140731ff671395fb7a869c2784429c14dc83fb27)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
| |
Docs: Fix markups for emphasis (GH-135598)
The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit 46c60e0d0b716e8e6f0b74a0f9d0542605b1efd4)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
|
| |
SystemExit (GH-135337) (#135395)
gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337)
(cherry picked from commit b706ff003c536c5bca24dfdd3a8917bffcfa3df1)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-135221)
Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640)
Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit f00512db20561370faad437853f6ecee0eec4856)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
|
| |
subinterpreters (GH-134775) (GH-134983)
(cherry picked from commit eb145fabbdd755f803296beba2d235fc32efe592)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
| |
(cherry picked from commit b367e27af9b52528e395f95b277ec7b69e98e287)
|
| |
|
|
|
|
|
| |
(GH-134213) (GH-134884)
(cherry picked from commit 4109a9c6b33faa0032ffc95d96cd0db482af3ce2)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
| |
gh-133678: Document C API third party tools (GH-134526)
(cherry picked from commit c3c88064f5905889057dcdfaaaa4a48f8e2d53d4)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
|
| |
(#134754)
gh-134160: Use multi-phase init in documentation examples (GH-134296)
(cherry picked from commit 96905bdd273d2e5724d2c1b6b0f95ecb0daeaabe)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
| |
Fix sphinx-lint warnings (default-role used). (GH-134647)
(cherry picked from commit 24a47155d2172966fab7d56f2bf9181056fba8d0)
Co-authored-by: Julien Palard <julien@palard.fr>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(gh-132247) (gh-134427)
Two special methods, __buffer__ and __release_buffer__ were added to
Python 3.12 by PEP 688. The C API Type Object documentation for slots
includes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`
but does not refer to the Python Data Model version of those. Add the
missing references.
(cherry picked from commit b529b60fc239d19245e5fafd0514d90097c2eb40)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
|
| |
|
|
| |
(#133900)
|
| |
|
|
|
|
| |
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698f5192dddd2d2f33c7c0a3d05afc223)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
|
| | |
|
| |
|
|
|
|
|
|
| |
(#133752)
gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6fdd1145c48ec7c3e668636cc301de8959e)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
| |
gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249)
(cherry picked from commit 8421b648e91981e393a740dd9fb7b7dbf4cf07dc)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)
(cherry picked from commit bba14c3e0129dc6c36c304018ab60a5580043f55)
# Conflicts:
# Doc/c-api/unicode.rst
|
| |
|
|
|
| |
(GH-132911) (#132932)
(cherry picked from commit 3fa024dec32e2ff86baf3dd7e14a0b314855327c)
|
| |
|
|
| |
Co-authored-by: Kuba_Z2 <77853483+KubaZ2@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
(cherry picked from commit 8768df2fe94a8444baff47a5b8c7414a2118731a)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
|
| |
|
|
|
|
| |
Fix a typo in c-api/typeobj.rst (GH-132317)
(cherry picked from commit f69b344e0944bd8d59d2dc4d98e988cc4dbfadf3)
Co-authored-by: Yongzi Li <1538321957@qq.com>
|
| |
|
|
|
|
|
|
| |
Docs: Fix specifications of `gcvisitobjects_t` (GH-132433)
`gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0.
(cherry picked from commit 1e5798e37255e921beae2aaa8329d5c48a2ef230)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
|
| | |
|
| |
|
|
|
|
| |
gh-131544: Update docs for PyType_AddWatcher (gh-132015)
(cherry picked from commit 25275bda790e8a689092e83855d6d0574f26061b)
Co-authored-by: Donghee Na <donghee.na@python.org>
|
| |
|
|
|
|
|
|
|
| |
(GH-131458)
The structure definition for `PyTypeObject` is in `Include/cpython/object.h`,
not in `Include/object.h`.
(cherry picked from commit a0478c9f0c6d6a75ca35a8dc2c74d3b58877f094)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-131118) (#131476)
gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH-131118)
The tp_finalize C API doc used PyErr_Fetch() and PyErr_Restore() in
its example code. That API was deprecated in 3.12.
Update to point to the suggested replacement function
PyErr_GetRaisedException() which has a sample usage.
(cherry picked from commit a4832f6b9a62771725b159bc7cd6c49fb45e3bc8)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-131424)
(cherry picked from commit f81990024554a75e2ab31133a72d9f0954690435)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-129850) (GH-131079)
- Add alignment requirement
- Mention that ob_size is unreliable if you don't control it
- Add some links for context
- basicsize should include the base type in generaly not just PyObject
- suggest Py_SIZE & Py_SET_SIZE
This adds a “by-the-way” link to `PyObject_New`, which shouldn't be
used for GC types. In order to be comfortable linking to it, I also
add a link to `PyObject_GC_New` from its docs. And the same for
`*Var` variants, while I'm here.
(cherry picked from commit ad0f618ab3eb1f26f8830a863aaf7bb70835c00d)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-130817) (#131225)
gh-130814: Enhance documentation for Python C API type objects (GH-130817)
The "Type Objects" title in `c-api/typeobj.rst`, duplicating the title of `c-api/type.rst`,
has been changed to "Type Objects Structures", thereby slightly improving Sphinx
search.
(cherry picked from commit 6b932edc5216d9766e70fef300a6b842ab33204c)
Co-authored-by: sharktide <meherrihaan@gmail.com>
|
| |
|
|
|
|
|
| |
Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in
3.13.2.
Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
|
| |
|
|
|
|
| |
(cherry picked from commit b3c18bfd828ba90b9c712da74095c4a052887655)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
| |
Fix grammar typo in `Doc/c-api/arg.rst` (GH-130741)
(cherry picked from commit 37145cb89fe806377a5e9ed1fdac92dd3a5df2c0)
Co-authored-by: Arijit Kumar Das <arijitkrdas2004@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-130511)
* Clarify sys.getdefaultencoding() documentation
* Add missing documentation for PyUnicode_GetDefaultEncoding,
the C equivalent of sys.getdefaultencoding
(cherry picked from commit 9f25c1f012c8d432a93bf2dcad5f19a64dc00d3c)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
|