Commit graph

27306 commits

Author SHA1 Message Date
Miss Islington (bot)
86db104eeb
[3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) (#112352)
Remove bogus annotations from the descriptor howto guide (GH-112349)
(cherry picked from commit d9fc15222e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-11-23 23:07:14 +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)
dedbd266d3
[3.12] gh-110383: Explained which error message is generated when there is an unhandled exception (GH-111574) (#112264)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-19 05:29:24 -07: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)
976488ebf6
[3.12] gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196) (#112200)
gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196)
(cherry picked from commit fb4cddb0cc)

Co-authored-by: Ori Avtalion <ori@avtalion.name>
2023-11-17 12:37:12 +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
Victor Stinner
a498433df2
[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)
gh-112088: Run autoreconf in GHA check_generated_files (#112090)

The "Check if generated files are up to date" job of GitHub Actions
now runs the "autoreconf -ivf -Werror" command instead of the "make
regen-configure" command to avoid depending on the external quay.io
server.

Add Tools/build/regen-configure.sh script to regenerate the configure
with an Ubuntu container image. The
"quay.io/tiran/cpython_autoconf:271" container image
(https://github.com/tiran/cpython_autoconf) is no longer used.

(cherry picked from commit d9fd33a869)
2023-11-16 15:55:40 +01:00
Miss Islington (bot)
2e17a81719
[3.12] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112148)
gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
(cherry picked from commit 985679f05d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-11-16 13:34:29 +01:00
Miss Islington (bot)
77f59bf664
[3.12] Fix typo in perf profiling docs (GH-112112) (#112117)
Fix typo in perf profiling docs (GH-112112)
(cherry picked from commit 0cfdd6e3d1)

Co-authored-by: Ryuji Tsutsui <ryu22e+github@gmail.com>
2023-11-15 15:48:04 +00:00
Miss Islington (bot)
c190552739
[3.12] Docs: Add the time to the HTML last updated format (GH-110091) (#112102)
Docs: Add the time to the HTML last updated format (GH-110091)
(cherry picked from commit 6c214dea7c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-11-15 06:20:14 +01: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)
a1447af69c
[3.12] Docs: Add make htmllive to rebuild and reload HTML files in your browser (GH-111900) (#112022)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-13 10:15:11 +02:00
Miss Islington (bot)
3b7e308a24
[3.12] gh-111944: Add assignment expression parentheses requirements (GH-111977) (#112010)
Augment the list of places where parentheses are
required around assignnment statements.  In particular,
'a := 0' and 'a = b := 1' are syntax errors.
(cherry picked from commit 9a2f25d374)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-13 00:17:54 +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)
fe7631e558
[3.12] gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898) (#111908)
gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d5ee)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-09 21:13:23 +02: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)
237b269298
[3.12] gh-111747: DOC: fix moved link to Documentation Translations (GH-111748) (#111749)
Update old link in bugs.rst to the table of doc translators and translation repositories at Github.
(cherry picked from commit 72e27a67b9)

Co-authored-by: partev <petrosyan@gmail.com>
2023-11-05 04:28:58 +00:00
Miss Islington (bot)
9c583f36d5
[3.12] gh-111724: Fix doctest ResourceWarning in howto/descriptor.rst (GH-111725) (#111727)
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725)

Close database connection explicitly in test cleanup.
(cherry picked from commit f48e669504)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-04 15:55:55 -04: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)
fcf91cd35f
[3.12] gh-111625: Fix link to Info-ZIP homepage (GH-111626) (#111639)
Co-authored-by: partev <petrosyan@gmail.com>
2023-11-02 12:04:27 +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)
ec00397912
[3.12] gh-111181: Fix enum doctests (GH-111180) (GH-111518)
gh-111181: Fix enum doctests (GH-111180)
(cherry picked from commit c4dc5a6ae8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-10-31 15:01:28 -07: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
Hugo van Kemenade
e820d7603b
[3.12] gh-111301: Move importlib.resources.files change to What's new in Python 3.12 (#111512) (#111534)
Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
2023-10-31 06:49:24 +00: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)
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
Miss Islington (bot)
754fda88d1
[3.12] gh-111406: Fix broken link to bpython's site (GH-111407) (#111408)
gh-111406: Fix broken link to bpython's site (GH-111407)
(cherry picked from commit 8a158a753c)

Co-authored-by: Zack Cerza <zack@cerza.org>
2023-10-27 18:44:33 +00:00
Miss Islington (bot)
713210985b
[3.12] gh-111276: Clarify docs and comments about the role of LC_CTYPE (GH-111319) (#111391)
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.htmlGH-deprecated-string-functions

Also, fix a comment in logging about locale-specific behavior of `str.lower()`.

(cherry picked from commit 6d42759c5e)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-27 17:15:06 +02:00
Miss Islington (bot)
883233dcc3
[3.12] gh-111343: Fix itertools docs: start arg is optional for count (gh-111344) (gh-111385) 2023-10-27 10:01:00 -05:00
Miss Islington (bot)
2014c23de3
[3.12] Fix typos in import system docs (GH-111396) (#111397)
Fix typos in import system docs (GH-111396)
(cherry picked from commit 9a2f2f46ca)

Co-authored-by: Jonathan Berthias <jvberthias@gmail.com>
2023-10-27 13:29:55 +00:00
Hugo van Kemenade
7d22e85550
[3.12] gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (GH-111188) (#111323) 2023-10-27 16:08:45 +03:00
Miss Islington (bot)
7cce26bcd9
[3.12] Docs: Add restart_events() and positional arg semantics for sys.monitoring (GH-111291) (#111335)
Docs: Add `restart_events()` and positional arg semantics for `sys.monitoring` (GH-111291)
(cherry picked from commit 3f84a19e62)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-25 18:13:05 +00:00
Miss Islington (bot)
ed05bf6006
[3.12] gh-108590: Improve sqlite3 docs on encoding issues and how to handle those (GH-108699) (#111324)
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.

(cherry picked from commit 1262e41842)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 14:08:10 +00:00
Serhiy Storchaka
5c4f9a1c7e
[3.12] gh-111165: Move test running code from test.support to libregrtest (GH-111166) (GH-111316)
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
(cherry picked from commit f6a45a03d0)
2023-10-25 14:56:27 +03:00
Miss Islington (bot)
a4eb2e308d
[3.12] Fix first parameter name in tool functions from sys.monitoring (GH-111286) (#111290)
Fix first parameter name in `tool` functions from `sys.monitoring` (GH-111286)
(cherry picked from commit 8b44f3c54b)

Co-authored-by: Pavel Karateev <lancelote.du.lac@gmail.com>
2023-10-24 21:28:35 +00:00
Miss Islington (bot)
2a28aa10a8
[3.12] GH-111182: Update EnumType.__contains__ docs (GH-111184) (GH-111281)
GH-111182: Update EnumType.__contains__ docs (GH-111184)
(cherry picked from commit c0ea67dd0d)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2023-10-24 10:52:17 -07:00
Miss Islington (bot)
b180120468
[3.12] Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271) (GH-111272)
Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271)

This reverts commit 7f31676340.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f907a)


Ref: https://github.com/python/cpython/pull/108427#-issuecomment-1777525740

Co-authored-by: Zachary Ware <zach@python.org>
2023-10-24 11:26:31 -05:00
Miss Islington (bot)
edff7c1614
[3.12] gh-111151: Convert monospaced directives to :ref: (GH-111152) (#111269)
gh-111151: Convert monospaced directives to :ref: (GH-111152)
(cherry picked from commit 1198076447)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2023-10-24 15:30:21 +00:00
Miss Islington (bot)
03c14b04d3
[3.12] Fix typo in sys docs (GH-111196) (#111248)
Co-authored-by: James Tocknell <aragilar+github@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-24 08:12:05 +00:00
Miss Islington (bot)
b622c2dcbe
[3.12] Fix a code snippet typo in asyncio docs (GH-108427) (#111245)
Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
2023-10-24 06:37:41 +00:00
Miss Islington (bot)
38578dd665
[3.12] gh-101100: Fix Sphinx warnings for fileno (GH-111118) (#111226)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 19:19:26 +00:00