Commit graph

118378 commits

Author SHA1 Message Date
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
Diego Russo
f941ecfffa
[3.12] gh-110190: Fix ctypes structs with array on Arm (#112604) (#112767)
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms.
This because on Arm platforms structs with at most 4 elements of any
floating point type values can be passed through registers. If the type
is double the maximum size of the struct is 32 bytes.
On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.

(cherry picked from commit bc68f4a4ab)
2023-12-06 16:57:34 +01:00
Miss Islington (bot)
f189bd3e83
[3.12] gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" (GH-111322) (GH-112802)
Previously, "widget.unbind(sequence, funcid)" destroyed the current binding
for "sequence", leaving "sequence" unbound, and deleted the "funcid"
command.

Now it removes only "funcid" from the binding for "sequence", keeping
other commands, and deletes the "funcid" command.
It leaves "sequence" unbound only if "funcid" was the last bound command.

(cherry picked from commit cc7e45cc57)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
2023-12-06 15:12:37 +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
Serhiy Storchaka
cf16aaae80
[3.12] gh-108927: Include new dir test/regrtestdata in the installation (GH-112765) (GH-112785)
(cherry picked from commit f8c0198e3b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-06 08:14:34 +00:00
Miss Islington (bot)
5720f7fcdf
[3.12] gh-112769: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix (GH-112771) (GH-112773)
zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813ff1)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2023-12-05 20:03:00 +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)
e63bb9caf0
[3.12] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) (GH-112763)
* Ignore os.close() errors when ignore_errors is True.
* Pass os.close() errors to the error handler if specified.
* os.close no longer retried after error.

(cherry picked from commit 11d88a178b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-05 17:38:44 +00:00
Miss Islington (bot)
5acfb8258a
[3.12] bpo-43153: Don't mask PermissionError with NotADirectoryError during tempdirectory cleanup (GH-29940) (GH-112753)
(cherry picked from commit 8cdfee1bb9)

Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-05 13:58:36 +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)
85bbfa8a4b
[3.12] gh-112334: Restore subprocess's use of vfork() & fix extra_groups=[] behavior (GH-112617) (#112731)
Restore `subprocess`'s intended use of `vfork()` by default for performance on Linux;
also fixes the behavior of `extra_groups=[]` which was unintentionally broken in 3.12.0:

Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it
would no longer use the fast-path ``vfork()`` system call when it could have
due to a logic bug, instead falling back to the safe but slower ``fork()``.

Also fixed a security bug introduced in 3.12.0.  If a value of ``extra_groups=[]``
was passed to :mod:`subprocess.Popen` or related APIs, the underlying
``setgroups(0, NULL)`` system call to clear the groups list would not be made
in the child process prior to ``exec()``.

The security issue was identified via code inspection in the process of
fixing the first bug.  Thanks to @vain for the detailed report and
analysis in the initial bug on Github.

(cherry picked from commit 9fe7655c6c)

+ Reword NEWS for the bugfix/security release. (mentions the assigned CVE number)

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-04 23:33:59 +00: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
Miss Islington (bot)
88ec2a4fef
[3.12] gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (GH-112615) (#112724)
gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (GH-112615)

Work around a macOS bug, limit zlib crc32 calls to 1GiB.

Without this, `zlib.crc32` and `binascii.crc32` could produce incorrect
results on multi-gigabyte inputs depending on the macOS version's Apple
supplied zlib implementation.
(cherry picked from commit 4eddb4c9d9)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-12-04 20:29:23 +00:00
Miss Islington (bot)
8d21242bd1
[3.12] gh-108927: Fix removing testing modules from sys.modules (GH-108952) (ПР-112711)
It breaks import machinery if the test module has submodules used in
other tests.
(cherry picked from commit e08b70fab1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-04 16:17:38 +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)
55896f470b
[3.12] gh-109786: Fix leaks and crash when re-enter itertools.pairwise.__next__() (GH-109788) (GH-112699)
(cherry picked from commit 6ca9d3e017)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-04 12:15:41 +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
Miss Islington (bot)
e005dabe13
[3.12] gh-106550: Fix sign conversion in pycore_code.h (GH-112613) (#112696)
gh-106550: Fix sign conversion in pycore_code.h (GH-112613)

Fix sign conversion in pycore_code.h: use unsigned integers and cast
explicitly when needed.
(cherry picked from commit a74902a14c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-04 11:14:13 +00:00
Miss Islington (bot)
29a5ff0068
[3.12] gh-112625: Protect bytearray from being freed by misbehaving iterator inside bytearray.join (GH-112626) (GH-112693)
(cherry picked from commit 0e732d0997)

Co-authored-by: chilaxan <chilaxan@gmail.com>
2023-12-04 08:46:40 +00:00
Miss Islington (bot)
bfad9578d1
[3.12] gh-112678: Declare Tkapp_CallDeallocArgs() as static (GH-112679) (GH-112690)
(cherry picked from commit 23e001fa9f)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-12-04 08:21:28 +00:00
Miss Islington (bot)
838e968e69
[3.12] gh-66819: More IDLE htest updates(4) (GH-112686) (#112688)
Mostly double spacing before 'if __name__...'.
(cherry picked from commit e5b0db0315)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-04 07:08:01 +00:00
Miss Islington (bot)
55a4bb99fc
[3.12] gh-66819: More IDLE htest updates(3) (GH-112683) (#112684)
Revise spec-callable pairs from percolator to end.
(cherry picked from commit 5a1b5316af)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-04 05:10:19 +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)
ee3ef7f196
[3.12] gh-66819: More IDLE htest updates(2) (GH-112642) (#112643)
Examine and update spec -- callable pairs.
Revise run method.
(cherry picked from commit 3855b45874)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-03 11:34:08 -05: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
Victor Stinner
34d57d5871
[3.12] gh-106560: Fix redundant declarations in Python/frozen.c (#112612) (#112651)
gh-106560: Fix redundant declarations in Python/frozen.c (#112612)

Avoid duplicated declarations of "extern" functions in
Python/frozen.c.

Compiler warnings seen by building Python with gcc -Wredundant-decls.

(cherry picked from commit d9e444dbb8)
2023-12-03 11:54:59 +00:00
Victor Stinner
05f5d416de
[3.12] gh-106560: Fix redundant declarations in Include/ (#112611) (#112650)
gh-106560: Fix redundant declarations in Include/ (#112611)

Don't declare PyBool_Type and PyLong_Type twice, but only once.

Compiler warnings seen by building Python with gcc -Wredundant-decls.
2023-12-03 11:45:32 +00:00
Miss Islington (bot)
73cda994a3
[3.12] gh-112578: Fix RuntimeWarning when running zipfile (GH-112579) (GH-112646)
(cherry picked from commit 29e6c7b68a)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-12-03 11:41:50 +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
2a378ca2ef
[3.12] gh-112618: Make Annotated cache typed (#112619) (#112628) 2023-12-03 00:41:03 +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
Alex Waygood
acc62db8af
[3.12] gh-109413: libregrtest: Backport .py-file changes from #112558 (#112605) 2023-12-01 18:54:38 +00:00
Alex Waygood
36dbebed44
[3.12] gh-109413: libregrtest: enable mypy's --strict-optional check on most files (#112586) (#112602)
gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (#112586)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-01 17:13:22 +00:00
Alex Waygood
4fc010cda2
[3.12] Bump mypy to 1.7.1 (#112581) (#112601) 2023-12-01 17:10:38 +00:00
Pablo Galindo Salgado
11232c1299
[3.12] gh-112367: Only free perf trampoline arenas at shutdown (GH-112368) (#112590)
(cherry picked from commit a73aa48e6b)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2023-12-01 16:05:31 +00:00
Miss Islington (bot)
4f919cf8b9
[3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112593)
gh-109413: regrtest: add WorkerRunTests class (GH-112588)
(cherry picked from commit f8ff80f635)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-01 14:46:42 +00:00
Miss Islington (bot)
7eff607deb
[3.12] gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. (GH-112428) (#112589) 2023-12-01 14:13:15 +00:00
Miss Islington (bot)
edce0c4fb3
[3.12] gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) (GH-112591)
(cherry picked from commit 058444308a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-01 14:12:46 +00:00
Serhiy Storchaka
ae1ea41cf3
[3.12] gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551) (GH-112555)
(cherry picked from commit 2223899adc)
2023-12-01 10:16:47 +02:00
Miss Islington (bot)
88d9142639
[3.12] gh-66819: More IDLE htest updates (GH-112574) (#112575)
Revise htest.py docstring and move 2 specs to alphabetical position.
(cherry picked from commit e44f1940bd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-01 07:20:28 +00:00
Dennis Sweeney
a99305e7fb
[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566) 2023-12-01 00:35:49 +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)
46adf6b701
[3.12] IDLE: fix config_key htest (GH-112545) (#112546)
Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
(cherry picked from commit 81261fa67f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-30 03:29:59 -05: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