Commit graph

119701 commits

Author SHA1 Message Date
Miss Islington (bot)
3f92cf272e
[3.12] gh-116520: Fix error handling in os_get_terminal_size_impl in posixmodule (GH-116521) (#116539)
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:36:02 +00:00
Miss Islington (bot)
d38298a9ba
[3.12] GH-116218 Docs: Add availability information for the 'resource' module (GH-116256) (#116533)
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:35:01 +01:00
Miss Islington (bot)
d5d86e2145
[3.12] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH116511)
(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:56:58 -08:00
Miss Islington (bot)
2647afeab6
[3.12] gh-116447: Fix possible UB in arraymodule and getargs (GH-116459) (#116496)
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:22:07 +00:00
Miss Islington (bot)
a8a95135a2
[3.12] gh-116485: Fixed the typo (GH-116486) (#116489)
Co-authored-by: Varun Gole <59524264+varungole@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-08 08:24:40 +00:00
Ethan Furman
d771729679
[3.12] gh-116040: [Enum] fix by-value calls when second value is falsey (GH-116072) (GH-116476)
e.g. Cardinal(1, 0)

(cherry picked from commit 13ffd4bd9f)
2024-03-07 15:26:13 -08:00
Miss Islington (bot)
4efd20e23a
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:33:19 +00:00
Petr Viktorin
0ab2384c5f
[3.12] gh-115421: List all test subdirs in Makefile, and test them (GH-115813) (#116462)
* gh-115421: Test that our Makefile has all needed test folders (GH-115813)

* Update the list of installed test subdirectories

---------

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-07 15:55:57 +01:00
Miss Islington (bot)
cbd94fdb6c
[3.12] gh-116448: Handle errors correctly in os_waitid_impl in posixmodule (GH-116449) (#116451)
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:03:28 +00:00
Serhiy Storchaka
1e75fe1468
[3.12] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450)
(cherry picked from commit 808a77612f)
2024-03-07 08:21:25 +00:00
Miss Islington (bot)
01505953f2
[3.12] gh-88118: Fix some test_multiprocessing flakiness. (GH-116434) (GH-116440)
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:13:49 +00:00
Sebastian Pipping
0a01ed6c2a
[3.12] gh-115398: Expose Expat >=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (GH-116248)
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 https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .

- Please treat as a security fix related to CVE-2023-52425.

(cherry picked from commit 6a95676bb5)
(cherry picked from commit 73807eb634)
(cherry picked from commit eda2963378)

---------

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 22:01:45 +00:00
Miss Islington (bot)
2528e46470
[3.12] gh-116143: Fix race condition in pydoc _start_server (GH-116144) (#116415)
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 14:58:02 +00:00
Miss Islington (bot)
5c69f60ae1
[3.12] gh-116404: Handle errors correctly in wait_helper in posixmodule (GH-116405) (#116406)
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:05:45 +00:00
Brett Cannon
88fdb082d9
[3.12] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) 2024-03-05 13:35:02 -08:00
Miss Islington (bot)
23a9ba45ae
[3.12] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116382)
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:51 +00:00
Terry Jan Reedy
84b023d243
[3.12] chore: fix typos (#116345) (#116370)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe)
2024-03-05 18:51:17 +00:00
Miss Islington (bot)
55faaa5c36
[3.12] gh-74668: Fix support of bytes in urllib.parse.parse_qsl() (GH-115771) (GH-116366)
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:51:35 +00:00
Miss Islington (bot)
85c32ad9fd
[3.12] gh-76511: Fix email.Message.as_string() for non-ASCII message with ASCII charset (GH-116125) (GH-116364)
(cherry picked from commit f97f25ef5d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 17:27:22 +00:00
Miss Islington (bot)
34efd49280
gh-115554: Improved logic for handling multiple existing py.exe launcher installs (GH-115793)
(cherry picked from commit 9b7f253b55)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-03-05 16:47:03 +00:00
Miss Islington (bot)
6e89141d73
[3.12] Fix the PyGetSetDef documentation (GH-116056) (GH-116363)
closure is not a function pointer, it is a user data pointer.
(cherry picked from commit df59401108)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 16:16:50 +00:00
Miss Islington (bot)
0f5cd44e1c
[3.12] gh-115777: Fix double versionadded directives (GH-116269) (GH-116361)
(cherry picked from commit 0064dfa091)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-05 16:00:40 +00:00
Miss Islington (bot)
9a42cfa368
[3.12] gh-116326: Handler errors correctly in getwindowsversion in sysmodule (GH-116339) (#116354)
* gh-116326: Handler errors correctly in `getwindowsversion` in `sysmodule` (GH-116339)
(cherry picked from commit c91bdf86ef)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-05 18:52:15 +03:00
Miss Islington (bot)
6264c4f4b2
[3.12] gh-116325: Raise SyntaxError rather than IndexError on ForwardRef with empty string arg (GH-116341) (#116347)
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:08:27 +00:00
Miss Islington (bot)
8785eab342
[3.12] gh-116265: Remove obsolete sentence. (GH-116284) (#116331)
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:20:44 +00:00
Miss Islington (bot)
0f70c14939
[3.12] gh-115320: Refactor get_hash_info in sysmodule.c not to swallow errors (GH-115321) (#116323)
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:13:38 +00:00
Hugo van Kemenade
19aa557424
[3.12] Docs: update using/configure.rst (GH-116274) (#116276) 2024-03-04 13:57:27 -07:00
Miss Islington (bot)
ee7ba53bdb
gh-116116: Backport blake2 change to fix building with clang-cl on windows-i686 (GH-116117)
(cherry picked from commit 9b9e819b51)

Co-authored-by: Yuriy Chernyshov <thegeorg@yandex-team.com>
2024-03-04 17:22:46 +00:00
Miss Islington (bot)
0a9356ce6d
[3.12] Consistently spell out *predicate* instead of *pred*. (gh-116308) (gh-116312) 2024-03-04 16:18:52 +00:00
Miss Islington (bot)
f6de98407d
[3.12] GH-116271 Docs: provide clarification for object assignments in the Tutorial section (GH-116283) (#116305)
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:43 +00:00
AN Long
eb0603b855
gh-104711: Add security warning to the CGIHTTPRequestHandler document (GH-115915)
(cherry picked from commit dac8ff4c40)
2024-03-04 11:54:38 +00:00
Miss Islington (bot)
d8a56ea439
[3.12] gh-116296: Fix refleak in reduce_newobj() corner case (GH-116297) (#116299)
(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:44 +00:00
Miss Islington (bot)
722b9cf9fb
[3.12] gh-116010: Remove link to deprecated PEP 6 in FAQ guide (GH-116246) (#116286)
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:50 +00:00
Miss Islington (bot)
e95e837541
[3.12] gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282) (#116285)
gh-116281: Remove wrong '\' from '\*' in some doc signatures (GH-116282)
(cherry picked from commit 4859ecb860)

Co-authored-by: HarryLHW <123lhw321@gmail.com>
2024-03-03 14:42:22 -05:00
Miss Islington (bot)
3f830adf58
[3.12] gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() (GH-115812) (GH-116261)
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 07:59:10 +00:00
Miss Islington (bot)
5b73ed4b66
[3.12] gh-72971: Clarify the special no-TypeError behavior for equality (GH-110729) (#116254)
(cherry picked from commit 67f742e03a)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2024-03-03 01:55:59 +01:00
Miss Islington (bot)
6aadabcfe6
[3.12] gh-114494: Change logging docstring to bool for exec_info (GH=114558) (GH-114624)
(cherry picked from commit 07236f5b39)

Co-authored-by: Tristan Pank <tristanpank@gmail.com>
2024-03-02 14:33:15 +02:00
Miss Islington (bot)
25b21596fe
[3.12] GH-115978: Disable *readv() and *writev() on WASI (GH-116228) (GH-116231)
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:11:41 +00:00
Miss Islington (bot)
90f75e1069
[3.12] gh-112281: Allow Union with unhashable Annotated metadata (GH-112283) (#116213)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-01 18:01:27 +00:00
Miss Islington (bot)
16be4a3b93
[3.12] gh-116035: Document that both tzinfo and fold are ignored in comparisons if tzinfo is the same (GH-116187) (GH-116216)
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:17 +02:00
Miss Islington (bot)
8dae3faab6
[3.12] gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) (GH-116208)
* 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:30 +02:00
Miss Islington (bot)
694874b7dc
[3.12] gh-104219: Document that idunders can return NotImplemented (GH-104220) (#116210)
(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:08:59 +00:00
Miss Islington (bot)
d341098c59
[3.12] gh-101293: Fix support of custom callables and types in inspect.Signature.from_callable() (GH-115530) (GH-116198)
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:59:49 +00:00
Miss Islington (bot)
753b6644e3
[3.12] gh-115811: Update documentation to add some Logger attributes. (GH-116109) (GH-116185)
(cherry picked from commit 3b6f4cadf1)
2024-03-01 08:57:30 +00:00
Shantanu
2cf68dbe29
[3.12] gh-115881: Document feature_version limitations (#115980) (#116173) 2024-03-01 01:56:06 +00:00
Miss Islington (bot)
5f63b73d52
[3.12] gh-116026: Try disabling rebuilds of dependents in Homebrew (GH-116027) (#116158)
(cherry picked from commit 02beb9f020)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 00:12:55 +00:00
Tian Gao
40e9295a58
[3.12] gh-87115: Set __main__.__spec__ to None in pdb (GH-116141) (#116154)
* gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141)

(cherry picked from commit ccfc042bbf)

* [3.12] 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:09 +00:00
Miss Islington (bot)
8d865f19bd
[3.12] Fix rendering of null character in ast.rst (GH-116080) (#116160)
Fix rendering of null character in ast.rst (GH-116080)
(cherry picked from commit c04a981ff4)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-02-29 22:42:25 +00:00
Miss Islington (bot)
211b55951d
[3.12] gh-112844: Add SBOM for external dependencies (GH-115789) (#116128)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-29 21:32:14 +00:00
Miss Islington (bot)
811f4bd5a7
[3.12] gh-73580: Docs for tunnelling TLS through TLS (GH-22539) (GH-116149)
(cherry picked from commit 91c3c64237)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2024-02-29 21:04:02 +00:00