summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] chore: fix typos (#116345) (#116370)Terry Jan Reedy2024-03-056-7/+7
| | | | Co-authored-by: cui fliter <imcusg@gmail.com> (cherry picked from commit e7ba6e9dbe5433b4a0bcb0658da6a68197c28630)
* [3.12] gh-74668: Fix support of bytes in urllib.parse.parse_qsl() ↵Miss Islington (bot)2024-03-052-26/+61
| | | | | | | | | (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 bdba8ef42b15e651dc23374a08143cc2b4c4657d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-76511: Fix email.Message.as_string() for non-ASCII message with ↵Miss Islington (bot)2024-03-053-2/+17
| | | | | | | ASCII charset (GH-116125) (GH-116364) (cherry picked from commit f97f25ef5dfcdfec0d9a359fd970abd139cf3428) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-116325: Raise `SyntaxError` rather than `IndexError` on ForwardRef ↵Miss Islington (bot)2024-03-052-1/+7
| | | | | | | | 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 a29998a06bf75264c3faaeeec4584a5f75b45a1f) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() ↵Miss Islington (bot)2024-03-032-36/+52
| | | | | | | | | | | (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 87faec28c78f6fa8eaaebbd1ababf687c7508e71) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114494: Change logging docstring to bool for exec_info (GH=114558) ↵Miss Islington (bot)2024-03-021-6/+6
| | | | | | | (GH-114624) (cherry picked from commit 07236f5b39a2e534cf190cd4f7c73300d209520b) Co-authored-by: Tristan Pank <tristanpank@gmail.com>
* [3.12] gh-112281: Allow `Union` with unhashable `Annotated` metadata ↵Miss Islington (bot)2024-03-013-18/+154
| | | | | | | (GH-112283) (#116213) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) (GH-116208)Miss Islington (bot)2024-03-012-32/+367
| | | | | | | | | | * 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 fee86fd9a422612b39e5aabf2571b8fe4abac770) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-101293: Fix support of custom callables and types in ↵Miss Islington (bot)2024-03-012-89/+434
| | | | | | | | | | | | | 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 59167c962efcae72e8d88aa4b33062ed3de4f120) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-87115: Set `__main__.__spec__` to `None` in pdb (GH-116141) (#116154)Tian Gao2024-02-292-0/+13
| | | | | | | | | | * gh-87115: Set `__main__.__spec__` to `None` in pdb (#116141) (cherry picked from commit ccfc042bbf31e53c44b8aae444afd8365b798422) * [3.12] gh-87115: Set `__main__.__spec__` to `None` in pdb (GH-116141) (cherry picked from commit ccfc042bbf31e53c44b8aae444afd8365b798422) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-72463: Fix ctypes/test_loading.py so that test_find reports ↵Miss Islington (bot)2024-02-291-0/+4
| | | | | | | skipped (GH-18312) (GH-116136) (cherry picked from commit 04d1000071b5eefd4b1dd69051aacad343da4b21) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* [3.12] gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission ↵Miss Islington (bot)2024-02-291-0/+4
| | | | | | | | | | | error (GH-116105) (GH-116120) gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105) (cherry picked from commit 186fa9387669bcba6d3974a99c012c2b2c6fb4ce) gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-116034: fix location info on the error of a failed assertion (#116054)Irit Katriel2024-02-292-1/+18
|
* [3.12] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210)Miss Islington (bot)2024-02-282-44/+62
| | | | | | | | 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 c43b26d02eaa103756c250e8d36829d388c5f3be) Co-authored-by: Weii Wang <weii.wang@canonical.com>
* [3.12] doc: Use super() in subclassed JSONEncoder examples (GH-115565) ↵Miss Islington (bot)2024-02-281-1/+1
| | | | | | | | | | | (GH-116047) 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 647053fed182066d3b8c934fb0bf52ee48ff3911) Co-authored-by: Jan Max Meyer <jmm@phorward.de>
* [3.12] gh-115961: Improve tests for compressed file-like objects (GH-115963) ↵Miss Islington (bot)2024-02-285-45/+476
| | | | | | | | | | | | | | | (GH-116032) * 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 e72576c48b8be1e4f22c2f387f9769efa073c5be) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data ↵Miss Islington (bot)2024-02-272-13/+21
| | | | | | | | descriptor (GH-115540) (GH-115966) (cherry picked from commit 68c79d21fa791d7418a858b7aa4604880e988a02) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845) ↵Miss Islington (bot)2024-02-272-1/+21
| | | | | | | | (GH-115995) Listener.accept() no longer hangs when authkey is an empty bytes object. (cherry picked from commit 686ec17f506cddd0b14a8aad5849c15ffc20ed46) Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
* [3.12] bpo-44865: Fix yet one missing translations in argparse (GH-27668) ↵Miss Islington (bot)2024-02-261-1/+2
| | | | | | | (GH-115974) (cherry picked from commit 6087315926fb185847a52559af063cc7d337d978) Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
* [3.12] gh-77956: Add the words 'default' and 'version' help text ↵Serhiy Storchaka2024-02-261-2/+4
| | | | | | | | | localizable (GH-12711) (GH-115967) (cherry picked from commit da382aaf52d761a037874bee27bb5db69906df9e) 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>
* [3.12] gh-114763: Protect lazy loading modules from attribute access races ↵Miss Islington (bot)2024-02-262-32/+91
| | | | | | | | | | (GH-114781) (GH-115870) 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 200271c61db44d90759f8a8934949aefd72d5724) Co-authored-by: Chris Markiewicz <effigies@gmail.com>
* [3.12] gh-115881: Ensure `ast.parse()` parses conditional context managers ↵Alex Waygood2024-02-261-8/+4
| | | | even with low `feature_version` passed (#115920) (#115959)
* [3.12] gh-115823: Calculate correctly error locations when dealing with ↵Miss Islington (bot)2024-02-261-0/+1
| | | | | | | | implicit encodings (GH-115824) (#115949) gh-115823: Calculate correctly error locations when dealing with implicit encodings (GH-115824) (cherry picked from commit 015b97d19a24a169cc3c0939119e1228791e4253) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-115931: Fix `SyntaxWarning`s in `test_unparse` (GH-115935) (#115948)Miss Islington (bot)2024-02-261-2/+11
| | | | | | gh-115931: Fix `SyntaxWarning`s in `test_unparse` (GH-115935) (cherry picked from commit b7383b8b71d49c761480ae9a8b2111644310e61d) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115886: Handle embedded null characters in shared memory name ↵Serhiy Storchaka2024-02-251-1/+16
| | | | | | | (GH-115887) (GH-115906) 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 79811ededd160b6e8bcfbe4b0f9d5b4589280f19)
* [3.12] bpo-14322: added test case for invalid update to hmac (GH-26636) ↵Miss Islington (bot)2024-02-251-0/+8
| | | | | | | (#115904) Co-authored-by: Arjun <ccldarjun@icloud.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-67044: Always quote or escape \r and \n in csv.writer() ↵Miss Islington (bot)2024-02-231-15/+39
| | | | | | | (GH-115741) (GH-115866) (cherry picked from commit c688c0f130906ff7725a126fff143d1389884f89) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-114435: Allow test_stat_inaccessible_file() to have matching ino/dev ↵Miss Islington (bot)2024-02-231-4/+3
| | | | | | | | (GH-114571) This may occur if Windows allows reading stat information from a file even if the current user does not have access. (cherry picked from commit d91ddff5de61447844f1dac575d2e670c8d7e26b) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-88516: show file proxy icon in IDLE editor windows on macOS ↵Miss Islington (bot)2024-02-231-1/+10
| | | | | | | | | | | | | | | | (GH-112894) (#115840) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b48101864c724a7eab41a6878a836f38e54e04fb) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-100762: Fix optimization in gen_close (GH-111069) (#115818)Miss Islington (bot)2024-02-222-6/+2
| | | | | | gh-100762: Fix optimization in gen_close (GH-111069) (cherry picked from commit 0db2517687efcf5ec0174a32398ec1564b3204f1) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-112364: Correct unparsing of backslashes and quotes in ast.… ↵Frank Hoffmann2024-02-212-7/+23
| | | | | | (#115782) [3.12] gh-112364: Correct unparsing of backslashes and quotes in ast.unparse (GH-115696) (cherry picked from commit 69ab93082d14425aaac48b8393711c716575b132)
* [3.12] gh-93205: When rotating logs with no namer specified, match whole ↵Miss Islington (bot)2024-02-212-19/+61
| | | | | | | extension (GH-93224) (GH-115784) (cherry picked from commit 113687a8381d6dde179aeede607bcbca5c09d182) Co-authored-by: Gabriele Catania <gabriele.ctn@gmail.com>
* [3.12] gh-96310: Fix a traceback in argparse when all options in a mutually ↵Miss Islington (bot)2024-02-212-0/+23
| | | | | | | | | | | | | exclusive group are suppressed (GH-96311) (GH-115767) Reproducer depends on terminal size - the traceback occurs when there's an option long enough so the usage line doesn't fit the terminal width. Option order is also important for reproducibility. Excluding empty groups (with all options suppressed) from inserts fixes the problem. (cherry picked from commit 5f7df88821347c5f44fc4e2c691e83a60a6c6cd5) Co-authored-by: Daniel Mach <daniel.mach@suse.com>
* [3.12] gh-86291: linecache: get module name from __spec__ if available ↵Miss Islington (bot)2024-02-202-7/+43
| | | | | | | | | (GH-22908) (GH-115731) This allows getting source code for the __main__ module when a custom loader is used. (cherry picked from commit e976baba99a5c243ff3a3b5ef2fd14608a398338) Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
* [3.12] gh-115712: Support CSV dialects with delimiter=' ' and ↵Serhiy Storchaka2024-02-201-6/+67
| | | | | | | skipinitialspace=True (GH-115721) (GH-115729) csv.writer() now quotes empty fields if delimiter is a space and skipinitialspace is true and raises exception if quoting is not possible. (cherry picked from commit 937d2821501de7adaa5ed8491eef4b7f3dc0940a)
* [3.12] Add missed `stream` argument (GH-111775) (#115716)Miss Islington (bot)2024-02-201-1/+1
| | | | | | | | | | Add missed `stream` argument (GH-111775) * Add missed `stream` argument * Add news (cherry picked from commit 1ff6c1416b0bb422f4847cd84fcb33662a2497ef) Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
* [3.12] gh-115539: Allow enum.Flag to have None members (GH-115636) (GH-115694)Miss Islington (bot)2024-02-202-21/+52
| | | | | | gh-115539: Allow enum.Flag to have None members (GH-115636) (cherry picked from commit c2cb31bbe1262213085c425bc853d6587c66cae9) Co-authored-by: Jason Zhang <yurenzhang2017@gmail.com>
* [3.12] gh-60346: Improve handling single-dash options in ↵Miss Islington (bot)2024-02-192-23/+56
| | | | | | | ArgumentParser.parse_known_args() (GH-114180) (GH-115675) (cherry picked from commit e47ecbd0420528f1f9f282d9e7acfcf586a4caa1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-115341: Fix loading unit tests with doctests in -OO mode ↵Miss Islington (bot)2024-02-191-1/+1
| | | | | | | (GH-115342) (GH-115671) (cherry picked from commit 872cc9957a9c8b971448e7377fad865f351da6c9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Fix test_py_compile with -O mode (GH-115345) (GH-115669)Miss Islington (bot)2024-02-191-1/+3
| | | | | (cherry picked from commit 07ef9d86a5efa82d06a8e7e15dd3aff1e946aa6b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Fix test_compile with -O mode (GH-115346) (GH-115668)Miss Islington (bot)2024-02-191-2/+5
| | | | | (cherry picked from commit 7b25a82e83ad8fe15e4302bb7655309573affa83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-115154: Fix untokenize handling of unicode named literals ↵Miss Islington (bot)2024-02-192-10/+83
| | | | | | | | (GH-115171) (#115662) gh-115154: Fix untokenize handling of unicode named literals (GH-115171) (cherry picked from commit ecf16ee50e42f979624e55fa343a8522942db2e7) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-111358: Fix timeout behaviour in ↵Miss Islington (bot)2024-02-192-9/+27
| | | | | | | BaseEventLoop.shutdown_default_executor (GH-115622) (#115641) (cherry picked from commit 53d5e67804227d541ed2f9e8efea8de5d70cb1ec) Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
* [3.12] gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (GH-114687) ↵Miss Islington (bot)2024-02-181-169/+0
| | | | | | | | (#115625) gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (GH-114687) (cherry picked from commit f9154f8f237e31e7c30f8698f980bee5e494f1e0) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115618: Remove improper Py_XDECREFs in property methods ↵Serhiy Storchaka2024-02-171-0/+18
| | | | | (GH-115619) (GH-115620) (cherry picked from commit 090dd21ab9379d6a2a6923d6cbab697355fb7165)
* [3.12] gh-115596: Fix ProgramPriorityTests in test_os permanently changing ↵Miss Islington (bot)2024-02-171-16/+15
| | | | | | | the process priority (GH-115610) (GH-115616) (cherry picked from commit 90dd653a6122a6c5b4b1fe5abe773c4751e5ca25) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
* [3.12] Fix ProgramPriorityTests on FreeBSD with high nice value (GH-100145) ↵Miss Islington (bot)2024-02-171-1/+2
| | | | | | | | | | (GH-115614) It expects priority to be capped with 19, which is the cap for Linux, but for FreeBSD the cap is 20 and the test fails under the similar conditions. Tweak the condition to cover FreeBSD as well. (cherry picked from commit 437924465de5cb81988d1e580797b07090c26a28) Co-authored-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
* [3.12] gh-107155: Fix help() for lambda function with return annotation ↵Kirill Podoprigora2024-02-172-2/+28
| | | | | (GH-115612) (cherry picked from commit b9a9e3dd62326b726ad2e8e8efd87ca6327b4019)
* [3.12] gh-115567: Catch ↵Miss Islington (bot)2024-02-171-3/+4
| | | | | | | test_ctypes.test_callbacks.test_i38748_stackCorruption stdout output (GH-115568) (GH-115609) (cherry picked from commit 265548a4eaaebc3fb379f85f2a919848927f09e5) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-101384: Add socket timeout to ThreadedVSOCKSocketStreamTest and ↵Miss Islington (bot)2024-02-171-0/+3
| | | | | | | skip it on WSL (GH-101419) (GH-115585) (cherry picked from commit 9fd420f53d1b1087d2ae648b0efc44107d27d867) Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>