Commit graph

1444 commits

Author SHA1 Message Date
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
Victor Stinner
82ab13c49a
[3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) (#105371)
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)

* Add "limited-c-api" and "stable-api" references.
* Rename "stable-abi-list" reference to "limited-api-list".
* Makefile: Document files regenerated by "make regen-limited-abi"
* Remove first empty line in generated files:

  - Lib/test/test_stable_abi_ctypes.py
  - PC/python3dll.c

(cherry picked from commit bae415ad02)

* gh-102304: Fix up Simple ABI doc (GH-105351)

(cherry picked from commit 0202aa002e)
2023-06-06 13:11:28 +00:00
Miss Islington (bot)
05b6153456
[3.12] gh-97908: CAPI docs: Remove repeated struct names from member docs (GH-100054) (#105057)
And add raw HTML fragments to keep old links working.
(cherry picked from commit 1668b41dc4)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-06-05 18:24:12 +02:00
Miss Islington (bot)
00fe6186cb
[3.12] gh-102778: update documentation of PyErr_PrintEx and traceback.print_last() regarding sys.last_exc (GH-105190) (#105246)
gh-102778: update documentation of PyErr_PrintEx and traceback.print_last() regarding sys.last_exc (GH-105190)
(cherry picked from commit 0dafc785ee)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-02 17:04:22 +01:00
Miss Islington (bot)
46cc4f0f76
[3.12] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105218)
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:24:25 +00:00
Miss Islington (bot)
aeee5a5756
[3.12] gh-105071: add missing versionadded directive (GH-105097) (#105105)
gh-105071: add missing versionadded directive (GH-105097)
(cherry picked from commit 4571eedca2)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-05-30 17:03:57 +00:00
Irit Katriel
b45df737d4
[3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583)
2023-05-30 16:50:23 +01:00
Miss Islington (bot)
905d419cac
[3.12] GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104760)
GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104674)
(cherry picked from commit 357bed0bcd)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-05-23 09:24:28 +00:00
Serhiy Storchaka
f3466bc040
gh-98836: Extend PyUnicode_FromFormat() (GH-98838)
* Support for conversion specifiers o (octal) and X (uppercase hexadecimal).
* Support for length modifiers j (intmax_t) and t (ptrdiff_t).
* Length modifiers are now applied to all integer conversions.
* Support for wchar_t C strings (%ls and %lV).
* Support for variable width and precision (*).
* Support for flag - (left alignment).
2023-05-22 00:32:39 +03:00
Mark Shannon
93923793f6
GH-101291: Add low level, unstable API for pylong (GH-101685)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-05-21 14:45:48 +01:00
gsallam
be0c106789
gh-103295: expose API for writing perf map files (#103546)
Co-authored-by: Aniket Panse <aniketpanse@fb.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-05-21 11:12:24 +01:00
Mark Shannon
cfa517d5a6
GH-96803: Document and test new unstable internal frame API functions (GH-104211)
Weaken contract of PyUnstable_InterpreterFrame_GetCode to return PyObject*.
2023-05-18 10:10:15 +01:00
Adam Turner
f5088006ca
GH-97950: Use new-style index directive ('builtin') (#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
2023-05-06 06:54:08 +03:00
Adam Turner
6ab463684b
GH-97950: Use new-style index directive ('object') (#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
2023-05-04 13:04:41 +03:00
Adam Turner
d0122372f2
GH-97950: Use new-style index directive ('module') (#103996)
* Use new-style index directive ('module') - C API

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

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

* Use new-style index directive ('module') - Tutorial

* Uncomment module removal in pairindextypes

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

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

* Use new-style index directive ('module') - Reference
2023-05-04 10:17:12 +02:00
Petr Viktorin
cd9a56c2b0
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-04 09:56:53 +02:00
Petr Viktorin
524a7f77fd
gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. (GH-103972)
(That's a mouthful of an edge case!)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-05-03 15:17:14 +02:00
Adam Turner
328435ed42
GH-98040: Suppress cross-references to the removed `imp` module (#104131)
Suppress cross-references to imp
2023-05-03 13:29:42 +01:00
Jurica Bradarić
87223f32ab
gh-103743: Add PyUnstable_Object_GC_NewWithExtraData (GH-103744)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-02 13:38:46 +02:00
Barry Warsaw
e1f14643dc
gh-98040: Remove just the imp module (#98573) 2023-04-28 16:17:58 -07:00
Erlend E. Aasland
2cf945bec6
Docs: fix dunders with too many underscores (#103955) 2023-04-27 23:17:43 +02:00
Inada Naoki
ce2383ec66
gh-103883: Doc: Move PyUnicode_FromObject doc (#103913)
This API is one of Unicode creator APIs.
2023-04-27 14:53:11 +09:00
Brett Simmers
b7f4811c88
gh-103091: Add PyUnstable_Type_AssignVersionTag (#103095) 2023-04-24 10:07:47 -06:00
Hugo van Kemenade
6a1c49a717
gh-101100: Test docs in nit-picky mode (#102513)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-24 13:23:35 +02:00