Commit graph

116607 commits

Author SHA1 Message Date
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
Miss Islington (bot)
82e7692ca6
[3.11] gh-72971: Clarify the special no-TypeError behavior for equality (GH-110729) (#116255)
(cherry picked from commit 67f742e03a)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2024-03-03 01:56:19 +01:00
Serhiy Storchaka
9485566096
[3.11] gh-114494: Change logging docstring to bool for exec_info (GH-114558) (GH-116242)
(cherry picked from commit 07236f5b39)

Co-authored-by: Tristan Pank <tristanpank@gmail.com>
2024-03-02 15:40:17 +02:00
Miss Islington (bot)
862775bdc2
[3.11] GH-115978: Disable *readv() and *writev() on WASI (GH-116228) (GH-116232)
GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228)

Wasmtime doesn't implement these functions in a way to pass test_posix (https://github.com/bytecodealliance/wasmtime/issues/7830).
(cherry picked from commit 5dc8c84d39)

Co-authored-by: Brett Cannon <brett@python.org>
2024-03-02 01:13:39 +00:00
Miss Islington (bot)
ac8d995bc6
[3.11] gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187) (GH-116217)
This mostly restores information removed in c12240ed28 (GH-114749).
(cherry picked from commit 05b04903a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-01 19:26:49 +02:00
Miss Islington (bot)
c36393690f
[3.11] gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) (GH-116209)
* Do not overwrite already rolled over files. It happened at midnight or
  during the DST change and caused the loss of data.
* computeRollover() now always return the timestamp larger than the
  specified time.
* Fix computation of the rollover time during the DST change.
(cherry picked from commit fee86fd9a4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-01 18:41:58 +02:00
Miss Islington (bot)
9eb7ed7121
[3.11] gh-104219: Document that idunders can return NotImplemented (GH-104220) (#116211)
(cherry picked from commit 2713c2abc8)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 16:09:02 +00:00
Steve Dower
677356b7a6
gh-115554: Improved logic for handling multiple existing py.exe launcher installs (GH-116201) 2024-03-01 13:42:46 +00:00
Miss Islington (bot)
726c1170e8
[3.11] gh-101293: Fix support of custom callables and types in inspect.Signature.from_callable() (GH-115530) (GH-116197)
Support callables with the __call__() method and types with
__new__() and __init__() methods set to class methods, static
methods, bound methods, partial functions, and other types of
methods and descriptors.

Add tests for numerous types of callables and descriptors.
(cherry picked from commit 59167c962e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-01 12:55:14 +00:00
Miss Islington (bot)
8813e5a2de
[3.11] gh-115811: Update documentation to add some Logger attributes. (GH-116109) (GH-116186)
(cherry picked from commit 3b6f4cadf1)
2024-03-01 08:58:24 +00:00
Shantanu
718172719f
[3.11] gh-115881: Document feature_version limitations (#115980) (#116174) 2024-03-01 01:56:53 +00:00
Miss Islington (bot)
f1d08c22d8
[3.11] gh-116026: Try disabling rebuilds of dependents in Homebrew (GH-116027) (#116157)
(cherry picked from commit 02beb9f020)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 00:02:39 +00:00
Tian Gao
d3282f5411
[3.11] gh-87115: Set __main__.__spec__ to None in pdb (GH-116141) (#116155)
* gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141)

(cherry picked from commit ccfc042bbf)

* [3.11] gh-87115: Set `__main__.__spec__` to `None` in pdb (GH-116141)
(cherry picked from commit ccfc042bbf)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-02-29 23:24:32 +00:00