]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Wed, 4 Jan 2023 15:40:06 +0000 (07:40 -0800)]
docs: fix `ssizeobjargproc` parameters (GH-100736)
(cherry picked from commit
5fb1c08e15b864d8ea9353a0e013166e2e0e2160 )
Co-authored-by: David Lechner <david@lechnology.com>
Miss Islington (bot) [Wed, 4 Jan 2023 08:28:00 +0000 (00:28 -0800)]
GH-86508: skip binding to local addresses of different family in `asyncio.open_connection` (GH-100615)
(cherry picked from commit
ba8dcdbcab5fd9989be6c9a51002394e782c463c )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Eli Schwartz [Wed, 4 Jan 2023 07:59:21 +0000 (02:59 -0500)]
[3.11] gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611) (#100738)
gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611)
```
Unable to read information on python frame
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'co_name'
```
Regression in commit
b4903afd4debbbd71dc49a2c8fefa74a3b6c6832 . While
refactoring the code into a while loop, the previous early return when
no frame exists went missing. We have just printed a message that we
cannot get information about this, so the frame will be None, and we
cannot attempt to use it.
Discovered on python 3.11, in python 3.12a2 this should error out with
`.is_shim()` instead of `co_name`.
(cherry picked from commit
85869498331f7020e18bb243c89cd694f674b911 )
Zachary Ware [Tue, 3 Jan 2023 22:51:36 +0000 (16:51 -0600)]
[3.11] Docs: Fix the Show Source link (GH-100733)
See also python/release-tools#10
Miss Islington (bot) [Tue, 3 Jan 2023 22:27:38 +0000 (14:27 -0800)]
[Enum] docs: replace 'last value' by 'highest value' for Flag auto (GH-100709)
(cherry picked from commit
64ed609c532a12b27f67a1e12e9e02f136ee3a94 )
Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
Zachary Ware [Tue, 3 Jan 2023 22:10:57 +0000 (16:10 -0600)]
gh-100700: Remove Date and Release fields in past whatsnews (GH-100729)
Miss Islington (bot) [Tue, 3 Jan 2023 17:59:40 +0000 (09:59 -0800)]
[3.11] gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (GH-100663) (#100717)
gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (GH-100663)
Fixes behaviour where int (and subtypes like bool) __sizeof__ under-reports true size as it did not take into account the size 1 `ob_digit` array for the zero int.
(cherry picked from commit
d7e7f79ca7c2029e46a06d21a7a5abea631b5d13 )
Co-authored-by: Ionite <dev@ionite.io>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Miss Islington (bot) [Tue, 3 Jan 2023 16:18:45 +0000 (08:18 -0800)]
gh-95882: fix regression in the traceback of exceptions propagated from inside a contextlib context manager (GH-95883)
(cherry picked from commit
b3722ca058f6a6d6505cf2ea9ffabaf7fb6b6e19 )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Miss Islington (bot) [Mon, 2 Jan 2023 11:57:51 +0000 (03:57 -0800)]
fix `grammer` -> `grammar` typo in expressions.rst (GH-100683)
(cherry picked from commit
7feb6d2f85d69fbabfc0598d8947124883167f12 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Automerge-Triggered-By: GH:AlexWaygood
Miss Islington (bot) [Mon, 2 Jan 2023 11:21:20 +0000 (03:21 -0800)]
Fix deprecation doc for `PyEval_InitThreads` (GH-100667)
(cherry picked from commit
254ab42240e0b18caedd4d5c3f45440bdaebf157 )
Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
Miss Islington (bot) [Mon, 2 Jan 2023 03:21:58 +0000 (19:21 -0800)]
gh-100428: Make int documentation more accurate (GH-100436)
- Remove first link to lexical definition of integer literal, since it
doesn't apply (differs in handling of leading zeros, base needs to be
explicitly specified, unicode digits are allowed)
- Better describe handling of leading zeros, unicode digits, underscores
- Base 0 does not work exactly as like a code literal, since it allows
Unicode digits. Link code literal to lexical definition of integer
literal.
(cherry picked from commit
edfbf56f4ca6588dfd20b53f534a4465e43c82bd )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 1 Jan 2023 22:35:39 +0000 (14:35 -0800)]
gh-99953: Purge mention of numeric param style from sqlite3 docs (GH-100630)
The PEP-249 numeric style has never been supported by sqlite3.
(cherry picked from commit
b7a68ab824249ebf053b8149ebb83cd8578781c9 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 1 Jan 2023 15:44:27 +0000 (07:44 -0800)]
gh-100201: Document behavior with a bare `yield` statement (GH-100416)
(cherry picked from commit
1aab269d4acbf0b29573ad0a21c54fddee233243 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Sun, 1 Jan 2023 15:13:50 +0000 (07:13 -0800)]
gh-96773 Fix documentation of socket backlog (GH-96778)
(cherry picked from commit
1d1480fefc6ae77d14d6eff007b180ff5d1cd5d4 )
Co-authored-by: Mehrdad Moradizadeh <mhrddmoradii@gmail.com>
Miss Islington (bot) [Sun, 1 Jan 2023 14:50:56 +0000 (06:50 -0800)]
gh-100649: Update native_thread_id after fork (gh-100650)
Update native_thread_id after fork
(cherry picked from commit
d52d4942cfdd52a50f88b87b1ff2a67375dbcf47 )
Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
Miss Islington (bot) [Sun, 1 Jan 2023 01:06:31 +0000 (17:06 -0800)]
gh-100546: Remove incorrect positional-only marker from eval (GH-100547)
All the arguments are positional-only.
The current status after GH-99476 seems to be to not use positional-only
markers in documentation, hence I've simply removed it.
(cherry picked from commit
71159a8e078bda0c9a39c6cd0980b7ba238dc582 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 1 Jan 2023 00:31:53 +0000 (16:31 -0800)]
IDLE - fix module browser test (GH-100647)
(cherry picked from commit
1f6c87ca7b9351b2e5c5363504796fce0554c9b8 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 31 Dec 2022 12:28:59 +0000 (04:28 -0800)]
gh-100633 Tutorial: Fix dataclasses import (GH-100638)
import dataclass not dataclasses from dataclasses
(cherry picked from commit
98308dbeb110198ebe28bdb7720d3671b3e7f57b )
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Miss Islington (bot) [Sat, 31 Dec 2022 06:34:12 +0000 (22:34 -0800)]
GH-85979: Clarify specification of `object.__await__` (GH-22320)
(cherry picked from commit
f59c7f8edd5ba5f6c1954383542a2292bcf51d91 )
Co-authored-by: Paolo Lammens <lammenspaolo@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Sat, 31 Dec 2022 04:23:39 +0000 (20:23 -0800)]
[3.11] Improve comments in itertools uniquification recipes (GH-100631) (GH-100632)
Miss Islington (bot) [Fri, 30 Dec 2022 21:51:06 +0000 (13:51 -0800)]
gh-95778: add doc missing in some places (GH-100627)
(cherry picked from commit
46521826cb1883e29e4640f94089dd92c57efc5b )
Co-authored-by: Éric <earaujo@caravan.coop>
Miss Islington (bot) [Fri, 30 Dec 2022 17:05:49 +0000 (09:05 -0800)]
gh-100616: Document 'attr' parameter for window.vline() in curses module (GH-24961)
(cherry picked from commit
f4fcfdf8c593611f98b9358cc0c5604c15306465 )
Co-authored-by: mathieui <mathieui@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Miss Islington (bot) [Fri, 30 Dec 2022 12:18:54 +0000 (04:18 -0800)]
gh-99433: Fix `doctest` failure on `types.MethodWrapperType` (GH-99434)
(cherry picked from commit
79c10b7da84f52999dc483fc62c8e758ad3eff23 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Thu, 29 Dec 2022 15:41:34 +0000 (07:41 -0800)]
gh-100600: Fix "coroutine was never awaited" warning in `test_coroutines` (GH-100601)
(cherry picked from commit
76856366d3ece34c3e738f7167329e97bbf52b34 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Thu, 29 Dec 2022 15:24:11 +0000 (07:24 -0800)]
gh-100583: Improve the `pydoc` documentation (GH-100590)
(cherry picked from commit
7223d50b9785bc7b0cd76dcc68d97dabcbade4b6 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Miss Islington (bot) [Wed, 28 Dec 2022 21:32:19 +0000 (13:32 -0800)]
GH-100101: Clarify documentation of zip's strict option (GH-100103)
(cherry picked from commit
cf1c09818032df3080c2cd9e7edb5f657213dc83 )
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
Miss Islington (bot) [Wed, 28 Dec 2022 20:37:58 +0000 (12:37 -0800)]
Restore early-out to factor(). Strengthen tests. (GH-100591)
(cherry picked from commit
c4c5790120beabed83ce5855f18d209ab8324434 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Wed, 28 Dec 2022 11:22:11 +0000 (03:22 -0800)]
Improve factor() recipe and fix its tests (GH-100576)
(cherry picked from commit
2d524068351a33feafa905becc148f3447697e92 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Wed, 28 Dec 2022 05:45:45 +0000 (21:45 -0800)]
gh-55688: Add note about ending backslashes for raw strings (GH-94768)
(cherry picked from commit
b95b1b3b25b0a93a22c7d58ac5bd5870e62070a8 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
Kumar Aditya [Wed, 28 Dec 2022 04:41:27 +0000 (10:11 +0530)]
[3.11] GH-100342: check for allocation failure in AC `*args` parsing (GH-100343). (#100568)
(cherry picked from commit
7cf164ad5e3c8c6af5ae8813ad6a784448605418 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Wed, 28 Dec 2022 01:25:28 +0000 (17:25 -0800)]
gh-100553: Improve accuracy of sqlite3.Row iter test (GH-100555)
(cherry picked from commit
3dc48dabd48864039951715816e07986a4828d80 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
colorfulappl [Wed, 28 Dec 2022 01:10:06 +0000 (09:10 +0800)]
[3.11] gh-64490: Fix bugs in argument clinic varargs processing (GH-32092) (#100368)
(cherry picked from commit
0da728387c99fe6c127b070f2d250dc5bdd62ee5 )
Miss Islington (bot) [Mon, 26 Dec 2022 15:43:11 +0000 (07:43 -0800)]
[3.11] gh-100520: Fix `rst` markup in `configparser` docstrings (GH-100524) (#100533)
gh-100520: Fix `rst` markup in `configparser` docstrings (GH-100524)
(cherry picked from commit
199507b81a302ea19f93593965b1e5088195a6c5 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Shantanu [Mon, 26 Dec 2022 07:09:06 +0000 (01:09 -0600)]
[3.11] gh-92446: Improve argparse choices docs (GH-94627) (#100528)
Based on the definition of the collections.abc classes, it is more accurate to use "sequence" instead of "container" when describing argparse choices.
(cherry picked from commit
ad3c99e521 )
Co-authored-by: Guy Yagev <yourlefthandman8@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Shantanu [Sat, 24 Dec 2022 20:39:19 +0000 (14:39 -0600)]
[3.11] gh-100287: Fix unittest.mock.seal with AsyncMock (GH-100496) (#100506)
(cherry picked from commit
e4b43ebb3afbd231a4e5630e7e358aa3093f8677 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sat, 24 Dec 2022 20:31:10 +0000 (12:31 -0800)]
gh-99535: Add test for inheritance of annotations and update documentation (GH-99990)
(cherry picked from commit
f5b7b19bf10724d831285fb04e00f763838bd555 )
Co-authored-by: MonadChains <monadchains@gmail.com>
Miss Islington (bot) [Sat, 24 Dec 2022 20:29:50 +0000 (12:29 -0800)]
gh-100472: Fix docs claim that compileall parameters could be bytes (GH-100473)
(cherry picked from commit
046cbc2080360b0b0bbe6ea7554045a6bbbd94bd )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sat, 24 Dec 2022 20:28:41 +0000 (12:28 -0800)]
[3.11] gh-100474: Fix handling of dirs named index.html in http.server (GH-100505)
Co-authored-by: James Frost <git@frost.cx>
Miss Islington (bot) [Sat, 24 Dec 2022 20:26:11 +0000 (12:26 -0800)]
[Minor PR] Quotes in documentation changed into code blocks (GH-99536)
Minor formatting fix in documentation
(cherry picked from commit
efccd04b9efc1752a845b377399d2068b06d04e7 )
Co-authored-by: Bart Broere <mail@bartbroere.eu>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sat, 24 Dec 2022 20:25:34 +0000 (12:25 -0800)]
GH-93179: Document the thread safety of functools.lru_cache (GH-95970)
(cherry picked from commit
ba4bb7e4649be99d5d6b4151a1bd2eac89ef97f2 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Sat, 24 Dec 2022 20:18:40 +0000 (12:18 -0800)]
gh-100428: Make float documentation more accurate (GH-100437)
Previously, the grammar did not accept `float("10")`.
Also implement mdickinson's suggestion of removing the indirection.
(cherry picked from commit
2e1a9ce9890aba748a518a39d01d1ea6d623d0d9 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Gregory P. Smith [Sat, 24 Dec 2022 20:12:04 +0000 (12:12 -0800)]
[3.11] gh-100454: Start running SSL tests with OpenSSL 3.1.0-beta1 (#100486)
[3.11] gh-100454: Start running SSL tests with OpenSSL 3.1.0-beta1 (GH-100456).
(cherry picked from commit
a23cb72ac82372fac05ba36ce08923840ca0de06 )
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Miss Islington (bot) [Sat, 24 Dec 2022 15:32:00 +0000 (07:32 -0800)]
gh-99908: Tutorial: Modernize the 'data-record class' example (GH-100499)
(cherry picked from commit
00afa5066bd45348ed82a38d3442763b2ed1a068 )
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sat, 24 Dec 2022 08:31:36 +0000 (00:31 -0800)]
Misc Itertools recipe tweaks (GH-100493)
(cherry picked from commit
0769f957514300a75be51fc6d1b963c8e359208b )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Bill Fisher [Sat, 24 Dec 2022 05:47:10 +0000 (22:47 -0700)]
[3.11] gh-99110: Initialize frame->previous in init_frame to fix segmentation fault (GH-100182) (#100478)
(cherry picked from commit
88d565f32a709140664444c6dea20ecd35a10e94 )
Co-authored-by: Bill Fisher <william.w.fisher@gmail.com>
Miss Islington (bot) [Sat, 24 Dec 2022 05:31:18 +0000 (21:31 -0800)]
gh-77771: Add enterabs example in sched (GH-92716)
(cherry picked from commit
0f6420640c0f3462e6b76b01a392844676de1fb9 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sat, 24 Dec 2022 02:14:08 +0000 (18:14 -0800)]
gh-94808: improve test coverage of number formatting (GH-99472)
(cherry picked from commit
7ca45e5ddd493411e61706d07679ea54b954e41b )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Gregory P. Smith [Sat, 24 Dec 2022 02:07:50 +0000 (18:07 -0800)]
[3.11] Correct CVE-2020-10735 documentation (GH-100306). (#100476)
(cherry picked from commit
1cf3d78c92eb07dc09d15cc2e773b0b1b9436825 )
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
Miss Islington (bot) [Sat, 24 Dec 2022 00:00:21 +0000 (16:00 -0800)]
Add "strict" to dotproduct(). Add docstring. Factor-out common code. (GH-100480)
(cherry picked from commit
f89de679ffec35e82548341cb23e675546602288 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Fri, 23 Dec 2022 20:43:13 +0000 (12:43 -0800)]
bpo-40447: accept all path-like objects in compileall.compile_file (GH-19883)
(cherry picked from commit
1ecfd1ebf1f53ef6ac82085b25ed09952b470d4e )
Co-authored-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Filipe Laíns <lains@archlinux.org>
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Fri, 23 Dec 2022 15:08:11 +0000 (07:08 -0800)]
gh-98712: Clarify "readonly bytes-like object" semantics in C arg-parsing docs (GH-98710)
(cherry picked from commit
49f6ff719c4e0beeafd6c42edd696601acf72764 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Fri, 23 Dec 2022 08:56:20 +0000 (00:56 -0800)]
[3.11] gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) (GH-100452)
gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576)
The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero.
(cherry picked from commit
84bc6a4f25fcf467813ee12b74118f7b1b54e285 )
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Miss Islington (bot) [Thu, 22 Dec 2022 23:30:12 +0000 (15:30 -0800)]
gh-48496: Added example and link to faq for UnboundLocalError in reference (GH-93068)
(cherry picked from commit
f3db68e6e66ebb36e1b9cb30daba913ecc736169 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Miss Islington (bot) [Thu, 22 Dec 2022 23:01:38 +0000 (15:01 -0800)]
gh-57762: fix misleading tkinter.Tk docstring (GH-98837)
Mentioned as a desired change by terryjreedy on the corresponding issue,
since Tk is not a subclass of Toplevel.
(cherry picked from commit
ad23da0e77c4c4a3185df64d1c199b8c17e08188 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Thu, 22 Dec 2022 11:49:18 +0000 (03:49 -0800)]
Correct typo in typing.py (GH-100423)
In the docstring of `ParamSpec`, the name of `P = ParamSpec('P')` was
mistakenly written as `'T'`.
(cherry picked from commit
68981578eceee763da4163e93cf653cc6b1b6d35 )
Co-authored-by: david-why <david_why@outlook.com>
Miss Islington (bot) [Wed, 21 Dec 2022 18:02:05 +0000 (10:02 -0800)]
gh-78878: Fix crash when creating an instance of `_ctypes.CField` (GH-14837)
(cherry picked from commit
d713c54ac8a2eba0616a5a07714696d935f1062e )
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Miss Islington (bot) [Wed, 21 Dec 2022 14:58:20 +0000 (06:58 -0800)]
gh-100129: Add tests for pickling all builtin types and functions (GH-100142)
(cherry picked from commit
b98d2d31bffcaeb0c4c8848a8d1b35419c70b2da )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 21 Dec 2022 14:06:10 +0000 (06:06 -0800)]
gh-100374: Fixed a bug in socket.getfqdn() (gh-100375)
(cherry picked from commit
12be23cf3c1301be2c6b8fd4cb2cd35a567d2ea2 )
Co-authored-by: Dominic Socular <BBH@awsl.rip>
Miss Islington (bot) [Wed, 21 Dec 2022 10:24:19 +0000 (02:24 -0800)]
GH-100133: fix `asyncio` subprocess losing `stderr` and `stdout` output (GH-100154)
(cherry picked from commit
a7715ccfba5b86ab09f86ec56ac3755c93b46b48 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
colorfulappl [Wed, 21 Dec 2022 10:02:29 +0000 (18:02 +0800)]
[3.11] gh-99240: Reset pointer to NULL when the pointed memory is freed in argument parsing (GH-99890) (#100385)
(cherry picked from commit
efbb1eb9f54cad4f7bf5df03eed3a6aba02d99f4 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Shantanu [Wed, 21 Dec 2022 05:25:13 +0000 (23:25 -0600)]
[3.11] gh-85267: Improvements to inspect.signature __text_signature__ handling (GH-98796) (#100392)
This makes a couple related changes to inspect.signature's behaviour
when parsing a signature from `__text_signature__`.
First, `inspect.signature` is documented as only raising ValueError or
TypeError. However, in some cases, we could raise RuntimeError. This PR
changes that, thereby fixing GH-83685.
(Note that the new ValueErrors in RewriteSymbolics are caught and then
reraised with a message)
Second, `inspect.signature` could randomly drop parameters that it
didn't understand (corresponding to `return None` in the `p` function).
This is the core issue in GH-85267. I think this is very surprising
behaviour and it seems better to fail outright.
Third, adding this new failure broke a couple tests. To fix them (and to
e.g. allow `inspect.signature(select.epoll.register)` as in GH-85267), I
add constant folding of a couple binary operations to RewriteSymbolics.
(There's some discussion of making signature expression evaluation
arbitrary powerful in GH-68155. I think that's out of scope. The
additional constant folding here is pretty straightforward, useful, and
not much of a slippery slope)
Fourth, while GH-85267 is incorrect about the cause of the issue, it turns
out if you had consecutive newlines in __text_signature__, you'd get
`tokenize.TokenError`.
Finally, the `if name is invalid:` code path was dead, since
`parse_name` never returned `invalid`..
(cherry picked from commit
79311cbfe718f17c89bab67d7f89da3931bfa2ac )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Wed, 21 Dec 2022 03:34:17 +0000 (19:34 -0800)]
gh-91081: Add note on WeakKeyDictionary behavior when deleting a replaced entry (GH-91499)
(cherry picked from commit
c615286e8576f2555d4380f38a966c300805b1a5 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <P.T.eendebak@tudelft.nl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Wed, 21 Dec 2022 02:12:53 +0000 (18:12 -0800)]
gh-99991: improve docs on str.encode and bytes.decode (GH-100198)
(cherry picked from commit
a2bb3b7f9d8d15c81b724726454d68357fb31d1c )
Co-authored-by: Bisola Olasehinde <horlasehinde@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Tue, 20 Dec 2022 17:22:39 +0000 (09:22 -0800)]
[3.11] gh-99576: Fix cookiejar file that was not truncated for some classes (GH-99616) (GH-100377)
(cherry picked from commit
44892d45b038f919b0378590a776580a9d73b291 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Tue, 20 Dec 2022 11:44:55 +0000 (03:44 -0800)]
Clarify that every thread has its own default context in contextvars (GH-99246)
(cherry picked from commit
cb60b6131bc2bb11c48a15f808914d8b242b9fc5 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
colorfulappl [Tue, 20 Dec 2022 10:19:53 +0000 (18:19 +0800)]
[3.11] gh-99240: Fix double-free bug in Argument Clinic str_converter generated code (GH-99241) (#100352)
(cherry picked from commit
8dbe08eb7c807f484fe9870f5b7f5ae2881fd966 )
Fix double-free bug mentioned at GH-99240, by moving memory clean up out of "exit" label.
Miss Islington (bot) [Tue, 20 Dec 2022 03:14:52 +0000 (19:14 -0800)]
gh-69929: re docs: Add more specific definition of \w (GH-92015)
(cherry picked from commit
36a0b1d0dddbdf324d98071ea31e7e9151eea6d5 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
colorfulappl [Mon, 19 Dec 2022 09:48:49 +0000 (17:48 +0800)]
[3.11] gh-64490: Fix refcount error when arguments are packed to tuple in argument clinic (GH-99233) (#100338)
(cherry picked from commit
69f6cc77d0f1664f983a83b6ae707d99a99f5c4f )
Raymond Hettinger [Sun, 18 Dec 2022 01:10:03 +0000 (19:10 -0600)]
[3.11] GH-98363: Update batched() recipe in docs to match 3.12 (#100323)
Miss Islington (bot) [Sat, 17 Dec 2022 07:49:49 +0000 (23:49 -0800)]
Docs: Use `PY_VERSION_HEX` for version comparison (GH-100179)
(cherry picked from commit
0264f634f720fbf12afaf1715a53cd1495fbd85b )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sat, 17 Dec 2022 07:19:45 +0000 (23:19 -0800)]
gh-97909: Fix markup for `PyMethodDef` members (GH-100089)
(cherry picked from commit
8edcb30c3f8bdd8099a093146fedbd9b63a3f667 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Miss Islington (bot) [Sat, 17 Dec 2022 06:54:33 +0000 (22:54 -0800)]
Document that zipfile's pwd parameter is a `bytes` object (GH-100209)
(cherry picked from commit
5ee7eb9debb12914f36c5ccee92460a681516fd6 )
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
colorfulappl [Sat, 17 Dec 2022 06:34:54 +0000 (14:34 +0800)]
[3.11] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100230)
(cherry picked from commit
c450c8c9ed6e420025f39d0e4850a79f8160cdcd )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 16 Dec 2022 19:14:28 +0000 (11:14 -0800)]
gh-99830: asyncio: Document returns of remove_{reader,writer} (GH-100302)
(cherry picked from commit
5234e1cbea686e38392f113707db322ad8405048 )
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Miss Islington (bot) [Fri, 16 Dec 2022 19:01:24 +0000 (11:01 -0800)]
[3.11] "Compound statement" docs: Fix with-statement step indexing (GH-100286) (GH-100300)
Back in commit
226e6e7d4326cf91ef37e13528eb1f62de1bb832
an item was added to the list, renumbering all the rest of the
items, but the forward-reference wasn't updated to match.
(cherry picked from commit
f23236a92d8796ae91772adaf27c3485fda963e8 )
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Miss Islington (bot) [Thu, 15 Dec 2022 18:47:58 +0000 (10:47 -0800)]
[3.11] Remove uninformative itertools recipe (GH-100253) (GH-100275)
Miss Islington (bot) [Wed, 14 Dec 2022 17:07:36 +0000 (09:07 -0800)]
gh-100248: Add missing `ssl_shutdown_timeout` parameter in `asyncio` docs (GH-100249)
(cherry picked from commit
96638538002fc6e209755c06f613b0a59eb91166 )
Co-authored-by: busywhitespace <busywhitespace@tuta.io>
Miss Islington (bot) [Tue, 13 Dec 2022 11:02:41 +0000 (03:02 -0800)]
GH-100206: use versionadded for the addition of sysconfig.get_default_scheme (GH-100207)
(cherry picked from commit
d3ea82aaf940167482df1e08d6482de8f2dd8526 )
Co-authored-by: Filipe Laíns <lains@riseup.net>
Miss Islington (bot) [Mon, 12 Dec 2022 12:38:39 +0000 (04:38 -0800)]
Fix: typo (Indention) (GH-99904)
Example needed to be indented. Was trying to call a context manger `pr` (from ` with cProfile.Profile() as pr:`) wot perform ` pr.print_stats()` once it had already exited.
(cherry picked from commit
8711b59f7ac1803307d340e357e025043fbe2f39 )
Co-authored-by: jarrodcolburn <jcourtlandcolburn@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
Miss Islington (bot) [Mon, 12 Dec 2022 12:06:48 +0000 (04:06 -0800)]
clarify the 4300-digit limit on int-str conversion (GH-100175)
(cherry picked from commit
935ef593211a627526b2b869ce1fc2a5e67e6cdd )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Miss Islington (bot) [Mon, 12 Dec 2022 04:25:06 +0000 (20:25 -0800)]
gh-70393: Clarify mention of "middle" scope (GH-98839)
(cherry picked from commit
70be5e42f6e288de32e0df3c77ac22a9ddf1a74b )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 11 Dec 2022 23:30:25 +0000 (15:30 -0800)]
gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)
Changed from multiples of 3 to powers of 3 to match the class name.
(cherry picked from commit
868bab0fdc514cfa70ce97e484a689aee8cb5a36 )
Co-authored-by: Beweeted <Beweeted@users.noreply.github.com>
Miss Islington (bot) [Sat, 10 Dec 2022 10:29:04 +0000 (02:29 -0800)]
gh-99728: correct typo in `datetime` format codes documentation (GH-99750)
(cherry picked from commit
d5f8a2b6ad408368e728a389da918cead3ef7ee9 )
Co-authored-by: Brad Wolfe <brad.wolfe@gmail.com>
Miss Islington (bot) [Sat, 10 Dec 2022 09:23:24 +0000 (01:23 -0800)]
gh-100049: fix `repr` for `mappingproxy` in dictionary view example doc (GH-100052)
(cherry picked from commit
7c0fb71fbfa8682f56c15832e2c793a6180f2ec0 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Miss Islington (bot) [Fri, 9 Dec 2022 13:12:43 +0000 (05:12 -0800)]
bpo-43984: Allow winreg.SetValueEx to set -1 without treating it as an error (GH-25775)
(cherry picked from commit
a29a7b9b786d6b928c4bb4e6e683a3788e3ab1c1 )
Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Miss Islington (bot) [Thu, 8 Dec 2022 20:45:40 +0000 (12:45 -0800)]
gh-96250: Improve sqlite3 injection attack example (GH-99270)
(cherry picked from commit
41d4ac9da348ca33056e271d71588b2dc3a6d48d )
Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Thu, 8 Dec 2022 17:34:52 +0000 (09:34 -0800)]
Use sphinxext-opengraph to generate OpenGraph metadata (GH-99931)
(cherry picked from commit
f49c735e525cf031ddbfc19161aafac4fb18837b )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Thu, 8 Dec 2022 09:02:06 +0000 (01:02 -0800)]
[3.11] bpo-44817: Ignore additional errors in ntpath.realpath (GH-27574) (GH-100022)
(cherry picked from commit
124ecd657646f808d1d3282c37ee19aae6bcb47f )
Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>
Miss Islington (bot) [Thu, 8 Dec 2022 08:52:02 +0000 (00:52 -0800)]
test_ast uses infinite_recursion() to prevent crash (GH-100104)
test.test_ast_recursion_limit() now uses infinite_recursion() of
test.support to prevent crashes on debug builds.
Before this change, the test crashed on ARM64 Windows 3.x buildbot
worker which builds Python in debug mode.
(cherry picked from commit
cd67c1bb30eccd0c6fd1386405df225aed4c91a9 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 8 Dec 2022 07:21:29 +0000 (23:21 -0800)]
gh-100098: [Enum] insist on actual tuples, no subclasses, for auto (GH-100099)
When checking for auto() instances, only top-level usage is supported,
which means either alone or as part of a regular tuple. Other
containers, such as lists, dicts, or namedtuples, will not have auto()
transformed into a value.
(cherry picked from commit
ded02ca54d7bfa32c8eab0871d56e4547cd356eb )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Thu, 8 Dec 2022 04:17:23 +0000 (20:17 -0800)]
gh-98778: Update HTTPError to initialize properly even if fp is None (gh-99966)
(cherry picked from commit
dc8a86893df37e137cfe992e95e7d66cd68e9eaf )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Wed, 7 Dec 2022 17:26:11 +0000 (09:26 -0800)]
gh-83035: handle decorator with nested parens in inspect.getsource (GH-99654)
(cherry picked from commit
68e41295b8611a990de68f15c89f1eb3dea51867 )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Miss Islington (bot) [Wed, 7 Dec 2022 09:18:00 +0000 (01:18 -0800)]
gh-100050: Fix an assertion error when raising unclosed parenthesis errors in the tokenizer (GH-100065)
(cherry picked from commit
97e7004cfe48305bcd642c653b406dc7470e196d )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Automerge-Triggered-By: GH:pablogsal
Pablo Galindo [Tue, 6 Dec 2022 21:07:58 +0000 (21:07 +0000)]
Post 3.11.1
Pablo Galindo [Tue, 6 Dec 2022 19:04:38 +0000 (19:04 +0000)]
Python 3.11.1
Brandt Bucher [Tue, 6 Dec 2022 17:02:19 +0000 (09:02 -0800)]
[3.11] GH-99729: Unlink frames before clearing them (#100047)
Serhiy Storchaka [Tue, 6 Dec 2022 15:15:44 +0000 (17:15 +0200)]
[3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949)
It no longer emits a deprecation warning if the current event loop was set.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Tue, 6 Dec 2022 10:34:20 +0000 (02:34 -0800)]
[3.11] gh-100001: Remove doc typo, add versionadded (GH-100042) (#100043)
(cherry picked from commit
bed15f87eadc726122185cf41efcdda289f4a7b1 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 6 Dec 2022 05:46:48 +0000 (21:46 -0800)]
[Enum] Fix typos in the documentation (GH-99960)
(cherry picked from commit
2ae894b6d1995a3b9f95f4a82eec6dedd3ba5298 )
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Miss Islington (bot) [Mon, 5 Dec 2022 22:53:41 +0000 (14:53 -0800)]
gh-100001: Also escape \s in http.server log messages. (GH-100038)
Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so
that it is technically possible to parse the line and reconstruct what the
original data was. Without this a \xHH is ambiguious as to if it is a hex
replacement we put in or the characters r"\x" came through in the original
request line.
(cherry picked from commit
7e29398407dbd53b714702abb89aa2fd7baca48a )
Co-authored-by: Gregory P. Smith <greg@krypto.org>