Commit graph

1379 commits

Author SHA1 Message Date
Hugo van Kemenade
fc657d0c60
[3.11] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112422) 2023-11-26 05:22:17 -07:00
Miss Islington (bot)
09bd752d94
[3.11] Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (GH-110963) (#111220)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
2023-10-23 16:09:56 +00:00
Miss Islington (bot)
e8eb2bf788
[3.11] C-API docs: Clarify the size of arenas (GH-110895) (#110947)
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:06:34 +00:00
Miss Islington (bot)
616862d58e
[3.11] gh-110527: Improve PySet_Clear docs (GH-110528) (#110927)
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:15:07 +00:00
Ezio Melotti
90b2620b6e
[3.11] gh-110631: Fix reST indentation (GH-110724) (#110739)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:53 +02:00
Adam Turner
d81bcc2327
[3.11] gh-102304: Add links to the Stable ABI and Limited C API docs (#105345) (#105371) (#109901)
* Add "limited-c-api" and "stable-api" targets
* Rename the "stable-abi-list" target to "limited-api-list"
2023-09-29 11:17:44 +02:00
Victor Stinner
d951aaea97
[3.11] gh-107298: Document PyMODINIT_FUNC macro (#109236) (#109948)
gh-107298: Document PyMODINIT_FUNC macro (#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)
2023-09-27 10:40:24 +02:00
Serhiy Storchaka
6538bcfa0b
[3.11] Improve some C API documentation (GH-108768) (GH-108786)
* 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 07:30:32 +03:00
Miss Islington (bot)
cc81f5b61a
[3.11] [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448) (#108489)
[3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448)

gh-108314: PyDict_GetItemString() mentions UTF-8

PyDict_GetItemString(), PyDict_SetItemString() and
PyDict_DelItemString() expects a UTF-8 encoding string for the key.
(cherry picked from commit 9a225d7d5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-25 18:48:25 +02:00
Serhiy Storchaka
3ca9264aba
[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108290)
(cherry picked from commit d7202e4879)
2023-08-22 20:33:07 +02:00
Miss Islington (bot)
80c7ae00f1
[3.11] gh-107298: Fix C API datetime documentation (GH-108034) (#108233)
(cherry picked from commit d63972e289)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-22 20:32:48 +02:00
Serhiy Storchaka
358b1acc69
[3.11] gh-107298: Fix some references in the C API documentation (GH-108072) (GH-108076)
(cherry picked from commit f51f0466c0)
2023-08-17 08:30:47 +00:00
Miss Islington (bot)
4e5dac1fe1
[3.11] gh-107298: Fix C API Buffer documentation (GH-108011) (#108041)
gh-107298: Fix C API Buffer documentation (GH-108011)
(cherry picked from commit c2941cba7a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-16 22:32:17 +02:00
Miss Islington (bot)
4ddfb04260
[3.11] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107872)
(cherry picked from commit 637f7ff2c6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-11 16:13:53 +00:00
Eric Snow
951320e4d0
[3.11] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107753)
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.
2023-08-07 16:17:12 -06:00
da-woods
ff5dd9d9db
[3.11] Fix the documentation for PyCode_New add qualname parameter (GH-107186) (#107454)
[3.11] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186).
(cherry picked from commit f2abeb590d)
2023-07-30 08:48:01 +00:00
Miss Islington (bot)
3c1bcae075
[3.11] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107418)
(cherry picked from commit f2d07d3289)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-29 09:17:20 +03:00
Serhiy Storchaka
d9392c0c0a
[3.11] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107381)
(cherry picked from commit 983305268e)
2023-07-28 08:31:49 +00:00
Serhiy Storchaka
32e17d4a3c
[3.11] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107377)
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()

(cherry picked from commit 8d61a71f9c)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 06:44:54 +00:00
Serhiy Storchaka
50d26138e6
[3.11] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107371)
(cherry picked from commit 87b39028e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 09:21:50 +03:00
Serhiy Storchaka
9513acf737
[3.11] gh-107298: Docs: add targets for some :c:member: and :c:macro: references (GH-107316) (GH-107333)
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)
2023-07-27 09:27:02 +03:00
Serhiy Storchaka
17aada0dd0
[3.11] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107331)
Fix also formatting of PyMethodDef members.
(cherry picked from commit d363eb5b02)
2023-07-27 09:26:14 +03:00
Miss Islington (bot)
603c5d50e8
[3.11] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107313)
(cherry picked from commit 6d5b6e71c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-27 00:00:36 +03:00
Serhiy Storchaka
cfa9f3b7cc
[3.11] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107311)
(cherry picked from commit af61cb9c78)
2023-07-26 19:35:16 +00:00
Miss Islington (bot)
579868e8f1
[3.11] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107174)
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:46 +00:00
Erlend E. Aasland
b3e600a632
[3.11] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (#107062) (#107157)
(cherry picked from commit b447e19e72)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:49:48 +02:00
Serhiy Storchaka
d2cdf0888b
[3.11] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107121)
(cherry picked from commit 08a228da05)
2023-07-23 15:06:32 +03:00
wulmer
c51f766ebb
[3.11] gh-101100: Fix some broken sphinx references (GH-107095). (#107120) 2023-07-23 05:56:09 -06:00
Serhiy Storchaka
ec8718dd7c
[3.11] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107061)
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)
2023-07-23 11:24:37 +02:00
Serhiy Storchaka
b338ac7540
[3.11] gh-106909: Use role :const: for referencing module constants (GH-106910) (GH-106957)
(cherry picked from commit 4b9948617f)
2023-07-21 14:49:57 +03:00
Serhiy Storchaka
cc76113cf8
[3.11] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106955)
(cherry picked from commit d036db728e)
2023-07-21 14:49:21 +03:00
Serhiy Storchaka
6bde1b9f04
[3.11] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106952)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:30 +03:00
Miss Islington (bot)
f5e29f4245
[3.11] gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (#106282)
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:40:13 +01:00
Miss Islington (bot)
c69f29f879
[3.11] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106071)
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:09 -07:00
Irit Katriel
e422f35267
[3.11] gh-105196: Fix indentations of section headings in C API docs (#105672) (#105786)
gh-105196: Fix indentations of section headings in C API docs (#105672)

Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
2023-06-14 22:34:37 -05:00
Miss Islington (bot)
8de607ab1c
[3.11] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105219)
gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a1)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-02 08:28:35 +00:00
Miss Islington (bot)
4b11af058e
[3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)
GH-97950: Use new-style index directive ('builtin') (GH-104164)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit f5088006ca)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-06 07:14:37 +03:00
Miss Islington (bot)
c463796ba7
[3.11] GH-97950: Use new-style index directive ('object') (GH-104158) (#104159)
GH-97950: Use new-style index directive ('object') (GH-104158)

* Uncomment object removal in pairindextypes

* Use new-style index directive ('object') - C API

* Use new-style index directive ('object') - Library

* Use new-style index directive ('object') - Reference

* Use new-style index directive ('object') - Tutorial
(cherry picked from commit 6ab463684b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-04 13:14:16 +03:00
Adam Turner
00563694bb
[3.11] GH-97950: Use new-style index directive ('module') (GH-103996) (#104154) 2023-05-04 11:39:15 +03:00
Inada Naoki
4041251a36
gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)
This API is one of Unicode creator APIs.
This APIs should not be placed in PEP 393 deprecated APIs.

Fixes: gh-103883

(cherry picked from commit ce2383ec66)
2023-04-27 15:05:35 +09:00
Hugo van Kemenade
85c686a1a5
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and asyncio.iscoroutine (#103001) 2023-03-25 09:43:52 +02:00
Miss Islington (bot)
a7a373e1c5
[3.11] gh-102595: Document PyObject_Format c-api function (GH-102596) (GH-102879)
(cherry picked from commit 910a64e301)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Def: 5ffdaf748d/Include/abstract.hGH-L389

Automerge-Triggered-By: GH:encukou
2023-03-22 02:32:02 -07:00
Miss Islington (bot)
3ddf397217
gh-101100: Documenting --prefix and --exec-prefix. (GH-102695)
(cherry picked from commit 61b9ff35cb)

Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-03-15 15:13:48 -07:00
Miss Islington (bot)
00791f23b7
gh-102383: [docs] Arguments of PyObject_CopyData are PyObject * (GH-102390)
(cherry picked from commit 7b9132057d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-03 09:27:20 -08:00
Miss Islington (bot)
61e0bbdb0c
Fix typo in Py_GetPythonHome signature (GH-102168)
(cherry picked from commit 9bba8035bd)

Co-authored-by: Tanner Firl <105078804+TannerFirl@users.noreply.github.com>
2023-02-23 05:38:08 -08:00
Miss Islington (bot)
559d0e8073
gh-101973: Fix parameter reference for PyModule_FromDefAndSpec (GH-101976)
(cherry picked from commit a3bb7fbe7e)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-02-17 00:50:46 -08:00
Miss Islington (bot)
4aeae28671
GH-101898: Fix missing term references for hashable definition (GH-101899)
Fix missing term references for hashable definition
(cherry picked from commit 3690688149)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2023-02-14 02:45:42 -08:00
Miss Islington (bot)
4c763463fc
Add missing versionadded directive for PyCode_Addr2Location (GH-101347)
(cherry picked from commit f11a3d1ebe)

Co-authored-by: Max Bachmann <oss@maxbachmann.de>
2023-02-03 19:40:51 -08:00
Miss Islington (bot)
bab79942c4
[docs] Mention how to get/set a bigint PyLong via the C API (GH-101270)
We don't need direct C APIs to get at a bigint representation of PyLong but we
do want the few people who need to understand how.

Additional Author:  CAM-Gerlach
(cherry picked from commit e244401ce5)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-01-23 21:31:06 -08:00