]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Wed, 27 Mar 2024 08:57:08 +0000 (09:57 +0100)]
[3.11] gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983) (GH-117277) (GH-117280)
(cherry picked from commit
17a82a1d16a46b6c008240bcc698619419ce5554 )
(cherry picked from commit
af1b0e94400d1bf732466d675054df8cf7dfb62d )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Tue, 26 Mar 2024 19:14:43 +0000 (20:14 +0100)]
[3.11] Change links on the index page (GH-117230) (#117269)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Miss Islington (bot) [Tue, 26 Mar 2024 17:13:23 +0000 (18:13 +0100)]
[3.11] [3.12] gh-115538: Use isolate mode when running venv test_multiproces… (GH-117264) (#117265)
[3.12] gh-115538: Use isolate mode when running venv test_multiproces… (GH-117264)
[3.12] gh-115538: Use isolate mode when running venv test_multiprocessing_recursion() (GH-117116)
(cherry picked from commit
4ec347760f98b156c6a2d42ca397af6b0b6ecc50 )
(cherry picked from commit
ca0793980b90a6a0f9a91f1a5303a1f27b235f83 )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 26 Mar 2024 14:11:30 +0000 (15:11 +0100)]
[3.11] pre-commit: add `check-case-conflict` and `check-merge-conflict` (GH-117259) (#117261)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 26 Mar 2024 11:46:28 +0000 (12:46 +0100)]
[3.11] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117257)
Fix parsing of the following corner cases:
* URLs with only a host name
* URLs containing a fragment
* URLs containing a query
* filenames with only a UNC sharepoint on Windows
(cherry picked from commit
9654daf793b534b44a831c80f43505ab9e380f1f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Miss Islington (bot) [Tue, 26 Mar 2024 09:50:40 +0000 (10:50 +0100)]
[3.11] gh-83845: Add tests for operator module (GH-115883) (#117254)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Miss Islington (bot) [Tue, 26 Mar 2024 08:18:10 +0000 (09:18 +0100)]
[3.11] [3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (GH-117250) (#117251)
[3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (GH-117250)
* gh-115122: Add --bisect option to regrtest (GH-115123)
* test.bisect_cmd now exit with code 0 on success, and code 1 on
failure. Before, it was the opposite.
* test.bisect_cmd now runs the test worker process with
-X faulthandler.
* regrtest RunTests: Add create_python_cmd() and bisect_cmd()
methods.
(cherry picked from commit
1e5719a663d5b1703ad588dda4fccd763c7d3e99 )
* gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)
Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks
This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.
Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.
Test *failure* is still determined by the existing heuristic.
(cherry picked from commit
af5f9d682c20c951b90e3c020eeccac386c9bbb0 )
* gh-83434: Disable XML in regrtest when -R option is used (GH-117232)
(cherry picked from commit
d52bdfb19fadd7614a0e5abaf68525fc7300e841 )
---------
(cherry picked from commit
477ef9015c312725734c4613b5ba12e80d920a22 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Tue, 26 Mar 2024 02:08:28 +0000 (03:08 +0100)]
[3.11] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117245)
gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203)
This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix. When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing.
* sax|etree: Simplify Expat version guard where simplifiable
Idea by Matěj Cepl
* sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0
This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix. (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package)
(cherry picked from commit
9f74e86c78853c101a23e938f8e32ea838d8f62e )
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
Miss Islington (bot) [Mon, 25 Mar 2024 22:40:41 +0000 (23:40 +0100)]
[3.11] Add information about negative indexes to sequence datamodel doc (GH-110903) (#117239)
Co-authored by Terry Jan Reedy
(cherry picked from commit
c2276176d543a2fc2d57709c2787f99850fbb073 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Serhiy Storchaka [Mon, 25 Mar 2024 10:34:25 +0000 (12:34 +0200)]
[3.11] gh-91227: Ignore ERROR_PORT_UNREACHABLE in proactor recvfrom() (GH-32011) (GH-117210)
(cherry picked from commit
f11d0d8be8af28e1368c3c7c116218cf65ddf93e )
Co-authored-by: Erik Soma <stillusingirc@gmail.com>
Miss Islington (bot) [Sun, 24 Mar 2024 15:14:51 +0000 (16:14 +0100)]
[3.11] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) (#117197)
Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 24 Mar 2024 10:07:37 +0000 (11:07 +0100)]
[3.11] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117192)
Co-authored-by: LilKS <1244886+LilKS@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Sat, 23 Mar 2024 10:19:14 +0000 (11:19 +0100)]
[3.11] [docs] Fix typo in docstring and add example to logging cookbook. (GH-117157) (GH-117158)
(cherry picked from commit
00baaa21de229a6db80ff2b84c2fd6ad1999a24c )
Carol Willing [Fri, 22 Mar 2024 21:11:57 +0000 (14:11 -0700)]
[3.11] docs: fix over-linking in dataclasses.rst (GH-117005) (#117164)
* docs: fix over-linking in dataclasses.rst (#117005)
(cherry picked from commit
0907871d43bffb613cbd560224e1a9db13d06c06 )
* [3.11] docs: fix over-linking in dataclasses.rst (GH-117005)
(cherry picked from commit
0907871d43bffb613cbd560224e1a9db13d06c06 )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
---------
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Serhiy Storchaka [Fri, 22 Mar 2024 19:24:27 +0000 (21:24 +0200)]
[3.11] gh-117084: Fix ZIP file extraction for directory entry names with backslashes on Windows (GH-117129) (GH-117162) (GH-117165)
(cherry picked from commit
f3fee231d359979133e1d58085f43277c41476d0 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
567ab3bd15398c8c7b791f3e376ae3e3c0bbe079 )
Miss Islington (bot) [Fri, 22 Mar 2024 15:20:38 +0000 (16:20 +0100)]
Fix get_packagefamilyname helper function on Windows 32-bit (GH-117153)
(cherry picked from commit
3be9b9d8722696b95555937bb211dc4cda714d56 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Fri, 22 Mar 2024 10:21:53 +0000 (11:21 +0100)]
[3.11] gh-117127: glob tests: Reopen dir_fd to pick up directory changes (GH-117128) (GH-117149)
gh-117127: glob tests: Reopen dir_fd to pick up directory changes (GH-117128)
(cherry picked from commit
42ae924d278c48a719fb0ab86357f3235a9f7ab9 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
infohash [Fri, 22 Mar 2024 09:48:41 +0000 (15:18 +0530)]
[3.11] gh-75988: Fix issues with autospec ignoring wrapped object (GH-115223) (#117124)
gh-75988: Fix issues with autospec ignoring wrapped object (#115223)
* set default return value of functional types as _mock_return_value
* added test of wrapping child attributes
* added backward compatibility with explicit return
* added docs on the order of precedence
* added test to check default return_value
(cherry picked from commit
735fc2cbbcf875c359021b5b2af7f4c29f4cf66d )
Miss Islington (bot) [Thu, 21 Mar 2024 22:37:16 +0000 (23:37 +0100)]
[3.11] gh-117061: Fix test_posix.test_sched_setaffinity() on RHEL9 (GH-117126) (#117138)
gh-117061: Fix test_posix.test_sched_setaffinity() on RHEL9 (GH-117126)
On RHEL9, sched_setaffinity(0, []) does not fail.
(cherry picked from commit
50f9b0b1e0fb181875751cef951351ed007b6397 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Serhiy Storchaka [Thu, 21 Mar 2024 09:43:42 +0000 (11:43 +0200)]
[3.11] gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064) (GH-117070) (GH-117075)
(cherry picked from commit
da2f9d1417a7d28df6e1ced87d64ecf28acb0a5f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
519b2ae22b54760475bbf62b9558d453c703f9c6 )
Miss Islington (bot) [Wed, 20 Mar 2024 21:08:18 +0000 (22:08 +0100)]
[3.11] Fix sort order for "locale encoding" glossary item (GH-115794) (#117103)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
jkriegshauser [Wed, 20 Mar 2024 20:10:32 +0000 (13:10 -0700)]
[3.11] gh-116773: Fix overlapped memory corruption crash (GH-116774) (#117077)
Manual backport of gh-116774.
Miss Islington (bot) [Wed, 20 Mar 2024 15:52:29 +0000 (16:52 +0100)]
[3.11] gh-117058: Update GUI and packaging recommendations for macOS. (GH-117059) (#117082)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Serhiy Storchaka [Tue, 19 Mar 2024 20:08:00 +0000 (22:08 +0200)]
[3.11] gh-90300: Improve the Python CLI help output (GH-115853) (GH-117022) (GH-117034)
* document equivalent command-line options for all environment variables
* document equivalent environment variables for all command-line options
* reduce the size of variable and option descriptions to minimum
* remove the ending period in single-sentence descriptions
(cherry picked from commit
b85572c47dc7a8c65fc366a87a3660fc7a3ed244 )
(cherry picked from commit
4be9fa896117bf07dc944a29c98dd18b71dd6c74 )
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 19 Mar 2024 20:03:21 +0000 (21:03 +0100)]
[3.11] docs: announce venv creation before installing packages (GH-117036) (#117039)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Miss Islington (bot) [Tue, 19 Mar 2024 19:55:43 +0000 (20:55 +0100)]
[3.11] gh-101100: Fix Sphinx warnings in `library/pydoc.rst` (GH-116913) (#117038)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 19 Mar 2024 17:52:08 +0000 (18:52 +0100)]
[3.11] Update titles and subtitles on landing page template (GH-116914) (#117019)
Update titles and subtitles on landing page template (GH-116914)
* Update titles and subtitles on landing page template
* address review from gvanrossum
* Edits from hugovk review
* Change word order back. Down the road we should split license and history
(cherry picked from commit
c514a975abe35fa4604cd3541e2286168ef67d10 )
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
David Röthlisberger [Tue, 19 Mar 2024 17:19:04 +0000 (17:19 +0000)]
[3.11] gh-116957: configparser: Do post-process values after DuplicateOptionError (GH-116958) (GH-117012)
If you catch DuplicateOptionError / DuplicateSectionError when reading a
config file (the intention is to skip invalid config files) and then
attempt to use the ConfigParser instance, any values it *had* read
successfully so far, were stored as a list instead of string! Later
`get` calls would raise "AttributeError: 'list' object has no attribute
'find'" from somewhere deep in the interpolation code.
(cherry picked from commit
b1bc37597f0d36084c4dcb15977fe6d4b9322cd4 )
Miss Islington (bot) [Tue, 19 Mar 2024 15:59:52 +0000 (16:59 +0100)]
[3.11] gh-107607: Update comment about utf-8 BOM being ignored (GH-107858) (#117015)
(cherry picked from commit
7f64ae30ddc22577ce4101ce0b6601b3548b036f )
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
Victor Stinner [Tue, 19 Mar 2024 14:21:42 +0000 (15:21 +0100)]
[3.11] gh-90872: Fix subprocess.Popen.wait() for negative timeout (#116989) (#117003)
gh-90872: Fix subprocess.Popen.wait() for negative timeout (#116989)
On Windows, subprocess.Popen.wait() no longer calls
WaitForSingleObject() with a negative timeout: pass 0 ms if the
timeout is negative.
(cherry picked from commit
27cf3ed00cfe942f4277c273a3dda8ee2ba61fc8 )
Miss Islington (bot) [Tue, 19 Mar 2024 10:57:45 +0000 (11:57 +0100)]
[3.11] gh-105866: fix dataclass with slots=True, weakref_slot=True (GH-105870) (GH-116979)
(cherry picked from commit
a22d05f04c074dbb4f71e7837f54c0bb693db75d )
Co-authored-by: Aviel Boag <avboag@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Carl Meyer <carl@oddbird.net>
Hugo van Kemenade [Tue, 19 Mar 2024 10:56:19 +0000 (12:56 +0200)]
[3.11] Bump GitHub Actions (GH-116944) (GH-116949)
(cherry picked from commit
3a99f5c5f34dc7b67597ca7230da355d92927c71 )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 18 Mar 2024 17:47:53 +0000 (18:47 +0100)]
[3.11] gh-90535: Fix support of interval>1 in logging.TimedRotatingFileHandler (GH-116220) (GH-116893)
Fix support of interval values > 1 in logging.TimedRotatingFileHandler
for when='MIDNIGHT' and when='Wx'.
(cherry picked from commit
269051d20e65eda30734cbbbdb07d21df61978d6 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 18 Mar 2024 14:37:42 +0000 (15:37 +0100)]
[3.11] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) (#116952)
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'. In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>. Remove it there.
(cherry picked from commit
4e45c6c54a9457b1ca5b4cf3aa2843b7218d4414 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Kushal Das [Mon, 18 Mar 2024 06:03:01 +0000 (07:03 +0100)]
[3.11] gh-116831: Fixes tests for c extension in WASI for Python 3.11 (GH-116831) (#116933)
gh-116831: Fixes tests for c extension in WASI
We can skip the C extension based tests under WASI.
Miss Islington (bot) [Sat, 16 Mar 2024 13:18:52 +0000 (14:18 +0100)]
[3.11] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852) (GH-116906)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit
744c0777952f1e535d1192ee15b286aa67b61533 )
Co-authored-by: jnchen <caojingchen@live.com>
Miss Islington (bot) [Sat, 16 Mar 2024 11:58:10 +0000 (12:58 +0100)]
[3.11] gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default names (GH-116495) (GH-116902)
Change automatically generated tkinter.Checkbutton widget names to
avoid collisions with automatically generated tkinter.ttk.Checkbutton
widget names within the same parent widget.
(cherry picked from commit
c61cb507c10c5b597928284e087a9a384ab267d0 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 16 Mar 2024 11:04:31 +0000 (12:04 +0100)]
[3.11] gh-116764: Fix regressions in urllib.parse.parse_qsl() (GH-116801) (GH-116895)
* Restore support of None and other false values.
* Raise TypeError for non-zero integers and non-empty sequences.
The regressions were introduced in gh-74668
(
bdba8ef42b15e651dc23374a08143cc2b4c4657d ).
(cherry picked from commit
1069a462f611f0b70b6eec0bba603d618a0378f3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Nikita Sobolev [Sat, 16 Mar 2024 09:29:11 +0000 (12:29 +0300)]
[3.11] gh-116858: Add `@cpython_only` to several tests in `test_cmd_line` (GH-116859) (#116890)
Jason R. Coombs [Fri, 15 Mar 2024 13:59:32 +0000 (09:59 -0400)]
[3.11] gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable when delegated through PathFinder. (GH-116812) (#116865)
* Make MetadataPathFinder a proper classmethod.
* In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches.
* Add blurb
(cherry picked from commit
5f52d20a93908196f74271db8437cc1ba7e1e262 )
Miss Islington (bot) [Fri, 15 Mar 2024 09:55:44 +0000 (10:55 +0100)]
[3.11] gh-90095: Ignore empty lines and comments in `.pdbrc` (GH-116834) (#116855)
gh-90095: Ignore empty lines and comments in `.pdbrc` (GH-116834)
(cherry picked from commit
a50cf6c3d76b34e2ee9f92a248f1b0df24e407f6 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Thu, 14 Mar 2024 13:41:52 +0000 (14:41 +0100)]
[3.11] gh-90300: Fix undocumented envvars in the Python CLI help (GH-116765) (GH-116797) (GH-116803)
(cherry picked from commit
fc4d5fdffe3d9829b118232f35ccee61a27392ee )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
19ac28bd08fdb16795e6f82ea7bfac73e8f3791b )
Miss Islington (bot) [Thu, 14 Mar 2024 10:39:32 +0000 (11:39 +0100)]
[3.11] gh-90300: Document equivalent -X options for envvars in the Python CLI help (GH-116756) (GH-116786) (GH-116796)
(cherry picked from commit
991710af022f27db862ff1399178bcc76b062669 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
8c6db45ce34df7081d7497e638daf3e130303295 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 14 Mar 2024 10:25:48 +0000 (11:25 +0100)]
[3.11] gh-116785: Fix direct invocation of `test_inspect` (GH-116787) (#116795)
gh-116785: Fix direct invocation of `test_inspect` (GH-116787)
(cherry picked from commit
66fb613d90fe3dea32130a5937963a9362c8a59e )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Serhiy Storchaka [Thu, 14 Mar 2024 10:07:31 +0000 (12:07 +0200)]
[3.11] gh-90300: Sort the -X options and some envvars in the Python CLI help (GH-116739) (GH-116766) (GH-116779)
(cherry picked from commit
870cd901ea72e85eea825425336305296ee443cc )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
e54bdeab9ce2958a22ba08c1f1f1431c5e8056bd )
Brett Cannon [Wed, 13 Mar 2024 21:55:29 +0000 (14:55 -0700)]
[3.11] GH-115979: update test_importlib to work under WASI SDK 21 (GH-116754) (GH-116762)
(cherry picked from commit
61733a2fb9dc36d2246d922146a3462a2248832d )
Miss Islington (bot) [Wed, 13 Mar 2024 17:16:28 +0000 (18:16 +0100)]
[3.11] gh-98731: Improvements to the logging documentation (GH-101618) (GH-116733)
(cherry picked from commit
7f418fb111dec325b5c9fe6f6e96076049322f02 )
Victor Stinner [Wed, 13 Mar 2024 16:49:30 +0000 (17:49 +0100)]
[3.11] gh-106687: _ssl: use uint64_t for SSL options (#106700) (#116665)
gh-106687: _ssl: use uint64_t for SSL options (#106700)
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html
Fix this compiler warning on Windows with MSC:
conversion from 'uint64_t' to 'long', possible loss of data
(cherry picked from commit
ad95c7253a70e559e7d3f25d53f4772f28bb8b44 )
Miss Islington (bot) [Wed, 13 Mar 2024 14:35:59 +0000 (15:35 +0100)]
[3.11] gh-110918: Fix side effects of regrtest test_match_tests() (GH-116718) (#116727)
gh-110918: Fix side effects of regrtest test_match_tests() (GH-116718)
test_match_tests now saves and restores patterns.
Add get_match_tests() function to libregrtest.filter.
Previously, running test_regrtest multiple times in a row only ran
tests once: "./python -m test test_regrtest -R 3:3.
(cherry picked from commit
612f1ec988314bc0bc42a1b908751950331e2ede )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 13 Mar 2024 14:34:09 +0000 (15:34 +0100)]
[3.11] [doc]: Update cookbook recipe for Qt6. (GH-116719) (GH-116728)
(cherry picked from commit
186af3cf21705badec086ec16f231ac390747d3b )
Miss Islington (bot) [Wed, 13 Mar 2024 13:56:25 +0000 (14:56 +0100)]
[3.11] gh-90300: Fix cmdline.rst (GH-116721) (GH-116725)
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
(cherry picked from commit
33662d4e01d73cd4f29a25efc2ef09288129023f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 13 Mar 2024 13:40:30 +0000 (14:40 +0100)]
[3.11] gh-116714: Handle errors correctly in `PyFloat_GetInfo` (GH-116715) (#116723)
gh-116714: Handle errors correctly in `PyFloat_GetInfo` (GH-116715)
(cherry picked from commit
fcd49b4f47f1edd9a2717f6619da7e7af8ea73cf )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 13 Mar 2024 11:09:52 +0000 (12:09 +0100)]
[3.11] gh-111307: Update design FAQ 'switch' entry (GH-115899) (#116704)
(cherry picked from commit
43986f55671ba2f7b08f8c5cea69aa136a093697 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Serhiy Storchaka [Wed, 13 Mar 2024 10:03:17 +0000 (12:03 +0200)]
[3.11] gh-116401: Fix blocking os.fwalk() and shutil.rmtree() on opening a named pipe (GH-116421) (GH-116717)
(cherry picked from commit
aa7bcf284f006434b07839d82f325618f7a5c06c )
Miss Islington (bot) [Wed, 13 Mar 2024 07:37:01 +0000 (08:37 +0100)]
[3.11] gh-116491: Improve `test_win32_ver` (GH-116506) (#116709)
gh-116491: Improve `test_win32_ver` (GH-116506)
(cherry picked from commit
ee0dbbc04504e0e0f1455e2bab8801ce0a682afd )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Wed, 13 Mar 2024 07:05:41 +0000 (08:05 +0100)]
[3.11] gh-115264: Fix `test_functools` with `-00` mode (GH-115276) (#116706)
gh-115264: Fix `test_functools` with `-00` mode (GH-115276)
(cherry picked from commit
27df81d5643f32be6ae84a00c5cf84b58e849b21 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Mariusz Felisiak [Wed, 13 Mar 2024 05:00:45 +0000 (06:00 +0100)]
[3.11] Docs: fix broken links (GH-116651) (#116701)
(cherry picked from commit
3f1b6efee95c06f8912bcea4031afacdbc0d5684 )
Jason R. Coombs [Wed, 13 Mar 2024 00:35:00 +0000 (20:35 -0400)]
[3.11] gh-116307: Proper fix for 'mod' leaking across importlib tests… (#116694)
[3.11] gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680)
(cherry picked from commit
a2548077614f81f25a2c3465dabb7a0a3885c40c )
gh-116307: Create a new import helper 'isolated modules' and use that instead of 'Clean Import' to ensure that tests from importlib_resources don't leave modules in sys.modules.
Miss Islington (bot) [Wed, 13 Mar 2024 00:29:03 +0000 (01:29 +0100)]
[3.11] gh-116682: stdout may be empty in test_cancel_futures_wait_false (GH-116683) (#116693)
If the `shutdown()` call happens before the worker thread starts executing
the task, then nothing will be printed to stdout.
(cherry picked from commit
7d1abe9502641a3602e9773aebc29ee56d8f40ae )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Tue, 12 Mar 2024 22:54:18 +0000 (23:54 +0100)]
[3.11] Add `typing.NamedTuple` in glossary section for named tuples (GH-108327) (#116690)
(cherry picked from commit
149f7f7ae28944579792d22607532006977177c9 )
Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
Nikita Sobolev [Tue, 12 Mar 2024 19:21:52 +0000 (22:21 +0300)]
[3.11] gh-110819: Fix ‘kind’ may be used uninitialized warning in `longobject` (GH-116599) (#116650)
(cherry picked from commit
eb947cdc1374842a32fa82249ba3c688abf252dc )
Tian Gao [Tue, 12 Mar 2024 16:58:40 +0000 (09:58 -0700)]
[3.11] gh-90095: Make .pdbrc work properly and add some reasonable te… (#116660)
[3.11] gh-90095: Make .pdbrc work properly and add some reasonable tests (GH-110496)
(cherry picked from commit
44f9a84b67c97c94f0d581ffd63b24b73fb79610 )
Miss Islington (bot) [Tue, 12 Mar 2024 10:34:48 +0000 (11:34 +0100)]
[3.11] gh-116541: Handle errors correctly in `_pystatvfs_fromstructstatvfs` (GH-116542) (#116644)
gh-116541: Handle errors correctly in `_pystatvfs_fromstructstatvfs` (GH-116542)
(cherry picked from commit
f8147d01da44da2434496d868c86c2785f7244cd )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 12 Mar 2024 00:36:15 +0000 (01:36 +0100)]
[3.11] gh-116600: [Enum] fix global Flag repr (GH-116615) (#116630)
* and fix global flag repr
(cherry picked from commit
06e29a224fac9edeba55422d2e60f2fbb88dddce )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Mon, 11 Mar 2024 22:11:36 +0000 (23:11 +0100)]
[3.11] gh-116563: Update tutorial error example (GH-116569) (#116625)
There now may be multiple carets pointing at a token
rather than just a character. Fix the sentence about
possible causes.
(cherry picked from commit
3e45030076bf2cfab41c4456c73fb212b7322c60 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 11 Mar 2024 21:01:13 +0000 (22:01 +0100)]
[3.11] gh-71052: Use `raise_signal` in `ThreadSignals.test_signals` (GH-116423) (#116617)
gh-71052: Use `raise_signal` in `ThreadSignals.test_signals` (GH-116423)
Use `raise_signal` rather than `kill` in `ThreadSignals.test_signals`
(cherry picked from commit
34920f36917de0d4e658cf94992d53a5a7f27f51 )
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Miss Islington (bot) [Mon, 11 Mar 2024 12:16:22 +0000 (13:16 +0100)]
[3.11] gh-116545: Fix error handling in `mkpwent` in `pwdmodule` (GH-116548) (#116594)
gh-116545: Fix error handling in `mkpwent` in `pwdmodule` (GH-116548)
(cherry picked from commit
ffd79bea0f032df5a2e7f75e8c823a09cdc7c7a2 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Petr Viktorin [Mon, 11 Mar 2024 11:02:05 +0000 (12:02 +0100)]
[3.11] gh-115421: List all test/ subdirs in Makefile, and test them (GH-115813)
This backports:
- GH-115813
- GH-115422
Unlike on the main branch, new directories are added to the end,
so they're a bit easier to patch out if a redistributor needs to do so.
On main & 3.12, there's a special case for `idlelib/idle_test`; on
3.11 TESTSUBDIRS has several more entries that are not in `test/`.
This backport ignores all of them (including idlelib).
(The alternative would be list them, as additions to TEST_HOME_DIR.
But that's probably too invasive; people might split stdlib up in
surprising ways.)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 11 Mar 2024 10:49:48 +0000 (11:49 +0100)]
[3.11] gh-88352: Make TimedRotatingFileHandler tests more stable (GH-116409) (GH-116586)
The tests failed (with less than 1% probability) if for example the file
was created at 11:46:03.999, but the record was emitted at 11:46:04.001,
with atTime=11:46:04, which caused an unexpected rollover. Ensure that the
tests are always run within the range of the same whole second.
Also share code between test_rollover_at_midnight and test_rollover_at_weekday.
(cherry picked from commit
d8712fa0c75ad5ea56543903fa45674ab47cc647 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 11 Mar 2024 07:23:05 +0000 (08:23 +0100)]
[3.11] gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577) (#116583)
gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577)
(cherry picked from commit
4704e55a71c859c5d17cc2747ba62f49da58ea2d )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 9 Mar 2024 22:08:23 +0000 (23:08 +0100)]
[3.11] gh-116535: Fix distracting "TypeError" in example code (gh-116538) (gh-116552)
gh-116535: Fix distracting "TypeError" in example code (gh-116538)
(cherry picked from commit
db8f423f58e336eb6180a70d9886b443d7203c2c )
Co-authored-by: Declan <5962877+dec1@users.noreply.github.com>
Miss Islington (bot) [Sat, 9 Mar 2024 11:41:46 +0000 (12:41 +0100)]
[3.11] gh-116520: Fix error handling in `os_get_terminal_size_impl` in `posixmodule` (GH-116521) (#116540)
gh-116520: Fix error handling in `os_get_terminal_size_impl` in `posixmodule` (GH-116521)
(cherry picked from commit
b4b4e764a798bab60324871074ce4cdebb9d01bb )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 9 Mar 2024 09:36:02 +0000 (10:36 +0100)]
[3.11] GH-116218 Docs: Add availability information for the 'resource' module (GH-116256) (#116534)
GH-116218 Docs: Add availability information for the 'resource' module (GH-116256)
Add availability data to 'resource' module Docs
(cherry picked from commit
03f86b1b626ac5b0df1cc74d8f80ea11117aec8c )
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
Miss Islington (bot) [Sat, 9 Mar 2024 00:57:16 +0000 (01:57 +0100)]
[3.11] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH-116512)
(cherry picked from commit
601f3a7b3391e9d219a8ec44a6c56d00ce584d2a )
Co-authored-by: Nicolas A. Oyarzabal <79150521+nicky-eng@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 8 Mar 2024 11:25:39 +0000 (12:25 +0100)]
[3.11] gh-116447: Fix possible UB in `arraymodule` and `getargs` (GH-116459) (#116497)
gh-116447: Fix possible UB in `arraymodule` and `getargs` (GH-116459)
(cherry picked from commit
fdb2d90a274158aee23b526d972172bf41bd4b7e )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Fri, 8 Mar 2024 08:27:33 +0000 (09:27 +0100)]
[3.11] gh-116485: Fixed the typo (GH-116486) (#116490)
Co-authored-by: Varun Gole <59524264+varungole@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 7 Mar 2024 22:16:32 +0000 (23:16 +0100)]
gh-116472: Replace literal newlines with escape characters in MSBuild files (GH-116473)
(cherry picked from commit
5d0cdfe519e6f35ccae1a1adca1ffd7fac10cee0 )
Co-authored-by: Dan Albert <dan@gingerhq.net>
Miss Islington (bot) [Thu, 7 Mar 2024 09:10:08 +0000 (10:10 +0100)]
[3.11] gh-116448: Handle errors correctly in `os_waitid_impl` in `posixmodule` (GH-116449) (#116453)
gh-116448: Handle errors correctly in `os_waitid_impl` in `posixmodule` (GH-116449)
(cherry picked from commit
882fcede83af783a834b759e4643130dc1307ee3 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Serhiy Storchaka [Thu, 7 Mar 2024 08:35:24 +0000 (10:35 +0200)]
[3.11] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450) (GH-116452)
(cherry picked from commit
1e75fe146857b5e6624bd3281675cf20cc356273 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
808a77612fb89b125d25efac2788522a100e8a6d )
Miss Islington (bot) [Wed, 6 Mar 2024 22:20:37 +0000 (23:20 +0100)]
[3.11] gh-88118: Fix some test_multiprocessing flakiness. (GH-116434) (GH-116441)
Fix some test_multiprocessing flakiness.
Potentially introduced by https://github.com/python/cpython/pull/25845
not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:
```
1 test altered the execution environment (env changed):
test.test_multiprocessing_fork.test_processes
2 re-run tests:
test.test_multiprocessing_fork.test_processes
test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit
ea1803e608a7aaf9cf2c07e510d8540d46d3b9ad )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Sebastian Pipping [Wed, 6 Mar 2024 22:17:02 +0000 (23:17 +0100)]
[3.11] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (#116268)
Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:
- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`
Based on the "flush" idea from #115138 (comment) .
- Please treat as a security fix related to CVE-2023-52425.
(cherry picked from commit
6a95676 )
(cherry picked from commit
73807eb )
(cherry picked from commit
eda2963 )
---------
Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Łukasz Langa [Wed, 6 Mar 2024 16:13:10 +0000 (17:13 +0100)]
[3.11] gh-90300: Reformat the Python CLI help output (GH-115847) (GH-116418)
(cherry picked from commit
2e92ffd7fa89e3bd33ee2f31541d3dc53aaa2d12 )
(cherry picked from commit
2bdd1d6f15d5507a9ed6dff10e9fb57e2a8c0b40 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 6 Mar 2024 15:07:08 +0000 (16:07 +0100)]
[3.11] gh-116143: Fix race condition in pydoc _start_server (GH-116144) (#116416)
gh-116143: Fix race condition in pydoc _start_server (GH-116144)
(cherry picked from commit
02ee475ee3ce9468d44758df2cd79df9f0926303 )
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Miss Islington (bot) [Wed, 6 Mar 2024 09:08:35 +0000 (10:08 +0100)]
[3.11] gh-116404: Handle errors correctly in `wait_helper` in `posixmodule` (GH-116405) (#116407)
gh-116404: Handle errors correctly in `wait_helper` in `posixmodule` (GH-116405)
(cherry picked from commit
22ccf13b332902142fe0c52c593f9efc152c7761 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Nikita Sobolev [Wed, 6 Mar 2024 07:54:34 +0000 (10:54 +0300)]
[3.11] gh-116326: Handler errors correctly in `getwindowsversion` in `sysmodule` (GH-116339) (#116388)
(cherry picked from commit
c91bdf86ef1cf9365b61a46aa2e51e5d1932b00a )
Brett Cannon [Tue, 5 Mar 2024 22:05:42 +0000 (14:05 -0800)]
[3.11] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) (GH-116384)
(cherry picked from commit
88fdb082d98104dd5612b06397f4c764a0936616 )
Miss Islington (bot) [Tue, 5 Mar 2024 21:20:59 +0000 (22:20 +0100)]
[3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116383)
Amend wording after gh-116019 was merged.
(cherry picked from commit
e205c5cd8f1a49d0ef126123312ee8a40d1416b6 )
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
Terry Jan Reedy [Tue, 5 Mar 2024 20:33:59 +0000 (15:33 -0500)]
[3.11] chore: fix typos (GH-116345) (#116375)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit
e7ba6e9dbe5433b4a0bcb0658da6a68197c28630 )
Miss Islington (bot) [Tue, 5 Mar 2024 17:52:03 +0000 (18:52 +0100)]
[3.11] gh-74668: Fix support of bytes in urllib.parse.parse_qsl() (GH-115771) (GH-116367)
urllib.parse functions parse_qs() and parse_qsl() now support bytes
arguments containing raw and percent-encoded non-ASCII data.
(cherry picked from commit
bdba8ef42b15e651dc23374a08143cc2b4c4657d )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 5 Mar 2024 17:32:30 +0000 (18:32 +0100)]
[3.11] gh-76511: Fix email.Message.as_string() for non-ASCII message with ASCII charset (GH-116125) (GH-116365)
(cherry picked from commit
f97f25ef5dfcdfec0d9a359fd970abd139cf3428 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Tue, 5 Mar 2024 16:26:29 +0000 (18:26 +0200)]
[3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368)
(cherry picked from commit
df594011089a83d151ac7000954665536f3461b5 )
Miss Islington (bot) [Tue, 5 Mar 2024 16:12:22 +0000 (17:12 +0100)]
[3.11] gh-115777: Fix double versionadded directives (GH-116269) (GH-116362)
(cherry picked from commit
0064dfa0919cc93257c351a609f99461f6e4e3ac )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 5 Mar 2024 10:15:54 +0000 (11:15 +0100)]
[3.11] gh-116325: Raise `SyntaxError` rather than `IndexError` on ForwardRef with empty string arg (GH-116341) (#116348)
gh-116325: Raise `SyntaxError` rather than `IndexError` on ForwardRef with empty string arg (GH-116341)
(cherry picked from commit
a29998a06bf75264c3faaeeec4584a5f75b45a1f )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 4 Mar 2024 22:27:14 +0000 (23:27 +0100)]
[3.11] gh-116265: Remove obsolete sentence. (GH-116284) (#116332)
Remove sentence in Tools/c-analyzer/README referring to deleted
ignore-globals.txt.
(cherry picked from commit
88b5c665ee1624af1bc5097d3eb2af090b9cabed )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 4 Mar 2024 21:12:27 +0000 (22:12 +0100)]
[3.11] gh-115320: Refactor `get_hash_info` in `sysmodule.c` not to swallow errors (GH-115321) (#116324)
gh-115320: Refactor `get_hash_info` in `sysmodule.c` not to swallow errors (GH-115321)
(cherry picked from commit
207030f5527d405940b79c10c1413c1e8ff696c1 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Hugo van Kemenade [Mon, 4 Mar 2024 20:57:35 +0000 (22:57 +0200)]
[3.11] Docs: update using/configure.rst (GH-116274) (#116277)
Miss Islington (bot) [Mon, 4 Mar 2024 12:28:21 +0000 (13:28 +0100)]
[3.11] GH-116271 Docs: provide clarification for object assignments in the Tutorial section (GH-116283) (#116306)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
AN Long [Mon, 4 Mar 2024 11:54:46 +0000 (19:54 +0800)]
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
(cherry picked from commit
dac8ff4c401f75e65a5eef1514f2d7987e63bbfe )
Miss Islington (bot) [Mon, 4 Mar 2024 10:04:21 +0000 (11:04 +0100)]
[3.11] gh-116296: Fix refleak in reduce_newobj() corner case (GH-116297) (#116300)
(cherry picked from commit
17c4849981905fb1c9bfbb2b963b6ee12e3efb2c )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Terry Jan Reedy [Sun, 3 Mar 2024 20:32:56 +0000 (15:32 -0500)]
[3.11] gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282) (#116289)
gh-116281: Remove wrong '\' from '\*' in some doc signatures (#116282)
(cherry picked from commit
4859ecb8609b51e2f6b8fb1b295e9ee0f83e1be6 )
Co-authored-by: HarryLHW 123lhw321@gmail.com