]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
Miss Islington (bot) [Tue, 22 Feb 2022 21:10:04 +0000 (13:10 -0800)] 
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
3 years ago[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE ...
Miss Islington (bot) [Tue, 22 Feb 2022 18:43:55 +0000 (10:43 -0800)] 
[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name'  and .SECTCRE (GH-31413) (GH-31507)

(cherry picked from commit bba8008f99d615a02984422a3825082bb5621f5a)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
3 years agobpo-36557: Updated wording for using/windows (GH-31457)
Miss Islington (bot) [Tue, 22 Feb 2022 18:03:30 +0000 (10:03 -0800)] 
bpo-36557: Updated wording for using/windows (GH-31457)

(cherry picked from commit 9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.9] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31474)
Miss Islington (bot) [Mon, 21 Feb 2022 17:18:55 +0000 (09:18 -0800)] 
[3.9] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31474)

(cherry picked from commit 0a222db2bca63070f429c0e613707da1bdfaf0e0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31469)
Miss Islington (bot) [Mon, 21 Feb 2022 16:16:23 +0000 (08:16 -0800)] 
bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31469)

Curly brackets were never allowed in namespace URIs
according to RFC 3986, and so-called namespace-validating
XML parsers have the right to reject them a invalid URIs.

libexpat >=2.4.5 has become strcter in that regard due to
related security issues; with ET.XML instantiating a
namespace-aware parser under the hood, this test has no
future in CPython.

References:
- https://datatracker.ietf.org/doc/html/rfc3968
- https://www.w3.org/TR/xml-names/

Also, test_minidom.py: Support Expat >=2.4.5
(cherry picked from commit 2cae93832f46b245847bdc252456ddf7742ef45e)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
3 years agobpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)
Miss Islington (bot) [Mon, 21 Feb 2022 08:07:54 +0000 (00:07 -0800)] 
bpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)

It fixes the "Text File Busy" OSError when using 'rmtree' on a
windows-managed filesystem in via the VirtualBox shared folder
(and possible other scenarios like a windows-managed network file
system).
(cherry picked from commit b77158b4da449ec5b8f682816a79d004fd65ed07)

Co-authored-by: Lital Natan <litaln@gmail.com>
3 years agoreplace `self` param with more appropriate `cls` in classmethods (GH-31402) (#31445)
Miss Islington (bot) [Mon, 21 Feb 2022 00:10:35 +0000 (16:10 -0800)] 
replace `self` param with more appropriate `cls` in classmethods (GH-31402) (#31445)

(cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa)

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
3 years agoImprove discussion about how __getattr__ is invoked. (GH-31435) (GH-31438)
Miss Islington (bot) [Sun, 20 Feb 2022 13:37:00 +0000 (05:37 -0800)] 
Improve discussion about how __getattr__ is invoked. (GH-31435) (GH-31438)

3 years ago[3.9] Raise TypeError if SSLSocket is passed to asyncio transport-based methods ...
Andrew Svetlov [Sun, 20 Feb 2022 12:49:27 +0000 (14:49 +0200)] 
[3.9] Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442) (GH-31444)

(cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years ago[3.9] bpo-46672: fix `NameError` in `asyncio.gather` if type check fails (GH-31187...
Andrew Svetlov [Sun, 20 Feb 2022 12:39:21 +0000 (14:39 +0200)] 
[3.9] bpo-46672: fix `NameError` in `asyncio.gather` if type check fails (GH-31187) (GH-31441)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoCounter doc mentions three methods, but lists four (GH-30706)
Miss Islington (bot) [Sat, 19 Feb 2022 02:49:48 +0000 (18:49 -0800)] 
Counter doc mentions three methods, but lists four (GH-30706)

Was probably caused by the addition of the `total()` method
(cherry picked from commit 99331fcf175b03b6b82451ac9aa953b476ab48e0)

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>
3 years ago[docs] Correct typos in SSLContext.sni_callback (GH-30623)
Miss Islington (bot) [Sat, 19 Feb 2022 02:13:33 +0000 (18:13 -0800)] 
[docs] Correct typos in SSLContext.sni_callback (GH-30623)

Co-authored-by: Jörn Heissler <nosuchaddress@joern-heissler.de>
(cherry picked from commit f80a97b492f41afd3c42bb2bd6da7b2828dca215)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
3 years agobpo-46784: Add newly exported expat symbols to the namespace. (GH-31397)
Miss Islington (bot) [Fri, 18 Feb 2022 23:13:16 +0000 (15:13 -0800)] 
bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397)

The libexpat 2.4.1 upgrade from  introduced the following new exported symbols:

* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`

We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)

(The newer libexpat upgrade  has no new symbols).

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 6312c1052c0186b4596fc45c42fd3ade9f8f5911)

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
3 years agoFix mistake in barry_as_FLUFL test (GH-31392)
Miss Islington (bot) [Fri, 18 Feb 2022 02:08:28 +0000 (18:08 -0800)] 
Fix mistake in barry_as_FLUFL test (GH-31392)

Use assertEqual(), not assertTrue(lineno, 2)
(cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66)

Co-authored-by: Patrick Reader <_@pxeger.com>
3 years agobpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31295)
Miss Islington (bot) [Thu, 17 Feb 2022 21:58:26 +0000 (13:58 -0800)] 
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31295)

3 years agoUpdate html.parser.rst (GH-30678)
Miss Islington (bot) [Thu, 17 Feb 2022 12:46:25 +0000 (04:46 -0800)] 
Update html.parser.rst (GH-30678)

This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will

- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
(cherry picked from commit 2945f5a7c51200bfc5c493ccb626fc414e1385b1)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years ago[3.9] Become a CODEOWNER for typing (GH-31374) (GH-31381)
Miss Islington (bot) [Thu, 17 Feb 2022 04:06:25 +0000 (20:06 -0800)] 
[3.9] Become a CODEOWNER for typing (GH-31374) (GH-31381)

(cherry picked from commit 6f1efd19a70839d480e4b1fcd9fecd3a8725824b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Automerge-Triggered-By: GH:JelleZijlstra
3 years agobpo-46333: Honor `module` parameter in ForwardRef (GH-30536)
Miss Islington (bot) [Thu, 17 Feb 2022 03:53:31 +0000 (19:53 -0800)] 
bpo-46333: Honor `module` parameter in ForwardRef (GH-30536)

The `module` parameter carries semantic information about the forward ref.
Forward refs are different if they refer to different module even if they
have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods.

Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a)

Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com>
3 years agobpo-46762: Fix an assert failure in f-strings where > or < is the last character...
Miss Islington (bot) [Wed, 16 Feb 2022 11:18:16 +0000 (03:18 -0800)] 
bpo-46762: Fix an assert failure in f-strings where > or < is the last character if the f-string is missing a trailing right brace. (GH-31365)

(cherry picked from commit ffd9f8ff84ed53c956b16d027f7d2926ea631051)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
3 years agobpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (31327)
Miss Islington (bot) [Tue, 15 Feb 2022 17:08:24 +0000 (09:08 -0800)] 
bpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (31327)

The docstring for `BufferedProtocol` states that the class is still an "experimental API", but it has been considered stable since 3.8.
(cherry picked from commit 1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years ago[3.9] bpo-46728: fix docstring of combinations_with_replacement for consistency ...
DongGeon Lee [Tue, 15 Feb 2022 12:22:01 +0000 (21:22 +0900)] 
[3.9] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293). (GH-31356)

3 years agoUpdate the OMG link (GH-30383)
Miss Islington (bot) [Mon, 14 Feb 2022 22:15:08 +0000 (14:15 -0800)] 
Update the OMG link (GH-30383)

(cherry picked from commit 04215a427232e55efdc1adcda50a15197f518ca9)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years agodoc: use colon for all color's rangs (GH-28998)
Miss Islington (bot) [Mon, 14 Feb 2022 20:13:33 +0000 (12:13 -0800)] 
doc: use colon for all color's rangs (GH-28998)

(cherry picked from commit 6b9f27dd0b5da53b1fd648494879d857572bec80)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
3 years agobpo-46436: Fix command-line option -d/--directory in module http.server (GH-30701)
Miss Islington (bot) [Mon, 14 Feb 2022 20:12:15 +0000 (12:12 -0800)] 
bpo-46436: Fix command-line option -d/--directory in module http.server (GH-30701)

Fix command-line option -d/--directory in http.server main
function that was ignored when combined with --cgi.

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 2d080347d74078a55c47715d232d1ab8dc8cd603)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years agobpo-38619: Update the documentation for UUID.hex (GH-29830)
Miss Islington (bot) [Mon, 14 Feb 2022 19:25:15 +0000 (11:25 -0800)] 
bpo-38619: Update the documentation for UUID.hex (GH-29830)

Explicitly state that it is lowercase.

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

Co-authored-by: 180909 <wjh180909@gmail.com>
3 years agoFix minor grammar error (GH-31325)
Miss Islington (bot) [Mon, 14 Feb 2022 19:10:38 +0000 (11:10 -0800)] 
Fix minor grammar error (GH-31325)

"an" followed by consonant should be "a"
(cherry picked from commit 0d29e7a06f98e8312b699d4531d27b76add1249f)

Co-authored-by: Scott Noyes <snoyes@gmail.com>
3 years ago[3.9] Corrections to format precision description. (GH-31291) (GH-31321)
John Belmonte [Mon, 14 Feb 2022 03:05:11 +0000 (12:05 +0900)] 
[3.9] Corrections to format precision description. (GH-31291) (GH-31321)

* `precision` field is a decimal integer
  * clarify that stated limitations are on presentation type
    rather than input value type.  Especially misleading is
    "precision is not allowed for integer values", since integer
    value input to a format like `.1f` is fine.
  * regarding max field size, replace "non-number" with "string",
    which is the only non-numeric presentation type

Automerge-Triggered-By: GH:ericvsmith.
(cherry picked from commit 1d6ce67c29aa2166ef326952cb605b908fb4f987)

Co-authored-by: John Belmonte <john@neggie.net>
3 years agobpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)
Dennis Sweeney [Sun, 13 Feb 2022 10:29:42 +0000 (05:29 -0500)] 
bpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)

Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.

(cherry picked from commit 4a66615ba736f84eadf9456bfd5d32a94cccf117)

3 years agobpo-45447: Add entry to What's new 3.9 (GH-31305)
Miss Islington (bot) [Sun, 13 Feb 2022 06:30:36 +0000 (22:30 -0800)] 
bpo-45447: Add entry to What's new 3.9 (GH-31305)

(cherry picked from commit cef91ca80c41749824eca1d4b2c99731e3d5f64c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)
Miss Islington (bot) [Sun, 13 Feb 2022 01:19:25 +0000 (17:19 -0800)] 
bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)

Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c49e19f917305dd7b9c71085c11edddb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 9fabcfbe68ff81ef5f17f86a93daf9cce9d83876)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser...
Jacob Walls [Sun, 13 Feb 2022 00:16:31 +0000 (19:16 -0500)] 
[3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) (GH-31299)

Both implementations accept target=None now.

(cherry picked from commit 168fd6453b5de15236116f9261d64601d92571ac)

3 years agobpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)
Miss Islington (bot) [Fri, 11 Feb 2022 21:03:45 +0000 (13:03 -0800)] 
bpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)

Remove pathlib classes from the list in stdtypes.rst of classes
that can be parameterized at runtime.
(cherry picked from commit e0bc8ee945af96f9395659bbe3cc30b082e7a361)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agoFix the signature of multiprocessing.set_executable (GH-31276)
Miss Islington (bot) [Fri, 11 Feb 2022 15:08:44 +0000 (07:08 -0800)] 
Fix the signature of multiprocessing.set_executable (GH-31276)

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4f9386661d51b78348395e78710f3bfbee9fd1de)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years ago[3.9] Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio...
Andrew Svetlov [Thu, 10 Feb 2022 13:32:05 +0000 (15:32 +0200)] 
[3.9] Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio (GH-31253). (GH-31256)

(cherry picked from commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)
Miss Islington (bot) [Wed, 9 Feb 2022 17:35:56 +0000 (09:35 -0800)] 
bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)

Numeric fields of type float, notably mtime, can't be represented
exactly in the ustar header, so the pax header is used. But it is
helpful to set them to the nearest int (i.e. second rather than
nanosecond precision mtimes) in the ustar header as well, for the
benefit of unarchivers that don't understand the pax header.

Add test for tarfile.TarInfo.create_pax_header to confirm correct
behaviour.
(cherry picked from commit bf2d44ffb06e8f49aacc6b1c140a6717df5cf897)

Co-authored-by: Joshua Root <jmr@macports.org>
3 years agobpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)
Miss Islington (bot) [Wed, 9 Feb 2022 15:12:32 +0000 (07:12 -0800)] 
bpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)

(cherry picked from commit d2d1d49eaccaa83eb8873ba15f2fc9562143bc56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46638: Makes registry virtualisation setting stable when building MSIX packages...
Miss Islington (bot) [Mon, 7 Feb 2022 17:37:01 +0000 (09:37 -0800)] 
bpo-46638: Makes registry virtualisation setting stable when building MSIX packages (GH-31130)

(cherry picked from commit 3a5afc14e16370c1f4f72d43cb553298ad9a1fa4)

3 years agobpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP server (GH-31186)
Miss Islington (bot) [Mon, 7 Feb 2022 13:14:06 +0000 (05:14 -0800)] 
bpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP server (GH-31186)

Re-enable test_issue16464() of test_urllib2, move it to urllib2_localnet
and use the local HTTP server rather than an external HTTP server.
(cherry picked from commit 8e98175a03fe03d62822d96007a74e5273013764)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
Miss Islington (bot) [Mon, 7 Feb 2022 08:08:10 +0000 (00:08 -0800)] 
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)

va_end() must be called before returning.
(cherry picked from commit 59e004af63742361b67d1e1ae70229ff0db1059d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
3 years agobpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)
Miss Islington (bot) [Sun, 6 Feb 2022 14:30:18 +0000 (06:30 -0800)] 
bpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)

POST requests to http://www.example.com/ fail randomly.
(cherry picked from commit 1578de2fcd685c71f9c84e09bac32901dea192c1)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years ago[3.9] bpo-46609: Update asyncio-task coroutine doc (GH-31132) 31140/head
Miss Islington (bot) [Fri, 4 Feb 2022 20:46:09 +0000 (12:46 -0800)] 
[3.9] bpo-46609: Update asyncio-task coroutine doc (GH-31132)

@coroutine in removed in 3.11, not 3.10.
(cherry picked from commit 5603db43ba7ba5568b7516d0e28730a2bc1e1f26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-46629: Update classicAppCompat.sccd for new signing certificate (GH-31111)
Miss Islington (bot) [Fri, 4 Feb 2022 16:38:09 +0000 (08:38 -0800)] 
bpo-46629: Update classicAppCompat.sccd for new signing certificate (GH-31111)

(cherry picked from commit 9b4e3d94a5746af093392ed8e977b26fcc1bfd11)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agoOptimize images by IMGbot (GH-21348)
Miss Islington (bot) [Fri, 4 Feb 2022 07:15:17 +0000 (23:15 -0800)] 
Optimize images by IMGbot (GH-21348)

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
(cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88)

Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
3 years agobpo-46588: fix typo in test_calltip.py (GH-31119)
Miss Islington (bot) [Fri, 4 Feb 2022 05:05:42 +0000 (21:05 -0800)] 
bpo-46588: fix typo in test_calltip.py  (GH-31119)

(cherry picked from commit 222865daabfa7a8b12ca9a5e9c23b9ce217448f1)

Co-authored-by: Caio Agiani <agianicaio@gmail.com>
3 years agobpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
Miss Islington (bot) [Thu, 3 Feb 2022 22:33:26 +0000 (14:33 -0800)] 
bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)

On Windows, one had to Tab or click on the entry box
to get a cursor and be able to enter anything.
(cherry picked from commit d1df81a730499cc6286d02afa6028a1e9c22bbbf)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45975: IDLE - Remove extraneous parens (GH-31107)
Miss Islington (bot) [Thu, 3 Feb 2022 20:44:23 +0000 (12:44 -0800)] 
bpo-45975: IDLE - Remove extraneous parens (GH-31107)

mistakenly included in 3 files in previous PR
and backported both to 3.10 and 3.9.
(cherry picked from commit 916d0d822c79933f4c420f7a36f16f3eb788646b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.9] [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_gene...
Miss Islington (bot) [Thu, 3 Feb 2022 04:32:54 +0000 (20:32 -0800)] 
[3.9] [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089) (GH-31093)

Disable compiler optimization within test_peg_generator.

This speed up test_peg_generator by always disabling compiler
optimizations by using -O0 or equivalent when the test is building its
own C extensions.

A build not using --with-pydebug in order to speed up test execution
winds up with this test taking a very long time as it would do
repeated compilation of parser C code using the same optimization
flags as CPython was built with.

This speeds the test up 6-8x on gps-raspbian.

Also incorporate's GH-31017's win32 conditional and flags.

Co-authored-by: Kumar Aditya kumaraditya303.
(cherry picked from commit 164a017e13ee96bd1ea1ae79f5ac9e25fe83994e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit f5ebec4d3e1199ec38b88920cfde8e460e5120dd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Automerge-Triggered-By: GH:gpshead
3 years ago[3.9] bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)
Terry Jan Reedy [Thu, 3 Feb 2022 03:12:38 +0000 (22:12 -0500)] 
[3.9] bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)

co-authored by Nick Drozd
cherrypicked from 51a95be1d035a717ab29e98056b8831a98e61125

3 years agobpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completi...
Miss Islington (bot) [Wed, 2 Feb 2022 20:23:49 +0000 (12:23 -0800)] 
bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completion (GH-31086)

(cherry picked from commit 89a0a90c2e0e685bc70206fc45e4413c4f4411ed)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years ago[3.9] bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_cache (GH...
Petr Viktorin [Wed, 2 Feb 2022 13:50:43 +0000 (14:50 +0100)] 
[3.9] bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_cache (GH-29384) (GH-30922) (GH-31076)

Consider the following directory structure:

    .
    └── PATH1
        └── namespace
            └── sub1
                └── __init__.py

And both PATH1 and PATH2 in sys path:

    $ PYTHONPATH=PATH1:PATH2 python3.11
    >>> import namespace
    >>> import namespace.sub1
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> ...

While this interpreter still runs, PATH2/namespace/sub2 is created:

    .
    ├── PATH1
    │   └── namespace
    │       └── sub1
    │           └── __init__.py
    └── PATH2
        └── namespace
            └── sub2
                └── __init__.py

The newly created module cannot be imported:

    >>> ...
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'namespace.sub2'

Calling importlib.invalidate_caches() now newly allows to import it:

    >>> import importlib
    >>> importlib.invalidate_caches()
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])

This was not previously possible.

Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
Automerge-Triggered-By: GH:encukou
3 years agobpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)
Miss Islington (bot) [Wed, 2 Feb 2022 02:16:58 +0000 (18:16 -0800)] 
bpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)

test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eafc709cbe8a2a0bdde082d25df0c5034de7)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-46591: Make About IDLE doc link label clickable (GH-30251)
Miss Islington (bot) [Wed, 2 Feb 2022 01:47:09 +0000 (17:47 -0800)] 
bpo-46591: Make About IDLE doc link label clickable (GH-30251)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 53c78080573b3bae4c4e782b9f47dce48aac9688)

Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
3 years agobpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports (GH...
Miss Islington (bot) [Tue, 1 Feb 2022 19:29:45 +0000 (11:29 -0800)] 
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports (GH-30958)

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

Co-authored-by: Emiya <importz750@gmail.com>
3 years agobpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057) (GH-31059)
Miss Islington (bot) [Tue, 1 Feb 2022 17:12:59 +0000 (09:12 -0800)] 
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057) (GH-31059)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit 519eb6ad74f946a9aa7676e2d6579a3a765a8b50)

3 years ago[3.9] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024...
Miss Islington (bot) [Tue, 1 Feb 2022 14:42:49 +0000 (06:42 -0800)] 
[3.9] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024) (GH-31053)

(cherry picked from commit 913e340a323c7e61ae6e4acbb1312b4342657bec)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.9] bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) (GH-31048)
Miss Islington (bot) [Tue, 1 Feb 2022 11:31:49 +0000 (03:31 -0800)] 
[3.9] bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) (GH-31048)

(cherry picked from commit 108e66b6d23efd0fc2966163ead9434b328c5f17)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
3 years ago[3.9] bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821) (GH-31045)
Miss Islington (bot) [Tue, 1 Feb 2022 10:25:25 +0000 (02:25 -0800)] 
[3.9] bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821) (GH-31045)

(cherry picked from commit 4c0612ad00ba45dbea2a86f7db6d21546cf243f8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Automerge-Triggered-By: GH:Fidget-Spinner
3 years agobpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035)
Miss Islington (bot) [Mon, 31 Jan 2022 20:03:44 +0000 (12:03 -0800)] 
bpo-46542: test_lib2to3 uses support.infinite_recursion() (GH-31035)

* bpo-46542: test_lib2to3 uses support.infinite_recursion()

Fix a Python crash in test_lib2to3 when using Python built in debug
mode: limit the recursion limit.

The test_all_project_files() test of test_lib2to3 now uses the
test.support.infinite_recursion() context manager when processing the
infinite_recursion.py file to prevent a crash when Python is built in
debug mode.

The two test_all_project_files() tests now use subTest() and log the
refactored/parsed filename (if test_lib2to3 is run in verbose mode).

* Update Lib/lib2to3/tests/data/infinite_recursion.py

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ee0ac328d38a86f7907598c94cb88a97635b32f8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)
Miss Islington (bot) [Fri, 28 Jan 2022 17:57:59 +0000 (09:57 -0800)] 
bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485)

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

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agobpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913)
Miss Islington (bot) [Fri, 28 Jan 2022 16:56:26 +0000 (08:56 -0800)] 
bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913)

(cherry picked from commit c27a33132be101e246ae2584f1826477357138d6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46542: test_json uses support.infinite_recursion() (GH-30972)
Miss Islington (bot) [Fri, 28 Jan 2022 01:04:56 +0000 (17:04 -0800)] 
bpo-46542: test_json uses support.infinite_recursion() (GH-30972)

Fix test_json tests checking for RecursionError: modify these tests
to use support.infinite_recursion().
(cherry picked from commit e7a6285f1be18992191599792524d3aa6aedfa55)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)
Miss Islington (bot) [Thu, 27 Jan 2022 16:59:43 +0000 (08:59 -0800)] 
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)

(cherry picked from commit 098a33f6a60ca2df88e03024ac9d8da507cfa5c8)

3 years agobpo-46539: Pass status of special typeforms to forward references (GH-30926)
Miss Islington (bot) [Thu, 27 Jan 2022 16:47:35 +0000 (08:47 -0800)] 
bpo-46539: Pass status of special typeforms to forward references (GH-30926)

Previously this didn't matter because there weren't any valid code paths
that could trigger a type check with a special form, but after the bug
fix for `Annotated` wrapping special forms it's now possible to annotate
something like `Annotated['ClassVar[int]', (3, 4)]`. This change would
also be needed for proposed future changes, such as allowing `ClassVar`
and `Final` to nest each other in dataclasses.
(cherry picked from commit ced50051bb752a7c1e616f4b0c001f37f0354f32)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years agobpo-44734: Fix floating point precision in test_turtle (GH-30910)
Miss Islington (bot) [Thu, 27 Jan 2022 14:23:52 +0000 (06:23 -0800)] 
bpo-44734: Fix floating point precision in test_turtle (GH-30910)

(cherry picked from commit aa78287bc6d1c4fc07ee134642eb72db67b771a0)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
3 years agobpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve...
Miss Islington (bot) [Thu, 27 Jan 2022 10:50:43 +0000 (02:50 -0800)] 
bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers.  (GH-29236)

(cherry picked from commit 08c0ed2d9c0d01ad1a5adc0787bc75e4e90cbb85)

Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com>
3 years agobpo-46496: news39 for bpo45296 (#30949)
Terry Jan Reedy [Thu, 27 Jan 2022 04:10:00 +0000 (23:10 -0500)] 
bpo-46496: news39 for bpo45296 (#30949)

(cherry picked from commit 9f0881476e0113d3a35e0ffa96649b9276dd75c5)

3 years agobpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
Miss Islington (bot) [Thu, 27 Jan 2022 03:41:13 +0000 (19:41 -0800)] 
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)

In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
(cherry picked from commit fcde0bc10ddd836b62d0a8e893d80b8c55e0ba3f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.9] bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925) (GH...
Pablo Galindo Salgado [Thu, 27 Jan 2022 00:16:44 +0000 (00:16 +0000)] 
[3.9] bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925) (GH-30934)

Since,

- Py_CompileString no longer allows to distinguish "incomplete input"
  from "invalid input"
- there is no alternative solution available from the Python C API
  due to how the new parser works (rewritten in 3.9)
- the only supported way is to manually import the codeop module from C
  and use its API as IDLE does, and accept its own complications

it is desirable to remove this Q&A from the official FAQ..
(cherry picked from commit f0a648152f2d8011f47cc49873438ebaf01d3f82)

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
3 years agobpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)
Miss Islington (bot) [Wed, 26 Jan 2022 23:50:30 +0000 (15:50 -0800)] 
bpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)

Fix GCC detection in setup.py when cross-compiling. The C compiler is
now run with LC_ALL=C. Previously, the detection failed with a German
locale.
(cherry picked from commit a9503ac39474a9cb1b1935ddf159c0d9672b04b6)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-43698: do not use `...` as argument name in docs (GH-30502)
Miss Islington (bot) [Wed, 26 Jan 2022 12:42:39 +0000 (04:42 -0800)] 
bpo-43698: do not use `...` as argument name in docs (GH-30502)

(cherry picked from commit b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915)
Christian Heimes [Wed, 26 Jan 2022 11:20:39 +0000 (13:20 +0200)] 
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)
Miss Islington (bot) [Wed, 26 Jan 2022 10:40:40 +0000 (02:40 -0800)] 
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)

(cherry picked from commit d0c690b5f85c679de6059cf353fe0524e905530e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905)
Miss Islington (bot) [Wed, 26 Jan 2022 05:15:03 +0000 (21:15 -0800)] 
bpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905)

(cherry picked from commit 7cf285d82ec722d4225297366013e924805171f2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving ...
Miss Islington (bot) [Tue, 25 Jan 2022 17:40:34 +0000 (09:40 -0800)] 
bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving (GH-30845) (#30861)

(cherry picked from commit 1c705fda8f9902906edd26d46acb0433b0b098e1)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agobpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
Miss Islington (bot) [Tue, 25 Jan 2022 14:39:12 +0000 (06:39 -0800)] 
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffca45b60729c460e3e2ad50c8c1946cfd4e)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years ago[3.9] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30877)
Terry Jan Reedy [Tue, 25 Jan 2022 08:28:53 +0000 (03:28 -0500)] 
[3.9] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30877)

Cherry picked from b1a3446f077b7d56b89f55d98dadb8018986a3e

3 years agobpo-41841: update idlelib News up to 3.10.0 (GH-30871)
Terry Jan Reedy [Tue, 25 Jan 2022 07:01:25 +0000 (02:01 -0500)] 
bpo-41841: update idlelib News up to 3.10.0 (GH-30871)

3 years agobpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in...
Miss Islington (bot) [Tue, 25 Jan 2022 03:08:42 +0000 (19:08 -0800)] 
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (30867)

* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

* Added blurb.
(cherry picked from commit 0daf72194bd4e31de7f12020685bb39a14d6f45e)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
3 years ago[3.9] bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30757)
Serhiy Storchaka [Mon, 24 Jan 2022 10:14:42 +0000 (12:14 +0200)] 
[3.9] bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30757)

Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.

Add context manager open_dir_fd() in test.support.os_helper.
(cherry picked from commit 54610bb448a9cf5be77d53b66169fca4c11be6cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30835)
Irit Katriel [Sun, 23 Jan 2022 19:35:15 +0000 (19:35 +0000)] 
bpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30835)

(cherry picked from commit f7955a82e36d4c32ebdd7b7707cdf0e6ffa7a418)

3 years ago[3.9] bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283...
Miss Islington (bot) [Sun, 23 Jan 2022 17:54:13 +0000 (09:54 -0800)] 
[3.9] bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283) (GH-30738)

(cherry picked from commit cfadcc31ea84617b1c73022ce54d4ae831333e8d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 years ago[3.9] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata...
Jason R. Coombs [Sun, 23 Jan 2022 15:17:41 +0000 (10:17 -0500)] 
[3.9] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 4.10.1) (GH-30803). (GH-30828)

(cherry picked from commit 51c3e28c8a163e58dc753765e3cc51d5a717e70d)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
3 years agoUpdate documentation in datetime module strftime-and-strptime-behavior fix typo in...
Miss Islington (bot) [Sun, 23 Jan 2022 00:59:41 +0000 (16:59 -0800)] 
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232) (GH-30703)

A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
(cherry picked from commit d45cd2d20770f72a000ba6dfa9ac88dd49423c27)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
Co-authored-by: Evan <binary-signal@users.noreply.github.com>
3 years agoDocument optional 'task'/'asyncgen' fields in call_exception_handler (GH-21735) ...
Miss Islington (bot) [Sun, 23 Jan 2022 00:59:23 +0000 (16:59 -0800)] 
Document optional 'task'/'asyncgen' fields in call_exception_handler (GH-21735) (GH-30727)

(cherry picked from commit a1652da2c89bb21f3fdc71780b63b1de2dff11f0)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
Co-authored-by: Shane Harvey <shnhrv@gmail.com>
3 years agobpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801)
Miss Islington (bot) [Sun, 23 Jan 2022 00:20:49 +0000 (16:20 -0800)] 
bpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801)

(cherry picked from commit 1ded8ed8e817b8f9dae1a0ef92d97983afbc844e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30786)
Miss Islington (bot) [Sat, 22 Jan 2022 15:31:40 +0000 (07:31 -0800)] 
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30786)

Code link:
https://github.com/python/cpython/blob/70c16468deee9390e34322d32fda57df6e0f46bb/Lib/http/server.pyGH-L1270

It's been this way since at least 3.4.

Also improved some wording in the same section.
(cherry picked from commit c8a536624e8f5d6612e3c275c5b19592583a8cf8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30790)
Miss Islington (bot) [Sat, 22 Jan 2022 14:28:42 +0000 (06:28 -0800)] 
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30790)

Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3270913e095d24ae13ecf96f5a32c8c503)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years ago[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH...
Kumar Aditya [Sat, 22 Jan 2022 12:52:24 +0000 (18:22 +0530)] 
[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777)  (GH-30785)

Automerge-Triggered-By: GH:asvetlov
3 years agobpo-46425: fix direct invocation of `asyncio` tests (GH-30725)
Miss Islington (bot) [Sat, 22 Jan 2022 11:54:07 +0000 (03:54 -0800)] 
bpo-46425: fix direct invocation of `asyncio` tests (GH-30725)

(cherry picked from commit 5a5340044ca98cbe6297668d91bccba04b102923)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.9] bpo-46383: Fix signature of zoneinfo module_free function (GH-3… (GH-30611)
Kumar Aditya [Sat, 22 Jan 2022 11:05:55 +0000 (16:35 +0530)] 
[3.9] bpo-46383: Fix signature of zoneinfo module_free function (GH-3… (GH-30611)

…0607)

3 years agobpo-46442: improve and rename testExceptionCleanupNames (GH-30758)
Miss Islington (bot) [Sat, 22 Jan 2022 07:37:32 +0000 (23:37 -0800)] 
bpo-46442: improve and rename testExceptionCleanupNames (GH-30758)

The test tested that explicitly deleting the local variable bound to the exception
did not cause problems, but it did not test what it actually claimed to test, i.e.
that the variable is deleted automatically.
(cherry picked from commit 82c53229e18f5853c82cb8ab6b9af1925a0e9e58)

Co-authored-by: Yellow Dusk <yellow.dusk1590@fastmail.com>
3 years agobpo-46463: Fixes escape4chm.py script used when building the CHM documentation file...
Miss Islington (bot) [Fri, 21 Jan 2022 22:15:44 +0000 (14:15 -0800)] 
bpo-46463: Fixes escape4chm.py script used when building the CHM documentation file (GH-30768)

(cherry picked from commit 57d1855682dbeb9233ef3a531f9535c6442e9992)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agobpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)
Miss Islington (bot) [Fri, 21 Jan 2022 22:06:35 +0000 (14:06 -0800)] 
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)

(cherry picked from commit 881a763cfe07ef4a5806ec78f13a9bc99e8909dc)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
3 years agobpo-46434: Handle missing docstrings in pdb help (GH-30705)
Miss Islington (bot) [Fri, 21 Jan 2022 17:33:25 +0000 (09:33 -0800)] 
bpo-46434: Handle missing docstrings in pdb help (GH-30705)

(cherry picked from commit 60705cff70576482fea31dcafbf8a37cbb751ea5)

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
3 years ago[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll...
Tal Einat [Fri, 21 Jan 2022 09:37:39 +0000 (11:37 +0200)] 
[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)

(cherry picked from commit 27df7566bc19699b967e0e30d7808637b90141f6)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
3 years agobpo-46080: fix argparse help generation exception in edge case (GH-30111)
Miss Islington (bot) [Thu, 20 Jan 2022 23:22:50 +0000 (15:22 -0800)] 
bpo-46080: fix argparse help generation exception in edge case (GH-30111)

Fix an uncaught exception during help text generation when
argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS
and help is specified.
(cherry picked from commit 9e87c0e03fa501fb90008547983ce4c1dcaaf90c)

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago[3.9] Mark all clinic headers as generated (GH-30679). (GH-30728)
Erlend Egeberg Aasland [Thu, 20 Jan 2022 21:07:19 +0000 (22:07 +0100)] 
[3.9] Mark all clinic headers as generated (GH-30679). (GH-30728)

(cherry picked from commit 71734d0b9ca584bcbdcb2fb44ae16bb2fbfcaf6e)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years ago[3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700)
Nikita Sobolev [Thu, 20 Jan 2022 01:43:49 +0000 (04:43 +0300)] 
[3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700)

3 years agobpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)
Miss Islington (bot) [Wed, 19 Jan 2022 22:12:25 +0000 (14:12 -0800)] 
bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704)

(cherry picked from commit 263c0dd16017613c5ea2fbfc270be4de2b41b5ad)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agodoc: Clarify os.urandom return type (GH-30282)
Miss Islington (bot) [Wed, 19 Jan 2022 22:07:47 +0000 (14:07 -0800)] 
doc: Clarify os.urandom return type (GH-30282)

Other descriptions in the same file also use 'bytestring' to refer to bytes objects
(cherry picked from commit 4b99803b861e58eb476a7a30e2e8aacdec5df104)

Co-authored-by: Florian Bruhin <me@the-compiler.org>