Commit graph

12622 commits

Author SHA1 Message Date
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)
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
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)
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
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
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)
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
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
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
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)
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)
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
Miss Islington (bot)
bfc6d91c78
[3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)
Fix docstring and var name of itertools recipe (GH-112113)

`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
(cherry picked from commit 6c47eaccfa)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-11-22 05:41:53 +00:00
Miss Islington (bot)
298e57ab56
[3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)
(cherry picked from commit 46500c42f0)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-11-21 23:06:13 +00:00
Miss Islington (bot)
5134f668b4
[3.12] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112262)
Co-authored-by: Alex Ptakhin <me@aptakhin.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-19 10:03:07 +00:00
Miss Islington (bot)
94bac1c407
[3.12] gh-112165: Fix typo in __main__.py (GH-112183) (#112184)
gh-112165: Fix typo in `__main__.py` (GH-112183)

Change '[2]' to '[1]' to get second argument.
(cherry picked from commit 8cd70eefc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-17 01:11:46 +00:00
Miss Islington (bot)
18b88fecc9
[3.12] gh-111622: Fix doc for items views (GH-112051) (#112052)
They are set-like even when some values are not hashable,
but work even better when all are.
(cherry picked from commit e31d65e0b7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-14 04:38:19 -05:00
Alex Waygood
9aa5ff82d4
[3.12] gh-111681: minor fixes to typing doctests; remove unused imports in test_typing (#111682) (#112035)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-13 14:08:57 +00:00
Miss Islington (bot)
37804149ec
[3.12] gh-103791: handle BaseExceptionGroup in contextlib.suppress() (GH-111910) (#111955)
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (GH-111910)
(cherry picked from commit d61313bdb1)

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-11-10 14:00:48 +00:00
Miss Islington (bot)
42699c82d7
[3.12] Glossary: Add "static type checker" (GH-111837) (#111854)
Glossary: Add "static type checker" (GH-111837)
(cherry picked from commit 8ab7ad6308)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:45:17 +00:00
Miss Islington (bot)
35141842d3
[3.12] gh-111729: update generic syntax for typing.Concatenate sample code in Doc/library/typing.rst (GH-111734) (#111814)
(cherry picked from commit c3e19c3a62)

Co-authored-by: 方糖 <cubesugarcheese@qq.com>
2023-11-07 01:00:16 +00:00
Miss Islington (bot)
4db71c3ca7
[3.12] gh-54434: Make difflib.rst doctests pass. (GH-111677) (#111678)
gh-54434: Make difflib.rst doctests pass. (GH-111677)
(cherry picked from commit 0d3df272fb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-03 06:28:55 +00:00
Miss Islington (bot)
1c84a48032
[3.12] Fix typo in documentation of SysLogHandler.createSocket (GH-111665) (#111669)
(cherry picked from commit 489b80640f)
2023-11-02 22:58:20 +00:00
Miss Islington (bot)
e2557947a4
[3.12] gh-111576: Improve documention for tkinter.messagebox (GH-111578) (GH-111597)
(cherry picked from commit eaf67e37a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-11-01 12:43:14 +02:00
Miss Islington (bot)
21c8fbf28d
[3.12] gh-111282: Fix NamedTemporaryFile example code (GH-111283) (GH-111579)
(cherry picked from commit 102685c4c8)

Co-authored-by: Krzysiek Karbowiak <krzysztof.karbowiak@interia.pl>
2023-10-31 22:14:21 +00:00
Miss Islington (bot)
b1da63468e
[3.12] gh-102249: Expand sys.call_tracing documentation (GH-102806) (#111557)
Co-authored-by: Quentin Peter <impact27@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-10-31 18:40:12 +02:00
Miss Islington (bot)
71e138d93e
[3.12] gh-93607: document root attribute of iterparse (GH-99410) (#111555)
Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-31 16:27:37 +00:00
Miss Islington (bot)
c21387c6b2
[3.12] gh-106861: Docs: Add availability directives to all Unix-only modules (GH-108975) (#111553)
Co-authored-by: xzmeng <aumo@foxmail.com>
2023-10-31 16:22:50 +00:00
Miss Islington (bot)
e5b6744f30
[3.12] gh-111165: Remove documentation for moved functions (GH-111467) (GH-111471)
(cherry picked from commit 4d6bdf8aab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-29 19:43:53 +00:00
Miss Islington (bot)
577c808cf9
[3.12] gh-101100: Fix sphinx warnings in library/asyncio-eventloop.rst (GH-111222) (#111469)
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)

* gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst`

* Update Doc/library/socket.rst



* Update asyncio-eventloop.rst

* Update socket.rst

---------

(cherry picked from commit 46389c3275)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-29 19:39:27 +00:00
Miss Islington (bot)
2e5d4e24eb
[3.12] gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336) (#111424)
gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336)

* Try to fix asyncio.Server.wait_closed() again

I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.

When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.

A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.

I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.

* Update Lib/asyncio/base_events.py

---------

(cherry picked from commit 2655369559)

Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-28 18:42:53 +00:00