]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Thu, 14 Dec 2023 10:28:57 +0000 (11:28 +0100)]
[3.12] gh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221) (GH-113096)
(cherry picked from commit
bb36f72efcc6a656e0907ffa83620a1e44044895 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 14 Dec 2023 10:15:28 +0000 (11:15 +0100)]
[3.12] Fixing typo in DocTestRunner docs (GH-112326) (GH-113097)
(cherry picked from commit
b3c21265fa48a137a4c6a35e425b2b7f94f96cf4 )
Co-authored-by: Daniel Wysocki <dwysocki@users.noreply.github.com>
Miss Islington (bot) [Thu, 14 Dec 2023 07:31:46 +0000 (08:31 +0100)]
[3.12] gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087) (GH-113088)
Also make test_copymode_symlink_to_symlink in test_shutil more strict.
(cherry picked from commit
b4f2c89118d5a48ce6c495ba931d7f6493422029 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 13 Dec 2023 21:06:43 +0000 (22:06 +0100)]
[3.12] gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885) (#113068)
gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885)
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit
890ce430d94b0b2bccc92a8472b1e1030b4faeb8 )
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Miss Islington (bot) [Wed, 13 Dec 2023 20:50:50 +0000 (21:50 +0100)]
[3.12] bpo-40648: Test modes that file can get with chmod() on Windows (GH-20130) (GH-113070)
Order of tests matter second part makes testing file writable and
possible to remove again.
(cherry picked from commit
f5c05e015c178975f24b77e5a8975a22d694e019 )
Co-authored-by: Pavol Babinčák <scroolik@gmail.com>
Miss Islington (bot) [Wed, 13 Dec 2023 20:01:39 +0000 (21:01 +0100)]
[3.12] gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960) (GH-113066)
gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)
POSIX specifies that implementations are not required to support changing the
file mode of symbolic links, but may do so.
Consequently, `lchmod()` is not part of POSIX (but mentioned for implementations
which do support the above).
The current wording of the availability of `os.lchmod()` is rather vague and
improved to clearly tell which POSIX/Unix/BSD-like support the function in
general (those that support changing the file mode of symbolic links).
Further, some examples of major implementations are added.
Data for the BSDs taken from their online manpages.
(cherry picked from commit
f14e3d59c955fb3cf89e5241727ec566164dcf42 )
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Wed, 13 Dec 2023 19:48:43 +0000 (20:48 +0100)]
[3.12] Docs: Fix external link to devguide.python.org (GH-112899) (#113065)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Miss Islington (bot) [Wed, 13 Dec 2023 19:07:19 +0000 (20:07 +0100)]
[3.12] gh-101100: Improve docs on exception attributes (GH-113057) (#113061)
gh-101100: Improve docs on exception attributes (GH-113057)
(cherry picked from commit
d05a180350fe20d5fde56c7e525e394a0b282703 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Wed, 13 Dec 2023 12:38:07 +0000 (13:38 +0100)]
[3.12] [pprint]: Add docstring about `PrettyPrinter.underscore_numbers` parameter (GH-112963) (#113053)
[pprint]: Add docstring about `PrettyPrinter.underscore_numbers` parameter (GH-112963)
(cherry picked from commit
2a3c37c273762d2dc40bfdae3899cb09b7c88d4a )
Co-authored-by: Sequew <88668176+KrySeyt@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Wed, 13 Dec 2023 08:59:47 +0000 (09:59 +0100)]
[3.12] gh-101100: Fix Sphinx warning in references with asterisks (GH-113029) (#113043)
gh-101100: Fix Sphinx warning in references with asterisks (GH-113029)
(cherry picked from commit
3531ea441b8b76bff90d2ecc062335da65fd3341 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Tue, 12 Dec 2023 20:28:10 +0000 (21:28 +0100)]
[3.12] gh-101100: Further improve docs on function attributes (GH-113001) (#113030)
gh-101100: Further improve docs on function attributes (GH-113001)
(cherry picked from commit
81a15ea74e2607728fceb822dfcc1aabff00478a )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Tue, 12 Dec 2023 18:24:28 +0000 (19:24 +0100)]
[3.12] gh-112983: Add the known magic value of 3495 for Python 3.11 bytecode (GH-112985) (#113023)
gh-112983: Add the known magic value of 3495 for Python 3.11 bytecode (GH-112985)
Add the known magic value of 3495 for Python 3.11 bytecode
(cherry picked from commit
616622cab7200bac476bf753d6cc98f4ee48808c )
Co-authored-by: wim glenn <jump@wimglenn.com>
Miss Islington (bot) [Tue, 12 Dec 2023 17:20:51 +0000 (18:20 +0100)]
[3.12] gh-112999: Replace the outdated "deprecated" directives with "versionchanged" (GH-113000) (GH-113019)
(cherry picked from commit
fe9991bb672dd95fb9cd38b5a03180719ac4e722 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 12 Dec 2023 16:30:00 +0000 (17:30 +0100)]
[3.12] Update pre-commit to fix Sphinx Lint (GH-113015) (#113017)
Update pre-commit to fix Sphinx Lint (GH-113015)
(cherry picked from commit
eafc2381a0b891383098b08300ae766868a19ba6 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Terry Jan Reedy [Tue, 12 Dec 2023 15:53:58 +0000 (10:53 -0500)]
[3.12] gh-83162: Rename re.error in idlelib (GH-101677) (#112987)
Backport idlelib part of #101677 with simple rename.
Hugo van Kemenade [Tue, 12 Dec 2023 10:10:27 +0000 (12:10 +0200)]
[3.12] gh-101100: Improve documentation on function attributes (GH-112933) (#112974)
(cherry picked from commit
4c5b9c107a1d158b245f21a1839a2bec97d05383 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Terry Jan Reedy [Tue, 12 Dec 2023 06:01:56 +0000 (01:01 -0500)]
[3.12] gh-112953: Rename idlelib/NEWS.txt to News3.txt and update (GH-112988) (#112990)
Miss Islington (bot) [Mon, 11 Dec 2023 19:00:45 +0000 (20:00 +0100)]
[3.12] gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108) (#112976)
gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108)
(cherry picked from commit
0738b9a338fd27ff2d4456dd9c15801a8858ffd9 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 11 Dec 2023 16:48:06 +0000 (17:48 +0100)]
[3.12] gh-94606: Fix error when message with Unicode surrogate not surrogateescaped string (GH-94641) (GH-112971)
(cherry picked from commit
27a5fd8cb8c88537216d7a498eba9d9177951d76 )
Co-authored-by: Sidney Markowitz <sidney@sidney.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 11 Dec 2023 16:14:15 +0000 (17:14 +0100)]
[3.12] gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939) (#112960)
gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939)
* gh-112898: warn about unsaved files when quitting IDLE on macOS
Implement the TK function ``::tk::mac::Quit`` on macOS to
ensure that IDLE asks about saving unsaved files when
quitting IDLE.
(cherry picked from commit
3251ba8f1af535bf28e31a6832511ba19e96b262 )
Co-authored-by: Christopher Chavez chrischavez@gmx.us
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Pablo Galindo Salgado [Mon, 11 Dec 2023 12:48:19 +0000 (12:48 +0000)]
[3.12] gh-112943: Correctly compute end offsets for multiline tokens in the tokenize module (GH-112949) (#112957)
(cherry picked from commit
a135a6d2c6d503b186695f01efa7eed65611b04e )
Miss Islington (bot) [Mon, 11 Dec 2023 12:13:01 +0000 (13:13 +0100)]
[3.12] Fix SyntaxWarning in test_syntax.py (GH-112944) (GH-112955)
(cherry picked from commit
97cd45bfdbb6525457ba9d6824386f1e0eea6657 )
Co-authored-by: Anthony Sottile <asottile@umich.edu>
Miss Islington (bot) [Sun, 10 Dec 2023 19:23:14 +0000 (20:23 +0100)]
[3.12] GH-101986: Support translation for Limited/Unstable API & Stable ABI (GH-107680) (#112940)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 10 Dec 2023 18:49:39 +0000 (19:49 +0100)]
[3.12] gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905) (#112927)
gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905)
On recentish macOS versions the system tar
command includes system metadata (ACLs, extended attributes
and resource forks) in the tar archive, which
shutil.make_archive will not do. This can cause
spurious test failures.
(cherry picked from commit
dd2ebdf89ff144e89db180bd552c50615f712cb2 )
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Miss Islington (bot) [Sun, 10 Dec 2023 17:50:05 +0000 (18:50 +0100)]
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
Doc: c-api: fix order of PyMemberDef fields (GH-112879)
(cherry picked from commit
42a86df3a376a77a94ffe6b4011a82cf51dc336a )
Miss Islington (bot) [Sun, 10 Dec 2023 12:59:25 +0000 (13:59 +0100)]
[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)
Miss Islington (bot) [Sun, 10 Dec 2023 09:36:01 +0000 (10:36 +0100)]
[3.12] Docs: Use 'f-strings' as header (GH-112888) (#112923)
Docs: Use 'f-strings' as header (GH-112888)
(cherry picked from commit
5bf7580d72259d7d64f5ee8cfc2df677de5310a4 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 10 Dec 2023 02:56:28 +0000 (03:56 +0100)]
[3.12] IDLE: Tweak iomenu.IOBinding.maybesave (GH-112914) (#112917)
Add docstring, use f-string, simplify code.
(cherry picked from commit
ca1bde894305a1b88fdbb191426547f35b7e9200 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 9 Dec 2023 22:50:33 +0000 (23:50 +0100)]
[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
96f64a2b1b4e3d4902848c63e42717a9c5539e03 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Alex Waygood [Sat, 9 Dec 2023 22:47:01 +0000 (22:47 +0000)]
[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>
Ronald Oussoren [Sat, 9 Dec 2023 14:53:16 +0000 (15:53 +0100)]
[3.12] gh-110820: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834)
* gh-110820: Make sure processor specific defines are correct for Universal 2 build on macOS (#112828)
A number of processor specific defines are different for x86-64 and
arm64, and need to be adjusted in pymacconfig.h.
(cherry picked from commit
15a80b15af9a0b0ebe6bd538a1919712ce7d4ef9 )
Serhiy Storchaka [Sat, 9 Dec 2023 13:13:40 +0000 (15:13 +0200)]
[3.12] gh-79429: Ignore FileNotFoundError when remove a temporary directory in the multiprocessing finalizer (GH-112865)
Miss Islington (bot) [Fri, 8 Dec 2023 18:26:46 +0000 (19:26 +0100)]
[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
ed8720ace4f73e49f149a1fdd548063ee05f42d5 )
Co-authored-by: Taylor Packard <3.t.packard@gmail.com>
Alex Waygood [Fri, 8 Dec 2023 14:03:38 +0000 (14:03 +0000)]
[3.12] gh-101100: Fix Sphinx nits in `library/contextlib.rst` (#112870) (#112875)
(cherry-picked from commit
e4c0876033 )
Miss Islington (bot) [Fri, 8 Dec 2023 13:25:52 +0000 (14:25 +0100)]
[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
ed21d0c1f4bd17b392e24bfd83e652723dad4ddf )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Fri, 8 Dec 2023 12:37:45 +0000 (13:37 +0100)]
[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
3cdcc2edf81c7be4c88d4f273947ce29f916f49a )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Fri, 8 Dec 2023 09:07:34 +0000 (10:07 +0100)]
[3.12] gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834) (#112851)
gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834)
Test test_stress_modifying_handlers in test_signal can crash
the interpreter due to a bug in macOS. Filed as
FB13453490
with Apple.
(cherry picked from commit
bf0beae6a05f3266606a21e22a4d803abbb8d731 )
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Thomas Wouters [Fri, 8 Dec 2023 00:40:16 +0000 (01:40 +0100)]
Merge branch '3.12' of https://github.com/python/cpython into 3.12
Thomas Wouters [Fri, 8 Dec 2023 00:39:55 +0000 (01:39 +0100)]
Post 3.12.1
Alex Waygood [Thu, 7 Dec 2023 21:10:12 +0000 (21:10 +0000)]
[3.12] gh-101100: Silence Sphinx warnings when `ntpath` or `posixpath` are referenced (#112833) (#112857)
(cherry-picked from commit
2c3906bc4b )
Thomas Wouters [Thu, 7 Dec 2023 20:31:58 +0000 (21:31 +0100)]
Python 3.12.1
Eric Snow [Thu, 7 Dec 2023 20:15:20 +0000 (13:15 -0700)]
[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>
Miss Islington (bot) [Thu, 7 Dec 2023 17:36:29 +0000 (18:36 +0100)]
[3.12] gh-79325: Fix recursion error in TemporaryDirectory cleanup on Windows (GH-112762) (GH-112847)
(cherry picked from commit
b2923a61a10dc2717f4662b590cc9f6d181c6983 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 7 Dec 2023 17:17:27 +0000 (18:17 +0100)]
[3.12] gh-87319: Simplify TemporaryDirectory cleanup using os.path.isjunction() (GH-112791) (GH-112845)
(cherry picked from commit
ba18893555bbf69b1da262aaf85d65e4b67e8955 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 7 Dec 2023 16:35:50 +0000 (17:35 +0100)]
[3.12] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930) (GH-112838)
(cherry picked from commit
81c16cd94ec38d61aa478b9a452436dc3b1b524d )
Co-authored-by: Søren Løvborg <sorenl@unity3d.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Łukasz Langa [Thu, 7 Dec 2023 14:07:45 +0000 (15:07 +0100)]
[3.12] gh-110190: Temporarily skip new test introduced in gh-112604 on PPC64LE (GH-112818) (#112829)
(cherry picked from commit
9f67042f28bf886a9bf30fed6795d26cff255f1e )
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Victor Stinner [Thu, 7 Dec 2023 13:41:00 +0000 (14:41 +0100)]
[3.12] gh-112125: Fix None.__ne__(None) returning NotImplemented instead of … (#112827)
gh-112125: Fix None.__ne__(None) returning NotImplemented instead of False (#112504)
(cherry picked from commit
9c3458e05865093dd55d7608810a9d0ef0765978 )
Co-authored-by: andrewluotechnologies <44252973+andrewluotechnologies@users.noreply.github.com>
Miss Islington (bot) [Thu, 7 Dec 2023 10:28:26 +0000 (11:28 +0100)]
[3.12] gh-109981: Fix support.fd_count() on macOS 14 (GH-112797) (#112824)
gh-109981: Fix support.fd_count() on macOS 14 (GH-112797)
Use scanning "/dev/fd/" on macOS in support.fd_count(). That's both more efficient than scanning all possible file descriptors, and avoids crashing the interpreter when there are open "guarded" file descriptors.
"Guarded" file descriptors are a macOS feature where file descriptors used by system libraries are marked and cause hard crashes when used by "user" code.
(cherry picked from commit
953ee622b3901d3467e65e3484dcfa75ba6fcddf )
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Alex Waygood [Wed, 6 Dec 2023 22:11:53 +0000 (22:11 +0000)]
[3.12] gh-101100: Improve documentation of code object attributes (#112781) (#112816)
(cherry-picked from commit
e9707d3c3d )
Miss Islington (bot) [Wed, 6 Dec 2023 20:22:42 +0000 (21:22 +0100)]
[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
3870d19d151c31d77b737d6a480aa946b4e87af6 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diego Russo [Wed, 6 Dec 2023 15:57:34 +0000 (15:57 +0000)]
[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
bc68f4a4abcfbea60bb1db1ccadb07613561931c )
Miss Islington (bot) [Wed, 6 Dec 2023 15:12:37 +0000 (16:12 +0100)]
[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
cc7e45cc572dd818412a649970fdee579417701f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
Miss Islington (bot) [Wed, 6 Dec 2023 10:03:22 +0000 (11:03 +0100)]
[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
00cce0fe495ee820cd3ca5878bdbe3dd65b1be7b )
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Miss Islington (bot) [Wed, 6 Dec 2023 08:50:30 +0000 (09:50 +0100)]
[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
e3f670e13792305cfb977d5cffd8e6aa03e8fe7f )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Serhiy Storchaka [Wed, 6 Dec 2023 08:14:34 +0000 (10:14 +0200)]
[3.12] gh-108927: Include new dir test/regrtestdata in the installation (GH-112765) (GH-112785)
(cherry picked from commit
f8c0198e3bfa2f6f65e426765a5efddd8ece78b0 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 5 Dec 2023 20:03:00 +0000 (21:03 +0100)]
[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
d384813ff18b33280a90b6d2011654528a2b6ad1 )
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Miss Islington (bot) [Tue, 5 Dec 2023 19:34:06 +0000 (20:34 +0100)]
[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
d109f637c048c2b5fc95dc7fdfd50f8ac41a7747 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Tue, 5 Dec 2023 17:38:44 +0000 (18:38 +0100)]
[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
11d88a178b077e42025da538b890db3151a47070 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 5 Dec 2023 13:58:36 +0000 (14:58 +0100)]
[3.12] bpo-43153: Don't mask `PermissionError` with `NotADirectoryError` during tempdirectory cleanup (GH-29940) (GH-112753)
(cherry picked from commit
8cdfee1bb902fd1e38d79170b751ef13a0907262 )
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>
Miss Islington (bot) [Tue, 5 Dec 2023 10:06:11 +0000 (11:06 +0100)]
[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
2f20cafdbfc39925f9374f36f9d53bac365ed32a )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Serhiy Storchaka [Tue, 5 Dec 2023 09:30:44 +0000 (11:30 +0200)]
[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
b31232ddf7f219ca8ff9e8d0401c02eb0b6ffec3 )
Co-authored-by: Rune Tynan <runetynan@gmail.com>
Miss Islington (bot) [Mon, 4 Dec 2023 23:33:59 +0000 (00:33 +0100)]
[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
9fe7655c6ce0b8e9adc229daf681b6d30e6b1610 )
+ 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>
Miss Islington (bot) [Mon, 4 Dec 2023 20:58:04 +0000 (21:58 +0100)]
[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
a8ce149628c9eaafb8c38fbf25fbd1ed483d2902 )
Co-authored-by: Amioplk <amir.worms@dauphine.eu>
Miss Islington (bot) [Mon, 4 Dec 2023 20:29:23 +0000 (21:29 +0100)]
[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
4eddb4c9d9452482c9af7fa9eec223d12b5a9f33 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Mon, 4 Dec 2023 16:17:38 +0000 (17:17 +0100)]
[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
e08b70fab1fbc45fa498020aac522ae1d5da6136 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Alex Waygood [Mon, 4 Dec 2023 13:12:38 +0000 (13:12 +0000)]
[3.12] gh-101100: Fix Sphinx nitpicks in `library/abc.rst` (#112703) (#112705)
(cherry-picked from commit
9560e0d6d7a316341939b4016e47e03bd5bf17c3 )
Miss Islington (bot) [Mon, 4 Dec 2023 12:15:41 +0000 (13:15 +0100)]
[3.12] gh-109786: Fix leaks and crash when re-enter itertools.pairwise.__next__() (GH-109788) (GH-112699)
(cherry picked from commit
6ca9d3e0173c38e2eac50367b187d4c1d43f9892 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 4 Dec 2023 12:11:26 +0000 (13:11 +0100)]
[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
cda737924fd616c4e08027888258f97e81f34447 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Alex Waygood [Mon, 4 Dec 2023 12:04:48 +0000 (12:04 +0000)]
[3.12] gh-101100: Fix sphinx warnings in `Doc/library/__future__.rst` (#109814) (#112702)
(cherry-picked from commit
f2eaa92b0cc5a37a9e6010c7c6f5ad1a230ea49b )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 4 Dec 2023 11:14:13 +0000 (12:14 +0100)]
[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
a74902a14cdc0952abf7bfabcf529c9b132c5cce )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 4 Dec 2023 08:46:40 +0000 (09:46 +0100)]
[3.12] gh-112625: Protect bytearray from being freed by misbehaving iterator inside bytearray.join (GH-112626) (GH-112693)
(cherry picked from commit
0e732d0997cff08855d98c17af4dd5527f10e419 )
Co-authored-by: chilaxan <chilaxan@gmail.com>
Miss Islington (bot) [Mon, 4 Dec 2023 08:21:28 +0000 (09:21 +0100)]
[3.12] gh-112678: Declare `Tkapp_CallDeallocArgs()` as `static` (GH-112679) (GH-112690)
(cherry picked from commit
23e001fa9f1897ba3384c02bbbe634313358a549 )
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Miss Islington (bot) [Mon, 4 Dec 2023 07:08:01 +0000 (08:08 +0100)]
[3.12] gh-66819: More IDLE htest updates(4) (GH-112686) (#112688)
Mostly double spacing before 'if __name__...'.
(cherry picked from commit
e5b0db0315941b968ebcc2414bfcdd2da44fd3c2 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 4 Dec 2023 05:10:19 +0000 (06:10 +0100)]
[3.12] gh-66819: More IDLE htest updates(3) (GH-112683) (#112684)
Revise spec-callable pairs from percolator to end.
(cherry picked from commit
5a1b5316af648ae79bb91f28253b6272bbbd2886 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Hugo van Kemenade [Sun, 3 Dec 2023 20:32:57 +0000 (22:32 +0200)]
[3.12] gh-101100: Fix Sphinx warning in `library/gettext.rst` (GH-112668) (#112674)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sun, 3 Dec 2023 17:39:26 +0000 (18:39 +0100)]
[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
45650d1c479a8b0370f126d821718dd3c502f333 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sun, 3 Dec 2023 16:34:08 +0000 (17:34 +0100)]
[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
3855b45874d5f8eb92a4957fb9de6fdce63eb760 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Irit Katriel [Sun, 3 Dec 2023 16:28:57 +0000 (16:28 +0000)]
[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
97857ac0580057c3a4f75d34209841c81ee11a96 )
Miss Islington (bot) [Sun, 3 Dec 2023 15:20:13 +0000 (16:20 +0100)]
[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
c27b09c81368bc3b756e94a79a39307ce44a4a2c )
Co-authored-by: Marco Aurélio A. Barbosa <aureliobarbosa@gmail.com>
Miss Islington (bot) [Sun, 3 Dec 2023 11:57:15 +0000 (12:57 +0100)]
[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
4ed46d224401243399b41c7ceef4532bd249da27 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Victor Stinner [Sun, 3 Dec 2023 11:54:59 +0000 (12:54 +0100)]
[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
d9e444dbb86e173ee5b8491e3facbd447b91eaed )
Victor Stinner [Sun, 3 Dec 2023 11:45:32 +0000 (12:45 +0100)]
[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.
Miss Islington (bot) [Sun, 3 Dec 2023 11:41:50 +0000 (12:41 +0100)]
[3.12] gh-112578: Fix RuntimeWarning when running zipfile (GH-112579) (GH-112646)
(cherry picked from commit
29e6c7b68acac628b084a82670708008be262379 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Alex Waygood [Sun, 3 Dec 2023 11:26:53 +0000 (11:26 +0000)]
[3.12] gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (#112631) (#112649)
(cherry-picked from commit
fc9e24b01fb7da4160b82cef26981d72bb678c13 )
Alex Waygood [Sun, 3 Dec 2023 00:41:03 +0000 (00:41 +0000)]
[3.12] gh-112618: Make Annotated cache typed (#112619) (#112628)
Alex Waygood [Sat, 2 Dec 2023 22:38:11 +0000 (22:38 +0000)]
[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>
Alex Waygood [Fri, 1 Dec 2023 18:54:38 +0000 (18:54 +0000)]
[3.12] gh-109413: libregrtest: Backport `.py`-file changes from #112558 (#112605)
Alex Waygood [Fri, 1 Dec 2023 17:13:22 +0000 (17:13 +0000)]
[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>
Alex Waygood [Fri, 1 Dec 2023 17:10:38 +0000 (17:10 +0000)]
[3.12] Bump mypy to 1.7.1 (#112581) (#112601)
Pablo Galindo Salgado [Fri, 1 Dec 2023 16:05:31 +0000 (16:05 +0000)]
[3.12] gh-112367: Only free perf trampoline arenas at shutdown (GH-112368) (#112590)
(cherry picked from commit
a73aa48e6bec900be7edd3431deaa5fc1d809e6f )
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Miss Islington (bot) [Fri, 1 Dec 2023 14:46:42 +0000 (15:46 +0100)]
[3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112593)
gh-109413: regrtest: add WorkerRunTests class (GH-112588)
(cherry picked from commit
f8ff80f63536e96b004d29112452a8f1738fde37 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 1 Dec 2023 14:13:15 +0000 (15:13 +0100)]
[3.12] gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. (GH-112428) (#112589)
Miss Islington (bot) [Fri, 1 Dec 2023 14:12:46 +0000 (15:12 +0100)]
[3.12] gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) (GH-112591)
(cherry picked from commit
058444308abee79bb1b3358883adfa8c97bd043a )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Serhiy Storchaka [Fri, 1 Dec 2023 08:16:47 +0000 (10:16 +0200)]
[3.12] gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551) (GH-112555)
(cherry picked from commit
2223899adce858a09ebeaaf82111e6cda9b42415 )
Miss Islington (bot) [Fri, 1 Dec 2023 07:20:28 +0000 (08:20 +0100)]
[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
e44f1940bd6d2ba4a3f8ac4585b3cf4f9cb93e49 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Dennis Sweeney [Fri, 1 Dec 2023 00:35:49 +0000 (19:35 -0500)]
[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566)
Miss Islington (bot) [Thu, 30 Nov 2023 13:00:08 +0000 (14:00 +0100)]
[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
1ff212debdc094c28928011cff9f4eea8de34d44 )
Co-authored-by: Matt Prodani <mp5908@nyu.edu>
Miss Islington (bot) [Thu, 30 Nov 2023 08:29:59 +0000 (09:29 +0100)]
[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
81261fa67ff82b03c255733b0d1abbbb8a228187 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Wed, 29 Nov 2023 21:49:52 +0000 (22:49 +0100)]
[3.12] [Enum] update class creation for RuntimeError changes (GH-111815) (GH-112526)
(cherry picked from commit
f9e6ce03953e9ee988d55324dc715b0ef2303cfb )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Wed, 29 Nov 2023 20:02:57 +0000 (21:02 +0100)]
[3.12] Add more C API tests (GH-112522) (GH-112525)
Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and
PyObject_Bytes().
(cherry picked from commit
e0449b9a7fffc0c0eed806bf4cbb8f1f65397bbb )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>