]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Wed, 22 Jun 2022 09:18:37 +0000 (02:18 -0700)]
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94106)
It is no longer changed when create a zip or tar archive.
It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit
fda4b2f06364ae5ef91ecd9c09e2af380c8b0b4c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 22 Jun 2022 08:48:14 +0000 (01:48 -0700)]
DOC: correct bytesarray -> bytearray in comments (GH-92410) (GH-94090)
(cherry picked from commit
0709586744ec58dd60492e16b08fff6dc1149a0a )
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
Dennis Sweeney [Wed, 22 Jun 2022 08:37:56 +0000 (04:37 -0400)]
[3.10] GH-93964: Harden overflow checks before _PyBytes_Resize in compile.c (GH-94045)
Miss Islington (bot) [Tue, 21 Jun 2022 22:05:08 +0000 (15:05 -0700)]
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098) (GH-94100)
Co-authored-by: Windson yang <wiwindson@outlook.com>
(cherry picked from commit
6575841266b83f3121c188695c7513e551ade034 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Tue, 21 Jun 2022 21:36:55 +0000 (14:36 -0700)]
gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879)
Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target. Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).
Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit
4abab6b603dd38bec1168e9a37c40a48ec89508e )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 21 Jun 2022 20:32:24 +0000 (13:32 -0700)]
gh-93021: Fix __text_signature__ for __get__ (GH-93023) (GH-94086)
Because of the way wrap_descr_get is written, the second argument
to __get__ methods implemented through the wrapper is always
optional.
(cherry picked from commit
4e08fbcfdfa57ea94091aabdd09413708e3fb2bf )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Tue, 21 Jun 2022 19:53:07 +0000 (12:53 -0700)]
Tutorial: specify match cases don't fall through (GH-93615) (GH-94084)
(cherry picked from commit
dd5cf84f245abf84405833320b8f25dbc43b24d2 )
Co-authored-by: max <36980911+pr2502@users.noreply.github.com>
Miss Islington (bot) [Tue, 21 Jun 2022 19:51:34 +0000 (12:51 -0700)]
gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94081)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit
51d673176ac90f2144e3e7a492e5b3ea53bdba2e )
Co-authored-by: paulreece <96156234+paulreece@users.noreply.github.com>
Łukasz Langa [Tue, 21 Jun 2022 19:39:08 +0000 (21:39 +0200)]
[3.10] gh-93675: Fix typos in `Doc/` (GH-93676) (GH-94080)
Closes GH-93675
(cherry picked from commit
830513754d081619b2d72db17770627312072fa5 )
Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
Łukasz Langa [Tue, 21 Jun 2022 19:37:09 +0000 (21:37 +0200)]
[3.10] gh-93851: Fix all broken links in Doc/ (GH-93853) (GH-94078)
(cherry picked from commit
f62ff97f31a775cc7956adeae32c14e7c85bdc15 )
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Serhiy Storchaka [Tue, 21 Jun 2022 19:36:09 +0000 (22:36 +0300)]
[3.10] gh-79512: Fixed names and __module__ value of weakref classes (GH-93719) (GH-94071)
Classes ReferenceType, ProxyType and CallableProxyType have now correct
atrtributes __module__, __name__ and __qualname__.
It makes them (types, not instances) pickleable.
(cherry picked from commit
8352e322e87ba39c71e578b65ad8ae156ca3e0c7 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 21 Jun 2022 18:09:55 +0000 (11:09 -0700)]
gh-91387: Strip trailing slash from tarfile longname directories (GH-32423)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit
c1e19421c23d1261ecbbe7375316adc1c24f0a87 )
Co-authored-by: Chris Fernald <chrisf671@gmail.com>
Miss Islington (bot) [Tue, 21 Jun 2022 17:51:23 +0000 (10:51 -0700)]
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"
This reverts commit
5c1f15b4b1024cbf0acc85832f0c623d1a4605fd
* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"
This reverts commit
b63a620014b67a6e63d10783149c41baaf59def8 .
(cherry picked from commit
0efe3a1636c143fe0694a8e4d25d6eae19e0d618 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jun 2022 14:14:51 +0000 (07:14 -0700)]
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-92754)
(cherry picked from commit
61f24e7885bed096b5d7f75aff13c1001994b35a )
Co-authored-by: Matthias Köppe <mkoeppe@math.ucdavis.edu>
Victor Stinner [Mon, 20 Jun 2022 14:09:55 +0000 (16:09 +0200)]
gh-84461: Silence some compiler warnings on WASM (GH-93978) (#94025)
(cherry picked from commit
774ef28814d0d9d57ec813cb31b0a7af6c476127 )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Mon, 20 Jun 2022 00:14:57 +0000 (17:14 -0700)]
[3.10] gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (GH-9621) (#94015)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit
affa9f22cfd1e83a5fb413e5ce2feef9ea1a49ac )
Co-authored-by: itssme <itssme3000@gmail.com>
Miss Islington (bot) [Sun, 19 Jun 2022 20:25:55 +0000 (13:25 -0700)]
gh-61162: Clarify sqlite3 connection context manager docs (GH-93890)
Explicitly note that transactions are only closed if there is an open
transation at `__exit__`, and that transactions are not implicitly
opened during `__enter__`.
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Automerge-Triggered-By: GH:erlend-aasland
(cherry picked from commit
8e0897814109765a9e463676413fff016875217b )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Erlend Egeberg Aasland [Sun, 19 Jun 2022 19:43:03 +0000 (21:43 +0200)]
[3.10] gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (GH-93926) (#94011)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit
6446592c89b0c581c00e170ae6278291e940755c )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Kumar Aditya [Sun, 19 Jun 2022 11:26:13 +0000 (16:56 +0530)]
GH-93990: fix refcounting bug in `add_subclass` in `typeobject.c` (GH-93989) (GH-93999)
(cherry picked from commit
726448ebe15cd78e180c29c9858cb6c10a581524 )
Miss Islington (bot) [Sun, 19 Jun 2022 09:14:21 +0000 (02:14 -0700)]
What's new in 3.10: fix link to issue (GH-93968)
* What's new in 3.10: fix link to issue
* What's new in 3.10: fix link to GH issue
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit
59c1b33805fe553fe6a157ae9b346153b96f7ff1 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 17 Jun 2022 22:32:15 +0000 (15:32 -0700)]
GH-83658: make multiprocessing.Pool raise an exception if maxtasksperchild is not None or a positive int (GH-93364) (GH-93924)
Closes GH-83658.
(cherry picked from commit
e37a158725dec561f234b81864363d55f05c7b4e )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Fri, 17 Jun 2022 09:44:03 +0000 (02:44 -0700)]
test_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)
(cherry picked from commit
538f28921f67e36617272faa662375d305d9284c )
Co-authored-by: Victor Stinner <vstinner@python.org>
Kumar Aditya [Thu, 16 Jun 2022 16:19:17 +0000 (21:49 +0530)]
gh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338) (#93805)
- Amend docs for WriteTransport.get_write_buffer_limits
- Add docs for WriteTransport.get_write_buffer_size
Co-authored-by: Sanket Shanbhag <TechieBoy@users.noreply.github.com>
Miss Islington (bot) [Thu, 16 Jun 2022 16:16:42 +0000 (09:16 -0700)]
gh-91810: Fix regression with writing an XML declaration with encoding='unicode' (GH-93426) (GH-93790)
Suppress writing an XML declaration in open files in ElementTree.write()
with encoding='unicode' and xml_declaration=None.
If file patch is passed to ElementTree.write() with encoding='unicode',
always open a new file in UTF-8.
(cherry picked from commit
d7db9dc3cc5b44d0b4ce000571fecf58089a01ec )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 16 Jun 2022 14:07:30 +0000 (07:07 -0700)]
gh-91577: SharedMemory move imports out of methods (GH-91579)
SharedMemory.unlink() uses the unregister() function from resource_tracker. Previously it was imported in the method, but this can fail if the method is called during interpreter shutdown, for example when unlink is part of a __del__() method.
Moving the import to the top of the file, means that the unregister() method is available during interpreter shutdown.
The register call in SharedMemory.__init__() can also use this imported resource_tracker.
(cherry picked from commit
9a458befdd68625d088f4fea7df135a57d147deb )
Co-authored-by: samtygier <samtygier@yahoo.co.uk>
Adam Turner [Thu, 16 Jun 2022 10:17:10 +0000 (11:17 +0100)]
[3.10] gh-93735: Split Docs CI to speed-up the build (GH-93736) (GH-93833)
(cherry picked from commit
4f26963526f386bba84de8e14962163bfd5da955 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Thu, 16 Jun 2022 07:19:29 +0000 (00:19 -0700)]
[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742) (GH-93792)
It combines PyImport_ImportModule() and PyObject_GetAttrString()
and saves 4-6 lines of code on every use.
Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.
(cherry picked from commit
6fd4c8ec7740523bb81191c013118d9d6959bc9d )
(cherry picked from commit
d42b3689f4a14694f5b1ff75c155141102aa2557 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 15 Jun 2022 14:24:50 +0000 (07:24 -0700)]
gh-93857: Fix broken audit-event targets in sqlite3 docs (GH-93859)
Corrected targets for the following audit-events:
- sqlite3.enable_load_extension => sqlite3.Connection.enable_load_extension
- sqlite3.load_extension => sqlite3.Connection.load_extension
(cherry picked from commit
ce4d11f98b30ec62f56a0653a212f0f78ca08b59 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 15 Jun 2022 10:46:33 +0000 (03:46 -0700)]
gh-87260: Update sqlite3 signature docs to reflect actual implementation (GH-93840)
Align the docs for the following methods with the actual implementation:
- sqlite3.complete_statement()
- sqlite3.Connection.create_function()
- sqlite3.Connection.create_aggregate()
- sqlite3.Connection.set_progress_handler()
(cherry picked from commit
d31834688bccb41fc136f780db83ffa12bef8cbd )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Erlend Egeberg Aasland [Wed, 15 Jun 2022 09:55:30 +0000 (11:55 +0200)]
[3.10] gh-89018: Improve documentation of `sqlite3` exceptions (GH-27645) (#93838)
- Order exceptions as in PEP 249
- Reword descriptions, so they match the current behaviour
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit
bb0b7689465c3aac3b1d7f68c8990009462c1ae5 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 15 Jun 2022 08:51:28 +0000 (01:51 -0700)]
gh-93183: Adjust wording in socket docs (GH-93832)
package => packet
Co-authored-by: Victor Norman
(cherry picked from commit
cdd39843073fc27b8e4a887d5d3b7992cb2ced60 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Erlend Egeberg Aasland [Tue, 14 Jun 2022 15:41:50 +0000 (17:41 +0200)]
[3.10] gh-93795: Use test.support TESTFN/unlink in sqlite3 tests (GH-93796). (#93809)
Erlend Egeberg Aasland [Tue, 14 Jun 2022 13:05:36 +0000 (15:05 +0200)]
[3.10] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93801)
The fix involves using pysqlite_check_remaining_sql(), not only to check
for multiple statements, but now also to strip leading comments and
whitespace from SQL statements, so we can improve DML query detection.
pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more
accurately reflect its function, and hardened to handle more SQL comment
corner cases.
(cherry picked from commit
46740073ef32bf83964c39609c7a7a4772c51ce3 )
Miss Islington (bot) [Mon, 13 Jun 2022 17:52:50 +0000 (10:52 -0700)]
gh-93353: Fix importlib.resources._tempfile() finalizer (GH-93377)
Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit
443ca731d6b1267fe2f92985e0490460c95e44a8 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Sat, 11 Jun 2022 11:13:38 +0000 (04:13 -0700)]
Change list to view object (GH-93661)
(cherry picked from commit
5d8e7a124098add18a17b12270a66ca26b8cc058 )
Co-authored-by: Pamela Fox <pamela.fox@gmail.com>
Miss Islington (bot) [Sat, 11 Jun 2022 03:53:07 +0000 (20:53 -0700)]
gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)
(cherry picked from commit
4c496f1f115a7910d4606b4de233d14874c77bfa )
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Miss Islington (bot) [Fri, 10 Jun 2022 23:32:27 +0000 (16:32 -0700)]
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimport.py` (GH-93236)
(cherry picked from commit
484a2357c8385694a077cf2ce0517f327fb0b172 )
Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
Miss Islington (bot) [Fri, 10 Jun 2022 23:10:29 +0000 (16:10 -0700)]
gh-91317: Document that Path does not collapse initial `//` (GH-32193)
Documentation for `pathlib` says:
> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:
However, it omits that initial double slashes also aren't collapsed.
Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:
- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.
For context, see the BPO entry.
(cherry picked from commit
78f1a436949209dab1f4a9d04036a1a42b165086 )
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Pablo Galindo Salgado [Fri, 10 Jun 2022 18:34:15 +0000 (19:34 +0100)]
[3.10] gh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match statements (GH-93680) (#93690)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit
53a8b17895e91d08f76a2fb59a555d012cd85ab4 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Steve Dower [Fri, 10 Jun 2022 16:36:02 +0000 (17:36 +0100)]
bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-93674)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Fri, 10 Jun 2022 14:31:00 +0000 (07:31 -0700)]
[3.10] Improve logging documentation with example and additional cookbook re… (GH-93644) (GH-93648)
(cherry picked from commit
e974b3e333c9827551d434661a99d990263bf915 )
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Fri, 10 Jun 2022 14:04:47 +0000 (07:04 -0700)]
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581) (GH-93605)
Nowadays everything that *is* in the Limited API has a note added
automatically.
These notes could mislead people to think that these functions
could never be added to the limited API. Remove them.
(cherry picked from commit
2c3fe5eeb2b64deb2132d9259e74b521c14fd92d )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Fri, 10 Jun 2022 13:59:39 +0000 (06:59 -0700)]
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93632)
copy.copy() and copy.deepcopy() now always raise a TypeError if
__reduce__() returns a tuple with length 6 instead of silently ignore
the 6th item or produce incorrect result.
(cherry picked from commit
a365dd64c2a1f0d142540d5031003f24986f489f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 10 Jun 2022 12:17:11 +0000 (05:17 -0700)]
gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617)
Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit
30610d28374f5a9698d456cebf3ae496ac01af51 )
Co-authored-by: Leo Trol <milestone.jxd@gmail.com>
Miss Islington (bot) [Fri, 10 Jun 2022 11:16:57 +0000 (04:16 -0700)]
gh-90763: Modernise xx template module initialisation (GH-93078)
Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
(cherry picked from commit
a87c9b538fbfc42883417c4d5e69f1a5922690e3 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Thu, 9 Jun 2022 14:15:49 +0000 (07:15 -0700)]
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93639)
(cherry picked from commit
a5ba0f4ebca5020f6c77718a20663e0ac6e194ac )
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Erlend Egeberg Aasland [Wed, 8 Jun 2022 11:31:14 +0000 (13:31 +0200)]
[3.10] gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (GH-93526) (GH-93599)
(cherry picked from commit
875de61 )
jacksonriley [Tue, 7 Jun 2022 21:58:43 +0000 (22:58 +0100)]
[3.10] Fix `PurePath.relative_to` links in the pathlib documentation (GH-93268) (GH-93590)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`..
(cherry picked from commit
8ef7929baffd0038bcb38978a6a91ecc63bf0de2 )
Co-authored-by: jacksonriley <52106215+jacksonriley@users.noreply.github.com>
Backport of #93268
Miss Islington (bot) [Tue, 7 Jun 2022 10:20:49 +0000 (03:20 -0700)]
gh-57539: Increase calendar test coverage (GH-93468) (GH-93565)
(cherry picked from commit
f0d0be3493fc5855eccfe0fbb3f25bf12760041f )
Co-authored-by: Sean Fleming
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 7 Jun 2022 10:14:25 +0000 (03:14 -0700)]
gh-88831: In docs for asyncio.create_task, explain why strong references to tasks are needed (GH-93258) (GH-93567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit
75ceae05c11461beda65e6170b67b0b42fd55cd0 )
Co-authored-by: Andreas Grommek <76997441+agrommek@users.noreply.github.com>
Miss Islington (bot) [Tue, 7 Jun 2022 08:54:40 +0000 (01:54 -0700)]
gh-92914: Round the allocated size for lists up to the even number (GH-92915) (GH-92942)
(cherry picked from commit
8a6af5a34642f5564220eb50d72caada8f17fc78 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 7 Jun 2022 08:24:54 +0000 (01:24 -0700)]
gh-86986: bump min sphinx version to 3.2 (GH-93337) (GH-93562)
(cherry picked from commit
57e8ee7086bf3f5c50c901e9d5896275644bbb54 )
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
Pablo Galindo [Mon, 6 Jun 2022 17:14:33 +0000 (18:14 +0100)]
Merge remote-tracking branch 'upstream/3.10' into 3.10
Miss Islington (bot) [Mon, 6 Jun 2022 17:14:04 +0000 (10:14 -0700)]
gh-93391: fix typo in `array` docs (GH-93392) (GH-93395)
Fixes GH-93391
(cherry picked from commit
fc694364cc6745eefba0afc3ea2c5283bbb64a3b )
Co-authored-by: ynfle <23086821+ynfle@users.noreply.github.com>
Pablo Galindo [Mon, 6 Jun 2022 17:13:35 +0000 (18:13 +0100)]
Post 3.10.5
Miss Islington (bot) [Mon, 6 Jun 2022 17:11:18 +0000 (10:11 -0700)]
gh-93372: Fix typo in os.rename documentation (GH-93401) (GH-93404)
(cherry picked from commit
e7aab7c92a7c2e4317023c71e847d55cf5c49f5f )
Co-authored-by: Wei-Ting Yang <74453331+Yang-Wei-Ting@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Mon, 6 Jun 2022 17:10:15 +0000 (10:10 -0700)]
gh-83728: Add hmac.new default parameter deprecation (GH-91939) (GH-93545)
(cherry picked from commit
56b5daf15970be449d44e91f08db84c698ac5506 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Julien Palard [Mon, 6 Jun 2022 16:59:22 +0000 (18:59 +0200)]
[3.10] gh-93108: Bump sphinx to fix rendering issue. (GH-93159)
Bug was visible on SysLogHandler:
bad: SysLogHandler(address='localhost', SYSLOG_UDP_PORT, ...
good: SysLogHandler(address=('localhost', SYSLOG_UDP_PORT), ...
Miss Islington (bot) [Mon, 6 Jun 2022 16:54:04 +0000 (09:54 -0700)]
📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396) (#93400)
This is purely for SEO as this is the actual generic name for this kind of method and it currently does not appear in a Google search for "python constant time compare". Not creating an issue or setting this up for backports as its trivial (I think) and not a functional change.
(cherry picked from commit
8241a6971e6051ba10040af6b50f9236faa0c892 )
Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
Pablo Galindo [Mon, 6 Jun 2022 11:52:40 +0000 (12:52 +0100)]
Python 3.10.5
Miss Islington (bot) [Mon, 6 Jun 2022 01:42:21 +0000 (18:42 -0700)]
gh-93247: Fix assert function in asyncio locks test (GH-93248)
(cherry picked from commit
9081bbd036934ab435291db9d32d02fd42282951 )
Co-authored-by: Cyker Way <cykerway@gmail.com>
Miss Islington (bot) [Sun, 5 Jun 2022 09:39:03 +0000 (02:39 -0700)]
gh-89973: Fix re.error in the fnmatch module. (GH-93072)
Character ranges with upper bound less that lower bound (e.g. [c-a])
are now interpreted as empty ranges, for compatibility with other glob
pattern implementations. Previously it was re.error.
(cherry picked from commit
0902c3d8edf7ef67972dd95f6a21670f5d1a4251 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 4 Jun 2022 19:23:22 +0000 (12:23 -0700)]
Fix missing word in sys.float_info docstring (GH-93489) (GH-93496)
(cherry picked from commit
e12f34b6d8200508bd50cdc9c6c5637732ff56e7 )
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Miss Islington (bot) [Sat, 4 Jun 2022 03:38:54 +0000 (20:38 -0700)]
gh-92886: Fix test that fails when running with `-O` in `test_imaplib.py` (GH-93237)
(cherry picked from commit
8150b8cf7fe09d601246f5bdc6456a0e31f31bca )
Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
Miss Islington (bot) [Fri, 3 Jun 2022 21:53:00 +0000 (14:53 -0700)]
gh-93156 - fix negative indexing into absolute `pathlib.PurePath().parents` (GH-93273)
When a `_PathParents` object has a drive or a root, the length of the
object is *one less* than than the length of `self._parts`, which resulted
in an off-by-one error when `path.parents[-n]` was fed through to
`self._parts[:-n - 1]`. In particular, `path.parents[-1]` was a malformed
path object with spooky properties.
This is addressed by adding `len(self)` to negative indices.
(cherry picked from commit
f32e6b48d12834ba3bde01ec21c14da33abd26d6 )
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Miss Islington (bot) [Fri, 3 Jun 2022 14:08:21 +0000 (07:08 -0700)]
test.pythoninfo: Fix typo, Py_REF_DEBUG => Py_TRACE_REFS (GH-93467)
(cherry picked from commit
d8f40ead92b5a973cff3a30482a7659d3b46b1ba )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 2 Jun 2022 01:04:43 +0000 (18:04 -0700)]
gh-93418: Fix an assert when an f-string expression is followed by an '=', but no closing brace. (gh-93419) (gh-93423)
(cherry picked from commit
ee70c70aa93d7a41cbe47a0b361b17f9d7ec8acd )
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Miss Islington (bot) [Wed, 1 Jun 2022 07:31:31 +0000 (00:31 -0700)]
Remove the execution bit to some socket-related files. (GH-93368)
(cherry picked from commit
5247389369ac3da35c44f7c0d8f4facc0300883a )
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Miss Islington (bot) [Tue, 31 May 2022 17:49:14 +0000 (10:49 -0700)]
Remove VOC reference (93333)
VOC has been archived by the BeeWare project, and they are instead
embedding CPython, rather than transpiling to Java bytecode.
(cherry picked from commit
bb900712a5511ba82ef64105fe28d2a6886a8fed )
Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
Miss Islington (bot) [Mon, 30 May 2022 03:03:11 +0000 (20:03 -0700)]
Fix typo in Lib/idlelib/idle_test/test_parenmatch.py (GH-93332) (#93340)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit
4f195f9db168bfe3360607eb45ba8d9ac98506ec )
Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
Miss Islington (bot) [Mon, 30 May 2022 02:03:15 +0000 (19:03 -0700)]
bpo-42272: fix misleading warning filter message/module docs (GH-23172)
* bpo-42272: improve message/module warning filter docs
"The Warnings Filter" section of the warnings module documentation
describes the message and module filters as "a string containing a
regular expression". While that is true when they are arguments to the
filterwarnings function, it is not true when they appear in -W or
$PYTHONWARNINGS where they are matched literally (after stripping any
starting/ending whitespace). Update the documentation to note when they
are matched literally. Also clarify that module matches the
"fully-qualified module name", rather than "module name" which is
ambiguous.
skip news (since this is a doc fix)
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* bpo-42272: remove bad submodule warning filter doc
The `error:::mymodule[.*]` example in the "Describing Warning Filters"
section of the warnings module documentation does not behave as the
comment describes. Since the module portion of the filter string is
interpreted literally, it would match a module with a fully-qualified
name that is literally `mymodule[.*]`.
Unfortunately, there is not a way to match '"module" and any subpackages
of "mymodule"' as documented, since the module part of a filter string
is matched literally. Instead, update the filter and comment to match
only "mymodule".
skip news (since this is a doc fix)
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* bpo-42272: add warning filter doc changes to NEWS
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
(cherry picked from commit
8136606769661c103c46d142e52ecbbbb88803f6 )
Co-authored-by: Kevin Locke <kevin@kevinlocke.name>
Éric [Sun, 29 May 2022 18:04:23 +0000 (14:04 -0400)]
[3.10] gh-93217: fix some issues in man page and --help (GH-93219) (#93261)
Miss Islington (bot) [Sun, 29 May 2022 08:22:35 +0000 (01:22 -0700)]
test.pythoninfo logs more build info (GH-93225) (#93256)
Log also test.support.check_sanitizer() values.
(cherry picked from commit
06dd26f89f35b6d6ef4b68c169cb6c675af7e4a4 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Sun, 29 May 2022 03:41:40 +0000 (20:41 -0700)]
gh-92240 : Include release dates for "What's New In Python 3.X" (GH-92937)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit
877ad7b3b2778a305d3989d58ebd68cb01baf26e )
Co-authored-by: georgically <40323509+georgically@users.noreply.github.com>
Miss Islington (bot) [Sat, 28 May 2022 18:48:25 +0000 (11:48 -0700)]
gh-92839: fixed typo in _bisectmodule.c (line 131) (GH-92849) (#93321)
Miss Islington (bot) [Fri, 27 May 2022 19:25:21 +0000 (12:25 -0700)]
gh-77024: test.support: Improve documentation (GH-92513)
This is a rework of GH-5774 on current main. I was a bit more
conservative in making changes than the original PR.
See @csabella's comments on issue GH-77024 and the discussion
on GH-5774 for explanations of several of the changes.
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit
8995177030c8b41885ad92b260279b7e622ecaea )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Victor Stinner [Wed, 25 May 2022 22:16:32 +0000 (00:16 +0200)]
[3.10] gh-91924: Fix __ltrace__ for non-UTF-8 stdout encoding (#93214)
Fix __ltrace__ debug feature if the stdout encoding is not UTF-8.
If the stdout encoding is not UTF-8, the first call to
lltrace_resume_frame() indirectly sets lltrace to 0 when calling
unicode_check_encoding_errors() which calls
encodings.search_function().
Add test_lltrace.test_lltrace() test.
Miss Islington (bot) [Wed, 25 May 2022 08:17:57 +0000 (01:17 -0700)]
test_threaded_import: Fix unittest.main spelling (GH-93114)
(cherry picked from commit
19710145b496b5e5341630d80be9c400aa792bd1 )
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Miss Islington (bot) [Wed, 25 May 2022 07:57:56 +0000 (00:57 -0700)]
[3.10] gh-83245: Raise BadZipFile instead of ValueError when reading a corrupt ZIP file (GH-32291) (GH-93140)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
202ed2506c84cd98e9e35621b5b2929ceb717864 )
Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Automerge-Triggered-By: GH:serhiy-storchaka
Miss Islington (bot) [Wed, 25 May 2022 00:42:06 +0000 (17:42 -0700)]
test.pythoninfo no longer requires socket (GH-93191)
test.pythoninfo no longer fails if "import socket" fails: the socket
module is now optional.
(cherry picked from commit
4a31ed8a32699973ae1f779022794fdab9fa08ee )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 24 May 2022 14:25:50 +0000 (07:25 -0700)]
GH-89369: test_contextlib_async finalizes event loop after each test (GH-93074)
Use asyncio.run().
(cherry picked from commit
d2ef66a10be1250b13c32fbf3c0f9a9d2d98b124 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Tue, 24 May 2022 12:32:19 +0000 (05:32 -0700)]
GH-93112: Fix missing ResourceDenied import in test_urllib2net (GH-93113)
The code was moved out of test.support in
311110abcd8ab648dbf1803e36a8ba5d93fa019b (GH-20812), thus making
ResourceDenied undefined.
(cherry picked from commit
37c9a351b15c3fc4fcdca5dcb9ce19e51d7d2dd7 )
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Miss Islington (bot) [Tue, 24 May 2022 08:52:29 +0000 (01:52 -0700)]
gh-93065: Fix HAMT to iterate correctly over 7-level deep trees (GH-93066) (GH-93146)
Also while there, clarify a few things about why we reduce the hash to 32 bits.
Co-authored-by: Eli Libman <eli@hyro.ai>
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit
c1f5c903a7e4ed27190488f4e33b00d3c3d952e5 )
Dennis Sweeney [Mon, 23 May 2022 23:53:38 +0000 (19:53 -0400)]
gh-93061: Mark as artificial: backwards jump after async for (GH-93120)
Miss Islington (bot) [Mon, 23 May 2022 19:45:44 +0000 (12:45 -0700)]
[3.10] gh-92859: Doc: add info about logging.debug() calling basicConfig() (GH-93063) (GH-93150)
Miss Islington (bot) [Mon, 23 May 2022 17:02:15 +0000 (10:02 -0700)]
gh-93010: InvalidHeaderError used but nonexistent (GH-93015)
* fix issue 93010
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit
71abeb0895f7563dc5ac4b4f077a8f87dab57e7a )
Co-authored-by: oda-gitso <105083118+oda-gitso@users.noreply.github.com>
Miss Islington (bot) [Mon, 23 May 2022 05:17:15 +0000 (22:17 -0700)]
gh-89158: Add some REPL secondary prompt markers (GH-93073)
This fixes an issue on tutorial/classes.rst section 9.4 where the example "class Warehouse"
was truncated when pressing the >>> button to hide the prompts and output.
(cherry picked from commit
88f0d0c1e8fdda036f3f64b0048911ba28ce7f06 )
Co-authored-by: Nicolas Haller <nicolas@haller.im>
Miss Islington (bot) [Mon, 23 May 2022 02:11:58 +0000 (19:11 -0700)]
gh-92994: Clarify importlib "check" example (GH-92995)
Fixes GH-92994
(cherry picked from commit
e39cd765610c9099da3b5595186ad16223b670b0 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Mon, 23 May 2022 02:06:54 +0000 (19:06 -0700)]
gh-73137: Added sub-subsection headers for flags in re (GH-93000)
Fixes GH-73137
(cherry picked from commit
b7a6610bc88dfecdd943e8d2817f7cd6b85fb740 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Miss Islington (bot) [Sat, 21 May 2022 15:10:56 +0000 (08:10 -0700)]
gh-91362: reword pickle docs to account for nested classes (GH-92429)
Fixes GH-91362
(cherry picked from commit
f9d6c59917435980fbe1b58c57257c45bfed2244 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Fri, 20 May 2022 22:44:07 +0000 (15:44 -0700)]
[3.10] gh-72073: Add Windows case in pathlib.rename (GH-93002) (GH-93029)
GH-72073
https://docs.python.org/3.12/library/pathlib.htmlGH-pathlib.Path.rename
(cherry picked from commit
f51ed04c663417f88e10eeb21dad23250358bafa )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Automerge-Triggered-By: GH:brettcannon
Miss Islington (bot) [Fri, 20 May 2022 09:21:29 +0000 (02:21 -0700)]
Doc: add missing manpage and title references in tkinter docs (GH-29008)
- add bind(3tk) manpage markup
- add Tcl/Tk book reference markup
(cherry picked from commit
0e12781ad9dec6e46ccb85969c0eb7be1ecad81d )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Miss Islington (bot) [Thu, 19 May 2022 22:48:42 +0000 (15:48 -0700)]
gh-92984: Explicitly disable incremental linking for Windows Release and PGO builds (GH-92985)
(cherry picked from commit
38feffa09c74d9a853745908b7813903bae33b96 )
Co-authored-by: David Machaj <46852402+dmachaj@users.noreply.github.com>
Łukasz Langa [Thu, 19 May 2022 19:16:57 +0000 (21:16 +0200)]
[3.10] bpo-28249: fix `lineno` location for empty `DocTest` instances (GH-30498) (#92981)
(cherry picked from commit
8db2b3b6878aba9f12844526bce966b7eed81aee )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Thu, 19 May 2022 15:57:46 +0000 (08:57 -0700)]
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615) (GH-92975)
(cherry picked from commit
2cdd57f119e3b85f1bfd28c7ff040e0d9bcaf115 )
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Martin Fischer <martin@push-f.com>
Miss Islington (bot) [Thu, 19 May 2022 15:49:13 +0000 (08:49 -0700)]
gh-92417: `subprocess` docs: remove note on compatibility with Python <3.5 (GH-92538) (GH-92973)
(cherry picked from commit
84b86000e2bc32b0fbb6dfb6445a7ffc882067d2 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 19 May 2022 15:45:30 +0000 (08:45 -0700)]
gh-92417: `fractions`, `decimal`: Improve docs for alternative constructor methods (GH-92421) (GH-92971)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit
090df844ea16af3a5df79aba2b9c89ac6a31ba06 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 19 May 2022 15:44:31 +0000 (08:44 -0700)]
gh-92417: `socket` docs: remove references to Python <3.3 (GH-92544) (GH-92969)
(cherry picked from commit
639b62c9c479e38a6f91a80b261097574a1e7ac7 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 19 May 2022 15:32:54 +0000 (08:32 -0700)]
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92966)
(cherry picked from commit
fb082c2fc5a925085b179e63ca10b7f60b356d2f )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Miss Islington (bot) [Thu, 19 May 2022 15:19:53 +0000 (08:19 -0700)]
gh-92417: Update docs and examples of doctest.IGNORE_EXCEPTION_DETAIL for Py>=3 (GH-92502) (GH-92963)
(cherry picked from commit
97b9c1096feff77a564787ef520cc7d4e1d1c45f )