Commit graph

119701 commits

Author SHA1 Message Date
Miss Islington (bot)
541b89eaf6
[3.12] IDLE: fix url in config.py comment (GH-119198) (#119200)
IDLE: fix url in config.py comment (GH-119198)
(cherry picked from commit 357f5a1f73)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-05-20 06:29:42 +00:00
Miss Islington (bot)
30c687cdf8
[3.12] marshal docs: Remove reference to "Sun" (GH-119161) (#119168)
Nobody has been using a Sun machine for a long time. When I saw
this sentence in a lightning talk just now, I thought it was talking
about sending Python code on a spacecraft.
(cherry picked from commit 697465ff88)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-19 02:22:10 +00:00
Miss Islington (bot)
d76d95eacb
[3.12] gh-119050: Add type hints to libregrtest/results.py (GH-119144) (#119157)
gh-119050: Add type hints to libregrtest/results.py (GH-119144)

Sort also 'omitted' in TestResults.display_result().
(cherry picked from commit 30b4e9f9c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-05-18 21:06:41 +00:00
Victor Stinner
bd1e9509a4
[3.12] gh-118997: Fix _Py_ClearImmortal() assertion (#119001)
Fix _Py_ClearImmortal() assertion: use _Py_IsImmortal() to tolerate
reference count lower than _Py_IMMORTAL_REFCNT. Fix the assertion for
the stable ABI, when a C extension is built with Python 3.11 or
lower.
2024-05-18 16:56:27 -04:00
Miss Islington (bot)
bb44a827f1
[3.12] gh-119078: Clarify venv tutorial (GH-119129) (GH-119141)
(cherry picked from commit 0f5e8bed63)
2024-05-18 12:54:40 +01:00
Miss Islington (bot)
a370eebdd9
[3.12] Minor improvements to the docs for itertools.tee() (gh-119135) (gh-119137) 2024-05-18 01:51:20 -05:00
Miss Islington (bot)
fa359dfe07
[3.12] Fix typos in documentation (GH-119092) (#119117)
Fix typos in documentation (GH-119092)
(cherry picked from commit 65de194dd8)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-17 06:57:34 -04:00
Miss Islington (bot)
a3db4e8f96
[3.12] gh-108267: Fix object.__setattr__ regression in dataclasses docs (GH-119082) (#119098)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-16 13:46:20 +00:00
Serhiy Storchaka
0a761cafc8
[3.12] Add Tkinter tests for different events (GH-118778) (GH-119095)
(cherry picked from commit b6839942a8)
2024-05-16 10:43:02 +00:00
Serhiy Storchaka
33a9f0ce65
[3.12] gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065) (GH-119088)
(cherry picked from commit 0152dc4ff5)
2024-05-16 08:04:37 +00:00
Miss Islington (bot)
ed395f5c0e
[3.12] gh-119009: Add gettext target (GH-119006) (#119075)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-15 18:20:41 +00:00
Miss Islington (bot)
6d0850c4c8
gh-118486: Simplify test_win32_mkdir_700 to check the exact ACL (GH-119056)
(cherry picked from commit 94591dca51)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-15 11:21:57 +00:00
Miss Islington (bot)
bac277f1dd
[3.12] Misc improvements to the itertools docs (gh-119040) (#119044) 2024-05-14 15:27:03 +00:00
Miss Islington (bot)
71ec3533c6
[3.12] Itertools docs: fix parameter names and indentation in Python equivalents (gh-118977) (#119042) 2024-05-14 14:59:11 +00:00
Miss Islington (bot)
4695f1a364
[3.12] typing tests: remove some unnecessary uses of exec() (GH-119005) (#119039)
(cherry picked from commit a9328e2b6e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-14 14:51:08 +00:00
Miss Islington (bot)
56cc026c85
[3.12] Add yet few cases for urlparse/urlunparse roundtrip tests (GH-119031) (GH-119036)
(cherry picked from commit 331d385af9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-14 14:16:27 +00:00
Miss Islington (bot)
387ff96e95
[3.12] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (GH-119024)
(cherry picked from commit e237b25a4f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-14 09:47:11 +00:00
Miss Islington (bot)
5bf7f5c6a8
[3.12] gh-118998: Handle errors correctly in tmtotuple in timemodule (GH-118999) (#119019)
gh-118998: Handle errors correctly in `tmtotuple` in `timemodule` (GH-118999)
(cherry picked from commit fc75792594)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-13 21:47:12 +00:00
Miss Islington (bot)
275ec3917e
[3.12] gh-119010: Adds docs about __type_params__ to functools.update_wrapper (GH-119012) (#119014)
gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012)
(cherry picked from commit b04c497f18)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-13 20:16:54 +00:00
Tian Gao
fcdd20ef83
[3.12] gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979) (#119008)
* [3.12] gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979)
(cherry picked from commit f526314194)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-05-13 20:21:15 +01:00
Miss Islington (bot)
2430729afe
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows.
(cherry picked from commit d8a82cca12)

Co-authored-by: I-Shen Leong <i-shenl@activestate.com>
2024-05-13 11:48:39 +00:00
Miss Islington (bot)
ce3fdf70f4
[3.12] Improve the rmtree doc for dir_fd param addition in 3.11 (GH-118964) (#118992)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-13 11:10:55 +00:00
Miss Islington (bot)
35649dfe05
[3.12] gh-87106: Fix inspect.signature.bind() handling of positional-only arguments with **kwargs (GH-103404) (GH-118984)
(cherry picked from commit 9c15202441)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-05-13 08:29:47 +00:00
Miss Islington (bot)
76dc1bf5be
[3.12] gh-118899: Add tests for NotImplemented attribute access (GH-118902) (#118969)
gh-118899: Add tests for `NotImplemented` attribute access (GH-118902)
(cherry picked from commit ec1398e117)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-12 14:22:58 +00:00
Barney Gale
a0786bcb74
[3.12] GH-118701: Note that recursive wildcards aren't supported in PurePath.match() (#118713) 2024-05-11 19:10:51 +01:00
Miss Islington (bot)
af8db2b681
[3.12] Correct the argument names for secrets.choice and secrets.randbelow in secrets.rst (GH-118098) (GH-118907)
Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098)

Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst`.
(cherry picked from commit c444362c6e)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2024-05-10 14:45:22 +00:00
Miss Islington (bot)
9f8f14a6da
gh-118689: Doc: fix ePub build (GH-118690)
(cherry picked from commit 7ac933e260)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2024-05-10 19:34:33 +09:00
Miss Islington (bot)
8bfaf3a5f0
Fix some missing null checks. (GH-118721)
(cherry picked from commit 7e6fcab200)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-10 09:51:57 +00:00
Steve Dower
eb29e2f590
gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488) 2024-05-09 19:18:56 +01:00
Miss Islington (bot)
c0d257cc69
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
(cherry picked from commit 82acc5f211)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-09 13:41:15 +00:00
Miss Islington (bot)
0d626760a4
[3.12] gh-103956: Fix trace output in case of missing source line (GH-103958) (GH-118832)
Print only filename with lineno if linecache.getline() returns an empty string.
(cherry picked from commit 7c87ce777b)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2024-05-09 12:51:03 +00:00
Miss Islington (bot)
e9539568be
[3.12] gh-118033: Fix __weakref__ not set for generic dataclasses (GH-118099) (#118822)
gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099)
(cherry picked from commit fa9b9cb113)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-09 09:09:40 +00:00
Serhiy Storchaka
530c3bb271
[3.12] Format None, True, False and NotImplemented as literals (GH-118758) (GH-118794)
(cherry picked from commit 05c2fe1acd)
2024-05-08 19:55:13 +00:00
Miss Islington (bot)
b83b3cb9da
[3.12] docs: module page titles should not start with a link to themselves (GH-117099) (#118791)
docs: module page titles should not start with a link to themselves (GH-117099)
(cherry picked from commit bcb435ee8f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-05-08 19:42:01 +00:00
Miss Islington (bot)
e652dae6eb
[3.12] Docs: fix typos in documentation (GH-118752) (#118786)
Docs: fix typos in documentation (GH-118752)
(cherry picked from commit 7b0c247f1c)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
2024-05-08 19:13:42 +00:00
Miss Islington (bot)
656491783d
[3.12] gh-118671: Updated dead ActiveState links (GH-118730) (#118754)
Co-authored-by: trag1c <trag1cdev@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-08 07:22:35 +00:00
Miss Islington (bot)
5cdef782bf
[3.12] Regen `Doc/requirements-oldest-sphinx.txt` (GH-118736) (#118753)
Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-118736)

Regen dependencies
(cherry picked from commit fcf52d7cee)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-08 06:06:04 +00:00
Miss Islington (bot)
efbc8c78c5
[3.12] Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612) (GH-118707)
Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612)
(cherry picked from commit a855f824a2)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
2024-05-07 13:35:09 +00:00
Miss Islington (bot)
8e53f66797
[3.12] gh-118310: Fix documentation for enum.Enum.__new__ (GH-118311) (GH-118699)
gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311)

The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
(cherry picked from commit 48e52fe2c9)

Co-authored-by: Momo Eissenhauer <mmEissen@users.noreply.github.com>
2024-05-07 14:02:55 +02:00
Miss Islington (bot)
f85021a6a2
[3.12] gh-78612: Mark up eval() using param list (GH-115212) (#116044)
Also mention that the 'expression' parameter can be a string.
(cherry picked from commit a71e32ce8e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-05-07 13:49:29 +02:00
Miss Islington (bot)
56c61cc564
[3.12] gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320) (GH-118691)
gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320)

Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.

(cherry picked from commit fe47d9bee3)

Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2024-05-07 09:35:49 +00:00
Raymond Hettinger
7b25d945e0
[3.12] Expand recipe for kernel density estimation to include common tasks. (gh-118659) 2024-05-06 14:51:27 -05:00
Serhiy Storchaka
bee1c322c0
[3.12] gh-71592: Add ability to trace Tcl commands executed by Tkinter (GH-118291) (GH-118662)
This is an experimental feature, for internal use.

Setting tkinter._debug = True before creating the root window enables
printing every executed Tcl command (or a Tcl command equivalent to the
used Tcl C API).

This will help to convert a Tkinter example into Tcl script to check
whether the issue is caused by Tkinter or exists in the underlying Tcl/Tk
library.
(cherry picked from commit 1ff626ebda)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-06 19:26:08 +00:00
Miss Islington (bot)
f6c2b04d02
[3.12] Fix typo in Doc/library/asyncio-task.rst (GH-118627) (#118657)
Fix typo in Doc/library/asyncio-task.rst (GH-118627)
(cherry picked from commit fc50f1bdba)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
2024-05-06 17:03:22 +00:00
Miss Islington (bot)
11888a8694
[3.12] GH-115577 Clarify netloc term usage in urllib.parse docs (GH-117632) (GH-118656)
(cherry picked from commit 3ed3bc379a)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
2024-05-06 17:01:50 +00:00
Miss Islington (bot)
a4812fd8f7
[3.12] gh-118164: Break a loop between _pydecimal and _pylong and optimize int to str conversion (GH-118483) (GH-118590)
For converting large ints to strings, CPython invokes a function in _pylong.py,
which uses the decimal module to implement an asymptotically waaaaay
sub-quadratic algorithm. But if the C decimal module isn't available, CPython
uses _pydecimal.py instead. Which in turn frequently does str(int). If the int
is very large, _pylong ends up doing the work, which in turn asks decimal to do
"big" arithmetic, which in turn calls str(big_int), which in turn ... it can
become infinite mutual recursion.

This change introduces a different int->str function that doesn't use decimal.
It's asymptotically worse, "Karatsuba time" instead of quadratic time, so
still a huge improvement. _pylong switches to that when the C decimal isn't
available. It is also used for not too large integers (less than 450_000 bits),
where it is faster (up to 2 times for 30_000 bits) than the asymptotically
better implementation that uses the C decimal.

(cherry picked from commit 711c80bfca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Tim Peters <tim.peters@gmail.com>
2024-05-06 12:10:05 +03:00
Erlend E. Aasland
a81fe2a8f8
[3.12] gh-115119: Bump CI to use Ubuntu 22.04 (#118631) (#118634)
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
2024-05-06 09:03:36 +00:00
Miss Islington (bot)
6abf8401db
[3.12] gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502) (#118632)
gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502)
(cherry picked from commit 7758be4318)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-05-06 08:12:39 +00:00
Miss Islington (bot)
11594da046
[3.12] gh-117389: Fix test_compileall.EncodingTest (GH-117390) (#118603)
gh-117389: Fix `test_compileall.EncodingTest` (GH-117390)
(cherry picked from commit 44f67916da)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-05 19:02:04 +00:00
Miss Islington (bot)
68316a04f3
[3.12] gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559) (#118587) 2024-05-05 06:49:19 +00:00