]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Tue, 22 Jun 2021 00:29:13 +0000 (17:29 -0700)]
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.
WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit
be1cb3214d09d4bf0288bc45f3c1f167f67e4514 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 21 Jun 2021 22:03:06 +0000 (15:03 -0700)]
bpo-13814: Explain why generators are not context managers (GH-26835)
Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit
51f45d085dad3b708f6fe166af517aba69e7e9f7 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 21 Jun 2021 14:27:42 +0000 (07:27 -0700)]
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
(cherry picked from commit
30f7a77f359a0fc6e37988b0f317a77a15d66b7b )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Victor Stinner [Mon, 21 Jun 2021 12:22:56 +0000 (14:22 +0200)]
bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26825)
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.
On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:
"libgcc_s.so.1 must be installed for pthread_cancel to work"
pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.
The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.
Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit
45a78f906d2d5fe5381d78466b11763fc56d57ba )
Miss Islington (bot) [Mon, 21 Jun 2021 07:54:04 +0000 (00:54 -0700)]
bpo-44469: Fix tests for "async with" with bad object (GH-26817)
Test for execution of the body was null. It would pass
even if the code which should be skipped was executed.
(cherry picked from commit
5d2b3a0d688cf8a33db3d266c9e7049c13766a4c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 19 Jun 2021 15:16:38 +0000 (08:16 -0700)]
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26805)
(cherry picked from commit
291848195f85e23c01adb76d5a0ff9c6eb7f2614 )
Miss Islington (bot) [Wed, 16 Jun 2021 19:13:53 +0000 (12:13 -0700)]
bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'. (GH-26744) (GH-26761)
(cherry picked from commit
7247f6f433846c6e37308a550e8e5eb6be379856 )
Ken Jin [Wed, 16 Jun 2021 15:34:52 +0000 (23:34 +0800)]
[3.9] bpo-44392: Add Py_GenericAlias to C API docs (GH-26724) (GH-26757)
(cherry picked from commit
6773c3eaa735b5061b4a97f2c730703a32d8c9ff )
Miss Islington (bot) [Tue, 15 Jun 2021 16:30:26 +0000 (09:30 -0700)]
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) (GH-26738)
The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.
(cherry picked from commit
243fd01047ddce1a7eb0f99a49732d123e942c63 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Pablo Galindo [Mon, 14 Jun 2021 17:07:51 +0000 (18:07 +0100)]
[3.9] bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712). (GH-26723)
(cherry picked from commit
507ed6fa1d6661e0f8e6d3282764aa9625a99594 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Mon, 14 Jun 2021 15:07:05 +0000 (08:07 -0700)]
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit
8a76683cfb842e12b57f6d276839f6c68fd94e1a )
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Miss Islington (bot) [Sun, 13 Jun 2021 07:42:43 +0000 (00:42 -0700)]
Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
(cherry picked from commit
59242431991794064824cf2ab70886367613f29e )
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Miss Islington (bot) [Fri, 11 Jun 2021 23:24:40 +0000 (16:24 -0700)]
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
In particular, when running with tk8.6.8, as in PSF 3.9.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit
3ec3ee7d2e9b45b586e486e429b412d6d0ca530f )
Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
Miss Islington (bot) [Fri, 11 Jun 2021 22:03:10 +0000 (15:03 -0700)]
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568)
(cherry picked from commit
449e6f0ef395231e3abe467f910b02d7f075c27f )
Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
Miss Islington (bot) [Fri, 11 Jun 2021 21:16:50 +0000 (14:16 -0700)]
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
(cherry picked from commit
5af56c6f2a0d11df37fed7ecaaf321cf6926ba13 )
Miss Islington (bot) [Fri, 11 Jun 2021 16:18:49 +0000 (09:18 -0700)]
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) (GH-26675)
(cherry picked from commit
4cb6ba14325cff98589c2660d1d2c65f4aacfee4 )
Co-authored-by: huzhaojie <hu.zj@foxmail.com>
Ethan Furman [Fri, 11 Jun 2021 08:26:32 +0000 (01:26 -0700)]
[Enum] improve pickle support (#26666)
search all bases for a __reduce__ style method; if a __new__ method is
found first the enum will be made unpicklable
Lysandros Nikolaou [Thu, 10 Jun 2021 22:52:49 +0000 (00:52 +0200)]
[3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659)
(cherry picked from commit
e7b4644607789848f9752a3bd20ff216e25b4156 )
Miss Islington (bot) [Thu, 10 Jun 2021 22:03:29 +0000 (15:03 -0700)]
bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26652)
This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:
class Str1Enum(str, Enum):
GH- some behavior here
class Str2Enum(str, Enum):
GH- some more behavior here
class FinalStrEnum(Str1Enum, Str2Enum):
GH- this now works
(cherry picked from commit
8a4f0850d75747af8c96ca0e7eef1f5c1abfba25 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Thu, 10 Jun 2021 21:24:03 +0000 (14:24 -0700)]
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26651)
(cherry picked from commit
6544b2532df82d137b71323445a07a6e29bcdec0 )
Co-authored-by: Daniel Hahler <git@thequod.de>
Miss Islington (bot) [Thu, 10 Jun 2021 19:40:39 +0000 (12:40 -0700)]
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit
42d5a4fc3b35e45cdd237d56a04e98894d0a31f5 )
Co-authored-by: Mark Roseman <mark@markroseman.com>
Miss Islington (bot) [Thu, 10 Jun 2021 12:01:22 +0000 (05:01 -0700)]
bpo-44363: Get test_capi passing with address sanitizer (GH-26639)
(cherry picked from commit
31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b )
Co-authored-by: Mark Shannon <mark@hotpy.org>
Miss Islington (bot) [Wed, 9 Jun 2021 20:41:24 +0000 (13:41 -0700)]
bpo-40468: Split IDLE settings General tab (GH-26621)
Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.
Create room for more options and make dialog shorter,
to better fit small windows.
(cherry picked from commit
275d5f7957dbb56a6d5e1248addff210ee2e7270 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Wed, 9 Jun 2021 02:05:28 +0000 (19:05 -0700)]
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
(cherry picked from commit
5571cabf1b3385087aba2c7c10289bba77494e08 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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>