]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-46278: fix typo introduced in GH-30427 (GH-30430)
Miss Islington (bot) [Thu, 6 Jan 2022 13:51:44 +0000 (05:51 -0800)] 
bpo-46278: fix typo introduced in GH-30427 (GH-30430)

Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit b50e5e916a05df65ab6a255af7624b751e0fe9d1)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoReflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) (#30429)
Miss Islington (bot) [Thu, 6 Jan 2022 13:03:11 +0000 (05:03 -0800)] 
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) (#30429)

(cherry picked from commit 3e43fac2503afe219336742b150b3ef6e470686f)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-46263: Don't use MULTIARCH on FreeBSD (GH-30410)
Miss Islington (bot) [Wed, 5 Jan 2022 10:20:09 +0000 (02:20 -0800)] 
bpo-46263: Don't use MULTIARCH on FreeBSD (GH-30410)

(cherry picked from commit cae55542d23e606dde9819d5dadd7430085fcc77)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agoFix missing "," in the documentation of Executor Objects (GH-30404)
Miss Islington (bot) [Tue, 4 Jan 2022 19:15:56 +0000 (11:15 -0800)] 
Fix missing "," in the documentation of Executor Objects (GH-30404)

(cherry picked from commit f404e26d749c85eef7b5be836375260855050ee3)

Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>
Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>
3 years agobpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
Miss Islington (bot) [Tue, 4 Jan 2022 14:27:26 +0000 (06:27 -0800)] 
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)

* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 7d7817cf0f826e566d8370a0e974bbfed6611d91)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agobpo-33252: Document that ResourceWarning is ignored by default (GH-30358) (GH-30396)
Miss Islington (bot) [Tue, 4 Jan 2022 12:03:58 +0000 (04:03 -0800)] 
bpo-33252: Document that ResourceWarning is ignored by default (GH-30358) (GH-30396)

`ResourceWarning` is ignored by default.

Document this behaviour, for consistency with others in this table such as `DeprecationWarning`.

Documentation PR can skip NEWS file.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit b949845b36b999185ed2bdf8a04dca1da39f3002)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
3 years agobpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353)
Miss Islington (bot) [Tue, 4 Jan 2022 09:13:56 +0000 (01:13 -0800)] 
bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353)

(cherry picked from commit 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-34538: Remove Exception subclassing from tutorial (GH-30361)
Miss Islington (bot) [Mon, 3 Jan 2022 23:19:29 +0000 (15:19 -0800)] 
bpo-34538: Remove Exception subclassing from tutorial (GH-30361)

Remove the bit about subclassing exceptions.

Documentation PR can skip the NEWS label.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 2db56130631255ca2eb504519430fb2f1fe789e9)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
3 years agobpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leadin...
Miss Islington (bot) [Mon, 3 Jan 2022 20:39:02 +0000 (12:39 -0800)] 
bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods (GH-30347) (GH-30369)

(cherry picked from commit 51700bf08b0dd4baf998440b2ebfaa488a2855ba)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agobpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348)
Miss Islington (bot) [Mon, 3 Jan 2022 06:48:21 +0000 (22:48 -0800)] 
bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348)

This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+):

- The launcher app was no longer able to launch the macOS Terminal.app to run a script.

- Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file.
(cherry picked from commit 549e62827262264cda30455e10e315602129da72)

Co-authored-by: Ned Deily <nad@python.org>
3 years agobpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30343)
Miss Islington (bot) [Sun, 2 Jan 2022 23:04:33 +0000 (15:04 -0800)] 
bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30343)

(cherry picked from commit ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520)

Co-authored-by: Julien Palard <julien@palard.fr>
3 years agoUpdate copyright year to 2022. (GH-30335)
Miss Islington (bot) [Sun, 2 Jan 2022 20:34:36 +0000 (12:34 -0800)] 
Update copyright year to 2022. (GH-30335)

Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit ba00f0d93a4aea85ae8089f139856a7c450584d7)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
3 years agobpo-46079: Replace external link that is down for maintenance. (GH-30315) (GH-30329)
Miss Islington (bot) [Sat, 1 Jan 2022 18:13:31 +0000 (10:13 -0800)] 
bpo-46079: Replace external link that is down for maintenance. (GH-30315) (GH-30329)

3 years agobpo-46085: Fix iterator cache mechanism of OrderedDict. (GH-30290)
Miss Islington (bot) [Thu, 30 Dec 2021 05:29:19 +0000 (21:29 -0800)] 
bpo-46085: Fix iterator cache mechanism of OrderedDict. (GH-30290)

(cherry picked from commit fb44d0589615590b1e7895ba78a038e96b15a219)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agocloses docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284)
Miss Islington (bot) [Wed, 29 Dec 2021 22:47:37 +0000 (14:47 -0800)] 
closes docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284)

(cherry picked from commit 8e11237c5d24e649b26cc928b52bc37f2fde9c7a)

Co-authored-by: Carlos Damazio <carlos.damazio@damazio.dev>
3 years agobpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)
Miss Islington (bot) [Sun, 26 Dec 2021 12:27:29 +0000 (04:27 -0800)] 
bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)

(cherry picked from commit 2e3e0d23adca8d83722d939d6abd1e467d7578f7)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
3 years ago[3.9] bpo-46032: Check types in singledispatch's register() at declaration time ...
Miss Islington (bot) [Sun, 26 Dec 2021 12:23:23 +0000 (04:23 -0800)] 
[3.9] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) (GH-30255)

The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).

(cherry picked from commit 078abb676cf759b1e960f78390b6e80f256f0255)
(cherry picked from commit 03c7449fbc7c57f5e0365f234a0b65c1dde763f2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.9] bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) (GH-30265)
Miss Islington (bot) [Sun, 26 Dec 2021 11:54:18 +0000 (03:54 -0800)] 
[3.9] bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) (GH-30265)

(cherry picked from commit a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agodoc: fix a typo in unittest.mock.rst (GH-30227) (GH-30263)
Miss Islington (bot) [Sun, 26 Dec 2021 11:51:57 +0000 (03:51 -0800)] 
doc: fix a typo in unittest.mock.rst (GH-30227) (GH-30263)

(cherry picked from commit 10bf0a9ac3c9bbde2fa8989d9435462f0e7da545)

Co-authored-by: Joe <nigelchiang@outlook.com>
3 years ago[3.9] Remove a NEWS entry for bpo-45878 (GH-30258) (GH-30260)
Miss Islington (bot) [Sun, 26 Dec 2021 11:25:49 +0000 (03:25 -0800)] 
[3.9] Remove a NEWS entry for bpo-45878 (GH-30258) (GH-30260)

The docs linter complains about it, and in general news entries for such changes are not required.
(cherry picked from commit 11909c12c75a7f377460561abc97707a4006fc07)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agoDoc: Fix link in multiprocessing.starmap pointing to builtin map. (GH-26560)
Miss Islington (bot) [Sun, 26 Dec 2021 11:15:38 +0000 (03:15 -0800)] 
Doc: Fix link in multiprocessing.starmap pointing to builtin map. (GH-26560)

(cherry picked from commit 32096df0e00e692ee6dc688e62213bff0dffd573)

Co-authored-by: Julien Palard <julien@palard.fr>
3 years agobpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_funct...
Miss Islington (bot) [Fri, 24 Dec 2021 09:27:17 +0000 (01:27 -0800)] 
bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) (GH-29723)

(cherry picked from commit b48ac6fe38b2fca9963b097c04cdecfc6083104e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46150: ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser` (GH...
Miss Islington (bot) [Fri, 24 Dec 2021 08:32:27 +0000 (00:32 -0800)] 
bpo-46150: ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser` (GH-30240)

Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
(cherry picked from commit b8de8b7039cee47465b2af9950b0b9ed2d3f2903)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoAllow test_pathlib to pass on systems where fakeuser exists. (GH-30244)
Miss Islington (bot) [Fri, 24 Dec 2021 08:07:41 +0000 (00:07 -0800)] 
Allow test_pathlib to pass on systems where fakeuser exists. (GH-30244)

(cherry picked from commit d8880677a79ba4e70bbe7583eecf573bfceb7e98)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agobpo-46106: Update OpenSSL to 1.1.1m (GH-30211) (GH-30225)
Ned Deily [Wed, 22 Dec 2021 04:25:09 +0000 (23:25 -0500)] 
bpo-46106: Update OpenSSL to 1.1.1m (GH-30211) (GH-30225)

Co-authored-by: Ned Deily <nad@python.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoUpdate potentially confusing note for mean. (GH-30174) (GH-30221)
Miss Islington (bot) [Tue, 21 Dec 2021 12:44:13 +0000 (04:44 -0800)] 
Update potentially confusing note for mean. (GH-30174) (GH-30221)

3 years ago[3.9] bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser...
Pablo Galindo Salgado [Mon, 20 Dec 2021 17:18:13 +0000 (17:18 +0000)] 
[3.9] bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177) (#30215)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf153d26059261ffef11f7643ae991e2a4c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[3.9] bpo-46104: Fix example broken by GH-30148 (GH-30203) (GH-30210)
Miss Islington (bot) [Mon, 20 Dec 2021 06:02:04 +0000 (22:02 -0800)] 
[3.9] bpo-46104: Fix example broken by GH-30148 (GH-30203) (GH-30210)

See discussion in GH-30179.
(cherry picked from commit 7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Automerge-Triggered-By: GH:Fidget-Spinner
3 years agobpo-46076: Improve documentation for per-attribute docstrings with `__slots__` (GH...
Miss Islington (bot) [Sun, 19 Dec 2021 21:11:37 +0000 (13:11 -0800)] 
bpo-46076: Improve documentation for per-attribute docstrings with `__slots__` (GH-30109) (GH-30207)

3 years agoFix test error about deprecation warning (#30205)
Andrew Svetlov [Sun, 19 Dec 2021 18:12:24 +0000 (20:12 +0200)] 
Fix test error about deprecation warning (#30205)

3 years ago[3.9] bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase (GH-30198...
Andrew Svetlov [Sun, 19 Dec 2021 16:59:37 +0000 (18:59 +0200)] 
[3.9] bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase (GH-30198) (GH-30204)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd89514a9a2865e2adcc472095f6949cecb2)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-46099: Fix pthread_getcpuclockid test on Solaris (GH-30140) (#30184)
Miss Islington (bot) [Sat, 18 Dec 2021 15:51:34 +0000 (07:51 -0800)] 
bpo-46099: Fix pthread_getcpuclockid test on Solaris (GH-30140) (#30184)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 427a490c495cde8a152e938c6f02be65620e3e59)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
3 years agobpo-46113: Minor fixes in stdtypes documentation (GH-30167) (GH-30187)
Miss Islington (bot) [Sat, 18 Dec 2021 14:26:04 +0000 (06:26 -0800)] 
bpo-46113: Minor fixes in stdtypes documentation (GH-30167) (GH-30187)

* Fix-1 - isidentifier() function output

* Fix-2 Update the str.splitlines() function parameter

* Fix-3 Removed unwanted full stop for str and bytes types double quotes examples.

* Fix-4 Updated class dict from **kwarg to **kwargs
(cherry picked from commit 6f2df4295123f8b961d49474b7668f7564a534a4)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
3 years ago[3.9] bpo-46104: Reduce use of pre-PEP 526 syntax in typing docs (GH-30148) (GH-30180)
Miss Islington (bot) [Sat, 18 Dec 2021 12:14:19 +0000 (04:14 -0800)] 
[3.9] bpo-46104: Reduce use of pre-PEP 526 syntax in typing docs (GH-30148) (GH-30180)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 6ada013df170b0afb6b61a0d942388c6fd81cbc9)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years ago[3.9] bpo-46044: Annotate deprecated sdists formats (GH-30043) (GH-30155)
Miss Islington (bot) [Fri, 17 Dec 2021 23:32:22 +0000 (15:32 -0800)] 
[3.9] bpo-46044: Annotate deprecated sdists formats (GH-30043) (GH-30155)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Éric <merwok@netwok.org>
3 years ago[3.9] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-30173)
Christian Heimes [Fri, 17 Dec 2021 16:02:38 +0000 (18:02 +0200)] 
[3.9] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-30173)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-46111: Fix unittest tests in optimized mode (GH-30163)
Miss Islington (bot) [Fri, 17 Dec 2021 09:35:58 +0000 (01:35 -0800)] 
bpo-46111: Fix unittest tests in optimized mode (GH-30163)

(cherry picked from commit 95a922b3bb3af247ec141d73fcdfbf68bb1d32a5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agoFix a typo in the message from make_ssl_certs. (GH-30152)
Miss Islington (bot) [Fri, 17 Dec 2021 05:49:37 +0000 (21:49 -0800)] 
Fix a typo in the message from make_ssl_certs. (GH-30152)

The file is utils.py not util.py.

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 69ef1b59983065ddb0b712dac3b04107c5059735)

Co-authored-by: Yilei "Dolee" Yang <yileiyang9@gmail.com>
3 years ago[3.9] bpo-46105: Honor spec when generating requirement specs with urls and extras...
Jason R. Coombs [Fri, 17 Dec 2021 00:58:19 +0000 (19:58 -0500)] 
[3.9] bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151). (GH-30157)

(cherry picked from commit 109d96602199a91e94eb14b8cb3720841f22ded7)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
3 years agobpo-28816: [doc] clarify that zipimport invokes importers only for python files ...
Miss Islington (bot) [Thu, 16 Dec 2021 12:23:17 +0000 (04:23 -0800)] 
bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) (GH-30134)

(cherry picked from commit a951c95a13c3555ac8fb1c8ee615ba3930ccc6f7)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agoFix the output of built-in iter() function example in Iterators (Section 9.8) of...
Miss Islington (bot) [Thu, 16 Dec 2021 11:04:53 +0000 (03:04 -0800)] 
Fix the output of built-in iter() function example in Iterators (Section 9.8) of The Python Tutorial (GH-30110)

Updated the output for it=iter(s) from <iterator object at 0x00A1DB50> to <str_iterator object at 0x10c90e650>
(cherry picked from commit c5d18a5014f649368b5a4bca94e9ec7d2908b481)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
3 years agoAdd Positional only arguments forward slash (/) to sorted() function in Built-in...
Miss Islington (bot) [Wed, 15 Dec 2021 13:00:03 +0000 (05:00 -0800)] 
Add Positional only arguments forward slash (/) to sorted() function in Built-in Functions document (GH-30113)

sorted() function is missing forward slash (/) in Built-in Functions documentation page.

Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit f025ae63dccf96c4a1d781a6438bd9ed1502f0a1)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
3 years agobpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099...
Miss Islington (bot) [Wed, 15 Dec 2021 12:24:48 +0000 (04:24 -0800)] 
bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099) (GH-30115)

(cherry picked from commit 86de99588db3beff964137f4fe27dd1077a09b35)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years ago[3.9] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (GH...
Miss Islington (bot) [Tue, 14 Dec 2021 17:27:22 +0000 (09:27 -0800)] 
[3.9] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (GH-30105)

3 years ago[3.9] bpo-46063: Improve algorithm for computing which rolled-over log file… (GH...
Miss Islington (bot) [Tue, 14 Dec 2021 01:19:50 +0000 (17:19 -0800)] 
[3.9] bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) (GH-30095)

3 years agoClarify new_event_loop return value. (GH-30078) (GH-30089)
Miss Islington (bot) [Mon, 13 Dec 2021 13:25:54 +0000 (05:25 -0800)] 
Clarify new_event_loop return value. (GH-30078) (GH-30089)

(cherry picked from commit e09705f58fc2ff3cc2720c6337ae3f48bb7cb090)

Co-authored-by: Paul Bryan <pbryan@anode.ca>
3 years ago [3.9] bpo-45840: Improve cross-references in the data model documentation (GH-29633...
Alex Waygood [Mon, 13 Dec 2021 12:19:08 +0000 (12:19 +0000)] 
 [3.9] bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30081)

Backport of GH-29633 to the 3.9 branch

3 years agobpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075...
Miss Islington (bot) [Mon, 13 Dec 2021 10:45:55 +0000 (02:45 -0800)] 
bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) (GH-30083)

(cherry picked from commit 481f3ffdbe40bd19677a1ba0ac2e7cece8949b47)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years ago[3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080)
Miss Islington (bot) [Mon, 13 Dec 2021 10:43:13 +0000 (02:43 -0800)] 
[3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080)

Functions signal(), getsignal(), pthread_sigmask(), sigpending(),
sigwait() and valid_signals() were omitted.

If __all__ is not defined all non-builtin functions should have
correct __module__.
(cherry picked from commit e08c0d8eec528f1d7a282ee19bcadb9aae9ec123)
(cherry picked from commit e55deaabd8de338138cf29aea6890996e794c997)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] bpo-13236: Flush the output stream more often in unittest (GH-29929) (GH-30039)
Miss Islington (bot) [Sat, 11 Dec 2021 00:34:46 +0000 (16:34 -0800)] 
[3.10] bpo-13236: Flush the output stream more often in unittest (GH-29929) (GH-30039)

It can prevent some losses when output to buffered stream..
(cherry picked from commit 83fa1291fd0a25216a4a9e990f423682fda67cbe)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-19737: Improved the documentation for globals (GH-29823) (GH-30042)
Miss Islington (bot) [Sat, 11 Dec 2021 00:32:29 +0000 (16:32 -0800)] 
bpo-19737: Improved the documentation for globals (GH-29823) (GH-30042)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 4fe5585240f64c3d14eb635ff82b163f92074b3a)

Co-authored-by: 180909 <734461790@qq.com>
3 years agobpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29759)
Miss Islington (bot) [Sat, 11 Dec 2021 00:03:15 +0000 (16:03 -0800)] 
bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29759)

(cherry picked from commit abfc794bbf2c6a0939ddd81b6e700c46944ba87a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[doc] Clarify MRO precedence in descriptor super binding section (GH-29539) (GH-29670)
Miss Islington (bot) [Sat, 11 Dec 2021 00:01:35 +0000 (16:01 -0800)] 
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539) (GH-29670)

A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.
(cherry picked from commit ee49484c0f0d0d79e8fc40835da10b78f89ae503)

Co-authored-by: Jouke Witteveen <j.witteveen@gmail.com>
3 years agobpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) ...
Miss Islington (bot) [Fri, 10 Dec 2021 23:29:28 +0000 (15:29 -0800)] 
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30038)

Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
(cherry picked from commit c1051e08b3c6d9045322763876a4b0aea98d79f9)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
3 years ago[3.9] bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216...
Miss Islington (bot) [Fri, 10 Dec 2021 18:06:07 +0000 (10:06 -0800)] 
[3.9] bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216) (GH-30033)

Co-authored-by: Ian Norton <inorton@gmail.com>
3 years agobpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023)
Miss Islington (bot) [Fri, 10 Dec 2021 11:21:19 +0000 (03:21 -0800)] 
bpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023)

(cherry picked from commit 2fb797e93c6bbd44dfcbe23f63acfa240a87e48a)

Co-authored-by: Thomas Klausner <tk@giga.or.at>
3 years agobpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384)
Miss Islington (bot) [Fri, 10 Dec 2021 10:04:54 +0000 (02:04 -0800)] 
bpo-42182: stdtypes doc - update and fix links to several dunder methods  (GH-27384)

(cherry picked from commit 8c74713d0e349c27518080945d5f040dfd52a56e)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 years ago[3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class...
Miss Islington (bot) [Fri, 10 Dec 2021 09:42:49 +0000 (01:42 -0800)] 
[3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) (GH-29924)

For example, InitVar[list[int]].
(cherry picked from commit 1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997)
Miss Islington (bot) [Thu, 9 Dec 2021 18:55:53 +0000 (10:55 -0800)] 
bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997)

(cherry picked from commit 3363e1cb05d0d19ed172ea63606d8cb6268747fc)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agoFix double-space in exception message (GH-29955) (GH-29983)
Miss Islington (bot) [Wed, 8 Dec 2021 11:41:50 +0000 (03:41 -0800)] 
Fix double-space in exception message (GH-29955) (GH-29983)

(cherry picked from commit c602c1be439e295fed9ebab47e895ef1d9df28be)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
3 years agobpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963)
Miss Islington (bot) [Tue, 7 Dec 2021 15:48:32 +0000 (07:48 -0800)] 
bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963)

(cherry picked from commit c7e7a4b969b5728d4b4f3c59bf98e1e830d5c6d6)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
3 years agobpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base...
Miss Islington (bot) [Tue, 7 Dec 2021 12:00:06 +0000 (04:00 -0800)] 
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) (GH-29928)

(cherry picked from commit 2b318ce1c988b7b6e3caf293d55f289e066b6e0f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.9] bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) (GH...
Miss Islington (bot) [Tue, 7 Dec 2021 11:45:49 +0000 (03:45 -0800)] 
[3.9] bpo-35821: Add an example to Logger.propagate documentation. (GH-29841) (GH-29958)

3 years agobpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH...
Miss Islington (bot) [Tue, 7 Dec 2021 10:25:02 +0000 (02:25 -0800)] 
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)

(cherry picked from commit 8db06528cacc94e67eb1fb2e4c2acc061a515671)

Co-authored-by: James Gerity <snoopjedi@gmail.com>
3 years ago[3.9] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29938)
Christian Heimes [Mon, 6 Dec 2021 12:48:54 +0000 (14:48 +0200)] 
[3.9] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29938)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29933)
Ned Deily [Mon, 6 Dec 2021 07:39:56 +0000 (02:39 -0500)] 
bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29933)

3 years agobpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAl...
Miss Islington (bot) [Sun, 5 Dec 2021 21:25:43 +0000 (13:25 -0800)] 
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)

(cherry picked from commit 446be166861b2f08f87f74018113dd98ca5fca02)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
Miss Islington (bot) [Sun, 5 Dec 2021 19:04:59 +0000 (11:04 -0800)] 
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)

Getting an attribute via attrib.get() simultaneously with replacing
the attrib dict can lead to access to deallocated dict.
(cherry picked from commit d15cdb2f32f572ce56d7120135da24b9fdce4c99)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)
Miss Islington (bot) [Sat, 4 Dec 2021 05:28:30 +0000 (21:28 -0800)] 
bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)

(cherry picked from commit 9f2f7e42269db74a89fc8cd74d82a875787f01d7)

Co-authored-by: Zachary Ware <zach@python.org>
3 years agodocs: Improve example for urlparse() (GH-29816) (GH-29889)
Miss Islington (bot) [Thu, 2 Dec 2021 10:24:51 +0000 (02:24 -0800)] 
docs: Improve example for urlparse() (GH-29816) (GH-29889)

(cherry picked from commit 226d22ff2d209495621550eb78e81ed4c0fe0152)

Co-authored-by: Christian Clauss <cclauss@me.com>
3 years agobpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29878)
Miss Islington (bot) [Wed, 1 Dec 2021 15:40:50 +0000 (07:40 -0800)] 
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29878)

(cherry picked from commit f27bef30438d2f07f19de91e021f34b77ccc4b20)

Co-authored-by: Rob <r4226@pm.me>
Co-authored-by: Rob <r4226@pm.me>
3 years agobpo-37658: Actually return result in race condition (GH-29202) (GH-29832)
Miss Islington (bot) [Tue, 30 Nov 2021 13:39:13 +0000 (05:39 -0800)] 
bpo-37658: Actually return result in race condition (GH-29202) (GH-29832)

(cherry picked from commit 934a82623793e9d52b85f74d5395d65927a52205)

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
3 years agobpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH...
Miss Islington (bot) [Tue, 30 Nov 2021 11:50:28 +0000 (03:50 -0800)] 
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29863)

(cherry picked from commit f97ec09baf8431494fd2ef5133090c7b0afd0551)

Co-authored-by: Vishal Pandey <vishalpandeyviptsk@gmail.com>
3 years agobpo-45931: Prevent Directory.Build.props/targets from leaking from directories above...
Miss Islington (bot) [Mon, 29 Nov 2021 23:08:53 +0000 (15:08 -0800)] 
bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (GH-29854)

(cherry picked from commit 734ed3538314c9651ae64d5e2e0e98aae3aec17b)

Co-authored-by: David Federman <david.federman@outlook.com>
3 years agobpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
Miss Islington (bot) [Mon, 29 Nov 2021 18:30:38 +0000 (10:30 -0800)] 
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)

Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0d378958dfae4f24aad0c0088e3e04e403)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 years ago[3.9] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29850)
Miss Islington (bot) [Mon, 29 Nov 2021 17:53:37 +0000 (09:53 -0800)] 
[3.9] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29850)

3 years ago[3.9] [Doc] Add info to logging cookbook about running logging socket listeners i...
Miss Islington (bot) [Mon, 29 Nov 2021 13:49:20 +0000 (05:49 -0800)] 
[3.9] [Doc] Add info to logging cookbook about running logging socket listeners i… (GH-29838) (GH-29840)

3 years agobpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
Miss Islington (bot) [Mon, 29 Nov 2021 12:28:46 +0000 (04:28 -0800)] 
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)

(cherry picked from commit 7431448b817d3bf87f71661cf8f3d537807ab2e2)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
3 years agobpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726...
Irit Katriel [Mon, 29 Nov 2021 10:11:48 +0000 (10:11 +0000)] 
bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29827)

(cherry picked from commit 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5)

3 years ago[3.9] bpo-19460: Add test for MIMENonMultipart (GH-29817) (#29819)
Miss Islington (bot) [Sun, 28 Nov 2021 14:33:50 +0000 (06:33 -0800)] 
[3.9] bpo-19460: Add test for MIMENonMultipart (GH-29817) (#29819)

* bpo-19460: Add test for MIMENonMultipart (GH-29817)
(cherry picked from commit 46c8d915715aa2bd4d697482aa051fe974d440e1)

Co-authored-by: 180909 <wjh180909@gmail.com>
* Update 2021-11-28-15-25-02.bpo-19460.lr0aWs.rst

Co-authored-by: 180909 <wjh180909@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years ago[3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29588)
Ma Lin [Sat, 27 Nov 2021 00:21:22 +0000 (08:21 +0800)] 
[3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29588)

* Fix thread lock in zlib.Decompress.flush() may go wrong
Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.

backport of https://github.com/python/cpython/pull/29587 to 3.9/3.8.

3 years agobpo-45901: Fixes argument passing when invoking .py files directly through the Store...
Miss Islington (bot) [Fri, 26 Nov 2021 23:43:12 +0000 (15:43 -0800)] 
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)

3 years agobpo-45866: Fix typo in the NEWS entry (GH-29798)
Miss Islington (bot) [Fri, 26 Nov 2021 22:20:14 +0000 (14:20 -0800)] 
bpo-45866: Fix typo in the NEWS entry (GH-29798)

(cherry picked from commit 9a7611a7c4da6406383f8ffcea272ded6f890f1e)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792...
Victor Stinner [Fri, 26 Nov 2021 16:23:41 +0000 (17:23 +0100)] 
bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792) (GH-29797)

"make regen-all" now produces the same output when run from a
directory other than the source tree: when building Python out of the
source tree.

(cherry picked from commit 253b7a0a9fef1d72a4cb87b837885576e68e917c)
(cherry picked from commit b6defde2afe656db830d6fedf74ca5f6225f5928)

3 years agobpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776)
Victor Stinner [Fri, 26 Nov 2021 09:59:31 +0000 (10:59 +0100)] 
bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776)

Fix Python.h to build C extensions with Xcode: remove a relative
include from Include/cpython/pystate.h.

(cherry picked from commit 4ae26b9c1d0c33e3db92c6f305293f9240dea358)

3 years ago[3.9] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29783)
Christian Heimes [Thu, 25 Nov 2021 21:51:52 +0000 (23:51 +0200)] 
[3.9] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29783)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.9] bpo-45881: Use CC from env first for cross building (GH-29752) (GH-29754)
Christian Heimes [Thu, 25 Nov 2021 19:53:14 +0000 (21:53 +0200)] 
[3.9] bpo-45881: Use CC from env first for cross building (GH-29752) (GH-29754)

Co-authored-by: Christian Heimes <christian@python.org>.
Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.9] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29774)
Christian Heimes [Thu, 25 Nov 2021 12:02:54 +0000 (14:02 +0200)] 
[3.9] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29774)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29763)
Miss Islington (bot) [Wed, 24 Nov 2021 20:40:09 +0000 (12:40 -0800)] 
bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29763)

Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit d71c7bc7339eb82de493c66ebbbfa1cad250ac78)

Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
3 years agobpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691...
Miss Islington (bot) [Mon, 22 Nov 2021 16:36:28 +0000 (08:36 -0800)] 
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29709)

3 years ago[3.9] bpo-45845: Change link for pyserial (GH-29675)
Miss Islington (bot) [Sat, 20 Nov 2021 20:52:07 +0000 (12:52 -0800)] 
[3.9] bpo-45845: Change link for pyserial (GH-29675)

(cherry picked from commit 123a3527ddd7774e8db325c778927e49172e01d4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-44844: Remove unresponsive web link (GH-29651)
Miss Islington (bot) [Sat, 20 Nov 2021 18:44:04 +0000 (10:44 -0800)] 
bpo-44844: Remove unresponsive web link (GH-29651)

Threading notes by Aahz from OSCON 2001.
(cherry picked from commit 985233914504c73f14a23af1c68a3709079e6913)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) ...
Miss Islington (bot) [Sat, 20 Nov 2021 15:57:37 +0000 (07:57 -0800)] 
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) (GH-29657)

(cherry picked from commit bc2bc0dbdb52498d009f9f9771452e6aa4faff2b)

Co-authored-by: JMcB <joel.mcbride1@live.com>
3 years agobpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630)
Hugo van Kemenade [Fri, 19 Nov 2021 18:55:15 +0000 (20:55 +0200)] 
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630)

3 years ago[3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628)
Sam Gross [Fri, 19 Nov 2021 18:53:46 +0000 (13:53 -0500)] 
[3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628)

The line number calculation in libpython.py did not properly handle
negative (signed) line table deltas.

3 years ago[3.9] bpo-45806: Fix recovery from stack overflow for 3.9. Again. (GH-29640)
Mark Shannon [Fri, 19 Nov 2021 18:51:50 +0000 (18:51 +0000)] 
[3.9] bpo-45806: Fix recovery from stack overflow for 3.9. Again. (GH-29640)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years ago[3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) (GH-29632)
Miss Islington (bot) [Thu, 18 Nov 2021 21:45:15 +0000 (13:45 -0800)] 
[3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) (GH-29632)

... To the Installation paths section of the sysconfig doc.
(cherry picked from commit 4575c01b750cd26377e803247c38d65dad15e26a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.9] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in...
Miss Islington (bot) [Thu, 18 Nov 2021 17:41:09 +0000 (09:41 -0800)] 
[3.9] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the  data model (GH-29389) (GH-29619)

The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
(cherry picked from commit 31b3a70edb1216bdc8fab3b2eafd8ddb00487f41)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agobpo-45835: Fix race condition in test_queue (GH-29601)
Miss Islington (bot) [Thu, 18 Nov 2021 16:16:06 +0000 (08:16 -0800)] 
bpo-45835: Fix race condition in test_queue (GH-29601)

Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).

This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.
(cherry picked from commit df3e53d86b2ad67da9ac2b5a3f56257d1f394982)

Co-authored-by: Sam Gross <colesbury@gmail.com>
3 years agobpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-29605)
Miss Islington (bot) [Thu, 18 Nov 2021 16:09:41 +0000 (08:09 -0800)] 
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-29605)

unittest.TestCase.assertWarns no longer raises a RuntimeException
when accessing a module's ``__warningregistry__`` causes importation of a new
module, or when a new module is imported in another thread.

Patch by Kernc.
(cherry picked from commit 46398fba4d66ad342cf2504ef947b5fb857423b2)

Co-authored-by: kernc <kerncece@gmail.com>