Commit Graph

1694 Commits

Author SHA1 Message Date
Miss Islington (bot) 7fdc829bc2
Doc: remove unnecessary section header (GH-134917)
(cherry picked from commit b367e27af9)
2025-05-30 18:14:00 +09:00
Miss Islington (bot) a9ba2ecae5
[3.13] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-134213) (GH-134884)
(cherry picked from commit 4109a9c6b3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-29 13:44:00 +00:00
Miss Islington (bot) d6e4786937
[3.13] gh-133678: Document C API third party tools (GH-134526) (#134792)
gh-133678: Document C API third party tools (GH-134526)
(cherry picked from commit c3c88064f5)

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>
2025-05-27 15:44:44 +00:00
Miss Islington (bot) 480f02dafa
[3.13] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134754)
gh-134160: Use multi-phase init in documentation examples (GH-134296)
(cherry picked from commit 96905bdd27)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-26 21:50:19 +00:00
Miss Islington (bot) f331d03e88
[3.13] Fix sphinx-lint warnings (default-role used). (GH-134647) (#134669)
Fix sphinx-lint warnings (default-role used). (GH-134647)
(cherry picked from commit 24a47155d2)

Co-authored-by: Julien Palard <julien@palard.fr>
2025-05-25 19:29:38 +00:00
Miss Islington (bot) bc60b33745
[3.13] gh-132246: Add special buffer methods to C API Type Object docs (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 b529b60fc2)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 16:34:13 +02:00
Peter Bierma 8d92823eca
[3.13] Docs: C API: Fix the incorrect `PyThreadState_Swap` documentation (#133900) 2025-05-19 18:24:00 +05:30
Miss Islington (bot) 018ec634f6
[3.13] document `Py_VISIT` as a macro in the docs (GH-133688) (#134187)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:36:04 +00:00
Stan Ulbrych 78a04b3300
[3.13] gh-46236: Document PyUnicode_BuildEncodingMap (#133770) 2025-05-13 19:23:43 -04:00
Miss Islington (bot) a98d46a9aa
[3.13] gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749) (#133752)
gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6fdd1)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-09 13:48:58 +00:00
Miss Islington (bot) 679e632c5e
[3.13] gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249) (#132282)
gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249)
(cherry picked from commit 8421b648e9)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-01 12:09:33 +01:00
Stan Ulbrych ff4134603a
[3.13] gh-46236: Document `PyUnicodeIter_Type` (GH-132925) (GH-133149)
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)

(cherry picked from commit bba14c3e01)

# Conflicts:
#	Doc/c-api/unicode.rst
2025-04-29 18:11:31 +02:00
Bénédikt Tran 7ebfc6ec5e
[3.13] gh-132909: handle overflow for `'K'` format in `do_mkvalue` (GH-132911) (#132932)
(cherry picked from commit 3fa024dec3)
2025-04-25 12:44:53 +00:00
Miss Islington (bot) 52e0f564d0
[3.13] Fix a grammar error in the `Py_ALWAYS_INLINE` doc (GH-129304) (#132877)
Co-authored-by: Kuba_Z2 <77853483+KubaZ2@users.noreply.github.com>
2025-04-24 14:27:41 +00:00
Victor Stinner 866b6359e5
[3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521)
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)

(cherry picked from commit 8768df2fe9)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-04-14 16:48:40 +00:00
Miss Islington (bot) 244a642443
[3.13] Fix a typo in c-api/typeobj.rst (GH-132317) (#132464)
Fix a typo in c-api/typeobj.rst (GH-132317)
(cherry picked from commit f69b344e09)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-04-13 07:24:46 +00:00
Miss Islington (bot) 1884a3bbd1
[3.13] Docs: Fix specifications of `gcvisitobjects_t` (GH-132433) (#132441)
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 1e5798e372)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-04-12 15:42:26 +00:00
Thomas Wouters 6280bb5478 Python 3.13.3 2025-04-08 15:54:08 +02:00
Miss Islington (bot) 75d453b0ab
[3.13] gh-131544: Update docs for PyType_AddWatcher (gh-132015) (gh-132019)
gh-131544: Update docs for PyType_AddWatcher (gh-132015)
(cherry picked from commit 25275bda79)

Co-authored-by: Donghee Na <donghee.na@python.org>
2025-04-03 01:24:43 +09:00
Miss Islington (bot) 2b5feb1f9e
[3.13] Docs: Fix documentation for "PyTypeObject Definition" (GH-130936) (GH-131458)
The structure definition for `PyTypeObject` is in `Include/cpython/object.h`,
not in `Include/object.h`.
(cherry picked from commit a0478c9f0c)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-20 13:41:06 +01:00
Miss Islington (bot) 69db2ebfce
[3.13] gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (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 a4832f6b9a)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-03-19 17:34:15 +00:00
Miss Islington (bot) 49efc411fa
[3.13] gh-118915: Document `PY_MONITORING_IS_INSTRUMENTED_EVENT` (GH-128026) (GH-131424)
(cherry picked from commit f819900245)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-19 11:37:34 +01:00
Miss Islington (bot) 6ceb8fcfb6
[3.13] gh-129675: Update documentation for tp_basicsize & tp_itemsize (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 ad0f618ab3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-03-17 16:18:26 +01:00
Miss Islington (bot) 6c10767232
[3.13] gh-130814: Enhance documentation for Python C API type objects (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 6b932edc52)

Co-authored-by: sharktide <meherrihaan@gmail.com>
2025-03-14 09:59:19 +00:00
Russell Keith-Magee 589f422d1b
[3.13] gh-130940: Remove PyConfig.use_system_logger (#131129)
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions Details
Tests / Check if generated files are up to date (push) Blocked by required conditions Details
Tests / Ubuntu SSL tests with OpenSSL (3.0.15, ubuntu-24.04) (push) Blocked by required conditions Details
Tests / Ubuntu SSL tests with OpenSSL (3.1.7, ubuntu-24.04) (push) Blocked by required conditions Details
Tests / Ubuntu SSL tests with OpenSSL (3.2.3, ubuntu-24.04) (push) Blocked by required conditions Details
Tests / Ubuntu SSL tests with OpenSSL (3.3.2, ubuntu-24.04) (push) Blocked by required conditions Details
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions Details
Tests / Address sanitizer (ubuntu-24.04) (push) Blocked by required conditions Details
Tests / All required checks pass (push) Blocked by required conditions Details
Lint / lint (push) Failing after 34s Details
Tests / Change detection (push) Successful in 27m51s Details
Tests / Docs (push) Has been skipped Details
Tests / Check if the ABI has changed (push) Failing after 31s Details
Tests / Windows ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (Win32, false, windows-latest) (push) Has been skipped Details
Tests / Windows ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (arm64, false, windows-latest) (push) Has been skipped Details
Tests / Windows ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (arm64, true, windows-latest) (push) Has been skipped Details
Tests / Windows ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (x64, false, windows-latest) (push) Has been skipped Details
Tests / Windows ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (x64, true, windows-latest) (push) Has been skipped Details
Tests / Windows MSI${{ '' }} (arm64) (push) Has been skipped Details
Tests / Windows MSI${{ '' }} (x64) (push) Has been skipped Details
Tests / Windows MSI${{ '' }} (x86) (push) Has been skipped Details
Tests / macOS ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (false, ${{ github.repository_owner != 'python' }}, ghcr.io/cirruslabs/macos-runner:sonoma) (push) Failing after 26m22s Details
Tests / macOS ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (true, ${{ github.repository_owner != 'python' }}, ghcr.io/cirruslabs/macos-runner:sonoma) (push) Failing after 31s Details
Tests / Ubuntu ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (false) (push) Failing after 28m19s Details
Tests / WASI (push) Failing after 28m29s Details
Tests / macOS ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (false, ${{ github.repository_owner != 'python' }}, macos-14) (push) Failing after 33m34s Details
Tests / macOS ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (false, ${{ github.repository_owner != 'python' }}, macos-13) (push) Failing after 33m34s Details
Tests / CIFuzz (address) (push) Has been skipped Details
Tests / CIFuzz (memory) (push) Has been skipped Details
Tests / CIFuzz (undefined) (push) Has been skipped Details
Tests / macOS ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (true, ${{ github.repository_owner != 'python' }}, macos-14) (push) Failing after 32m44s Details
Tests / Ubuntu ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (true) (push) Failing after 36m1s Details
Tests / Thread sanitizer ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (false) (push) Failing after 25m11s Details
Tests / Thread sanitizer ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }} (true) (push) Successful in 53m17s Details
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.
2025-03-13 11:53:11 +08:00
Miss Islington (bot) 30e8bd2a41
[3.13] gh-130711: Document `PyBaseObject_Type` (GH-130712) (GH-130792)
(cherry picked from commit b3c18bfd82)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-03-10 15:05:38 +01:00
Miss Islington (bot) 9854566626
[3.13] Fix grammar typo in `Doc/c-api/arg.rst` (GH-130741) (#130759)
Fix grammar typo in `Doc/c-api/arg.rst` (GH-130741)
(cherry picked from commit 37145cb89f)

Co-authored-by: Arijit Kumar Das <arijitkrdas2004@outlook.com>
2025-03-02 13:14:29 +02:00
Miss Islington (bot) 3161f01760
[3.13] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) (GH-130511)
* Clarify sys.getdefaultencoding() documentation

* Add missing documentation for PyUnicode_GetDefaultEncoding,
  the C equivalent of sys.getdefaultencoding
(cherry picked from commit 9f25c1f012)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-24 17:10:17 +01:00
Miss Islington (bot) d71b167c5c
[3.13] gh-129405: Fix doc for Py_mod_multiple_interpreters default, and add test (GH-129406) (GH-130507)
(cherry picked from commit fc8d2cba54)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-24 16:49:35 +01:00
Miss Islington (bot) 38dfe014de
[3.13] Fix phrasing in paragraphs with leading "similar" (GH-121135) (#130364)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-02-20 15:58:16 +00:00
Miss Islington (bot) 2ac25550bd
[3.13] gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (GH-130191) (#130360)
gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (GH-130191)
(cherry picked from commit 0f5b82169e)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-20 15:48:13 +00:00
Miss Islington (bot) fc1c9f884e
[3.13] gh-130214: Document `PyEllipsis_Type` (GH-130215) (#130223)
gh-130214: Document `PyEllipsis_Type` (GH-130215)
(cherry picked from commit fc8c99a8ce)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-17 19:23:42 +03:00
Stan Ulbrych 320316ef7e
[3.13] gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130127)
We had the definition of what makes a character "printable" documented in three places, giving two different definitions.
The definition in the comment on `_PyUnicode_IsPrintable` was inverted; correct that.

With that correction, the two definitions turn out to be equivalent -- but to confirm that, you have to go look up, or happen to know, that those are the only five "Other" categories and only three "Separator" categories in the Unicode character database.  That makes it hard for the reader to tell whether they really are the same, or if there's some subtle difference in the intended semantics.

Fix that by cutting the C API docs' and the C comment's copies of the subtle details, in favor of referring to the Python-level docs. That ensures it's explicit that these are all meant to agree, and also lets us concentrate improvements to the wording in one place.

Speaking of which, borrow some ideas from the C comment, along with other tweaks, to hopefully add a bit more clarity to that one newly-centralized copy in the docs.

Also add a thorough test that the implementation agrees with this definition.

Author:    Greg Price <gnprice@gmail.com>

Co-authored-by: Greg Price <gnprice@gmail.com>
(cherry picked from commit 3402e133ef)
2025-02-17 15:02:39 +01:00
Miss Islington (bot) 5740b95076
[3.13] gh-130169: Fix broken list markup in `Doc/c-api/function.rst` (GH-130174) (#130175)
gh-130169: Fix broken list markup in `Doc/c-api/function.rst` (GH-130174)
(cherry picked from commit 9837c2a214)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-16 11:01:45 +00:00
Miss Islington (bot) 4c2a59b7b8
[3.13] gh-129912: Fix references to `Py_TPFLAGS_MANAGED_DICT` (gh-130044) (gh-130059)
(cherry picked from commit 791cdfe141)

Co-authored-by: Satyam Kumar <isatyamks@gmail.com>
2025-02-12 22:56:02 +00:00
Miss Islington (bot) 36790830cb
[3.13] gh-101100: Docs: Fix some typos in the document (GH-129988) (#129997)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-11 21:37:25 +00:00
Miss Islington (bot) a38bacd41f
[3.13] gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934) (GH-129961)
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)

(cherry picked from commit 8d9d3e4ecb)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-10 17:36:06 +01:00
Miss Islington (bot) fc78ed9e6f
[3.13] gh-118915: Fix bad link in documentation (GH-129691) (GH-129723)
gh-118915: Fix bad link in documentation (GH-129691)
(cherry picked from commit 779d06945c)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2025-02-06 13:47:07 +01:00
Miss Islington (bot) 186165e509
[3.13] gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433) (#129612)
gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433)
(cherry picked from commit 04264a286e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-02-03 12:02:00 +00:00
Miss Islington (bot) 972d95313c
[3.13] gh-118915: C API: Document compiler flag macros (GH-129028) (GH-129086)
(cherry picked from commit 6e02096e2f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-21 11:47:55 +01:00
Miss Islington (bot) 22e9faf08a
[3.13] Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458) (#129080)
Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458)
(cherry picked from commit e792f4bc2e)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan U. <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-20 16:04:53 +00:00
Miss Islington (bot) 65da5db28a
[3.13] gh-118915: Document `PyUnstable_InterpreterState_GetMainModule` (GH-128483) (GH-128677)
(cherry picked from commit ea39c8b08d)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-10 08:41:14 +01:00
Miss Islington (bot) a194fd08c0
[3.13] gh-90241: Clarify documentation for PyUnicode_FSConverter and PyUnicode_FSDecoder (GH-128451) (GH-128542)
(cherry picked from commit 657d7b77e5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2025-01-06 23:20:26 +02:00
Miss Islington (bot) 3678cf8fb9
[3.13] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128538)
(cherry picked from commit 8d15058d61)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-06 10:56:14 +00:00
Miss Islington (bot) 5ed2b7649e
[3.13] gh-127954: Document PyObject_DelItemString (GH-127986) (#128496)
(cherry picked from commit 8ade15343d)

Co-authored-by: RUANG (James Roy) <rruuaanng@outlook.com>
2025-01-04 20:53:30 +00:00
Miss Islington (bot) f8b24cdbb9
[3.13] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128449)
(cherry picked from commit 616468b87b)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-01-03 14:12:24 +00:00
Miss Islington (bot) bad6b7bfca
[3.13] gh-125887: Update PyObject_HasAttr exception behavior (GH-125907) (#128283)
gh-125887: Update PyObject_HasAttr exception behavior (GH-125907)

Update PyObject_HasAttr exception behavior

(cherry picked from commit 08a0728d6c)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-12-27 02:03:38 +00:00
Miss Islington (bot) 6023b3b01e
[3.13] Document PyObject_SelfIter (GH-127861) (#127898)
Document PyObject_SelfIter (GH-127861)
(cherry picked from commit 58942a07df)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2024-12-13 15:07:28 +05:30
Miss Islington (bot) 8b24d042b4
[3.13] gh-118915: C API: Document frame locals proxies. (GH-127720) (#127831)
gh-118915: C API: Document frame locals proxies. (GH-127720)
(cherry picked from commit dd9da738ad)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-12-11 16:34:35 +00:00
Peter Bierma bcdd10d0c8
[3.13] gh-127791: Fix, document, and test `PyUnstable_AtExit` (GH-127793) (#127819)
* Fix merge conflicts.

* [3.13] gh-127791: Fix, document, and test `PyUnstable_AtExit` (GH-127793)
(cherry picked from commit d5d84c3f13)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-12-11 13:40:45 +00:00