Commit graph

116619 commits

Author SHA1 Message Date
Serhiy Storchaka
4a73637966
[3.11] gh-116401: Fix blocking os.fwalk() and shutil.rmtree() on opening a named pipe (GH-116421) (GH-116717)
(cherry picked from commit aa7bcf284f)
2024-03-13 10:03:17 +00:00
Miss Islington (bot)
5bd350709d
[3.11] gh-116491: Improve test_win32_ver (GH-116506) (#116709)
gh-116491: Improve `test_win32_ver` (GH-116506)
(cherry picked from commit ee0dbbc045)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-13 07:37:01 +00:00
Miss Islington (bot)
7e8578ce9d
[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 27df81d564)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-13 07:05:41 +00:00
Mariusz Felisiak
0ebc7925e5
[3.11] Docs: fix broken links (GH-116651) (#116701)
(cherry picked from commit 3f1b6efee9)
2024-03-12 22:00:45 -07:00
Jason R. Coombs
21a259eba5
[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 a254807761)


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.
2024-03-13 00:35:00 +00:00
Miss Islington (bot)
a01621aeb4
[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 7d1abe9502)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-03-13 00:29:03 +00:00
Miss Islington (bot)
0917338c78
[3.11] Add typing.NamedTuple in glossary section for named tuples (GH-108327) (#116690)
(cherry picked from commit 149f7f7ae2)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
2024-03-12 22:54:18 +00:00
Nikita Sobolev
f3a2b62bc1
[3.11] gh-110819: Fix ‘kind’ may be used uninitialized warning in longobject (GH-116599) (#116650)
(cherry picked from commit eb947cdc13)
2024-03-12 22:21:52 +03:00
Tian Gao
b17d34796e
[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 44f9a84b67)
2024-03-12 16:58:40 +00:00
Miss Islington (bot)
52c41179f9
[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 f8147d01da)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-12 10:34:48 +00:00
Miss Islington (bot)
5562a09821
[3.11] gh-116600: [Enum] fix global Flag repr (GH-116615) (#116630)
* and fix global flag repr

(cherry picked from commit 06e29a224f)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-03-11 17:36:15 -07:00
Miss Islington (bot)
830fbe9b6e
[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 3e45030076)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-11 22:11:36 +00:00
Miss Islington (bot)
88ed804ae7
[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 34920f3691)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-03-11 21:01:13 +00:00
Miss Islington (bot)
6ae6d46e61
[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 ffd79bea0f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-11 12:16:22 +00:00
Petr Viktorin
d78117981a
[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>
2024-03-11 12:02:05 +01:00
Miss Islington (bot)
707ce1f0a7
[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 d8712fa0c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-11 12:49:48 +02:00
Miss Islington (bot)
34e808ec6c
[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 4704e55a71)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-11 07:23:05 +00:00
Miss Islington (bot)
982f457f6f
[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 db8f423f58)

Co-authored-by: Declan <5962877+dec1@users.noreply.github.com>
2024-03-09 17:08:23 -05:00
Miss Islington (bot)
f2898f89bf
[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 b4b4e764a7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-09 11:41:46 +00:00
Miss Islington (bot)
b1c77ba1ce
[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 03f86b1b62)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-03-09 10:36:02 +01:00
Miss Islington (bot)
232b085a01
[3.11] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH-116512)
(cherry picked from commit 601f3a7b33)

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>
2024-03-08 16:57:16 -08:00
Miss Islington (bot)
3abf267787
[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 fdb2d90a27)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-08 11:25:39 +00:00
Miss Islington (bot)
0f6cd295d7
[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>
2024-03-08 08:27:33 +00:00
Miss Islington (bot)
22c38a6f77
gh-116472: Replace literal newlines with escape characters in MSBuild files (GH-116473)
(cherry picked from commit 5d0cdfe519)

Co-authored-by: Dan Albert <dan@gingerhq.net>
2024-03-07 22:16:32 +00:00
Miss Islington (bot)
fa7f278583
[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 882fcede83)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-07 09:10:08 +00:00
Serhiy Storchaka
e89f2a0be1
[3.11] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450) (GH-116452)
(cherry picked from commit 1e75fe1468)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 808a77612f)
2024-03-07 08:35:24 +00:00
Miss Islington (bot)
22eb97cf9b
[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 ea1803e608)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-03-06 22:20:37 +00:00
Sebastian Pipping
fc9da96274
[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>
2024-03-06 14:17:02 -08:00
Łukasz Langa
e8fb762fa9
[3.11] gh-90300: Reformat the Python CLI help output (GH-115847) (GH-116418)
(cherry picked from commit 2e92ffd7fa)
(cherry picked from commit 2bdd1d6f15)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-06 17:13:10 +01:00
Miss Islington (bot)
26f7956f8f
[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 02ee475ee3)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2024-03-06 15:07:08 +00:00
Miss Islington (bot)
d69bef6080
[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 22ccf13b33)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-06 09:08:35 +00:00
Nikita Sobolev
23c17f3c1a
[3.11] gh-116326: Handler errors correctly in getwindowsversion in sysmodule (GH-116339) (#116388)
(cherry picked from commit c91bdf86ef)
2024-03-06 10:54:34 +03:00
Brett Cannon
4637a1fcbd
[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 88fdb082d9)
2024-03-05 22:05:42 +00:00
Miss Islington (bot)
8675e7f853
[3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116383)
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5cd8f)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-03-05 21:20:59 +00:00
Terry Jan Reedy
f4672e2569
[3.11] chore: fix typos (GH-116345) (#116375)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe)
2024-03-05 20:33:59 +00:00
Miss Islington (bot)
fa670a59ba
[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 bdba8ef42b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 17:52:03 +00:00
Miss Islington (bot)
c75df4b13a
[3.11] gh-76511: Fix email.Message.as_string() for non-ASCII message with ASCII charset (GH-116125) (GH-116365)
(cherry picked from commit f97f25ef5d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 17:32:30 +00:00
Serhiy Storchaka
c67a4b6bdb
[3.11] Fix the PyGetSetDef documentation (GH-116056) (GH-116368)
(cherry picked from commit df59401108)
2024-03-05 16:26:29 +00:00
Miss Islington (bot)
1b9f0d1f61
[3.11] gh-115777: Fix double versionadded directives (GH-116269) (GH-116362)
(cherry picked from commit 0064dfa091)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 16:12:22 +00:00
Miss Islington (bot)
f187da5b59
[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 a29998a06b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-05 10:15:54 +00:00
Miss Islington (bot)
7fa33187cb
[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 88b5c665ee)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-04 22:27:14 +00:00
Miss Islington (bot)
8ee7e91c38
[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 207030f552)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-04 21:12:27 +00:00
Hugo van Kemenade
e5595288c9
[3.11] Docs: update using/configure.rst (GH-116274) (#116277) 2024-03-04 13:57:35 -07:00
Miss Islington (bot)
1cc1d0872e
[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>
2024-03-04 12:28:21 +00:00
AN Long
b6077aaf12
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
(cherry picked from commit dac8ff4c40)
2024-03-04 11:54:46 +00:00
Miss Islington (bot)
f068522a3a
[3.11] gh-116296: Fix refleak in reduce_newobj() corner case (GH-116297) (#116300)
(cherry picked from commit 17c4849981)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2024-03-04 10:04:21 +00:00
Terry Jan Reedy
7dfde8423c
[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 4859ecb860)

Co-authored-by: HarryLHW 123lhw321@gmail.com
2024-03-03 20:32:56 +00:00
Nikita Sobolev
8bfbeeb0a1
[3.11] gh-112281: Allow Union with unhashable Annotated metadata (GH-112283) (#116288)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-03 20:20:01 +00:00
Miss Islington (bot)
6c2484bbf1
[3.11] gh-116010: Remove link to deprecated PEP 6 in FAQ guide (GH-116246) (#116287)
Co-authored-by: Iman Tabrizian <iman.tabrizian@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-03 19:56:24 +00:00
Miss Islington (bot)
d3756edbc4
[3.11] gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() (GH-115812) (GH-116262)
Improve algorithm for computing which rolled-over log files to delete
in logging.TimedRotatingFileHandler. It is now reliable for handlers
without namer and with arbitrary deterministic namer that leaves
the datetime part in the file name unmodified.
(cherry picked from commit 87faec28c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-03 08:01:52 +00:00