Commit graph

116588 commits

Author SHA1 Message Date
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
Miss Islington (bot)
da34d55f7f
[3.11] Fix rendering of null character in ast.rst (GH-116080) (#116161)
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:31 +00:00
Miss Islington (bot)
8014ffda1d
[3.11] gh-73580: Docs for tunnelling TLS through TLS (GH-22539) (GH-116150)
(cherry picked from commit 91c3c64237)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2024-02-29 21:03:59 +00:00
Miss Islington (bot)
f4efc135b3
[3.11] Docs: mark up NotImplemented using the :data: role throughout the docs (GH-116135) (#116148)
(cherry picked from commit dbe44f150c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-29 20:53:50 +00:00
Miss Islington (bot)
8643cfd918
[3.11] gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) (GH-116137)
(cherry picked from commit 04d1000071)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2024-02-29 19:48:38 +00:00
Miss Islington (bot)
9db482c7d9
[3.11] gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105) (GH-116121)
gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105)
(cherry picked from commit 186fa93876)


gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-02-29 14:44:55 +00:00
Miss Islington (bot)
6e328371c5
[3.11] gh-115937: Remove implementation details from inspect.signature() docs (GH-116086) (#116107)
gh-115937: Remove implementation details from inspect.signature() docs (GH-116086)
(cherry picked from commit fb2e17b642)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-29 01:54:48 -08:00
Miss Islington (bot)
e7dc85308f
[3.11] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210)
gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210)

Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason.  Proxy bypass lists are strictly name based.  Most implementations of proxy support agree.
(cherry picked from commit c43b26d02e)

Co-authored-by: Weii Wang <weii.wang@canonical.com>
2024-02-28 20:53:00 +00:00
Erlend E. Aasland
02bb367748
[3.11] GH-115986 Reorder pprint docs and amend some references (#116019) (#116064)
(cherry picked from commit 6c1c94dc51)

Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.

Also:
- Fix pprint.pprint() references so they properly link to the module
  level function.
- Add links to sys.stdout.

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-02-28 20:11:12 +00:00
Irit Katriel
99ab0d49e2
[3.11] gh-116034: fix location info on the error of a failed assertion (#116052) 2024-02-28 19:12:16 +00:00
Miss Islington (bot)
f225740211
[3.11] doc: Use super() in subclassed JSONEncoder examples (GH-115565) (GH-116046)
doc: Use super() in subclassed JSONEncoder examples (GH-115565)

Replace calls to `json.JSONEncoder.default(self, obj)`
by `super().default(obj)` within the examples of the documentation.
(cherry picked from commit 647053fed1)

Co-authored-by: Jan Max Meyer <jmm@phorward.de>
2024-02-28 14:08:40 +00:00
Serhiy Storchaka
becc61596f
[3.11] gh-115961: Improve tests for compressed file-like objects (GH-115963) (GH-116039)
* Increase coverage for compressed file-like objects initialized with a
  file name, an open file object, a file object opened by file
  descriptor, and a file-like object without name and mode attributes
  (io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
  seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c48b)
2024-02-28 09:38:39 +00:00
Miss Islington (bot)
4007086019
[3.11] gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data descriptor (GH-115540) (GH-115965)
(cherry picked from commit 68c79d21fa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-27 18:35:55 +00:00
Miss Islington (bot)
eb13ac66c4
[3.11] bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845) (GH-115994)
Listener.accept() no longer hangs when authkey is an empty bytes object.
(cherry picked from commit 686ec17f50)

Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
2024-02-27 16:14:01 +00:00
Miss Islington (bot)
cccd73dced
[3.11] gh-115315: Update time.rst to include microseconds field (%f) in chart (GH-115316) (#115991)
Co-authored-by: Tahoma Software <bacon@tahoma.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-27 15:40:33 +02:00
Miss Islington (bot)
c562f5a1e2
[3.11] bpo-44865: Fix yet one missing translations in argparse (GH-27668) (GH-115975)
(cherry picked from commit 6087315926)

Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
2024-02-26 23:14:32 +00:00
Serhiy Storchaka
f8a6a1c5c3
[3.11] gh-77956: Add the words 'default' and 'version' help text localizable (GH-12711) (GH-115968)
(cherry picked from commit da382aaf52)

Co-authored-by: paul.j3
Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
2024-02-26 21:36:57 +00:00
Miss Islington (bot)
46f821d62b
[3.11] gh-114763: Protect lazy loading modules from attribute access races (GH-114781) (GH-115871)
gh-114763: Protect lazy loading modules from attribute access races (GH-114781)

Setting the __class__ attribute of a lazy-loading module to ModuleType enables other threads to attempt to access attributes before the loading is complete. Now that is protected by a lock.
(cherry picked from commit 200271c61d)

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
2024-02-26 20:50:55 +00:00
Alex Waygood
a30a1e7a49
[3.11] gh-115881: Ensure ast.parse() parses conditional context managers even with low feature_version passed (#115920) (#115960) 2024-02-26 16:27:51 +00:00
Miss Islington (bot)
35a43d4394
[3.11] gh-115823: Calculate correctly error locations when dealing with implicit encodings (GH-115824) (#115950)
gh-115823: Calculate correctly error locations when dealing with implicit encodings (GH-115824)
(cherry picked from commit 015b97d19a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-02-26 16:08:37 +00:00