Commit graph

116578 commits

Author SHA1 Message Date
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
Miss Islington (bot)
0f7f5a4a6c
[3.11] Doc: Clarify the return type of Event.wait when timeout is used (GH-104168) (GH-115939)
(cherry picked from commit 37f5d06b1b)

Co-authored-by: Phil Elson <pelson.pub@gmail.com>
2024-02-26 09:59:32 +00:00
Miss Islington (bot)
392bc9a3a0
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.1.rst (GH-112357) (#115933)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-26 06:55:56 +00:00
Miss Islington (bot)
f822070e7a
[3.11] gh-115921: Change 'equation' to 'expression' in random.rst (GH-115927) (#115929)
In uniform function entry.
(cherry picked from commit de0b4f95cb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-26 03:57:48 +00:00
Carol Willing
2110ae80fa
[3.11] gh-101100: Fix broken xrefs in fcntl module doc (GH-115691) (#115925)
* clean up fcntl module doc

* simplify

* a few changes, based on suggestion by CAM-Gerlach

* nitpick ignore for a couple other C functions mentioned in the fcntl module doc

* more changes, especially related to LOCK_* constants

* :data: back to :const:

* Apply suggestions from code review



---------

(cherry picked from commit 84a275c4a2)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-02-26 01:32:52 +00:00
Miss Islington (bot)
6324d9b485
[3.11] gh-103417: Fix the scheduler example (GH-111497) (GH-115909)
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
(cherry picked from commit cb287d3421)

Co-authored-by: mauricelambert <50479118+mauricelambert@users.noreply.github.com>
2024-02-25 14:04:47 +02:00
Serhiy Storchaka
f2b1f6b828
[3.11] gh-115886: Handle embedded null characters in shared memory name (GH-115887) (GH-115907)
shm_open() and shm_unlink() now check for embedded null characters in
the name and raise an error instead of silently truncating it.
(cherry picked from commit 79811ededd)
2024-02-25 11:12:07 +00:00
Miss Islington (bot)
c6455ff0fd
[3.11] bpo-14322: added test case for invalid update to hmac (GH-26636) (#115905)
Co-authored-by: Arjun <ccldarjun@icloud.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-25 10:52:55 +00:00
Hugo van Kemenade
a9f8cf03f1
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.0.rst (GH-112351) (#115903)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-25 03:19:23 -07:00
Miss Islington (bot)
c0789209c4
[3.11] Add an example of of custom __repr__ (GH-112761) (#115901)
Added to repr entry in Doc/library/functions.rst.

---------

(cherry picked from commit 5770006ffa)

Co-authored-by: Oh seungmin <tmdals179@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-25 08:06:37 +00:00
Miss Islington (bot)
92e43aea35
[3.11] Erase some unnecessary quotes on data model doc (GH-113521) (#115897)
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.

(cherry picked from commit f7455864f2)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2024-02-24 23:30:34 -05:00