Commit graph

27306 commits

Author SHA1 Message Date
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
Miss Islington (bot)
02fbe89342
[3.12] gh-101100: Fix Sphinx warning in library/http.cookies.rst (GH-112908) (#112929)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix Sphinx warning in library/http.cookies.rst (GH-112908)
2023-12-10 12:59:25 +00:00
Miss Islington (bot)
81c2df0f8b
[3.12] Docs: Use 'f-strings' as header (GH-112888) (#112923)
Docs: Use 'f-strings' as header (GH-112888)
(cherry picked from commit 5bf7580d72)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-10 11:36:01 +02:00
Miss Islington (bot)
b23034de9d
[3.12] gh-101100: Improve documentation of TracebackType attributes (GH-112884) (#112911)
gh-101100: Improve documentation of `TracebackType` attributes (GH-112884)
(cherry picked from commit 96f64a2b1b)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-09 22:50:33 +00:00
Alex Waygood
ebcf7577a7
[3.12] gh-101100: Fix Sphinx nitpicks in library/tempfile.rst (#112886) (#112910)
(cherry-picked from commit 54410e6bd9)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-09 22:47:01 +00:00
Miss Islington (bot)
259a4af3d2
[3.12] gh-112758: Updated pathlib documentation for PurePath.match (GH-112814) (#112882)
gh-112758: Updated pathlib documentation for PurePath.match (GH-112814)
(cherry picked from commit ed8720ace4)

Co-authored-by: Taylor Packard <3.t.packard@gmail.com>
2023-12-08 18:26:46 +00:00
Alex Waygood
0260c38e80
[3.12] gh-101100: Fix Sphinx nits in library/contextlib.rst (#112870) (#112875)
(cherry-picked from commit e4c0876033)
2023-12-08 14:03:38 +00:00
Miss Islington (bot)
b39e90e4d1
[3.12] gh-101100: Improve documentation for attributes on instance methods (GH-112832) (#112872)
gh-101100: Improve documentation for attributes on instance methods (GH-112832)
(cherry picked from commit ed21d0c1f4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-08 13:25:52 +00:00
Miss Islington (bot)
7ef3a1e64b
[3.12] gh-101100: Fix Sphinx nitpicks in library/shelve.rst (GH-112836) (#112868)
gh-101100: Fix Sphinx nitpicks in `library/shelve.rst` (GH-112836)
(cherry picked from commit 3cdcc2edf8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-08 12:37:45 +00:00
Alex Waygood
fb02db75cb
[3.12] gh-101100: Silence Sphinx warnings when ntpath or posixpath are referenced (#112833) (#112857)
(cherry-picked from commit 2c3906bc4b)
2023-12-07 21:10:12 +00:00
Eric Snow
c0fc88fa2f
[3.12] gh-112826: Fix the threading Module When _thread is Missing _is_main_interpreter() (#112850)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-07 20:15:20 +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)
af7cf385a2
[3.12] gh-101100: Fix Sphinx nitpicks in library/reprlib.rst (GH-112811) (#112813)
gh-101100: Fix Sphinx nitpicks in `library/reprlib.rst` (GH-112811)
(cherry picked from commit 3870d19d15)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-06 20:22:42 +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)
7527cdaaaf
[3.12] gh-101100: Fix most Sphinx nitpicks in the glossary and stdtypes.rst (GH-112757) (#112789)
gh-101100: Fix most Sphinx nitpicks in the glossary and `stdtypes.rst` (GH-112757)
(cherry picked from commit e3f670e137)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-06 08:50:30 +00: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
Miss Islington (bot)
68f05dd829
[3.12] gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (GH-112737) (#112748)
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (GH-112737)
(cherry picked from commit 2f20cafdbf)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-05 10:06:11 +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
Alex Waygood
f49d07327a
[3.12] gh-101100: Fix Sphinx nitpicks in library/abc.rst (#112703) (#112705)
(cherry-picked from commit 9560e0d6d7)
2023-12-04 13:12:38 +00:00
Miss Islington (bot)
8d1b3c0a70
[3.12] gh-101100: Fix Sphinx nitpicks in library/functions.rst (GH-112669) (#112697)
gh-101100: Fix Sphinx nitpicks in `library/functions.rst` (GH-112669)
(cherry picked from commit cda737924f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-04 12:11:26 +00:00
Alex Waygood
09b3e8fddb
[3.12] gh-101100: Fix sphinx warnings in Doc/library/__future__.rst (#109814) (#112702)
(cherry-picked from commit f2eaa92b0c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-04 12:04:48 +00:00
Hugo van Kemenade
da73a5cc27
[3.12] gh-101100: Fix Sphinx warning in library/gettext.rst (GH-112668) (#112674)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 20:32:57 +00:00
Miss Islington (bot)
5608112fa9
[3.12] gh-101100: Fix most Sphinx nitpicks in inspect.rst (GH-112662) (#112666)
gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (GH-112662)
(cherry picked from commit 45650d1c47)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 17:39:26 +00:00
Irit Katriel
f5965c2385
[3.12] gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659) (#112665)
gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659)

(cherry picked from commit 97857ac058)
2023-12-03 16:28:57 +00:00
Miss Islington (bot)
b3b2706cad
[3.12] Fix link to 'The Perils of Floating Point', on the tutorial (GH-112499) (GH-112664)
Use author link to 'The Perils of Floating Point'.
(cherry picked from commit c27b09c813)

Co-authored-by: Marco Aurélio A. Barbosa <aureliobarbosa@gmail.com>
2023-12-03 15:20:13 +00:00
Miss Islington (bot)
12083c0299
[3.12] Run more inspect.rst code snippets in CI (GH-112654) (#112655)
Run more `inspect.rst` code snippets in CI (GH-112654)
(cherry picked from commit 4ed46d2244)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 11:57:15 +00:00
Alex Waygood
6221482f0c
[3.12] gh-112316: improve docs for inspect.signature and inspect.Signature (#112631) (#112649)
(cherry-picked from commit fc9e24b01f)
2023-12-03 11:26:53 +00:00
Alex Waygood
e3c7947770
[3.12] gh-112316: Improve docs of inspect.signature and Signature.from_callable (#112317) (#112629)
gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable` (#112317)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-02 22:38:11 +00:00
Miss Islington (bot)
4c9da4c964
[3.12] gh-111699: Move smtpd note to dedicated section in What's New Python 3.12 doc (GH-112544) (GH-112552)
Relocate smtpd deprecation notice to it's own section rather than under
'locale' in docs for What's New in Python 3.12 doc
(cherry picked from commit 1ff212debd)

Co-authored-by: Matt Prodani <mp5908@nyu.edu>
2023-11-30 13:00:08 +00:00
Miss Islington (bot)
749c8fdafb
[3.12] [Enum] update class creation for RuntimeError changes (GH-111815) (GH-112526)
(cherry picked from commit f9e6ce0395)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-11-29 13:49:52 -08:00
Miss Islington (bot)
01b882b390
[3.12] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112523)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-29 15:55:46 +00:00
Eric Snow
1e1a30f9f4
[3.12] gh-110310: Add a Per-Interpreter XID Registry for Heap Types (gh-110311) (gh-110714)
We do the following:

* add a per-interpreter XID registry (PyInterpreterState.xidregistry)
* put heap types there (keep static types in _PyRuntimeState.xidregistry)
* clear the registries during interpreter/runtime finalization
* avoid duplicate entries in the registry (when _PyCrossInterpreterData_RegisterClass() is called more than once for a type)
* use Py_TYPE() instead of PyObject_Type() in _PyCrossInterpreterData_Lookup()

The per-interpreter registry helps preserve isolation between interpreters.  This is important when heap types are registered, which is something we haven't been doing yet but I will likely do soon.

(cherry-picked from commit 80dc39e1dc)
2023-11-28 02:36:29 +00:00
Eric Snow
0122b4d7c9
[3.12] gh-105716: Support Background Threads in Subinterpreters Consistently (gh-109921) (gh-110707)
The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish.

We add PyInterpreterState.threads.main, with some internal C-API functions.

(cherry-picked from commit 1dd9dee45d)
2023-11-27 19:01:05 -07:00
Eric Snow
82ae5a609d
[3.12] gh-109793: Allow Switching Interpreters During Finalization (gh-109794) (gh-110705)
Essentially, we should check the thread ID rather than the thread state pointer.
2023-11-28 00:58:02 +00:00
Miss Islington (bot)
c44af75e24
[3.12] Docs: fix markup for importlib.machinery.NamespaceLoader (GH-112479) (#112481)
Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479)
(cherry picked from commit 2e632fa07d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-28 00:21:47 +00:00
Eric Snow
4f71f1680d
[3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) (gh-110713)
We tried this before with a dict and for all interned strings.  That ran into problems due to interpreter isolation.  However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning.  Here we circle back to using a global cache, but only for statically allocated strings.  We also use a more-basic _Py_hashtable_t for that global cache instead of a dict.

Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter.  Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.

(cherry-picked from commit b72947a8d2)
2023-11-27 23:51:12 +00:00
Miss Islington (bot)
60a08e6ff2
[3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)
Correct documentation for AF_PACKET (GH-112339)

Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1].

[1] 89ddea4886/Modules/socketmodule.cGH-L2144

network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept.
(cherry picked from commit 562d7149c6)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
2023-11-27 23:48:59 +00:00
Eric Snow
313554457e
[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) (gh-110701)
This change makes sure sys.path[0] is set properly for subinterpreters.  Before, it wasn't getting set at all.

This change does not address the broader concerns from gh-109853.

(cherry-picked from commit a040a32ea2)
2023-11-27 22:21:12 +00:00
Miss Islington (bot)
1cb95cd2c5
[3.12] gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453) (GH-111857)
* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.
(cherry picked from commit 005d1e8fc8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-11-27 20:14:37 +00:00
Miss Islington (bot)
a2ed553b1a
[3.12] GH-101100: Fix reference warnings for `socket` methods (GH-110114) (#112455)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-11-27 17:04:18 +02:00
Miss Islington (bot)
a8269628f6
[3.12] Move What's New In Python 3.12 entries to the right section (GH-112447) (#112450)
Move What's New In Python 3.12 entries to the right section (GH-112447)

Jython and ctypes removals are unrelated to C API Removals.
(cherry picked from commit d44ee42cd7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-11-27 12:02:16 +00:00
Miss Islington (bot)
2718947886
[3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)
Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442)
(cherry picked from commit fb79e1ed4a)

Co-authored-by: Tom Levy <tomlevy93@gmail.com>
2023-11-27 09:34:19 +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)
b478c5e50c
[3.12] gh-112331: Fix reference manual description of attribute lookup mechanics (gh-112375) (#112412) 2023-11-25 22:26:31 +00:00
Miss Islington (bot)
2199cebd0f
[3.12] Descriptor HowTo: Sync the error-messages with the C code. Add tests. (gh-112403) (gh-112411) 2023-11-25 22:24:43 +00:00
Miss Islington (bot)
8b3c66bb90
[3.12] gh-101100 : Fix Sphinx warnings in library/doctest.rst (GH-112399) (#112402)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-25 12:26:00 -07:00
Miss Islington (bot)
44eb329490
[3.12] gh-101100: Define _tkinter module to fix references (GH-112382) (#112392)
gh-101100: Define `_tkinter` module to fix references (GH-112382)

Define _tkinter module to fix references
(cherry picked from commit 6b961b8cea)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-25 10:00:21 +02:00
Miss Islington (bot)
4b9d50bb60
[3.12] gh-101100: Define test.regrtest module to fix references (GH-112381) (#112390)
gh-101100: Define `test.regrtest` module to fix references (GH-112381)

Define test.regrtest module to fix references
(cherry picked from commit d525d01e27)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-25 09:59:09 +02:00
Miss Islington (bot)
103728dc15
[3.12] gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (#112378)
gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit fafae08cc7)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-11-24 18:15:54 +00:00