]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Mon, 6 May 2024 09:10:05 +0000 (11:10 +0200)]
[3.12] gh-118164: Break a loop between _pydecimal and _pylong and optimize int to str conversion (GH-118483) (GH-118590)
For converting large ints to strings, CPython invokes a function in _pylong.py,
which uses the decimal module to implement an asymptotically waaaaay
sub-quadratic algorithm. But if the C decimal module isn't available, CPython
uses _pydecimal.py instead. Which in turn frequently does str(int). If the int
is very large, _pylong ends up doing the work, which in turn asks decimal to do
"big" arithmetic, which in turn calls str(big_int), which in turn ... it can
become infinite mutual recursion.
This change introduces a different int->str function that doesn't use decimal.
It's asymptotically worse, "Karatsuba time" instead of quadratic time, so
still a huge improvement. _pylong switches to that when the C decimal isn't
available. It is also used for not too large integers (less than 450_000 bits),
where it is faster (up to 2 times for 30_000 bits) than the asymptotically
better implementation that uses the C decimal.
(cherry picked from commit
711c80bfca5dd17cb7c6ec26f0e44848b33aec04 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Erlend E. Aasland [Mon, 6 May 2024 09:03:36 +0000 (11:03 +0200)]
[3.12] gh-115119: Bump CI to use Ubuntu 22.04 (#118631) (#118634)
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
Miss Islington (bot) [Mon, 6 May 2024 08:12:39 +0000 (10:12 +0200)]
[3.12] gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502) (#118632)
gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502)
(cherry picked from commit
7758be431807d574e0f1bbab003796585ae46719 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sun, 5 May 2024 19:02:04 +0000 (21:02 +0200)]
[3.12] gh-117389: Fix `test_compileall.EncodingTest` (GH-117390) (#118603)
gh-117389: Fix `test_compileall.EncodingTest` (GH-117390)
(cherry picked from commit
44f67916dafd3583f482e6d001766581a1a734fc )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 5 May 2024 06:49:19 +0000 (08:49 +0200)]
[3.12] gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559) (#118587)
Miss Islington (bot) [Sun, 5 May 2024 06:35:11 +0000 (08:35 +0200)]
[3.12] gh-118455: Fix mangle_from_ default value in email.policy.Policy.__doc__ (GH-118456) (#118586)
gh-118455: Fix mangle_from_ default value in email.policy.Policy.__doc__ (GH-118456)
* Fix mangle_from_ default value in email.policy.Policy.__doc__
The docstring says it defaults to True, but it actually defaults
to False. Only the Compat32 subclass overrides that.
---------
(cherry picked from commit
fed8d73fde779fca41026398376cb3038e9b2b5f )
Co-authored-by: wim glenn <jump@wimglenn.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 5 May 2024 06:34:43 +0000 (08:34 +0200)]
[3.12] gh-118164: str(10**10000) hangs if the C _decimal module is missing (GH-118503) (GH-118584)
Serhiy and I independently concluded that exact powers of 10
aren't possible in these contexts, so just checking the
string length is sufficient.
(cherry picked from commit
999f0c512281995fb61a0d9eda075fd846e8c505 )
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 4 May 2024 15:26:30 +0000 (17:26 +0200)]
[3.12] gh-118569: Add a test for dynamic PEP695 classes (GH-118570) (#118574)
gh-118569: Add a test for dynamic PEP695 classes (GH-118570)
(cherry picked from commit
5f547585fa56c94c5d836b5313a7200f4937ebc4 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Fri, 3 May 2024 22:20:29 +0000 (00:20 +0200)]
[3.12] Minor improvements to the itertools recipes (GH-118563) (#118565)
Miss Islington (bot) [Fri, 3 May 2024 15:55:09 +0000 (17:55 +0200)]
[3.12] docs: clarify csv.DictReader's treatment of the first data row (GH-118549) (#118555)
(cherry picked from commit
9d67b72a4952766fdba803eb6eadd41dfee29dff )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Miss Islington (bot) [Fri, 3 May 2024 14:40:05 +0000 (16:40 +0200)]
[3.12] gh-118513: Fix sibling comprehensions with a name bound in one and global in the other (GH-118526) (#118548)
gh-118513: Fix sibling comprehensions with a name bound in one and global in the other (GH-118526)
(cherry picked from commit
c8deb1e4b495bf97ab00c710dfd63f227e1fb645 )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Fri, 3 May 2024 13:09:05 +0000 (15:09 +0200)]
[3.12] gh-117492: Clarify documentation of `typing.Never` (GH-117678) (#118547)
(cherry picked from commit
852263e1086748492602a90347ecc0a3925e1dda )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Thu, 2 May 2024 18:01:17 +0000 (20:01 +0200)]
[3.12] gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (GH-118163) (#118517)
gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (GH-118163)
(cherry picked from commit
b28a3339e4c63ea3a801dba9bbbc6af5af42c3a0 )
Co-authored-by: infohash <46137868+infohash@users.noreply.github.com>
Irit Katriel [Thu, 2 May 2024 15:22:50 +0000 (16:22 +0100)]
[3.12] gh-118272: Clear generator frame's locals when the generator is closed (#118451)
Miss Islington (bot) [Thu, 2 May 2024 14:02:26 +0000 (16:02 +0200)]
[3.12] gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925) (GH-118509)
(cherry picked from commit
b3372481b6cae5766330b041c4622c28cee2119f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Thomas Grainger [Thu, 2 May 2024 08:23:25 +0000 (09:23 +0100)]
[3.12] GH-117881: fix athrow().throw()/asend().throw() concurrent access (GH-117882) (#118458)
GH-117881: fix athrow().throw()/asend().throw() concurrent access (GH-117882)
(cherry picked from commit
fc7e1aa3c001bbce25973261fba457035719a559 )
Miss Islington (bot) [Thu, 2 May 2024 06:03:49 +0000 (08:03 +0200)]
[3.12] Uncomment one grammar test (GH-118361) (#118385)
Uncomment one grammar test (GH-118361)
(cherry picked from commit
23d0371bb99b1df183c36883e256f82fdf6a4bea )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Jelle Zijlstra [Thu, 2 May 2024 06:01:06 +0000 (23:01 -0700)]
[3.12] docs: typo: tiny grammar change: "pointed by" -> "pointed to by" (GH-118411) (#118504)
(cherry picked from commit
a6b610a94bee0e4436aee2825c14f05ec2f22f75 )
Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
Co-authored-by: Andrew-Zipperer <atzipperer@gmail.com>
Irit Katriel [Wed, 1 May 2024 17:23:29 +0000 (18:23 +0100)]
[3.12] gh-116767: fix crash on 'async with' with many context managers (GH-118348) (#118477)
gh-116767: fix crash on 'async with' with many context managers (GH-118348)
Account for `add_stopiteration_handler` pushing a block for `async with`.
To allow generator functions that previously almost hit the `CO_MAXBLOCKS`
limit by nesting non-async blocks, the limit is increased by 1.
This increase allows one more block in non-generator functions.
(cherry picked from commit
c1bf4874c1e9db2beda1d62c8c241229783c789b )
Seth Michael Larson [Wed, 1 May 2024 14:47:41 +0000 (09:47 -0500)]
gh-116122: Add SBOM generation to PCbuild/build.bat (GH-116138)
(cherry picked from commit
72dae53e09a5344bf4922d934a34a2fa48a11c86 )
Co-authored-by: Seth Michael Larson <seth@python.org>
Miss Islington (bot) [Tue, 30 Apr 2024 16:26:38 +0000 (18:26 +0200)]
[3.12] gh-118418: Use a default value for `type_params` in `typing._eval_type` (GH-118431) (#118436)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 30 Apr 2024 14:52:44 +0000 (16:52 +0200)]
[3.12] gh-117860: Add tests for resolving names when import rebind names (GH-118176) (GH-118432)
Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
(cherry picked from commit
c0eaa232f63a62e0e0408911ab5f118dca2af607 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 30 Apr 2024 12:33:54 +0000 (14:33 +0200)]
[3.12] gh-118404: Fix inspect.signature() for non-comparable callables (GH-118405) (GH-118424)
(cherry picked from commit
11f8348d78c22f85694d7a424541b34d6054a8ee )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 30 Apr 2024 08:44:23 +0000 (10:44 +0200)]
[3.12] gh-85453: Consistent backquotes on None occurences across datetime.rst (GH-118282) (#118419)
(cherry picked from commit
0f797402bc77192c76a952410ca8e17359feab3c )
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Miss Islington (bot) [Mon, 29 Apr 2024 21:16:17 +0000 (23:16 +0200)]
gh-118347: Fix Windows installer not updating launcher (GH-118386)
(cherry picked from commit
96d8ca7ad6c4f23f023dd6ed0abd042b29dff4a2 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Mon, 29 Apr 2024 21:07:56 +0000 (23:07 +0200)]
[3.12] gh-118359: Improve docs for Bdb.user_call (GH-118368) (#118410)
gh-118359: Improve docs for Bdb.user_call (GH-118368)
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
(cherry picked from commit
8e4fb5d260e529c9d4ca60980225fbd00dd5c3c8 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Mon, 29 Apr 2024 20:31:14 +0000 (22:31 +0200)]
[3.12] gh-118401: Docs: Use Sphinx short options (GH-118403) (#118407)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 29 Apr 2024 17:58:06 +0000 (19:58 +0200)]
[3.12] Docs: Upgrade to Sphinx 7.3 (GH-118397) (#118400)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 29 Apr 2024 14:41:26 +0000 (16:41 +0200)]
[3.12] gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567) (GH-118391)
gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)
While properties like IPv6Address.is_private account for IPv4-mapped
IPv6 addresses, such as for example:
>>> ipaddress.ip_address("192.168.0.1").is_private
True
>>> ipaddress.ip_address("::ffff:192.168.0.1").is_private
True
...the same doesn't currently apply to the is_loopback property:
>>> ipaddress.ip_address("127.0.0.1").is_loopback
True
>>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback
False
At minimum, this inconsistency between different properties is
counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and
purposes a loopback address, and should be treated as such.
(cherry picked from commit
fb7f79b4da35b75cdc82ff3cf20816d2bf93d416 )
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Miss Islington (bot) [Sun, 28 Apr 2024 18:41:02 +0000 (20:41 +0200)]
[3.12] gh-101100: Fix Sphinx warnings in `library/faulthandler.rst` (GH-118353) (#118366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 28 Apr 2024 18:40:46 +0000 (20:40 +0200)]
[3.12] gh-101100: Fix Sphinx warnings in `whatsnew/3.10.rst` (GH-118356) (#118367)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Hugo van Kemenade [Sun, 28 Apr 2024 17:52:58 +0000 (20:52 +0300)]
[3.12] gh-101100: Fix Sphinx warnings in `whatsnew/3.9.rst` (GH-118364) (#118365)
Jelle Zijlstra [Fri, 26 Apr 2024 23:25:31 +0000 (16:25 -0700)]
[3.12] Fix note in Enum.__new__ docs (GH-118284) (#118325)
(cherry picked from commit
5a4d3df2fa02409ffd2a90cd75b67370206e9891 )
Co-authored-by: Philipp A <flying-sheep@web.de>
Kirill Podoprigora [Fri, 26 Apr 2024 14:18:58 +0000 (17:18 +0300)]
[3.12] gh-117928: Bump the minimum Sphinx version to 6.2.1 (GH-117853) (#118321)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 26 Apr 2024 09:56:10 +0000 (11:56 +0200)]
[3.12] gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237) (GH-118309)
gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237)
(cherry picked from commit
ef940dec409f0a9e4f353c6188990aeb3ad4ffb4 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Serhiy Storchaka [Fri, 26 Apr 2024 05:53:54 +0000 (08:53 +0300)]
[3.12] gh-118042: Fix error in Telnet.__del__ when __init__() was not called (GH-118274)
Miss Islington (bot) [Fri, 26 Apr 2024 05:29:45 +0000 (07:29 +0200)]
[3.12] gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208) (#118269)
gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208)
(cherry picked from commit
796b3fb28057948ea5b98f7eb0c0f3af6a1e276e )
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Erlend E. Aasland [Thu, 25 Apr 2024 08:33:35 +0000 (10:33 +0200)]
[3.12] gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223) (#118270)
sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.
With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Thomas Grainger [Thu, 25 Apr 2024 07:13:47 +0000 (08:13 +0100)]
[3.12] GH-117894: prevent aclose()/athrow() being re-used after StopIteration (GH-117851) (GH-118226)
(cherry picked from commit
7d369d471cf2b067c4d795d70b75201c48b46f5b )
Miss Islington (bot) [Thu, 25 Apr 2024 05:16:43 +0000 (07:16 +0200)]
[3.12] gh-117968: Make the test for closed file more safe in the C API tests (GH-118230) (GH-118266)
The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.
(cherry picked from commit
546cbcfa0eeeb533950bd49e30423f3d3bbd5ebe )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 24 Apr 2024 20:27:19 +0000 (22:27 +0200)]
[3.12] gh-85453: Make numeric literals consistent across datetime.rst (GH-118245) (#118248)
Remove code formatting from remaining numeric literals.
(cherry picked from commit
59a4d52973ca73bd739f914e88243a31dbef6b32 )
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Miss Islington (bot) [Wed, 24 Apr 2024 20:02:53 +0000 (22:02 +0200)]
[3.12] gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables (GH-118068) (#118244)
Also remove formatting from numeric literals.
(cherry picked from commit
809aa9a682fc865f7502e7421da0a74d204aab6d )
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Wed, 24 Apr 2024 15:27:08 +0000 (17:27 +0200)]
[3.12] gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` (GH-118202) (#118232)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Petr Viktorin [Wed, 24 Apr 2024 12:29:30 +0000 (14:29 +0200)]
[3.12] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177)
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).
This patch updates the ranges with what was missing or otherwise
incorrect.
100.64.0.0/10 is left alone, for now, as it's been made special in [1].
The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.
[1] https://github.com/python/cpython/issues/61602
* GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)
It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).
(cherry picked from commit
2a4cbf17af19a01d942f9579342f77c39fbd23c4 )
(cherry picked from commit
40d75c2b7f5c67e254d0a025e0f2e2c7ada7f69f )
---------
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
Miss Islington (bot) [Tue, 23 Apr 2024 17:50:43 +0000 (19:50 +0200)]
[3.12] bpo-40944: Fix IndexError when parse emails with truncated Message-ID, address, routes, etc (GH-20790) (GH-117974)
(cherry picked from commit
1aa8bbe62f27b564cf15e2aad591c62744354a4e )
Co-authored-by: Ivan Savin <acccko@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 23 Apr 2024 17:22:19 +0000 (19:22 +0200)]
[3.12] Fix typo in py_compile.rst (GH-118102) (GH-118191)
(cherry picked from commit
0d221e9a1952949465df4e737e8d3189bdd9632a )
Co-authored-by: Animesh Kumar <animesh0721@gmail.com>
Miss Islington (bot) [Tue, 23 Apr 2024 13:57:36 +0000 (15:57 +0200)]
[3.12] gh-118168: Fix Unpack interaction with builtin aliases (GH-118169) (#118178)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Tue, 23 Apr 2024 12:41:32 +0000 (14:41 +0200)]
[3.12] gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242) (GH-117508)
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
(cherry picked from commit
fc5f68e58ecfbc8c452e1c2f33a2a53d3f2d7ea2 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Tue, 23 Apr 2024 01:30:59 +0000 (03:30 +0200)]
[3.12] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118166)
gh-116741: Upgrade libexpat to 2.6.2 (GH-117296)
Upgrade libexpat to 2.6.2
(cherry picked from commit
c9829eec0883a8991ea4d319d965e123a3cf6c20 )
Co-authored-by: Seth Michael Larson <seth@python.org>
Serhiy Storchaka [Mon, 22 Apr 2024 18:59:28 +0000 (21:59 +0300)]
[3.12] gh-117968: Add tests for the part of the PyRun family of the C API (GH-117982) (GH-118011)
(cherry picked from commit
6078f2033ea15a16cf52fe8d644a95a3be72d2e3 )
Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Mon, 22 Apr 2024 15:04:11 +0000 (17:04 +0200)]
[3.12] gh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing.rst` (GH-118154) (#118155)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Miss Islington (bot) [Mon, 22 Apr 2024 13:43:34 +0000 (15:43 +0200)]
[3.12] gh-118148: Improve tests for shutil.make_archive() (GH-118149) (GH-118151)
(cherry picked from commit
287d939ed4445089e8312ab44110cbb6b6306a5c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 22 Apr 2024 10:34:48 +0000 (12:34 +0200)]
[3.12] gh-115986 Improve pprint documentation accuracy (GH-117403) (#118146)
(cherry picked from commit
ceb6038b053c403bed3ca3a8bd17b7e3fc9aab7d )
Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Mon, 22 Apr 2024 06:58:41 +0000 (08:58 +0200)]
[3.12] gh-117995: Don't raise DeprecationWarnings for indexed nameless params (GH-118001) (#118142)
Filter out '?NNN' placeholders when looking for named params.
(cherry picked from commit
550483b7e6c54b2a25d4db0c4ca41bd9c1132f93 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Sun, 21 Apr 2024 18:10:15 +0000 (20:10 +0200)]
[3.12] Docs: replace Harry Potter reference with Monty Python (GH-118130) (#118135)
Docs: replace Harry Potter reference with Monty Python (GH-118130)
(cherry picked from commit
1446024124fb98c3051199760380685f8a2fd127 )
Co-authored-by: Clément Robert <cr52@protonmail.com>
Nikita Sobolev [Sun, 21 Apr 2024 07:41:54 +0000 (10:41 +0300)]
[3.12] gh-118121: Fix `test_doctest.test_look_in_unwrapped` (#118122) (#118129)
Miss Islington (bot) [Sun, 21 Apr 2024 01:50:01 +0000 (03:50 +0200)]
[3.12] Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (GH-114009) (#118128)
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (GH-114009)
(cherry picked from commit
1558d993166636f371c1003107ec979db6744f21 )
Co-authored-by: Quazi Irfan <quazirfan@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 22:53:18 +0000 (00:53 +0200)]
[3.12] GH-115874: Fix segfault in FutureIter_dealloc (GH-118114)
GH-115874: Fix segfault in FutureIter_dealloc (GH-117741)
(cherry picked from commit
d8f350309ded3130c43f0d2809dcb8ec13112320 )
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 18:34:55 +0000 (20:34 +0200)]
[3.12] gh-118100: Improve links in `ast.rst` (GH-118101) (#118110)
gh-118100: Improve links in `ast.rst` (GH-118101)
(cherry picked from commit
2aa11cca115add03f39cb6cd7299135ecf4d4d82 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Alex Waygood [Fri, 19 Apr 2024 13:41:28 +0000 (14:41 +0100)]
[3.12] gh-114053: Fix bad interaction of PEP-695, PEP-563 and ``get_type_hints`` (#118009) (#118104)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 11:44:59 +0000 (13:44 +0200)]
[3.12] gh-88035: update doc-string of `epoch` in timemodule.c (GH-118076) (GH-118097)
Follow GH-88035, update doc-string of epoch in timemodule.c
The epoch is `January 1st, 1970 on all platforms`, according to
current documentation.
(cherry picked from commit
7c6cc00211772cc2afe0bc5e996b6d28f925d133 )
Co-authored-by: lit <litlighilit@foxmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 11:23:26 +0000 (13:23 +0200)]
[3.12] gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384) (GH-118046)
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384)
The implementation uses 'ptr' for the name of the first parameter of
ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings
with the naming used in the implementation.
(cherry picked from commit
81a926bd20a8c66646e51b66ef1cfb309b73ebe7 )
Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 09:44:19 +0000 (11:44 +0200)]
[3.12] gh-116935: Document that heap types need to support garbage collection (GH-118021) (GH-118092)
gh-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit
5d544365742a117027747306e2d4473f3b73d921 )
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Miss Islington (bot) [Fri, 19 Apr 2024 08:57:51 +0000 (10:57 +0200)]
[3.12] gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920) (#118087)
gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)
(cherry picked from commit
4605a197bd84da1a232bd835d8e8e654f2fef220 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 19 Apr 2024 05:42:35 +0000 (07:42 +0200)]
[3.12] gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333) (#118080)
gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333)
Thanks Davin Potts for the clarification idea.
(cherry picked from commit
fefd5d97111364afa027ae580c3244f427dda59d )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Tian Gao [Fri, 19 Apr 2024 04:07:05 +0000 (21:07 -0700)]
[3.12] gh-117535: Ignore made up file name "sys" for warnings (#118014)
Miss Islington (bot) [Fri, 19 Apr 2024 03:34:56 +0000 (05:34 +0200)]
[3.12] Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (GH-118070) (#118078)
Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (GH-118070)
(cherry picked from commit
398abdd6fa5b6b15c0570c75321cd7df9573a5b7 )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Miss Islington (bot) [Thu, 18 Apr 2024 17:17:05 +0000 (19:17 +0200)]
[3.12] gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056) (GH-118058)
(cherry picked from commit
ccdcd1d95a9d6eda4df86811c4539f204beef817 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 18 Apr 2024 12:24:43 +0000 (14:24 +0200)]
[3.12] gh-116932: Remove redundant NEWS entry (GH-118040) (#118041)
Co-authored-by: lyc8503 <me@lyc8503.site>
Miss Islington (bot) [Thu, 18 Apr 2024 11:40:05 +0000 (13:40 +0200)]
[3.12] Doc: Render version/language selector on Read the Docs (GH-116966) (#118038)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Miss Islington (bot) [Thu, 18 Apr 2024 08:52:09 +0000 (10:52 +0200)]
[3.12] gh-116932: Add note on how to report python documentation theme bugs (GH-117989) (GH-118031)
gh-116932: Add note on how to report python documentation theme bugs (GH-117989)
(cherry picked from commit
468b9aeb922470c26275ce7dda1e6d570a3323f3 )
Co-authored-by: lyc8503 <me@lyc8503.site>
neonene [Wed, 17 Apr 2024 21:11:17 +0000 (06:11 +0900)]
[3.12] gh-117613: Argument Clinic: ensure that defining class params are positional-only (#117939)
Mariusz Felisiak [Wed, 17 Apr 2024 19:23:58 +0000 (21:23 +0200)]
[3.12] gh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445) (#118008)
(cherry picked from commit
de0dc68b8263da4e3e69d517f303b9b08b36f142 )
Miss Islington (bot) [Wed, 17 Apr 2024 18:44:38 +0000 (20:44 +0200)]
[3.12] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (#118002)
gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)
(cherry picked from commit
a4b44d39cd6941cc03590fee7538776728bdfd0a )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Wed, 17 Apr 2024 16:59:35 +0000 (18:59 +0200)]
[3.12] gh-80361: Fix TypeError in email.Message.get_payload() (GH-117994) (GH-117998)
It was raised when the charset is rfc2231 encoded, e.g.:
Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8
(cherry picked from commit
deaecb88fa5da68cbffca413c63af95fd99578dd )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 17 Apr 2024 15:05:35 +0000 (17:05 +0200)]
[3.12] gh-117977: Amend version changed annotation for os.chmod, os.chown, and os.listdir (GH-117978) (#117992)
(cherry picked from commit
fccedbda9316d52d93b2db855c07f947fab26ae2 )
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Miss Islington (bot) [Wed, 17 Apr 2024 13:48:09 +0000 (15:48 +0200)]
[3.12] gh-117975: Ensure flush level is checked when configuring a logging MemoryHandler. (GH-117976) (GH-117986)
(cherry picked from commit
6d0bb43232dd6ebc5245daa4fe29f07f815f0bad )
Miss Islington (bot) [Wed, 17 Apr 2024 12:27:03 +0000 (14:27 +0200)]
[3.12] gh-115009: Update macOS installer to use SQLite 3.45.3 (GH-117443) (#117981)
(cherry picked from commit
b9b3c455f0293be67a762f653bd22f864d15fe3c )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Wed, 17 Apr 2024 12:13:21 +0000 (14:13 +0200)]
[3.12] gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919) (GH-117962)
Now it is set even if the C implementation is used.
Also add a one-line synopsis.
(cherry picked from commit
c69968ff69b59b27d43708379e4399f424f92075 )
Miss Islington (bot) [Wed, 17 Apr 2024 10:48:56 +0000 (12:48 +0200)]
[3.12] gh-117313: Fix re-folding email messages containing non-standard line separators (GH-117369) (GH-117971)
Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email
messages. Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e'
and Unicode line separators '\x85', '\u2028' and '\u2029' as is.
(cherry picked from commit
aec1dac4efe36a7db51f08385ddcce978814dbe3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Wed, 17 Apr 2024 10:43:37 +0000 (13:43 +0300)]
[3.12] gh-117503: Fix support of non-ASCII user names in posixpath.expanduser() (GH-117504) (GH-117970)
They are now supported in bytes paths as well as in string paths.
(cherry picked from commit
51132da0c4dac13500d9bb86b2fdad42091d3fd9 )
Miss Islington (bot) [Wed, 17 Apr 2024 10:28:55 +0000 (12:28 +0200)]
[3.12] gh-73231: Update documentation for PyErr_SetFromWindowsErr() (GH-117226) (GH-117973)
(cherry picked from commit
438b7c3071eebaccd1ba215f15a239345b22f813 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 17 Apr 2024 10:15:22 +0000 (12:15 +0200)]
[3.12] gh-117879: Fix test_httpservers for the build with profiling (GH-117932) (GH-117969)
(cherry picked from commit
8429b4565deaef7a86bffc0ce58bc0eab1d7ae48 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 17 Apr 2024 08:03:12 +0000 (10:03 +0200)]
[3.12] gh-86650: Fix IndexError when parse emails with invalid Message-ID (GH-117934) (GH-117965)
In particularly, one-off addresses generated by Microsoft Outlook:
https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/one-off-addresses
(cherry picked from commit
f74e51229c83e3265f905dc15283bfe0ec1a659e )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: fsc-eriker <72394365+fsc-eriker@users.noreply.github.com>
Miss Islington (bot) [Wed, 17 Apr 2024 07:55:11 +0000 (09:55 +0200)]
[3.12] gh-75171: Fix parsing invalid email address headers starting or ending with a dot (GH-15600) (GH-117964)
(cherry picked from commit
8cc9adbfddc8e37cf7d621b12754eecb0584f5da )
Co-authored-by: tsufeki <tsufeki@ymail.com>
Co-authored-by: Tim Bell <timothybell@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 16 Apr 2024 23:02:13 +0000 (01:02 +0200)]
[3.12] gh-117945: Fix `os.path.ismount()` documentation (GH-117947) (#117952)
gh-117945: Fix `os.path.ismount()` documentation (GH-117947)
(cherry picked from commit
a23fa3368e50866f31d6fc1c66a9a5ca2a580239 )
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Miss Islington (bot) [Tue, 16 Apr 2024 22:20:47 +0000 (00:20 +0200)]
gh-112844: Fix xz CPE identifier (GH-117656)
(cherry picked from commit
d70ee13e575ae4832f2824add64dba77ce5ab7ad )
Co-authored-by: Seth Michael Larson <seth@python.org>
Miss Islington (bot) [Tue, 16 Apr 2024 16:29:52 +0000 (18:29 +0200)]
[3.12] Docs: Add classes to C API return value annotations (GH-117926) (#117937)
Docs: Add classes to C API return value annotations (GH-117926)
(cherry picked from commit
3284b84c437e3b0b0a052471e8a6aabc528fc651 )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 16 Apr 2024 11:54:01 +0000 (13:54 +0200)]
[3.12] gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872) (GH-117930)
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872)
(cherry picked from commit
cff0a2db00b6379f60fe273a9782f71773d0a4cb )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Inada Naoki [Tue, 16 Apr 2024 09:51:06 +0000 (18:51 +0900)]
gh-77102: site: try utf-8 and locale encoding when reading .pth file (GH-117802)
(cherry picked from commit
6dc661bc9f65e9923eafbcdbf18bcc57eebbf6a4 )
Miss Islington (bot) [Tue, 16 Apr 2024 09:50:10 +0000 (11:50 +0200)]
[3.12] gh-117797: Improve `test_descr.test_not_implemented` (GH-117798) (#117921)
gh-117797: Improve `test_descr.test_not_implemented` (GH-117798)
(cherry picked from commit
1a1e013a4a526546c373afd887f2e25eecc984ad )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 15 Apr 2024 21:24:35 +0000 (23:24 +0200)]
[3.12] gh-117804: Document how to suppress PGO unprofiled source warnings (GH-117859) (#117912)
(cherry picked from commit
757891ee8ad61a864444c1fdb764d81bc8a11189 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Hugo van Kemenade [Mon, 15 Apr 2024 19:18:21 +0000 (22:18 +0300)]
[3.12] Docs: add link roles with Sphinx extlinks (GH-117850) (#117910)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Mon, 15 Apr 2024 16:55:04 +0000 (18:55 +0200)]
[3.12] Docs: make the `whatsnew-typing-py312` anchor point to things that were new in the typing module (GH-117904) (#117905)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Steve Dower [Mon, 15 Apr 2024 15:43:41 +0000 (16:43 +0100)]
gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817)
Steve Dower [Mon, 15 Apr 2024 15:43:28 +0000 (16:43 +0100)]
gh-112278: Improve error handling in wmi module and tests (GH-117818)
Serhiy Storchaka [Mon, 15 Apr 2024 15:15:43 +0000 (18:15 +0300)]
[3.12] gh-115664: Reorganize versionadded directives for -X options (GH-116304) (GH-117900)
Add the versionadded directives just under the description of the
corresponding option.
(cherry picked from commit
10f1a2687a080f07bc128e185c854586207f08cf )
Nice Zombies [Mon, 15 Apr 2024 14:49:44 +0000 (16:49 +0200)]
[3.12] gh-117114: Update os.path function availability and link to genericpath.py in os.path.rst (GH-117756)
Miss Islington (bot) [Mon, 15 Apr 2024 14:15:30 +0000 (16:15 +0200)]
[3.12] gh-117889: Fix PGO test in test_peg_generator (GH-117893) (#117895)
Reuse support.check_cflags_pgo() in test_peg_generator to check for
PGO build.
Log PGO_PROF_USE_FLAG in test.pythoninfo.
(cherry picked from commit
64cd6fc9a6a3c3c19091a1c81cbbe8994583017d )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 15 Apr 2024 12:59:34 +0000 (14:59 +0200)]
[3.12] gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568) (GH-117890)
gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568)
(cherry picked from commit
3de09cadde788065a4f2d45117e789c9353bbd12 )
Co-authored-by: Steve (Gadget) Barnes <gadgetsteve@hotmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>