]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
16 months ago[3.13] gh-101830: Fix Tcl_Obj to string conversion (GH-120884) (GH-120905)
Miss Islington (bot) [Sun, 23 Jun 2024 15:33:19 +0000 (17:33 +0200)] 
[3.13] gh-101830: Fix Tcl_Obj to string conversion (GH-120884) (GH-120905)

Accessing the Tkinter object's string representation no longer converts
the underlying Tcl object to a string on Windows.
(cherry picked from commit f4ddaa396715855ffbd94590f89ab7d55feeec07)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` ...
Miss Islington (bot) [Sun, 23 Jun 2024 12:58:06 +0000 (14:58 +0200)] 
[3.13] gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` (GH-120898) (#120902)

gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` (GH-120898)
(cherry picked from commit b6fa8fe86a6f4d02c263682716a91285a94024fc)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
16 months ago[3.13] gh-119003: Clarify slice assignments (GH-119935) (#120847)
Miss Islington (bot) [Sun, 23 Jun 2024 12:34:48 +0000 (14:34 +0200)] 
[3.13] gh-119003: Clarify slice assignments (GH-119935) (#120847)

gh-119003: Clarify slice assignments (GH-119935)
(cherry picked from commit 462832041e342f8aaf8c88ec44f7b14c70042575)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
16 months ago[3.13] Amend categories of @nineteendo's news entries (GH-120735) (#120850)
Nice Zombies [Sat, 22 Jun 2024 20:05:15 +0000 (22:05 +0200)] 
[3.13] Amend categories of @nineteendo's news entries (GH-120735) (#120850)

16 months ago[3.13] gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877) (GH-120879)
Miss Islington (bot) [Sat, 22 Jun 2024 13:43:30 +0000 (15:43 +0200)] 
[3.13] gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877) (GH-120879)

(cherry picked from commit a046c848c1df0cf98092e9696594d3fb836e3530)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120873: Add test for "state" option in ttk.Scale (GH-120874) (GH-120875)
Miss Islington (bot) [Sat, 22 Jun 2024 11:45:19 +0000 (13:45 +0200)] 
[3.13] gh-120873: Add test for "state" option in ttk.Scale (GH-120874) (GH-120875)

Also refactor the "state" option tests for other ttk widgets.
(cherry picked from commit 974a978631bfbfa6f617e927d5eaa82b06694ae5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120811: Fix reference leak upon `_PyContext_Exit` failure (GH-120812) ...
Miss Islington (bot) [Sat, 22 Jun 2024 11:14:46 +0000 (13:14 +0200)] 
[3.13] gh-120811: Fix reference leak upon `_PyContext_Exit` failure (GH-120812) (#120843)

gh-120811: Fix reference leak upon `_PyContext_Exit` failure (GH-120812)
(cherry picked from commit aed31beca9a54b85a1392631a48da80602210f18)

Co-authored-by: Peter <zintensitydev@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months ago[3.13] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) (GH-120864)
Miss Islington (bot) [Sat, 22 Jun 2024 07:17:55 +0000 (09:17 +0200)] 
[3.13] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) (GH-120864)

The tests are now passed with the current version of Tcl/Tk under
development (8.7b1+ and 9.0b3+).

The following changes were also made to make the tests more flexible:

* Helper methods like checkParam() now interpret the expected error message
  as a regular expression instead of a literal.
* Add support of new arguments in checkEnumParam():
  - allow_empty=True skips testing with empty string;
  - fullname= specifies the name for error message if it differs from the
    option name;
  - sort=True sorts values for error message.
* Add support of the allow_empty argument in checkReliefParam():
  allow_empty=True adds an empty string to the list of accepted values.
* Attributes _clip_highlightthickness, _clip_pad and  _clip_borderwidth
  specify how negative values of options -highlightthickness, -padx, -pady
  and -borderwidth are handled.
* Use global variables for some common error messages.

(cherry picked from commit 6ad26de6e8ab61b035e7ecfff9791c2b349c3ad0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
16 months ago[3.13] gh-119344: Make critical section API public (GH-119353) (#120856)
Sam Gross [Fri, 21 Jun 2024 20:20:41 +0000 (16:20 -0400)] 
[3.13] gh-119344: Make critical section API public (GH-119353) (#120856)

This makes the following macros public as part of the non-limited C-API for
locking a single object or two objects at once.

* `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()`
* `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()`

The supporting functions and structs used by the macros are also exposed for
cases where C macros are not available.
(cherry picked from commit 8f17d69b7bc906e8407095317842cc0fd52cd84a)

16 months ago[3.13] gh-120838: Add a Note in the Docs About Expectations for Py_Finalize() (gh...
Miss Islington (bot) [Fri, 21 Jun 2024 19:21:47 +0000 (21:21 +0200)] 
[3.13] gh-120838: Add a Note in the Docs About Expectations for Py_Finalize() (gh-120852)

(cherry picked from commit 03fa2df92707b543c304a426732214002f81d671, AKA gh-120839)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-120773: document introspective attributes of an async generator object...
Miss Islington (bot) [Fri, 21 Jun 2024 11:28:46 +0000 (13:28 +0200)] 
[3.13] gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778) (#120827)

gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778)
(cherry picked from commit 83d3d7aace32b8536f552f78dd29610344f13160)

Co-authored-by: blhsing <blhsing@gmail.com>
16 months ago[3.13] gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (GH-120442...
Miss Islington (bot) [Fri, 21 Jun 2024 11:16:24 +0000 (13:16 +0200)] 
[3.13] gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (GH-120442) (#120826)

gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (GH-120442)
(cherry picked from commit 8334a1b55c93068f5d243852029baa83377ff6c9)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] gh-111259: Document idiomatic RE pattern (?s:.) that matches any character...
Miss Islington (bot) [Thu, 20 Jun 2024 21:22:45 +0000 (23:22 +0200)] 
[3.13] gh-111259: Document idiomatic RE pattern (?s:.) that matches any character (GH-120745) (GH-120813)

(cherry picked from commit a2f6f7dd26128b834c6e66fe1ceac3ac751143f5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-117511: Make PyMutex public in the non-limited API (GH-117731) (#120800)
Sam Gross [Thu, 20 Jun 2024 16:00:25 +0000 (12:00 -0400)] 
[3.13] gh-117511: Make PyMutex public in the non-limited API (GH-117731) (#120800)

(cherry picked from commit 3af7263037de1d0ef63b070fc7bfc2cf042eaebe)

16 months ago[3.13] gh-119258: Backport optimizer frame fixes in GH-119365 (GH-120699)
Ken Jin [Thu, 20 Jun 2024 15:55:20 +0000 (23:55 +0800)] 
[3.13] gh-119258: Backport optimizer frame fixes in GH-119365 (GH-120699)

(cherry picked from commit 55402d3)

16 months ago[3.13] GH-119462: Enforce invariants of type versioning. Backport of GH-120731. ...
Mark Shannon [Thu, 20 Jun 2024 14:09:32 +0000 (15:09 +0100)] 
[3.13] GH-119462: Enforce invariants of type versioning. Backport of GH-120731. (#120748)

* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG

16 months ago[3.13] Update the documentation howto index page and group docs into 3 logical sectio...
Miss Islington (bot) [Thu, 20 Jun 2024 10:24:14 +0000 (12:24 +0200)] 
[3.13] Update the documentation howto index page and group docs into 3 logical sections (GH-119366, GH-120703) (GH-120646)

Update the documentation howto index page and group docs into 3 logical sections (GH-119366)

(cherry picked from commit a26d27e7ee512cd822b7a7ba075171152779ffdd)

Includes a follow-up fix to properly merge GH-119877:
* Add a link to free-threading HOWTO to the index (GH-120703)
  (cherry picked from commit 45d5cab533a607716b2b41134839a59facf309cd)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
16 months ago[3.13] gh-119698: fix `symtable.Class.get_methods` and document its behaviour correct...
Jelle Zijlstra [Thu, 20 Jun 2024 05:27:23 +0000 (22:27 -0700)] 
[3.13] gh-119698: fix `symtable.Class.get_methods` and document its behaviour correctly (GH-120151) (#120777)

(cherry picked from commit b8a8e04fec76ad7f7c3e5149114dd2ee8a5caecc)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] Fix typos in comments (GH-120481) (#120774)
Miss Islington (bot) [Thu, 20 Jun 2024 03:40:54 +0000 (05:40 +0200)] 
[3.13] Fix typos in comments (GH-120481) (#120774)

(cherry picked from commit 656a1c81083b76b9d998c983f4329348a65985d3)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
16 months ago[3.13] GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120768)
Miss Islington (bot) [Thu, 20 Jun 2024 01:13:23 +0000 (03:13 +0200)] 
[3.13] GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120768)

(cherry picked from commit 285f42c850da0d8ca31850088eb7b9247cbbbc71)

Co-authored-by: Xarblu <xarblu@protonmail.com>
16 months ago[3.13] gh-118820: Zero-valued flag enum has no name (GH-118848) (GH-120759)
Miss Islington (bot) [Wed, 19 Jun 2024 22:11:30 +0000 (00:11 +0200)] 
[3.13] gh-118820: Zero-valued flag enum has no name (GH-118848) (GH-120759)

gh-118820: Zero-valued flag enum has no name (GH-118848)
(cherry picked from commit ed5ae6c4d76feaff06c2104c8ff864553b000253)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec...
Miss Islington (bot) [Wed, 19 Jun 2024 20:59:28 +0000 (22:59 +0200)] 
[3.13] gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737) (#120760)

gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737)
(cherry picked from commit 1e4815692f6c8a37a3974d0d7d2025494d026d76)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-120753) (#120757)
Miss Islington (bot) [Wed, 19 Jun 2024 20:10:33 +0000 (22:10 +0200)] 
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-120753) (#120757)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] gh-120521: clarify except* documentation to allow tuples (GH-120523) (#120750)
Miss Islington (bot) [Wed, 19 Jun 2024 19:07:04 +0000 (21:07 +0200)] 
[3.13] gh-120521: clarify except* documentation to allow tuples (GH-120523) (#120750)

(cherry picked from commit 58b3f111767148e9011ccd52660e208f0c834b2a)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago [3.13] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh...
Nadeshiko Manju [Wed, 19 Jun 2024 17:40:48 +0000 (01:40 +0800)] 
 [3.13] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322 (GH-120712) (#120747)

[3.13] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322 (GH-120712)

Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
16 months ago[3.13] gh-120635: Avoid leaking processes in test_pyrepl (GH-120676) (#120741)
Miss Islington (bot) [Wed, 19 Jun 2024 13:38:37 +0000 (15:38 +0200)] 
[3.13] gh-120635: Avoid leaking processes in test_pyrepl (GH-120676) (#120741)

gh-120635: Avoid leaking processes in test_pyrepl (GH-120676)

If the child process takes longer than SHORT_TIMEOUT seconds to
complete, kill the process but then wait until it completes with no
timeout to not leak child processes.
(cherry picked from commit 0f3e36454d754026d6c510053ff1e4b22ae80cd9)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120738)
Miss Islington (bot) [Wed, 19 Jun 2024 13:22:21 +0000 (15:22 +0200)] 
[3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120738)

(cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
16 months ago[3.13] gh-119960: Add information about regex flags in re module functions (GH-119978...
Miss Islington (bot) [Wed, 19 Jun 2024 10:30:34 +0000 (12:30 +0200)] 
[3.13] gh-119960: Add information about regex flags in re module functions (GH-119978) (#120730)

gh-119960: Add information about regex flags in re module functions (GH-119978)
(cherry picked from commit a86e6255c371e14cab8680dee979a7393b339ce5)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
16 months ago[3.13] gh-120726: Fix compiler warnings on is_core_module() (GH-120727) (#120729)
Miss Islington (bot) [Wed, 19 Jun 2024 10:23:28 +0000 (12:23 +0200)] 
[3.13] gh-120726: Fix compiler warnings on is_core_module() (GH-120727) (#120729)

gh-120726: Fix compiler warnings on is_core_module() (GH-120727)

Fix compiler warnings on is_core_module() and
check_interpreter_whence(): only define them when
assertions are built.
(cherry picked from commit a816cd67f43d9adb27ccdb6331e08c835247d1df)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)...
Miss Islington (bot) [Wed, 19 Jun 2024 10:11:07 +0000 (12:11 +0200)] 
[3.13] gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507) (#119964)

gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)
(cherry picked from commit 52586f930f62bd80374f0f240a4ecce0c0238174)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
16 months ago[3.13] gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450...
Miss Islington (bot) [Wed, 19 Jun 2024 07:20:09 +0000 (09:20 +0200)] 
[3.13] gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450) (GH-120700)

gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450)
(cherry picked from commit d8cd0fa4e347f460d0f3277e2392504e61ed087d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)
Miss Islington (bot) [Wed, 19 Jun 2024 07:01:09 +0000 (09:01 +0200)] 
[3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)

The `inspect.ismethoddescriptor()` function did not check for the lack of
`__delete__()` and, consequently, erroneously returned True when applied
to *data* descriptors with only `__get__()` and `__delete__()` defined.

(cherry picked from commit dacc5ac71a8e546f9ef76805827cb50d4d40cabf)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months ago[3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634...
Miss Islington (bot) [Wed, 19 Jun 2024 06:46:13 +0000 (08:46 +0200)] 
[3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (#120725)

gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634)
(cherry picked from commit 89f7208f672be635e923f04c19a7480eb8eb414c)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
16 months ago[3.13] gh-120496: Add a note about iterator thread-safe (gh-120685) (#120706)
Miss Islington (bot) [Wed, 19 Jun 2024 04:15:44 +0000 (06:15 +0200)] 
[3.13] gh-120496: Add a note about iterator thread-safe (gh-120685) (#120706)

gh-120496: Add a note about iterator thread-safe (gh-120685)
(cherry picked from commit 7e189aed6450c0aebcdd6ff6aefe29e2f45b173a)

Co-authored-by: Donghee Na <donghee.na@python.org>
16 months ago[3.13] gh-120367: fix bug where compiler detects redundant jump after pseudo op repla...
Miss Islington (bot) [Tue, 18 Jun 2024 22:34:07 +0000 (00:34 +0200)] 
[3.13] gh-120367: fix bug where compiler detects redundant jump after pseudo op replacement (GH-120714) (#120716)

16 months ago[3.13] gh-117953: Skip `test_interpreters` properly without GIL (gh-120707)
Miss Islington (bot) [Tue, 18 Jun 2024 16:05:30 +0000 (18:05 +0200)] 
[3.13] gh-117953: Skip `test_interpreters` properly without GIL (gh-120707)

(cherry picked from commit 1035fe0cfbeee23f61aed3332ebbae854e5da800, AKA gh-120689)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
16 months ago[3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (GH-118807) (...
Miss Islington (bot) [Tue, 18 Jun 2024 14:54:51 +0000 (16:54 +0200)] 
[3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (GH-118807) (#120695)

This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable
C-API function to provide a thread-safe mechanism for clearing weakrefs
without executing callbacks.

Some C-API extensions need to clear weakrefs without calling callbacks,
such as after running finalizers like we do in subtype_dealloc.
Previously they could use `_PyWeakref_ClearRef` on each weakref, but
that's not thread-safe in the free-threaded build.

(cherry picked from commit e8752d7b80775ec2a348cd4bf38cbe26a4a07615)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
16 months ago[3.13] gh-120659: Skip `test_freethreading` with GIL (GH-120660) (#120694)
Miss Islington (bot) [Tue, 18 Jun 2024 14:46:29 +0000 (16:46 +0200)] 
[3.13] gh-120659: Skip `test_freethreading` with GIL (GH-120660) (#120694)

gh-120659: Skip `test_freethreading` with GIL (GH-120660)
(cherry picked from commit 360f14a493d8461d42dc646be40b4b6fb20db57a)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
16 months ago[3.13] gh-119241: Add HOWTO for free-threaded C API extensions (GH-119877) (#120693)
Miss Islington (bot) [Tue, 18 Jun 2024 14:28:51 +0000 (16:28 +0200)] 
[3.13] gh-119241: Add HOWTO for free-threaded C API extensions (GH-119877) (#120693)

Some sections adapted from https://github.com/Quansight-Labs/free-threaded-compatibility/
written by Nathan Goldbaum.

(cherry picked from commit 02b272b7026b68e70b4a4d9a0ca080904aed374c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
16 months ago[3.13] gh-120662: Improve `smtplib` example (GH-120668) (#120681)
Miss Islington (bot) [Tue, 18 Jun 2024 12:12:58 +0000 (14:12 +0200)] 
[3.13] gh-120662: Improve `smtplib` example (GH-120668) (#120681)

gh-120662: Improve `smtplib` example (GH-120668)
(cherry picked from commit 4bc27abdbee88efcf9ada83de6e9e9a0e439edaf)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] gh-119897: Add test for lambda generator invocation (GH-120658) (#120673)
Miss Islington (bot) [Tue, 18 Jun 2024 10:16:42 +0000 (12:16 +0200)] 
[3.13] gh-119897: Add test for lambda generator invocation (GH-120658) (#120673)

gh-119897: Add test for lambda generator invocation (GH-120658)
(cherry picked from commit 73dc1c678eb720c2ced94d2f435a908bb6d18566)

gh-120467: Add test for lambda generator invocation

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.13] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120669)
Miss Islington (bot) [Tue, 18 Jun 2024 09:54:55 +0000 (11:54 +0200)] 
[3.13] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120669)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf47389e26cb591342d07dad98619916d5a1b15)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_cou...
Miss Islington (bot) [Mon, 17 Jun 2024 22:13:40 +0000 (00:13 +0200)] 
[3.13] gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_count (gh-120657)

gh-120182 added new global state (interp_count), but didn't add thread-safety for it.  This change eliminates the possible race.

(cherry picked from commit 2c66318cdc0545da37e7046533dfe74bde129d91, AKA gh-120529)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-117657: Fix `__slots__` thread safety in free-threaded build (GH-119368...
Miss Islington (bot) [Mon, 17 Jun 2024 19:12:25 +0000 (21:12 +0200)] 
[3.13] gh-117657:  Fix `__slots__` thread safety in free-threaded build (GH-119368) (#120655)

Fix a race in `PyMember_GetOne` and `PyMember_SetOne` for `Py_T_OBJECT_EX`.
These functions implement `__slots__` accesses for Python objects.
(cherry picked from commit 362cd2680b45a36c3467b9721ff7fc0ceb338452)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
16 months ago[3.13] gh-117657: Fix TSan reported data race on ioctl_works (GH-120175) (#120654)
Miss Islington (bot) [Mon, 17 Jun 2024 17:52:49 +0000 (19:52 +0200)] 
[3.13] gh-117657: Fix TSan reported data race on ioctl_works (GH-120175) (#120654)

(cherry picked from commit 460cc9e14e221c53c0038a847bfd411fe184ebf3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-115649: Copy the filename into main interpreter before intern in import...
Miss Islington (bot) [Mon, 17 Jun 2024 17:00:26 +0000 (19:00 +0200)] 
[3.13] gh-115649: Copy the filename into main interpreter before intern in import.c (GH-120315) (#120652)

gh-115649: Copy the filename into main interpreter before intern in import.c (GH-120315)
(cherry picked from commit 28140d1f2da1766bfbb83f58779f15255c73c871)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months ago[3.13] gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alterna...
Miss Islington (bot) [Mon, 17 Jun 2024 16:18:07 +0000 (18:18 +0200)] 
[3.13] gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (GH-120434) (#120651)

gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (GH-120434)
(cherry picked from commit 95737bbf18765a24b6585708588c9b707dc30d27)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold...
Miss Islington (bot) [Mon, 17 Jun 2024 15:07:20 +0000 (17:07 +0200)] 
[3.13] gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425) (#120621)

gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425)
(cherry picked from commit 21866c8ed296524f0ca175c0f55b43744c2b30df)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.13] gh-119933: Improve ``SyntaxError`` message for invalid type parameters express...
Jelle Zijlstra [Mon, 17 Jun 2024 15:01:49 +0000 (08:01 -0700)] 
[3.13] gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions (GH-119976) (#120641)

(cherry picked from commit 4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-12058...
Miss Islington (bot) [Mon, 17 Jun 2024 07:09:11 +0000 (09:09 +0200)] 
[3.13] gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588) (#120616)

gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588)
(cherry picked from commit 3df2022931f77c5cadb3f51b371be6ae17587ede)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 ...
Miss Islington (bot) [Mon, 17 Jun 2024 06:06:11 +0000 (08:06 +0200)] 
[3.13] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480) (#120612)

gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480)
(cherry picked from commit bac4edad69bb20dd9460766e062637cae999e1e0)

gh-112346: Describe the "os" byte in gzip output change.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
16 months ago[3.13] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570...
Miss Islington (bot) [Sun, 16 Jun 2024 21:09:54 +0000 (23:09 +0200)] 
[3.13] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570) (#120597)

gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570)
(cherry picked from commit bd4516d9efee109dd3b02a3d60845f9053fc6718)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-118596: Add thread-safety clarifications to the SSLContext documentation...
Miss Islington (bot) [Sun, 16 Jun 2024 20:43:20 +0000 (22:43 +0200)] 
[3.13] gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597) (#120595)

gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f8638267aa64ad2daa0111d8b7fdc2499834)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
16 months ago[3.13] gh-119824: Print stack entry when user input is needed (GH-119882) (#120533)
Tian Gao [Sun, 16 Jun 2024 19:05:07 +0000 (12:05 -0700)] 
[3.13] gh-119824: Print stack entry when user input is needed (GH-119882) (#120533)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.13] gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sec...
Miss Islington (bot) [Sun, 16 Jun 2024 17:38:00 +0000 (19:38 +0200)] 
[3.13] gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (GH-120585) (#120592)

gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (GH-120585)
(cherry picked from commit b337aefd3e44f5c8e38cd282273359d07cce6126)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] Docs: remove temporary hardcoded links (GH-120348) (#120587)
Miss Islington (bot) [Sun, 16 Jun 2024 13:07:27 +0000 (15:07 +0200)] 
[3.13] Docs: remove temporary hardcoded links (GH-120348) (#120587)

Docs: remove temporary hardcoded links (GH-120348)
(cherry picked from commit b8484c6ad7fd14ca464e584b79821b4b906dd77a)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-120579: Guard `_testcapi` import in `test_free_threading` (GH-120580) ...
Miss Islington (bot) [Sun, 16 Jun 2024 08:50:33 +0000 (10:50 +0200)] 
[3.13] gh-120579: Guard `_testcapi` import in `test_free_threading` (GH-120580) (#120583)

gh-120579: Guard `_testcapi` import in `test_free_threading` (GH-120580)
(cherry picked from commit 0c0348adbfca991f78b3aaa6790e5c26606a1c0f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] gh-120360: Add self as IDLE doc owner (GH-120571) (#120576)
Miss Islington (bot) [Sun, 16 Jun 2024 06:22:07 +0000 (08:22 +0200)] 
[3.13] gh-120360: Add self as IDLE doc owner (GH-120571) (#120576)

gh-120360: Add self as IDLE doc owner (GH-120571)

Add self as IDLE doc owner
(cherry picked from commit cf49ef78f894e418bea7de23dde9b01d6235889d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
16 months ago[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)
Miss Islington (bot) [Sun, 16 Jun 2024 05:51:29 +0000 (07:51 +0200)] 
[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)

gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(cherry picked from commit 1fa595963ed512b055d2a4faddef5a9e544288ac)

Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
16 months ago[3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH...
Miss Islington (bot) [Sat, 15 Jun 2024 19:10:50 +0000 (21:10 +0200)] 
[3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) (#120563)

gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486)

This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0.  this keeps things consistent.
(cherry picked from commit 08d09cf5ba041c9c5c3860200b56bab66fd44a23)

Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
16 months ago[3.13] gh-120541: Improve the "less" prompt in pydoc (GH-120543) (GH-120562)
Miss Islington (bot) [Sat, 15 Jun 2024 18:21:13 +0000 (20:21 +0200)] 
[3.13] gh-120541: Improve the "less" prompt in pydoc (GH-120543) (GH-120562)

When help() is called with non-string argument, use __qualname__ or
__name__ if available, otherwise use "{typename} object".
(cherry picked from commit 31d1d72d7e24e0427df70f7dd14b9baff28a4f89)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] annotations: expand documentation on "simple" assignment targets (GH-120535...
Miss Islington (bot) [Sat, 15 Jun 2024 15:35:57 +0000 (17:35 +0200)] 
[3.13] annotations: expand documentation on "simple" assignment targets (GH-120535) (#120555)

This behavior is rather surprising and it was not clearly specified.

(cherry picked from commit 9e0b11eb21930b7b8e4a396200a921e9985cfca4)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] gh-117657: Make PyType_HasFeature (exported version) atomic (GH-120484) (...
Miss Islington (bot) [Sat, 15 Jun 2024 15:06:54 +0000 (17:06 +0200)] 
[3.13] gh-117657: Make PyType_HasFeature (exported version) atomic (GH-120484) (#120554)

gh-117657: Make PyType_HasFeature (exported version) atomic (GH-120484)

Make PyType_HasFeature (exported version) atomic
(cherry picked from commit 6f63dfff6f493b405f3422210a168369e1e7a35d)

Co-authored-by: Ken Jin <kenjin@python.org>
16 months ago[3.13] Add some more edge-case tests for `inspect.get_annotations` with `eval_str...
Miss Islington (bot) [Sat, 15 Jun 2024 13:16:40 +0000 (15:16 +0200)] 
[3.13] Add some more edge-case tests for `inspect.get_annotations` with `eval_str=True` (GH-120550) (#120551)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545...
Miss Islington (bot) [Sat, 15 Jun 2024 11:54:07 +0000 (13:54 +0200)] 
[3.13] gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545) (#120546)

gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545)
(cherry picked from commit 42ebdd83bb194f054fe5a10b3caa0c3a95be3679)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120548)
Miss Islington (bot) [Sat, 15 Jun 2024 11:28:28 +0000 (13:28 +0200)] 
[3.13] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120548)

gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498)
(cherry picked from commit c501261c919ceb97c850ef9427a93326f06a8f2e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-120526: Correct signature of map() builtin (GH-120528) (GH-120539)
Miss Islington (bot) [Sat, 15 Jun 2024 05:59:37 +0000 (07:59 +0200)] 
[3.13] gh-120526: Correct signature of map() builtin (GH-120528) (GH-120539)

map() requires at least one iterable arg.

(cherry picked from commit d4039d3f6f8cb7738c5cd272dde04171446dfd2b)

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Co-authored-by: Adam Williamson <adam@blueradius.ca>
16 months ago[3.13] gh-119819: Conditional skip of logging tests that require multiprocessing...
Miss Islington (bot) [Sat, 15 Jun 2024 00:32:22 +0000 (02:32 +0200)] 
[3.13] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) (#120531)

gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476)

Skip tests that require multiprocessing subprocess support.
(cherry picked from commit 92f6d400f76b6a04dddd944568870f689c8fab5f)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
16 months ago[3.13] gh-120524: Temporarily Skip test_create_many_threaded In test_interpreters...
Eric Snow [Fri, 14 Jun 2024 22:14:29 +0000 (18:14 -0400)] 
[3.13] gh-120524: Temporarily Skip test_create_many_threaded In test_interpreters.test_stress (gh-120527)

16 months ago[3.13] gh-120161: Fix a Crash in the _datetime Module (gh-120518)
Miss Islington (bot) [Fri, 14 Jun 2024 19:54:46 +0000 (21:54 +0200)] 
[3.13] gh-120161: Fix a Crash in the _datetime Module (gh-120518)

In gh-120009 I used an atexit hook to finalize the _datetime module's static types at interpreter shutdown.  However, atexit hooks are executed very early in finalization, which is a problem in the few cases where a subclass of one of those static types is still alive until the final GC collection.  The static builtin types don't have this probably because they are finalized toward the end, after the final GC collection.  To avoid the problem for _datetime, I have applied a similar approach here.

Also, credit goes to @mgorny and @neonene for the new tests.

FYI, I would have liked to take a slightly cleaner approach with managed static types, but wanted to get a smaller fix in first for the sake of backporting.  I'll circle back to the cleaner approach with a future change on the main branch.

(cherry picked from commit b2e71ff4f8fa5b7d8117dd8125137aee3d01f015, AKA gh-120182)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH...
Miss Islington (bot) [Fri, 14 Jun 2024 19:08:21 +0000 (21:08 +0200)] 
[3.13] gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364) (#120511)

gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364)

* gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
(cherry picked from commit 7fadfd82ebf6ea90b38cb3f2a046a51f8601a205)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.13] gh-117657: Add TSAN suppression for set_default_allocator_unlocked (GH-120500...
Miss Islington (bot) [Fri, 14 Jun 2024 16:34:07 +0000 (18:34 +0200)] 
[3.13] gh-117657: Add TSAN suppression for set_default_allocator_unlocked (GH-120500) (#120510)

gh-117657: Add TSAN suppression for set_default_allocator_unlocked (GH-120500)

Add TSAN suppression for set_default_allocator_unlocked
(cherry picked from commit 2bacc2343c24c49292dea3461f6b7664fc2d33e2)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
16 months ago[3.13] gh-120400 :Support Linux perf profile to see Python calls on RISC-V architectu...
Miss Islington (bot) [Fri, 14 Jun 2024 15:03:24 +0000 (17:03 +0200)] 
[3.13] gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089) (#120413)

gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089)
(cherry picked from commit 4b1e85bafc5bcb8cb70bb17164e07aebf7ad7e8e)

Co-authored-by: ixgbe00 <yangwang@iscas.ac.cn>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotation...
Miss Islington (bot) [Thu, 13 Jun 2024 21:41:14 +0000 (23:41 +0200)] 
[3.13] gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270) (#120474)

gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270)
(cherry picked from commit 42351c3b9a357ec67135b30ed41f59e6f306ac52)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465...
Miss Islington (bot) [Thu, 13 Jun 2024 20:43:59 +0000 (22:43 +0200)] 
[3.13] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465) (#120472)

GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465)

Add dedicated subsection for `pathlib.Path.rename()`, `replace()`,
`unlink()` and `rmdir()`.
(cherry picked from commit d88a1f2e156cd1072119afa91d4f4dc4037c1b21)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
16 months ago[3.13] gh-117398: Add datetime C-API type check test for subinterpreters (gh-120463)
Miss Islington (bot) [Thu, 13 Jun 2024 18:30:42 +0000 (20:30 +0200)] 
[3.13] gh-117398: Add datetime C-API type check test for subinterpreters (gh-120463)

Check if the DateTime C-API type matches the datetime.date type on main and shared/isolated subinterpreters.

(cherry picked from commit 50a389565aa0b480792ed06a2ab56fb5a72fc2d8, AKA gh-119604)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
16 months ago[3.13] GH-119054: Add "Creating files and directories" section to pathlib docs. ...
Miss Islington (bot) [Thu, 13 Jun 2024 18:17:57 +0000 (20:17 +0200)] 
[3.13] GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186) (#120462)

GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186)

Add dedicated subsection for `pathlib.Path.touch()`, `mkdir()`,
`symlink_to()` and `hardlink_to()`. Also note that `open()`, `write_text()`
and `write_bytes()` are often used to create files.

(cherry picked from commit c2d810b6d4deeea530648a8d0983e3a2adf6c942)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-119146: Update ``regexp`` in `build.yml` to not trigger the jobs on `*...
Miss Islington (bot) [Thu, 13 Jun 2024 12:03:59 +0000 (14:03 +0200)] 
[3.13] gh-119146: Update ``regexp`` in `build.yml` to not trigger the jobs on `*.md` and `*.ini` files. (GH-120435) (#120447)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-117657: Fix some simple races in instrumentation.c (GH-120118) (#120444)
Miss Islington (bot) [Thu, 13 Jun 2024 10:23:19 +0000 (12:23 +0200)] 
[3.13] gh-117657: Fix some simple races in instrumentation.c (GH-120118) (#120444)

gh-117657: Fix some simple races in instrumentation.c (GH-120118)

* stop the world when setting local events
(cherry picked from commit b1b61dc4cee43920ef2b08d5ac94ddf08119c507)

Co-authored-by: Ken Jin <kenjin@python.org>
16 months ago[3.13] gh-117657: Make PyType_HasFeature atomic (GH-120210) (#120443)
Miss Islington (bot) [Thu, 13 Jun 2024 10:06:04 +0000 (12:06 +0200)] 
[3.13] gh-117657: Make PyType_HasFeature atomic (GH-120210) (#120443)

gh-117657: Make PyType_HasFeature atomic (GH-120210)

Make PyType_HasFeature atomic
(cherry picked from commit eebae2c460dabdc70dc0d9b6e189368eb1abb716)

Co-authored-by: Ken Jin <kenjin@python.org>
16 months ago[3.13] gh-101575: document Decimal.__round__() (GH-101737) (GH-120394)
Miss Islington (bot) [Thu, 13 Jun 2024 07:07:37 +0000 (09:07 +0200)] 
[3.13] gh-101575: document Decimal.__round__() (GH-101737) (GH-120394)

gh-101575: document Decimal.__round__() (GH-101737)
(cherry picked from commit 7dd8c37a067f9fcb6a2a658d6a93b294cc2e6fb4)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
16 months ago[3.13] Fix typos in documentation (GH-120338) (#120438)
Xie Yanbo [Thu, 13 Jun 2024 06:39:46 +0000 (14:39 +0800)] 
[3.13] Fix typos in documentation (GH-120338) (#120438)

(cherry picked from commit ce3879bd45e068f8e2a5a214acd234ca44cad53b)

16 months ago[3.13] gh-118908: Protect the REPL subprocess with a timeout in tests (GH-120408...
Miss Islington (bot) [Wed, 12 Jun 2024 19:58:29 +0000 (21:58 +0200)] 
[3.13] gh-118908: Protect the REPL subprocess with a timeout in tests (GH-120408) (#120430)

(cherry picked from commit 3453362183f083e37ea866a7ae1b34147ffaf81d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH...
Miss Islington (bot) [Wed, 12 Jun 2024 19:51:55 +0000 (21:51 +0200)] 
[3.13] gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH-120419) (#120432)

gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH-120419)

Remove wheeldata from both sides of the `assertEqual`, so that we're
*actually* ignoring it from the test set.

This test is only making assertions about the source tree, no code is
being executed that would do anything different based on the value of
`WHEEL_PKG_DIR`.
(cherry picked from commit 030b452e34bbb0096acacb70a31915b9590c8186)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
16 months ago[3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429)
Miss Islington (bot) [Wed, 12 Jun 2024 19:27:32 +0000 (21:27 +0200)] 
[3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429)

gh-120417: Remove unused imports in the stdlib (GH-120420)
(cherry picked from commit 4c6d4f5cb33e48519922d635894eef356faddba2)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-120343: Fix column offsets of multiline tokens in tokenize (GH-120391)...
Miss Islington (bot) [Wed, 12 Jun 2024 19:22:44 +0000 (21:22 +0200)] 
[3.13] gh-120343: Fix column offsets of multiline tokens in tokenize (GH-120391) (#120427)

(cherry picked from commit 4b5d3e0e721a952f4ac9d17bee331e6dfe543dcd)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
16 months ago[3.13] gh-71587: Drop local reference cache to `_strptime` module in `_datetime`...
Miss Islington (bot) [Wed, 12 Jun 2024 17:15:16 +0000 (19:15 +0200)] 
[3.13] gh-71587: Drop local reference cache to `_strptime` module in `_datetime` (gh-120424)

The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation).  That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters.  This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).

(cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
16 months ago[3.13] gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) ...
Miss Islington (bot) [Wed, 12 Jun 2024 15:39:54 +0000 (17:39 +0200)] 
[3.13] gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) (#120414)

gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329)
(cherry picked from commit 939c201e00943c6dc2d515185168c30606ae522c)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH...
Miss Islington (bot) [Wed, 12 Jun 2024 14:51:35 +0000 (16:51 +0200)] 
[3.13] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) (GH-120411)

* Remove "()" when refer to a class as a type.
* Use :func: when refer to a callable.
* Fix reference to the datetime.astimezone() method.
(cherry picked from commit 92c9c6ae147e1e658bbc8d454f8c7b2c4dea31d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120155: Add assertion to sre.c match_getindex() (GH-120402) (#120409)
Miss Islington (bot) [Wed, 12 Jun 2024 14:07:36 +0000 (16:07 +0200)] 
[3.13] gh-120155: Add assertion to sre.c match_getindex() (GH-120402) (#120409)

gh-120155: Add assertion to sre.c match_getindex() (GH-120402)

Add an assertion to help static analyzers to detect that i*2 cannot
overflow.
(cherry picked from commit 42b25dd61ff3593795c4cc2ffe876ab766098b24)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165) (GH-120403)
Miss Islington (bot) [Wed, 12 Jun 2024 13:37:26 +0000 (15:37 +0200)] 
[3.13] gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165) (GH-120403)

gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165)
(cherry picked from commit e16aed63f64b18a26859eff3de976ded373e66b8)

Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
16 months ago[3.13] gh-93691: fix too broad source locations of for statement iterators (GH-120330...
Miss Islington (bot) [Wed, 12 Jun 2024 12:18:43 +0000 (14:18 +0200)] 
[3.13] gh-93691: fix too broad source locations of for statement iterators (GH-120330) (#120399)

gh-93691: fix too broad source locations of for statement iterators (GH-120330)
(cherry picked from commit 97b69db167be28a33688db436551a6c3c3ea4662)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.13] gh-118908: Fix completions after namespace change in REPL (GH-120370) (#120392)
Miss Islington (bot) [Wed, 12 Jun 2024 08:48:22 +0000 (10:48 +0200)] 
[3.13] gh-118908: Fix completions after namespace change in REPL (GH-120370) (#120392)

(cherry picked from commit 02e74c356223feb0771759286d24d1dbac01d4ca)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
16 months ago[3.13] gh-120128: fix description of argument to ipaddress.collapse_addresses() ...
Miss Islington (bot) [Wed, 12 Jun 2024 06:23:24 +0000 (08:23 +0200)] 
[3.13] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120135)

gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131)

The argument to collapse_addresses() is now described as an *iterable*
(rather than *iterator*).
(cherry picked from commit f878d46e5614f08a9302fcb6fc611ef49e9acf2f)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
16 months ago[3.13] gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL (GH-12035...
Miss Islington (bot) [Tue, 11 Jun 2024 19:46:07 +0000 (21:46 +0200)] 
[3.13] gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL (GH-120354) (#120368)

16 months agogh-120198: Fix race condition when editing __class__ with an audit hook active (GH...
Miss Islington (bot) [Tue, 11 Jun 2024 19:35:49 +0000 (21:35 +0200)] 
gh-120198: Fix race condition when editing __class__ with an audit hook active (GH-120195)

(cherry picked from commit 203565b2f9c74656ba519780049b46d4e5afcba1)

Co-authored-by: Ken Jin <kenjin@python.org>
16 months ago[3.13] gh-118908: Limit exposed globals from internal imports and definitions on...
Miss Islington (bot) [Tue, 11 Jun 2024 18:04:39 +0000 (20:04 +0200)] 
[3.13] gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup (GH-119547) (#120362)

16 months ago[3.13] gh-120343: Do not reset byte_col_offset_diff after multiline tokens (GH-120352...
Miss Islington (bot) [Tue, 11 Jun 2024 17:25:57 +0000 (19:25 +0200)] 
[3.13] gh-120343: Do not reset byte_col_offset_diff after multiline tokens (GH-120352) (#120355)

(cherry picked from commit 1b62bcee941e54244b3ce6476aef8913604987c9)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
16 months ago[3.13] Fix typo in ElementTree docs (GH-120342) (#120357)
Miss Islington (bot) [Tue, 11 Jun 2024 17:24:29 +0000 (19:24 +0200)] 
[3.13] Fix typo in ElementTree docs (GH-120342) (#120357)

Fix typo in ElementTree docs (GH-120342)
(cherry picked from commit 0335662fe1f663fe96e3e4acf0f34c5959d06b00)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
16 months ago[3.13] gh-119517: Fixes for pasting in pyrepl (GH-120253) (#120353)
Miss Islington (bot) [Tue, 11 Jun 2024 17:09:28 +0000 (19:09 +0200)] 
[3.13] gh-119517: Fixes for pasting in pyrepl (GH-120253) (#120353)

gh-119517: Fixes for pasting in pyrepl (GH-120253)

* Remove pyrepl's optimization for self-insert

This will be replaced by a less specialized optimization.

* Use line-buffering when pyrepl echoes pastes

Previously echoing was totally suppressed until the entire command had
been pasted and the terminal ended paste mode, but this gives the user
no feedback to indicate that an operation is in progress. Drawing
something to the screen once per line strikes a balance between
perceived responsiveness and performance.

* Remove dead code from pyrepl

`msg_at_bottom` is always true.

* Speed up pyrepl's screen rendering computation

The Reader in pyrepl doesn't hold a complete representation of the
screen area being drawn as persistent state. Instead, it recomputes it,
on each keypress. This is fast enough for a few hundred bytes, but
incredibly slow as the input buffer grows into the kilobytes (likely
because of pasting).

Rather than making some expensive and expansive changes to the repl's
internal representation of the screen, add some caching: remember some
data from one refresh to the next about what was drawn to the screen
and, if we don't find anything that has invalidated the results that
were computed last time around, reuse them. To keep this caching as
simple as possible, all we'll do is look for lines in the buffer that
were above the cursor the last time we were asked to update the screen,
and that are still above the cursor now. We assume that nothing can
affect a line that comes before both the old and new cursor location
without us being informed. Based on this assumption, we can reuse old
lines, which drastically speeds up the overwhelmingly common case where
the user is typing near the end of the buffer.

* Speed up pyrepl prompt drawing

Cache the `can_colorize()` call rather than repeatedly recomputing it.
This call looks up an environment variable, and is called once per
character typed at the REPL. The environment variable lookup shows up as
a hot spot when profiling, and we don't expect this to change while the
REPL is running.

* Speed up pasting multiple lines into the REPL

Previously, we were checking whether the command should be accepted each
time a line break was encountered, but that's not the expected behavior.
In bracketed paste mode, we expect everything pasted to be part of
a single block of code, and encountering a newline shouldn't behave like
a user pressing <Enter> to execute a command. The user should always
have a chance to review the pasted command before running it.

* Use a read buffer for input in pyrepl

Previously we were reading one byte at a time, which causes much slower
IO than necessary. Instead, read in chunks, processing previously read
data before asking for more.

* Optimize finding width of a single character

`wlen` finds the width of a multi-character string by adding up the
width of each character, and then subtracting the width of any escape
sequences. It's often called for single character strings, however,
which can't possibly contain escape sequences. Optimize for that case.

* Optimize disp_str for ASCII characters

Since every ASCII character is known to display as single width, we can
avoid not only the Unicode data lookup in `disp_str` but also the one
hidden in `str_width` for them.

* Speed up cursor movements in long pyrepl commands

When the current pyrepl command buffer contains many lines, scrolling up
becomes slow. We have optimizations in place to reuse lines above the
cursor position from one refresh to the next, but don't currently try to
reuse lines below the cursor position in the same way, so we wind up
with quadratic behavior where all lines of the buffer below the cursor
are recomputed each time the cursor moves up another line.

Optimize this by only computing one screen's worth of lines beyond the
cursor position. Any lines beyond that can't possibly be shown by the
console, and bounding this makes scrolling up have linear time
complexity instead.

---------

(cherry picked from commit 32a0faba439b239d7b0c242c1e3cd2025c52b8cf)

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>