Commit graph

1485 commits

Author SHA1 Message Date
Miss Islington (bot)
a69e68db60
[3.12] gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003) (#115135)
gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003)
(cherry picked from commit d0322fdf2c)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2024-02-07 10:55:21 +00:00
Miss Islington (bot)
d334122d22
[3.12] GH-69695: Update `PyImport_ImportModule` description (GH-103836) GH-114925)
GH-69695: Update ``PyImport_ImportModule`` description (GH-103836)

(cherry picked from commit 9872855a31)

Co-authored-by: patenaud <33957588+patenaud@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-02-05 10:53:57 +01:00
Miss Islington (bot)
cf2ecbc514
[3.12] gh-101100: Fix sphinx warnings in c-api/file.rst (GH-114546) (#114584)
* gh-101100: Fix sphinx warnings in `c-api/file.rst` (GH-114546)
(cherry picked from commit 01d970c1b8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-04 10:57:19 +02:00
Miss Islington (bot)
930f805e72
[3.12] gh-101100: Fix sphinx warnings in Doc/c-api/memoryview.rst (GH-114669) (GH-114704)
(cherry picked from commit 97fb2480e4)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-29 10:02:06 +00:00
Miss Islington (bot)
3bf5d90360
[3.12] gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891) (GH-114638)
(cherry picked from commit 926881dc10)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-27 08:02:15 +00:00
Miss Islington (bot)
c95cdd0a82
[3.12] Document PyOS_strtoul and PyOS_strtol (GH-114048) (GH-114618)
(cherry picked from commit 3f62bf32ca)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-26 17:50:33 +00:00
Miss Islington (bot)
3a588d09d5
[3.12] gh-101100: Fix Sphinx warnings in c-api/structures.rst (GH-113564) (#114527)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-01-24 13:48:36 +00:00
Miss Islington (bot)
69f876a82a
[3.12] gh-101100: Fix sphinx warnings in Doc/c-api/memory.rst (GH-114373) (#114377)
gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` (GH-114373)
(cherry picked from commit 47133d8d86)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-21 09:41:00 +00:00
Miss Islington (bot)
f9158d63b1
[3.12] gh-112092: clarify unstable ABI recompilation requirements (GH-112093) (#114260)
gh-112092: clarify unstable ABI recompilation requirements (GH-112093)

Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand.
(cherry picked from commit 68a7b78cd5)

Co-authored-by: DerSchinken <53398996+DerSchinken@users.noreply.github.com>
2024-01-18 21:28:04 +01:00
Miss Islington (bot)
27941b14ab
[3.12] gh-102468: Document PyCFunction_New* and PyCMethod_New (GH-112557) (GH-114119)
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
(cherry picked from commit a482bc67ee)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-17 10:21:08 +01:00
Miss Islington (bot)
f3d3663a47
[3.12] gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369) (#113606)
gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369)
(cherry picked from commit 2849cbb53a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-12-31 23:22:55 +00:00
Miss Islington (bot)
78ccb41c56
[3.12] docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888) (GH-111690)
(cherry picked from commit 9f33ede127)

Co-authored-by: lefp <70862148+lefp@users.noreply.github.com>
2023-12-25 20:24:22 +02:00
Miss Islington (bot)
34714f4ac9
[3.12] gh-101100: Improve docs on exception attributes (GH-113057) (#113061)
gh-101100: Improve docs on exception attributes (GH-113057)

(cherry picked from commit d05a180350)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-13 19:07:19 +00:00
Miss Islington (bot)
e328115254
[3.12] gh-101100: Further improve docs on function attributes (GH-113001) (#113030)
gh-101100: Further improve docs on function attributes (GH-113001)
(cherry picked from commit 81a15ea74e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-12 20:28:10 +00:00
Hugo van Kemenade
54fcfbde30
[3.12] gh-101100: Improve documentation on function attributes (GH-112933) (#112974)
(cherry picked from commit 4c5b9c107a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-12 10:10:27 +00:00
Miss Islington (bot)
c108080626
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
(cherry picked from commit 42a86df3a3)
2023-12-10 17:50:05 +00:00
Alex Waygood
ca11aec98c
[3.12] gh-101100: Improve documentation of code object attributes (#112781) (#112816)
(cherry-picked from commit e9707d3c3d)
2023-12-06 22:11:53 +00:00
Miss Islington (bot)
399a3f2e1e
[3.12] gh-111178: Docs: fix traverseproc, inquiry, and destructor parameters in slot typedefs table (GH-112742) (GH-112792)
gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters in slot typedefs table (GH-112742)

In the slot typedefs table, the parameter of `destructor`
and the first parameter of `traverseproc` should both be
`PyObject *` rather than `void *`.
Same for `inquiry`.
(cherry picked from commit 00cce0fe49)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-12-06 11:03:22 +01:00
Miss Islington (bot)
ef92e9e666
[3.12] gh-101100: Properly document frame object attributes (GH-112735) (#112772)
gh-101100: Properly document frame object attributes (GH-112735)
(cherry picked from commit d109f637c0)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-05 19:34:06 +00:00
Serhiy Storchaka
f1a0c77f4e
[3.12] gh-62897: Update PyUnicode C API parameter names (GH-12680) (GH-112744)
Standardize PyUnicode C API parameter names across the documentation.

(cherry picked from commit b31232ddf7)

Co-authored-by: Rune Tynan <runetynan@gmail.com>
2023-12-05 11:30:44 +02:00
Miss Islington (bot)
494cd508c0
[3.12] gh-112671: Fixing typo in the Macro Docs (GH-112715) (GH-112726)
Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE
(cherry picked from commit a8ce149628)

Co-authored-by: Amioplk <amir.worms@dauphine.eu>
2023-12-04 20:58:04 +00:00
Hugo van Kemenade
d7a7883326
[3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-26 05:22:13 -07:00
Miss Islington (bot)
748bc48648
[3.12] gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455) (GH-111507)
Also document the behavior when called with NULL.
(cherry picked from commit bca3305429)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-30 17:36:00 +00:00
Miss Islington (bot)
87123ab545
[3.12] Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (GH-110963) (#111219)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
2023-10-23 16:09:59 +00:00
Miss Islington (bot)
94525a7a4d
[3.12] C-API docs: Clarify the size of arenas (GH-110895) (#110946)
C-API docs: Clarify the size of arenas (GH-110895)

Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.
(cherry picked from commit f07ca27709)

Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
2023-10-16 19:03:18 +00:00
Miss Islington (bot)
b4ed73042e
[3.12] gh-110527: Improve PySet_Clear docs (GH-110528) (#110928)
gh-110527: Improve `PySet_Clear` docs (GH-110528)
(cherry picked from commit bfc1cd8145)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-16 13:14:52 +00:00
Miss Islington (bot)
f2e353b9d8
[3.12] gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813) (#110823)
gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)

* gh-110803: Reorganize docs for what PyType_Slot doesn't cover

- Cover the offset fields first
- Mention the old alternative for MANAGED flags, which is needed
  to support older Pythons
- De-emphasize the internal flags: use an inline list.
- Add a note to PyMemberDef saying what to do with it

* Remove an older draft...
(cherry picked from commit 2ab34f0e42)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-10-13 12:59:55 +00:00
Ezio Melotti
7d5a982609
[3.12] gh-110631: Fix reST indentation (GH-110724) (#110738)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:36 +02:00
Alex Waygood
25bf0564c4
[3.12] Fix typos in docs and comments (#109619) (#109621)
Fix typos in docs and comments (#109619)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
2023-10-02 17:34:49 +00:00
Miss Islington (bot)
fc4fddb139
[3.12] gh-107298: Document PyMODINIT_FUNC macro (GH-109236) (#109947)
gh-107298: Document PyMODINIT_FUNC macro (GH-109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.
(cherry picked from commit d7a27e527d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-27 17:38:28 +02:00
Serhiy Storchaka
246cb64984
[3.12] Improve some C API documentation (GH-108768) (#108785)
* Express functions which take argument as a C string in terms of
  functions which take Python object.
* Use "note" directive for PyMapping_HasKey() and
  PyMapping_HasKeyString() notes..
(cherry picked from commit 6f97eeec22)
2023-09-02 23:43:41 +02:00
Miss Islington (bot)
ae9bbd16d8
[3.12] Fix misc doc typos (GH-108592) (#108594)
Fix misc doc typos (GH-108592)
(cherry picked from commit 88f1c5b454)

Co-authored-by: xzmeng <aumo@foxmail.com>
2023-08-29 12:38:03 +02:00
Victor Stinner
9a225d7d5b
[3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (#108448)
gh-108314: PyDict_GetItemString() mentions UTF-8

PyDict_GetItemString(), PyDict_SetItemString() and
PyDict_DelItemString() expects a UTF-8 encoding string for the key.
2023-08-25 18:19:53 +02:00
Miss Islington (bot)
e5d779c0e2
[3.12] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108284)
gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)
(cherry picked from commit d7202e4879)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-22 16:16:31 +02:00
Serhiy Storchaka
47f60c3f67
[3.12] gh-107298: Fix C API datetime documentation (GH-108034). (#108234)
(cherry picked from commit d63972e289)
2023-08-21 21:44:45 +02:00
Miss Islington (bot)
41c951b62f
[3.12] gh-107298: Fix some references in the C API documentation (GH-108072) (#108074)
gh-107298: Fix some references in the C API documentation (GH-108072)
(cherry picked from commit f51f0466c0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-17 12:52:48 +02:00
Serhiy Storchaka
277bf80238
[3.12] gh-107298: Fix C API Buffer documentation (GH-108011). (#108048)
(cherry picked from commit c2941cba7a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-17 01:20:23 +02:00
Miss Islington (bot)
00bfed7cba
[3.12] gh-91051: fix segfault when using all 8 type watchers (GH-107853) (#107876)
* gh-91051: fix segfault when using all 8 type watchers (GH-107853)
(cherry picked from commit 66e4edd734)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-08-16 11:58:54 +02:00
Miss Islington (bot)
d20d52bc4d
[3.12] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107871)
Docs: Document PyBUF_MAX_NDIM (GH-107865)
(cherry picked from commit 637f7ff2c6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-11 22:29:57 +02:00
Miss Islington (bot)
aa2ecef22a
[3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752)
* gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d504)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

* Fix a typo.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-08-08 16:25:35 +02:00
Miss Islington (bot)
fc4532a55d
[3.12] gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519) (gh-107522)
gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519)
(cherry picked from commit db361a340a)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-31 17:25:18 -06:00
Miss Islington (bot)
3f6afafa7e
[3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) (gh-107521)
gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403)

It was added in 3.12 for PEP 684 (per-interpreter GIL).
(cherry picked from commit fb344e99aa)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-31 23:15:13 +00:00
Miss Islington (bot)
e3b5ed7b1c
[3.12] Fix the documentation for PyCode_New add qualname parameter (GH-107186) (#107440)
Fix the documentation for PyCode_New add `qualname` parameter (GH-107186)
(cherry picked from commit f2abeb590d)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2023-07-29 17:52:17 +00:00
Serhiy Storchaka
d514e1439f
[3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419)
(cherry picked from commit f2d07d3289)
2023-07-29 09:16:27 +03:00
Miss Islington (bot)
32502da987
[3.12] gh-107305: Update the C-API Docs for PEP 684 (gh-107324) (gh-107402)
gh-107305: Update the C-API Docs for PEP 684 (gh-107324)
(cherry picked from commit c0b81c4b54)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-28 19:54:57 +00:00
Serhiy Storchaka
4014869b4b
[3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380)
(cherry picked from commit 983305268e)
2023-07-28 08:20:53 +00:00
Serhiy Storchaka
e6a4b10820
[3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376)
Declare the following functions as macros, since they are actually
macros. It avoids a warning on "TYPE" or "macro" argument.

* PyMem_New()
* PyMem_Resize()
* PyModule_AddIntMacro()
* PyModule_AddStringMacro()
* PyObject_GC_New()
* PyObject_GC_NewVar()
* PyObject_New()
* PyObject_NewVar()

Add C standard C types to nitpick_ignore in Doc/conf.py:

* int64_t
* uint64_t
* uintptr_t

No longer ignore non existing "__int" type in nitpick_ignore.

Update Doc/tools/.nitignore.
(cherry picked from commit 8d61a71f9c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 09:56:52 +03:00
Serhiy Storchaka
ef7422a1b9
[3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)
(cherry picked from commit 391e03fa05)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 06:40:16 +00:00
Miss Islington (bot)
17ce87ba7f
[3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107370)
Update also Doc/tools/.nitignore.
(cherry picked from commit 87b39028e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 06:17:49 +00:00
Miss Islington (bot)
36e96baa33
[3.12] gh-107298: Docs: add targets for some :c:member: and :c:macro: references (GH-107316) (GH-107332)
Add targets for PyStructSequence_Desc and PyStructSequence_Field members
and macros like Py_EQ.
Fix target for Py_RETURN_RICHCOMPARE.
(cherry picked from commit abec9a1b20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-27 09:37:54 +03:00