]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Tue, 8 Jun 2021 21:26:56 +0000 (14:26 -0700)]
bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
These are the settings that extend the help menu. Moving them shortens the dialog and will help with it being too tall for small screens.
(cherry picked from commit
ab36b9f83424a020fbd672f218612e6f19257a32 )
Batuhan Taskaya [Tue, 8 Jun 2021 17:39:47 +0000 (20:39 +0300)]
[3.9] bpo-11105: reduce the recursion limit for tests. (GH-26605)
(cherry picked from commit
e58d762c1fb4ad5e021d016c80c2bc4513632d2f )
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
Terry Jan Reedy [Mon, 7 Jun 2021 02:57:53 +0000 (22:57 -0400)]
[3.9] bpo-44322: Document more SyntaxError details. (GH-26562)
1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.
(cherry picked from commit
67dfa6f2a508c325715625fe442f2ce20270a8b3 )
Miss Islington (bot) [Sun, 6 Jun 2021 02:57:24 +0000 (19:57 -0700)]
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)
(cherry picked from commit
71be46170490d08743c714b9fa4484038aa7a23e )
Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
Miss Islington (bot) [Fri, 4 Jun 2021 23:59:55 +0000 (16:59 -0700)]
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542)
(cherry picked from commit
f171877ebe276749f31386baed5841ce37cbee2e )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 4 Jun 2021 22:09:45 +0000 (15:09 -0700)]
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) (GH-26539)
(cherry picked from commit
dda9ecbfece28aad7b8ba7eaf7951dd9816f78b1 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Batuhan Taskaya [Thu, 3 Jun 2021 21:22:34 +0000 (00:22 +0300)]
[3.9] bpo-11105: Do not crash when compiling recursive ASTs (GH-20594) (GH-26522)
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit
f3491242e41933aa9529add7102edb68b80a25e9 )
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
Gregory P. Smith [Thu, 3 Jun 2021 04:15:26 +0000 (21:15 -0700)]
[3.9] bpo-43776: Remove list call from args in Popen repr (GH-25338) (GH-26510)
Removes the `list` call in the Popen `repr`.
Current implementation:
For cmd = `python --version`, with `shell=True`.
```bash
<Popen: returncode: None args: ['p', 'y', 't', 'h', 'o', 'n', ' ', '-', '-',...>
```
For `shell=False` and args=`['python', '--version']`, the output is correct:
```bash
<Popen: returncode: None args: ['python', '--version']>
```
With the new changes the `repr` yields:
For cmd = `python --version`, with `shell=True`:
```bash
<Popen: returncode: None args: 'python --version'>
```
For `shell=False` and args=`['python', '--version']`, the output:
```bash
<Popen: returncode: None args: ['python', '--version']>
```
Automerge-Triggered-By: GH:gpshead.
(cherry picked from commit
db0c5b786df961785ae8c803f5572ae0c8dadcc7 )
Co-authored-by: M. Kocher <michael.kocher@me.com>
Co-authored-by: M. Kocher <michael.kocher@me.com>
Miss Islington (bot) [Thu, 3 Jun 2021 04:10:22 +0000 (21:10 -0700)]
bpo-44022: Improve the regression test. (GH-26503)
It wasn't actually detecting the regression due to the
assertion being too lenient.
(cherry picked from commit
e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Joshua Root [Thu, 3 Jun 2021 00:25:15 +0000 (10:25 +1000)]
[3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) (GH-26001)
Only complain if the config target is >= 10.3 and the current target is
< 10.3. The check was originally added to ensure that incompatible
LDSHARED flags are not used, because '-undefined dynamic_lookup' is
used when building for 10.3 and later, and is not supported on older OS
versions. Apart from that, there should be no problem in general
with using an older target. In particular, this allows targeting macOS
11.0 when Python was built for a newer minor version like 11.3.
(manually cherry picked from part of commit
8703178 )
Miss Islington (bot) [Wed, 2 Jun 2021 23:50:55 +0000 (16:50 -0700)]
bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486) (GH-26496)
This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.
(cherry picked from commit
bdb56902a3bfe12b10f85a941d5dd0eae739f1a8 )
Co-authored-by: stratakis <cstratak@redhat.com>
Irit Katriel [Tue, 1 Jun 2021 22:15:48 +0000 (23:15 +0100)]
[3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481)
(cherry picked from commit
87272b70f157af76cb14ff90d73dfc5d9bfb945a )
Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
Miss Islington (bot) [Mon, 31 May 2021 11:33:31 +0000 (04:33 -0700)]
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
* _testcapi.heapgctype: implement a traverse function since the type
is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
Py_TPFLAGS_HAVE_GC since it has no traverse function.
(cherry picked from commit
142e5c5445c019542246d93fe2f9e195d3131686 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Sat, 29 May 2021 08:16:34 +0000 (01:16 -0700)]
bpo-44254: On Mac, remove disfunctional colors from turtledemo buttons (GH-26448)
On macOS, tk defers to system setting for button background when in normal state.
Give turtledemo button text a color that works on either light or dark background.
(cherry picked from commit
af5a324843de395cecc562cb0c757b3768f2077f )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 29 May 2021 03:53:40 +0000 (20:53 -0700)]
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
(cherry picked from commit
43cf7c864a2941b3f8f823e5928721dd286b7778 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 29 May 2021 03:20:54 +0000 (20:20 -0700)]
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442)
(cherry picked from commit
8b55bc3f93a655bc803bff79725d5fe3f124e2f0 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 29 May 2021 01:07:39 +0000 (18:07 -0700)]
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26437)
(cherry picked from commit
7e6f2375698036d62464c238059ef2073755fdaf )
Co-authored-by: Sean Grady <vedicmonk@gmail.com>
Co-authored-by: Sean Grady <vedicmonk@gmail.com>
Miss Islington (bot) [Fri, 28 May 2021 20:02:47 +0000 (13:02 -0700)]
bpo-44249: Fix 3 README.rst typos (GH-26385)
(cherry picked from commit
acac6c71ff370413374c6aca1df808c426e8a30c )
Co-authored-by: Ayush Parikh <ayushparikh332@gmail.com>
Miss Islington (bot) [Fri, 28 May 2021 06:39:59 +0000 (23:39 -0700)]
bpo-41611: IDLE: Catch TclError exceptions in AutoCompleteWindow.winconfig_event() (GH-26404)
Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.
(cherry picked from commit
4e2e5c1c4f792b4011e4c78d011baea2aee39f1b )
Miss Islington (bot) [Thu, 27 May 2021 17:23:51 +0000 (10:23 -0700)]
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26410)
(cherry picked from commit
164a4f46d1606e21d82babc010e397a9116e6730 )
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Miss Islington (bot) [Thu, 27 May 2021 15:08:00 +0000 (08:08 -0700)]
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
(cherry picked from commit
abc4bd5db91c86b6b74289241378a13bd3a0a5e2 )
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Miss Islington (bot) [Wed, 26 May 2021 14:43:37 +0000 (07:43 -0700)]
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26380)
(cherry picked from commit
46db39d7bd67fb9fea133cd4f18cdf7eacb0f6d9 )
Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
Miss Islington (bot) [Tue, 25 May 2021 21:03:43 +0000 (14:03 -0700)]
Point to recent link to PyFLTK (GH-26315) (GH-26367)
(cherry picked from commit
ee3d78ef730116f2c43afc248d207ca1d47eee08 )
Co-authored-by: Mark <mark@qtrac.eu>
Co-authored-by: Mark <mark@qtrac.eu>
Miss Islington (bot) [Tue, 25 May 2021 14:30:42 +0000 (07:30 -0700)]
bpo-20408: Fix memoryview() signature in docs (GH-24431)
(cherry picked from commit
d18e5dae914b1db49b25ed7729c07a535d1f0c52 )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Tue, 25 May 2021 04:21:28 +0000 (21:21 -0700)]
bpo-43109: Fix --with-lto configure option on macOS (GH-26341) (GH-26343)
Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.
(cherry picked from commit
59acfd4a09df1c141dac7845eed008af8970fce7 )
Co-authored-by: Ned Deily <nad@python.org>
Miss Islington (bot) [Mon, 24 May 2021 17:33:03 +0000 (10:33 -0700)]
[3.9] bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317) (GH-26335)
(cherry picked from commit
7148293d96843ca868961313b00361504ec0c242 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
Miss Islington (bot) [Sat, 22 May 2021 22:23:11 +0000 (15:23 -0700)]
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309) (GH-26312)
Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit
2a1e6698b10a7b58c6ac66429de0f51cb739da35 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Mariusz Felisiak [Sat, 22 May 2021 20:56:19 +0000 (22:56 +0200)]
[3.9] Remove duplicate words in docs. (GH-26167) (GH-26297)
(cherry picked from commit
b06ed1d883cd79c920c514d8a1f4643cf93dc5e0 )
Miss Islington (bot) [Sat, 22 May 2021 11:06:46 +0000 (04:06 -0700)]
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513) (GH-26238)
Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes
Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
(cherry picked from commit
2edaf6a4fb7e20324dde1423232f07211347f092 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Miss Islington (bot) [Fri, 21 May 2021 22:48:31 +0000 (15:48 -0700)]
Specify Python Cookbook edition for reference (GH-26301) (#26303)
(cherry picked from commit
604cd71e501b3bb1ede2b8abc797643fc2e9129c )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Zackery Spytz [Fri, 21 May 2021 20:29:12 +0000 (13:29 -0700)]
bpo-43556: Fix the attr names for ast.expr and ast.stmt in the docs (GH-24940)
Miss Islington (bot) [Fri, 21 May 2021 18:17:10 +0000 (11:17 -0700)]
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)
This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
(cherry picked from commit
2f47d8dcc735234bf9c7f92fbdacd8c5a6ee7761 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Fri, 21 May 2021 17:06:58 +0000 (10:06 -0700)]
[doc] Fix indentation in inspect documentation (GH-24846) (GH-26288)
(cherry picked from commit
642fdfdc04e8e40c2cd3e65d67b09fac472bb345 )
Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
Jakub Kulík [Fri, 21 May 2021 14:59:39 +0000 (16:59 +0200)]
[3.9] bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096) (GH-25847)
(cherry picked from commit
9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86 )
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Senthil Kumaran [Fri, 21 May 2021 12:30:04 +0000 (05:30 -0700)]
[3.9] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26276)
* [3.9] bpo-43882 - Mention urllib.parse changes in Whats new section.
* Add the missing section.
Miss Islington (bot) [Thu, 20 May 2021 10:41:43 +0000 (03:41 -0700)]
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131) (GH-26263)
(cherry picked from commit
1270ad6ec8fe1f71e7d88086474f96f99670ac3a )
Co-authored-by: native-api <vano@mail.mipt.ru>
Miss Islington (bot) [Thu, 20 May 2021 02:05:41 +0000 (19:05 -0700)]
Update link in SECURITY.md (GH-21320) (GH-26260)
(cherry picked from commit
4d396e7d79bd1152f991147718dc5f094a3cc957 )
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
Miss Islington (bot) [Thu, 20 May 2021 00:37:49 +0000 (17:37 -0700)]
bpo-43295: Fix error handling of datetime.strptime format string '%z' (GH-24627) (#25695)
Previously, `datetime.strptime` would match `'z'` with the format string `'%z'` (for UTC offsets), throwing an `IndexError` by erroneously trying to parse `'z'` as a timestamp. As a special case, `'%z'` matches the string `'Z'` which is equivalent to the offset `'+00:00'`, however this behavior is not defined for lowercase `'z'`.
This change ensures a `ValueError` is thrown when encountering the original example, as follows:
```
>>> from datetime import datetime
>>> datetime.strptime('z', '%z')
ValueError: time data 'z' does not match format '%z'
```
Automerge-Triggered-By: GH:pganssle
(cherry picked from commit
04f6fbb6969e9860783b9ab4dc24b6fe3c6dab8d )
Co-authored-by: Noor Michael <nsmichael31@gmail.com>
Co-authored-by: Noor Michael <nsmichael31@gmail.com>
Miss Islington (bot) [Wed, 19 May 2021 21:20:10 +0000 (14:20 -0700)]
[doc] Fix typo in asyncio-eventloop documentation (GH-22311) (GH-26257)
(cherry picked from commit
b66a03a49157076cb15a002aaf44a011cc79be3b )
Co-authored-by: Bruno <brunogeninatti@gmail.com>
Miss Islington (bot) [Wed, 19 May 2021 21:06:55 +0000 (14:06 -0700)]
bpo-37741: make importlib.metadata docs discoverable through a module directive. (GH-25415) (GH-25417)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit
23acadcc1c75eb74b2459304af70d97a35001b34 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Wed, 19 May 2021 20:37:52 +0000 (13:37 -0700)]
bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26255)
(cherry picked from commit
c054e8f78f53035e06d6dc58c423d76c8a5fa39a )
Co-authored-by: naglis <naglis@users.noreply.github.com>
Miss Islington (bot) [Wed, 19 May 2021 18:27:19 +0000 (11:27 -0700)]
Fix compiler warning for misleading guarding in the tkinter (GH-26244) (GH-26252)
The newest gcc emmits this warning:
```
/Modules/_tkinter.c:272:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
| ^~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
2869 | LEAVE_PYTHON
| ^~~~~~~~~~~~
/Modules/_tkinter.c:243:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
243 | (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*)))
| ^
/Modules/_tkinter.c:272:57: note: in expansion of macro ‘tcl_tstate’
272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
| ^~~~~~~~~~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
2869 | LEAVE_PYTHON
```
that's because the macro packs together two statements at the same level
as the "if". The warning is misleading but is very noisy so it makes
sense to fix it.
(cherry picked from commit
95d04710c5fb0df5393b5add2c5c2de2412673eb )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Pablo Galindo [Wed, 19 May 2021 18:26:59 +0000 (19:26 +0100)]
[3.9] bpo-44168: Fix error message in the parser for keyword arguments for invalid expressions (GH-26210) (GH-26250)
(cherry picked from commit
33c0c90dea06fda1df99482521559ebef7210bea )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Wed, 19 May 2021 18:21:07 +0000 (11:21 -0700)]
Fix compiler warning in the xml module (GH-26245) (GH-26248)
The newest version of gcc complains about passing un-initialized arrays
as constant pointers:
```
/Modules/expat/xmltok_ns.c: In function ‘findEncodingNS’:
/Modules/expat/xmltok.h:272:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
| ^~~~~~~~~~~~~~
/Modules/expat/xmltok.h:272:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’}
272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
| ^~~~~~~~~~~~~~
In file included from /Modules/expat/xmltok.c:1657:
/Modules/expat/xmltok_ns.c:92:8: note: ‘buf’ declared here
92 | char buf[ENCODING_MAX];
```
(cherry picked from commit
be93f81e58ba3742589259ef84325a95b547e424 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Tal Einat [Wed, 19 May 2021 11:59:38 +0000 (14:59 +0300)]
[3.9] backport non-content changes to IDLE's help.html (GH-26239)
Followup to GH-25851 to synchonize with 3.10.
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Miss Islington (bot) [Wed, 19 May 2021 08:59:36 +0000 (01:59 -0700)]
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26219)
(cherry picked from commit
4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Miss Islington (bot) [Wed, 19 May 2021 08:17:03 +0000 (01:17 -0700)]
bpo-44106: Purge unused sqlite3 doc includes (GH-26234)
(cherry picked from commit
d798acc8733b605f7fc9c3c1a85cd14ee2a56add )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Wed, 19 May 2021 07:43:44 +0000 (00:43 -0700)]
bpo-44106: Improve sqlite3 example database contents (GH-26027)
(cherry picked from commit
92d1064727d6b7f4136f9c09ab52ae15e3676afe )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Wed, 19 May 2021 07:32:45 +0000 (00:32 -0700)]
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
(cherry picked from commit
901443757333a66ff2b5c85eba30dc1c48eac321 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Ken Jin [Tue, 18 May 2021 22:31:27 +0000 (06:31 +0800)]
[3.9] bpo-42783: Documentation for asyncio.sleep(0) (GH-24002) (GH-24153)
Co-Authored-By: Simon Willison <swillison@gmail.com>
Miss Islington (bot) [Tue, 18 May 2021 16:44:48 +0000 (09:44 -0700)]
bpo-41963: document that ConfigParser strips off comments (GH-26197) (GH-26213)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Laura Gutierrez Funderburk <58710704+lgfunderburk@users.noreply.github.com>
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
(cherry picked from commit
02ee8191263848f8c8999f72286148946b83e5c9 )
Irit Katriel [Tue, 18 May 2021 14:25:38 +0000 (15:25 +0100)]
bpo-25872: Add unit tests for linecache and threading (GH-25913) (GH-26211)
(cherry picked from commit
115dea9e2602b96b63390f00cc880e90c433efa2 )
Co-authored-by: uniocto <serit142sa33go@gmail.com>
Miss Islington (bot) [Mon, 17 May 2021 17:34:39 +0000 (10:34 -0700)]
bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058)
`shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this
Automerge-Triggered-By: GH:gpshead
(cherry picked from commit
f32c7950e0077b6d9a8e217c2796fc582f18ca08 )
Co-authored-by: Igor Bolshakov <ibolsch@gmail.com>
Miss Islington (bot) [Mon, 17 May 2021 08:07:49 +0000 (01:07 -0700)]
[3.9] bpo-44145: Release the GIL around HMAC_Update. (GH-26157) (GH-26188)
It was always meant to be released for parallelization.
This now matches the other similar code in the module.
Thanks michaelforney for noticing!
(cherry picked from commit
c10392e7ddb3eafbd11e9ffe335c07648426715f )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Automerge-Triggered-By: GH:gpshead
Miss Islington (bot) [Mon, 17 May 2021 00:00:12 +0000 (17:00 -0700)]
[doc] Fix typo in os module (GH-24464)
Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit
fdc7e52f5f1853e350407c472ae031339ac7f60c )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Miss Islington (bot) [Sun, 16 May 2021 23:43:26 +0000 (16:43 -0700)]
fix docstring typo in bdb.py (GH-22323) (#26180)
(cherry picked from commit
be54fb5ae73db507a0cdb1884d553aca5966f0e6 )
Co-authored-by: flizzywine <1041958497@qq.com>
Miss Islington (bot) [Sun, 16 May 2021 18:08:10 +0000 (11:08 -0700)]
[3.9] Fix typo in comment (GH-26162) (GH-26165)
(cherry picked from commit
de367378f67d7e90e4015100b19277685a3c9bb3 )
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
Automerge-Triggered-By: GH:iritkatriel
Miss Islington (bot) [Sun, 16 May 2021 16:17:55 +0000 (09:17 -0700)]
Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438) (#26169)
(cherry picked from commit
a42d98ed91cd1f08b2e9734ca6ca136dd10dff5d )
Co-authored-by: Serhii Hidenko <shidenko97@gmail.com>
Miss Islington (bot) [Sun, 16 May 2021 14:34:43 +0000 (07:34 -0700)]
bpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH-26062) (GH-26093)
These are passed and called as PyCFunction, however they are defined here without the (ignored) args parameter.
This works fine in some C compilers, but fails in webassembly or anything else that has strict function pointer call type checking.
(cherry picked from commit
ab383eb6f03896b0ef6634ee3d776344fcb9e5b8 )
Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
Miss Islington (bot) [Sat, 15 May 2021 17:28:05 +0000 (10:28 -0700)]
bpo-32133: Improve numbers docs (GH-26124) (GH-26147)
Antoine Pitrou [Sat, 15 May 2021 09:51:20 +0000 (11:51 +0200)]
[3.9] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) (GH-26142)
When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown. If many threads are created this way, the _shutdown_locks set could therefore grow endlessly. To avoid such a situation, purge expired locks each time a new one is added or removed..
(cherry picked from commit
c10c2ec7a0e06975e8010c56c9c3270f8ea322ec )
Co-authored-by: Antoine Pitrou <antoine@python.org>
Automerge-Triggered-By: GH:pitrou
Miss Islington (bot) [Fri, 14 May 2021 22:25:43 +0000 (15:25 -0700)]
bpo-44072: fix Complex, Integral docs for `**` (GH-25986)
In numbers module docstrings and docs.
(cherry picked from commit
4aa63d65a9971d14f1a2131b989dca0dab514a9d )
Co-authored-by: Rory Yorke <rory.yorke@gmail.com>
Miss Islington (bot) [Fri, 14 May 2021 20:06:34 +0000 (13:06 -0700)]
bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137)
(cherry picked from commit
07797121cc290ede0b3d3cf02068f3d993cddd15 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Fri, 14 May 2021 17:23:03 +0000 (10:23 -0700)]
Subprocess Protocols Documentation (GH-20950) (GH-26134)
Should be "Subprocess Protocol instances" not "Datagram Protocol instances"
(cherry picked from commit
2918846a4ff394237ccd7c6d5cdf5655e2ddd726 )
Co-authored-by: kudavid <67070184+kudavid@users.noreply.github.com>
Co-authored-by: kudavid <67070184+kudavid@users.noreply.github.com>
Miss Islington (bot) [Fri, 14 May 2021 17:13:40 +0000 (10:13 -0700)]
[doc] Fix typos in cgi.rst (GH-24766) (GH-26131)
(cherry picked from commit
19d839ae20db9c6f740646e99df7f4601cb9f4dc )
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Erlend Egeberg Aasland [Fri, 14 May 2021 16:50:03 +0000 (18:50 +0200)]
[3.9] sqlite3 test suite now works with SQLITE_DQS=0 (GH-26032). (GH-26128)
(cherry picked from commit
be7e467bcf5e419302d887904ef3e8fd310c68e7 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Fri, 14 May 2021 14:25:40 +0000 (07:25 -0700)]
Update doc as relative import can be used with star import (GH-25667) (GH-26122)
(cherry picked from commit
3d4b5f1019123a7d74801500eb18ec8fa12136bc )
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
Miss Islington (bot) [Fri, 14 May 2021 06:07:31 +0000 (23:07 -0700)]
Updated code example for asyncio.gather (GH-20604) (GH-26120)
The previous example did not fully showcase the interest of using gather.
Here the example showcases "the result is an aggregate list of returned values".
(cherry picked from commit
56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2 )
Co-authored-by: josephernest <nouvellecollection@gmail.com>
Co-authored-by: josephernest <nouvellecollection@gmail.com>
Miss Islington (bot) [Thu, 13 May 2021 21:35:30 +0000 (14:35 -0700)]
bpo-28146: Fix a confusing error message in str.format() (GH-24213)
Automerge-Triggered-By: GH:pitrou
(cherry picked from commit
4aeee0b47b3a2b604bbac37040320ffc88c291f2 )
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Miss Islington (bot) [Thu, 13 May 2021 21:07:16 +0000 (14:07 -0700)]
bpo-44114: Remove redundant cast. (GH-26098)
(cherry picked from commit
e0c614e5fd017ca43cab55a9f8490133750c704f )
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Miss Islington (bot) [Thu, 13 May 2021 18:14:23 +0000 (11:14 -0700)]
bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text.
Automerge-Triggered-By: GH:pitrou
(cherry picked from commit
1aa3530314d339725519f4ad95b7dea4b00b657e )
Co-authored-by: Antoine Pitrou <antoine@python.org>
Ken Jin [Wed, 12 May 2021 17:44:14 +0000 (01:44 +0800)]
[3.9] Revert "[3.9] bpo-38908: Fix issue when non runtime_protocol does not raise TypeError (GH-26067)" (GH-26077)
Reverts python/cpython#26075
Automerge-Triggered-By: GH:gvanrossum
Ken Jin [Wed, 12 May 2021 17:04:43 +0000 (01:04 +0800)]
[3.9] bpo-38908: Fix issue when non runtime_protocol does not raise TypeError (GH-26067) (GH-26075)
(cherry picked from commit
c40486a )
Co-authored-by: Yurii Karabas 1998uriyyo@gmail.com
Automerge-Triggered-By: GH:gvanrossum
Miss Islington (bot) [Wed, 12 May 2021 13:45:18 +0000 (06:45 -0700)]
bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034) (GH-26063)
Co-authored-by: Szymon Trapp
(cherry picked from commit
5010c044c73ee55d0fd578cfecd3f4c3f01a4140 )
Co-authored-by: Karl Dubost <karl+github@la-grange.net>
Miss Islington (bot) [Wed, 12 May 2021 10:28:10 +0000 (03:28 -0700)]
bpo-40640: doc -- add missing ... in example of Continue (GH-26055) (GH-26058)
Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
(cherry picked from commit
6574334a68aa324394a6fd1f855ecbad20432b1e )
Steve Dower [Wed, 12 May 2021 09:48:50 +0000 (10:48 +0100)]
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964) (GH-26052)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
Erlend Egeberg Aasland [Wed, 12 May 2021 09:04:10 +0000 (11:04 +0200)]
[3.9] bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None (GH-25438) (GH-26053)
Co-authored-by: Thomas Kluyver <takowl@gmail.com>
(cherry picked from commit
8563a7052ccd98e6a381d361664ce567afd5eb6e )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:iritkatriel
Miss Islington (bot) [Tue, 11 May 2021 23:18:23 +0000 (16:18 -0700)]
Fix import of HTTPError (GH-22304) (GH-26048)
Import HTTPError from urllib.error instead of urllib.request.
(cherry picked from commit
5fedf71439187f00c661b16b80d398b74b00390e )
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Jero Bado [Tue, 11 May 2021 22:28:57 +0000 (06:28 +0800)]
Fix typo in blurb entry (GH-26043)
Miss Islington (bot) [Tue, 11 May 2021 22:23:54 +0000 (15:23 -0700)]
bpo-10548: expectedFailure does not apply to fixtures (GH-23201) (#26045)
(cherry picked from commit
23ae2c3bacc167f7bbfea1846bbbc9dde63a1bfd )
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Miss Islington (bot) [Tue, 11 May 2021 20:55:24 +0000 (13:55 -0700)]
bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26041)
* Document os-system, subprocess Patch
* Update Doc/library/os.rst
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit
5f2eb87f2893c5e77ade4d662cebcce59d3f2c2f )
Co-authored-by: uniocto <serit142sa33go@gmail.com>
Co-authored-by: uniocto <serit142sa33go@gmail.com>
Miss Islington (bot) [Tue, 11 May 2021 18:19:42 +0000 (11:19 -0700)]
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (GH-23192) (#26036)
(cherry picked from commit
12e7d10dfd28d4e26304e2c06b2e41c7418ec6f3 )
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Miss Islington (bot) [Tue, 11 May 2021 01:59:22 +0000 (18:59 -0700)]
Doc: http.server: directory is not a class attribute, but an argument. (GH-26017) (GH-26030)
* Doc: http.server: directory is not a class attribute, but an argument.
(cherry picked from commit
d1b81574edd75e33ae85c525ac988ce772675a07 )
Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Julien Palard <julien@palard.fr>
Steve Dower [Mon, 10 May 2021 23:39:17 +0000 (00:39 +0100)]
bpo-44070: Clarify NEWS message to specify the version when the behaviour was introduced (GH-26029)
Steve Dower [Mon, 10 May 2021 22:45:50 +0000 (23:45 +0100)]
bpo-44070: No longer eagerly makes import filenames absolute, except for extension modules (GH-26025)
Miss Islington (bot) [Mon, 10 May 2021 18:58:45 +0000 (11:58 -0700)]
bpo-44074: let patchcheck infer the base branch name (GH-25991)
(cherry picked from commit
21fbbb98bac8bfe56f8b931258c36750e84f9285 )
Co-authored-by: Leonardo Lai <leonardo.lai@live.com>
Miss Islington (bot) [Mon, 10 May 2021 13:38:01 +0000 (06:38 -0700)]
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26019)
(cherry picked from commit
2a031723eefcf6f1d678bbb4f6018610d43623c4 )
Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>
Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>
Miss Islington (bot) [Sat, 8 May 2021 18:43:59 +0000 (11:43 -0700)]
bpo-32924: Fix the Show Source url in the documentation (GH-25994)
(cherry picked from commit
03acfc50ac0be8b49847b94dee93e21b1efa0e76 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 8 May 2021 06:58:27 +0000 (23:58 -0700)]
Fix make libainstall. (GH-25980)
Initial patch by Benno Leslie.
(cherry picked from commit
80d250d68cf3bb511fd862169c681b28028499c2 )
Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
Miss Islington (bot) [Fri, 7 May 2021 14:13:19 +0000 (07:13 -0700)]
Simple Enhancement. Add missing return statements in ftplib documentation. (GH-25968) (#25970)
(cherry picked from commit
b32c8e97951db46484ba3b646b988bcdc4062199 )
Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
Miss Islington (bot) [Thu, 6 May 2021 21:54:58 +0000 (14:54 -0700)]
Fix minor grammar problems in dataclasses documentation (GH-25948) (#25959)
Some missing words; some odd word choices.
(cherry picked from commit
ee8e7c2fa950f88ba2c33035bea7aed7aaf0cb77 )
Co-authored-by: Scott Noyes <snoyes@gmail.com>
Co-authored-by: Scott Noyes <snoyes@gmail.com>
Miss Islington (bot) [Thu, 6 May 2021 19:52:50 +0000 (12:52 -0700)]
docs: clearly document that ":GH-X" string formatting results in "0X..." (GH-25941)
* clearly document that ":GH-X" string formatting results in "0X..."
* put back the "serial comma"
(cherry picked from commit
92ceb1c8402422412fcbb98ca19448677c667c3c )
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Miss Islington (bot) [Thu, 6 May 2021 19:50:54 +0000 (12:50 -0700)]
bpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler 301s (GH-25705)
* Set content-length for simple http server 301s
When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.
* Test Content-Length on simple http server redirect
When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.
* Add news entry for SimpleHTTPRequestHandler fix
* Clarify the specific kind of 301
Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
(cherry picked from commit
fb427255614fc1f740e7785554c1da8ca39116c2 )
Co-authored-by: Stephen Rosen <sirosen@globus.org>
Miss Islington (bot) [Thu, 6 May 2021 06:55:35 +0000 (23:55 -0700)]
[3.9] bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927) (GH-25928)
Contributed-By: Matthias Klose
Automerge-Triggered-By: GH:tiran
(cherry picked from commit
da5c808fb50d34bc2e180d9481706072f33025da )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Wed, 5 May 2021 23:05:52 +0000 (16:05 -0700)]
bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916)
Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit
47895e31b6f626bc6ce47d175fe9d43c1098909d )
Co-authored-by: Gen Xu <xgbarry@gmail.com>
Miss Islington (bot) [Wed, 5 May 2021 08:53:54 +0000 (01:53 -0700)]
bpo-44040: Update broken link in pathlib source (GH-25905) (GH-25911)
(cherry picked from commit
96d5c7038b06e93d20822d28ed42a2183f876857 )
Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
Miss Islington (bot) [Tue, 4 May 2021 21:03:48 +0000 (14:03 -0700)]
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)
The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in
a30f6d45ac3 . However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.
This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
(cherry picked from commit
355bae88822bee4de6092b63d69c5a5dad393a16 )
Co-authored-by: karl ding <karlding@users.noreply.github.com>
Miss Islington (bot) [Tue, 4 May 2021 19:59:45 +0000 (12:59 -0700)]
Clarify rx parameter of compileall functions (GH-25857)
(cherry picked from commit
09490298d4485e9322edc6e1e8e15eb66c586164 )
Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
Jelle Zijlstra [Tue, 4 May 2021 16:48:41 +0000 (09:48 -0700)]
[3.9] bpo-44001: improve Literal documentation (GH-25877). (#25897)
(cherry picked from commit
87109f4d85c93a870ee8aa0d2b394547d4636b17 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Petr Viktorin [Tue, 4 May 2021 14:07:13 +0000 (16:07 +0200)]
[3.9] bpo-42083: Allow NULL doc in PyStructSequence_NewType (#25896)
(cherry picked from commit
2f5baa17504feb9a7613bac32fdceed4894434de )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>