]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Mon, 12 Jul 2021 15:11:10 +0000 (08:11 -0700)]
bpo-44472: Fix ltrace functionality when exceptions are raised (GH-26822) (#26831)
(cherry picked from commit
06cda808f149fae9b4c688f752b6eccd0d455ba4 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 10 Jul 2021 04:13:59 +0000 (21:13 -0700)]
[3.9] bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049) (GH-27082)
Fixes the misleading IsADirectoryError to be FileNotFoundError.
(cherry picked from commit
248173cc0483a9ad9261353302f1234cf9eb2ebe )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Automerge-Triggered-By: GH:gpshead
Miss Islington (bot) [Thu, 8 Jul 2021 15:21:55 +0000 (08:21 -0700)]
docs: add the word 'official' (GH-26849)
(cherry picked from commit
af4a2dcc40321de49bffec80bf6c6b5a7d43b134 )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Dong-hee Na [Wed, 7 Jul 2021 14:55:22 +0000 (23:55 +0900)]
[3.9] bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007). (GH-27055)
Miss Islington (bot) [Mon, 5 Jul 2021 22:34:01 +0000 (15:34 -0700)]
bpo-44563: Fix error handling in tee.fromiterable() (GH-27020) (GH-27042)
In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.
(cherry picked from commit
f64de53ff01e734d48d1d42195443d7d1646f220 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Ken Jin [Mon, 5 Jul 2021 16:22:43 +0000 (00:22 +0800)]
[3.9] bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27028)
Miss Islington (bot) [Mon, 5 Jul 2021 09:52:04 +0000 (02:52 -0700)]
bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)
(cherry picked from commit
09302405d22e86884d6058226790c0cdf5b72f14 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Pablo Galindo [Sun, 4 Jul 2021 19:26:34 +0000 (20:26 +0100)]
Revert "bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27018)" (GH-27022)
This reverts commit
4684a34c8d2a2ffac7b779edb4ba57f043783478 .
Miss Islington (bot) [Sun, 4 Jul 2021 17:55:43 +0000 (10:55 -0700)]
bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27018)
(cherry picked from commit
d33943a6c368c2184e238019c63ac7a267da5594 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Miss Islington (bot) [Sat, 3 Jul 2021 16:05:33 +0000 (09:05 -0700)]
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) (GH-27005)
(cherry picked from commit
d968a638fcbf9030c999cfacd4c9bf0656e779c4 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Fri, 2 Jul 2021 17:38:04 +0000 (10:38 -0700)]
bpo-30256: [doc] Fix formatting error in news (GH-26994) (GH-26996)
(cherry picked from commit
2560c612c89ea2534b90a266aabf76dc74d93a12 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Miss Islington (bot) [Fri, 2 Jul 2021 04:35:31 +0000 (21:35 -0700)]
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (GH-26989)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit
85b920498b42c69185540ecc2f5c4907fd38d877 )
Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
Miss Islington (bot) [Wed, 30 Jun 2021 19:31:04 +0000 (12:31 -0700)]
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
(cherry picked from commit
d3a95c1b6eacbbbd92c294744e7ed41932f3f63e )
Co-authored-by: Steve Dower <steve.dower@python.org>
Steve Dower [Wed, 30 Jun 2021 17:52:39 +0000 (18:52 +0100)]
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26971)
Miss Islington (bot) [Tue, 29 Jun 2021 23:19:32 +0000 (16:19 -0700)]
bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950) (GH-26960)
(cherry picked from commit
e2fea101fd5517f33371b04432842b971021c3bf )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 29 Jun 2021 17:53:07 +0000 (10:53 -0700)]
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26957)
(cherry picked from commit
12803c59d54ff1a45a5b08cef82652ef199b3b07 )
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Miss Islington (bot) [Tue, 29 Jun 2021 14:19:05 +0000 (07:19 -0700)]
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834) (GH-26952)
(cherry picked from commit
0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40 )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Łukasz Langa [Mon, 28 Jun 2021 09:48:44 +0000 (11:48 +0200)]
Post 3.9.6
Łukasz Langa [Mon, 28 Jun 2021 08:26:18 +0000 (10:26 +0200)]
Python 3.9.6
Jason R. Coombs [Sun, 27 Jun 2021 22:05:27 +0000 (18:05 -0400)]
[3.9] bpo-37741: make importlib.metadata docs discoverable through a module directive. (GH-25415) (GH-26500)
Automerge-Triggered-By: GH:jaraco.
(cherry picked from commit
23acadcc1c75eb74b2459304af70d97a35001b34 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Sun, 27 Jun 2021 19:52:32 +0000 (12:52 -0700)]
bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) (GH-26928)
(cherry picked from commit
2f49c9debc2efe010c757be3bdbd6493f1ebc5f6 )
Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
Miss Islington (bot) [Sun, 27 Jun 2021 18:50:45 +0000 (11:50 -0700)]
Clarify the order of a stacked `abstractmethod` (GH-26892)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit
74d60eab558bffdf5ca8ea2f5305e19b36bdb9a8 )
Co-authored-by: Ram Rachum <ram@rachum.com>
Serhiy Storchaka [Sun, 27 Jun 2021 11:28:24 +0000 (14:28 +0300)]
[3.9] bpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations (GH-26843). (GH-26916)
(cherry picked from commit
5c7940257e1f611e7284fd504887bd29a63d0a94 )
Stéphane Bidoul [Sat, 26 Jun 2021 17:59:57 +0000 (19:59 +0200)]
[3.9] Update vendored pip to 21.1.3 (GH-26912). (GH-26915)
Miss Islington (bot) [Thu, 24 Jun 2021 12:25:41 +0000 (05:25 -0700)]
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
(cherry picked from commit
b5a52eef67997246b4235b5407e52a01e822ce56 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Victor Stinner [Wed, 23 Jun 2021 15:47:33 +0000 (17:47 +0200)]
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26878)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.
(cherry picked from commit
489699ca05bed5cfd10e847d8580840812b476cd )
Miss Islington (bot) [Wed, 23 Jun 2021 10:03:00 +0000 (03:03 -0700)]
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
(cherry picked from commit
5a3108044d2e5b694da2d1f4176c9bbaef15c142 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Tue, 22 Jun 2021 17:10:50 +0000 (10:10 -0700)]
[doc] Improve punctuation atexit doc (GH-25629) (GH-26857)
(cherry picked from commit
a6b47de07a304eaa37a1c5554ed00a3ec91f8407 )
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Miss Islington (bot) [Tue, 22 Jun 2021 14:42:41 +0000 (07:42 -0700)]
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit
d1ae57027fc39ff60dcfc1b63881400e5ca3ce56 )
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Ma Lin [Tue, 22 Jun 2021 13:57:41 +0000 (21:57 +0800)]
bpo-44439: BZ2File.write()/LZMAFile.write() handle length correctly (GH-26846)
No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.
Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
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>