summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.9.6v3.9.6Łukasz Langa2021-06-2859-132/+581
|
* [3.9] bpo-37741: make importlib.metadata docs discoverable through a module ↵Jason R. Coombs2021-06-271-0/+2
| | | | | | | | directive. (GH-25415) (GH-26500) Automerge-Triggered-By: GH:jaraco. (cherry picked from commit 23acadcc1c75eb74b2459304af70d97a35001b34) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) ↵Miss Islington (bot)2021-06-272-14/+10
| | | | | | | (GH-26928) (cherry picked from commit 2f49c9debc2efe010c757be3bdbd6493f1ebc5f6) Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
* Clarify the order of a stacked `abstractmethod` (GH-26892)Miss Islington (bot)2021-06-271-3/+24
| | | | | | Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com> (cherry picked from commit 74d60eab558bffdf5ca8ea2f5305e19b36bdb9a8) Co-authored-by: Ram Rachum <ram@rachum.com>
* [3.9] bpo-44482: Fix very unlikely resource leak in glob in non-CPython ↵Serhiy Storchaka2021-06-272-2/+9
| | | | | | implementations (GH-26843). (GH-26916) (cherry picked from commit 5c7940257e1f611e7284fd504887bd29a63d0a94)
* [3.9] Update vendored pip to 21.1.3 (GH-26912). (GH-26915)Stéphane Bidoul2021-06-263-1/+2
|
* bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)Miss Islington (bot)2021-06-241-3/+8
| | | | | (cherry picked from commit b5a52eef67997246b4235b5407e52a01e822ce56) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26878)Victor Stinner2021-06-236-10/+88
| | | | | | | 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)
* bpo-28395: Remove unnecessary semicolons in tests (GH-26868)Miss Islington (bot)2021-06-238-31/+32
| | | | | (cherry picked from commit 5a3108044d2e5b694da2d1f4176c9bbaef15c142) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [doc] Improve punctuation atexit doc (GH-25629) (GH-26857)Miss Islington (bot)2021-06-221-7/+8
| | | | | | | (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>
* bpo-41621: Document defaultdict's default_factory parameter (GH-21945)Miss Islington (bot)2021-06-223-3/+4
| | | | | | It defaults to None and is positional only. (cherry picked from commit d1ae57027fc39ff60dcfc1b63881400e5ca3ce56) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* bpo-44439: BZ2File.write()/LZMAFile.write() handle length correctly (GH-26846)Ma Lin2021-06-225-8/+45
| | | | | | 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>
* bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)Miss Islington (bot)2021-06-222-1/+6
| | | | | | | | | | | 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>
* bpo-13814: Explain why generators are not context managers (GH-26835)Miss Islington (bot)2021-06-212-0/+10
| | | | | | | | 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>
* bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)Miss Islington (bot)2021-06-213-2/+11
| | | | | (cherry picked from commit 30f7a77f359a0fc6e37988b0f317a77a15d66b7b) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26825)Victor Stinner2021-06-212-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | _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)
* bpo-44469: Fix tests for "async with" with bad object (GH-26817)Miss Islington (bot)2021-06-211-6/+12
| | | | | | | 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>
* bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) ↵Miss Islington (bot)2021-06-191-2/+2
| | | | | | (GH-26805) (cherry picked from commit 291848195f85e23c01adb76d5a0ff9c6eb7f2614)
* bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it ↵Miss Islington (bot)2021-06-161-2/+2
| | | | | | to 'num'. (GH-26744) (GH-26761) (cherry picked from commit 7247f6f433846c6e37308a550e8e5eb6be379856)
* [3.9] bpo-44392: Add Py_GenericAlias to C API docs (GH-26724) (GH-26757)Ken Jin2021-06-163-0/+49
| | | (cherry picked from commit 6773c3eaa735b5061b4a97f2c730703a32d8c9ff)
* bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) (GH-26738)Miss Islington (bot)2021-06-152-3/+9
| | | | | | | 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>
* [3.9] bpo-44409: Fix error location in tokenizer errors that happen during ↵Pablo Galindo2021-06-143-0/+4
| | | | | | | initialization (GH-26712). (GH-26723) (cherry picked from commit 507ed6fa1d6661e0f8e6d3282764aa9625a99594) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)Miss Islington (bot)2021-06-142-2/+12
| | | | | | | 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>
* Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)Miss Islington (bot)2021-06-131-0/+1
| | | | | | | (cherry picked from commit 59242431991794064824cf2ab70886367613f29e) Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)Miss Islington (bot)2021-06-112-0/+4
| | | | | | | | 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>
* bpo-41299: Reduce lag in Windows threading timeouts by using a higher ↵Miss Islington (bot)2021-06-112-4/+11
| | | | | | | precision time source (GH-26568) (cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f) Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
* bpo-44381: Windows build now allows enabling control flow guard (GH-26645)Miss Islington (bot)2021-06-112-2/+4
| | | (cherry picked from commit 5af56c6f2a0d11df37fed7ecaaf321cf6926ba13)
* bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints ↵Miss Islington (bot)2021-06-113-1/+31
| | | | | | | (GH-24646) (GH-26675) (cherry picked from commit 4cb6ba14325cff98589c2660d1d2c65f4aacfee4) Co-authored-by: huzhaojie <hu.zj@foxmail.com>
* [Enum] improve pickle support (#26666)Ethan Furman2021-06-113-3/+65
| | | | search all bases for a __reduce__ style method; if a __new__ method is found first the enum will be made unpicklable
* [3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659)Lysandros Nikolaou2021-06-102-943/+467
| | | (cherry picked from commit e7b4644607789848f9752a3bd20ff216e25b4156)
* bpo-44356: [Enum] allow multiple data-type mixins if they are all the same ↵Miss Islington (bot)2021-06-103-4/+52
| | | | | | | | | | | | | | | | | | | (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>
* bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from ↵Miss Islington (bot)2021-06-103-14/+48
| | | | | | | repr (GH-18180) (GH-26651) (cherry picked from commit 6544b2532df82d137b71323445a07a6e29bcdec0) Co-authored-by: Daniel Hahler <git@thequod.de>
* bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)Miss Islington (bot)2021-06-103-118/+73
| | | | | | | | 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>
* bpo-44363: Get test_capi passing with address sanitizer (GH-26639)Miss Islington (bot)2021-06-103-1/+17
| | | | | (cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b) Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-40468: Split IDLE settings General tab (GH-26621)Miss Islington (bot)2021-06-093-141/+184
| | | | | | | | | | 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>
* bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)Miss Islington (bot)2021-06-092-201/+216
| | | | | (cherry picked from commit 5571cabf1b3385087aba2c7c10289bba77494e08) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)Miss Islington (bot)2021-06-083-139/+190
| | | | | 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)
* [3.9] bpo-11105: reduce the recursion limit for tests. (GH-26605)Batuhan Taskaya2021-06-082-2/+14
| | | | | (cherry picked from commit e58d762c1fb4ad5e021d016c80c2bc4513632d2f) Co-authored-by: Batuhan Taskaya <batuhan@python.org>
* [3.9] bpo-44322: Document more SyntaxError details. (GH-26562)Terry Jan Reedy2021-06-072-2/+11
| | | | | | | | 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)
* bpo-44320: Fix markup for W3C C14N test suite (GH-26556)Miss Islington (bot)2021-06-061-1/+1
| | | | | (cherry picked from commit 71be46170490d08743c714b9fa4484038aa7a23e) Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
* bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test ↵Miss Islington (bot)2021-06-041-0/+2
| | | | | | | suite (GH-26542) (cherry picked from commit f171877ebe276749f31386baed5841ce37cbee2e) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' ↵Miss Islington (bot)2021-06-041-1/+1
| | | | | | | (GH-26492) (GH-26539) (cherry picked from commit dda9ecbfece28aad7b8ba7eaf7951dd9816f78b1) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.9] bpo-11105: Do not crash when compiling recursive ASTs (GH-20594) ↵Batuhan Taskaya2021-06-034-4/+732
| | | | | | | | | | | | (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>
* [3.9] bpo-43776: Remove list call from args in Popen repr (GH-25338) (GH-26510)Gregory P. Smith2021-06-033-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bpo-44022: Improve the regression test. (GH-26503)Miss Islington (bot)2021-06-031-1/+6
| | | | | | | 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>
* [3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) ↵Joshua Root2021-06-032-5/+11
| | | | | | | | | | | | | (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)
* bpo-44285: getpath.c: Assert that env_file is NULL during an error check ↵Miss Islington (bot)2021-06-021-0/+1
| | | | | | | | (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>
* [3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) ↵Irit Katriel2021-06-011-2/+3
| | | | | | | (GH-26481) (cherry picked from commit 87272b70f157af76cb14ff90d73dfc5d9bfb945a) Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
* bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)Miss Islington (bot)2021-05-312-2/+9
| | | | | | | | | * _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>
* bpo-44254: On Mac, remove disfunctional colors from turtledemo buttons ↵Miss Islington (bot)2021-05-292-16/+30
| | | | | | | | | (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>