Commit graph

1517 commits

Author SHA1 Message Date
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
Serhiy Storchaka
434e3b89a7
[3.12] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107330)
Fix also formatting of PyMethodDef members.
(cherry picked from commit d363eb5b02)
2023-07-27 09:24:18 +03:00
Miss Islington (bot)
da2097dffb
[3.12] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107312)
(cherry picked from commit 6d5b6e71c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 19:37:39 +00:00
Miss Islington (bot)
9f5a5f0b33
[3.12] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107310)
(cherry picked from commit af61cb9c78)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 22:30:46 +03:00
Miss Islington (bot)
4fd576478c
[3.12] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107173)
Fix PyVectorcall_Function doc versionadded (GH-107140)

The documentation implies that PyVectorcall_Function() was available in Python 3.8.
This is half-true - it was available under a different name. I think it's clearer to set
the "version added" to 3.9.
(cherry picked from commit 0a9b339363)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2023-07-24 13:06:16 +00:00
Miss Islington (bot)
40a337fbaa
[3.12] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (GH-107062) (#107154)
(cherry picked from commit b447e19e72)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:13:23 +02:00
Miss Islington (bot)
95a82dcbe7
[3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113)
(cherry picked from commit 08a228da05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 14:50:21 +03:00
Miss Islington (bot)
332db37835
[3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103)
(cherry picked from commit f5147c0cfb)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 12:00:31 +02:00
Serhiy Storchaka
456cf8b097
[3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107060)
* [3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949)

It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".

(cherry picked from commit f8b7fe2f26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
2023-07-23 11:24:51 +02:00
Serhiy Storchaka
ffc7678f46
[3.12] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106954)
(cherry picked from commit d036db728e)
2023-07-21 14:51:00 +03:00
Serhiy Storchaka
84e52171b5
[3.12] gh-106909: Use role :const: for referencing module constants (GH-106910) (GH-106956)
(cherry picked from commit 4b9948617f)
2023-07-21 14:49:39 +03:00
Serhiy Storchaka
ac9aa8a369
[3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:15 +03:00
Miss Islington (bot)
41057b2ffe
[3.12] gh-105227: Add PyType_GetDict() (GH-105747) (#106600)
gh-105227: Add PyType_GetDict() (GH-105747)

This compensates for static builtin types having `tp_dict` set to `NULL`.

(cherry picked from commit a840806d33)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-07-10 17:12:15 +00:00
Miss Islington (bot)
5784acd08c
[3.12] tp_flags docs: fix indentation (GH-106420) (#106442)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-07-04 23:12:47 -07:00
Miss Islington (bot)
d6a5a30669
[3.12] gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (#106281)
gh-101100: Docs: Fix references to several numeric dunders (GH-106278)
(cherry picked from commit a8ae73965b)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-30 15:39:52 +01:00
Miss Islington (bot)
592d1eadc6
[3.12] gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (GH-105195) (#105977)
gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (GH-105195)
(cherry picked from commit a2392720d6)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-26 14:02:00 +05:30
Miss Islington (bot)
746c0f3d8f
[3.12] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106070)
gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047)

Use a note:: tag so that these dict and object API deficiencies show up clearly.

A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change).  warning:: seemed too extreme.  note looks good.
(cherry picked from commit 19d6511b0b)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-24 16:30:27 -07:00
Miss Islington (bot)
335fbd65db
[3.12] gh-105196: Fix indentations of section headings in C API docs (GH-105672) (#105782)
gh-105196: Fix indentations of section headings in C API docs (GH-105672)
(cherry picked from commit d32e8d6070)

Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
2023-06-14 22:30:00 -05:00
Miss Islington (bot)
2eed1f5868
[3.12] gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386) (GH-105697)
gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386)
(cherry picked from commit 2b90796be6)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-06-12 16:24:21 +00:00