Commit graph

108570 commits

Author SHA1 Message Date
Miss Islington (bot)
8fe57aacc7
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 243fd01047)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-15 18:30:26 +02:00
Pablo Galindo
0d0a9eaa82
[3.9] bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712). (GH-26723)
(cherry picked from commit 507ed6fa1d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-14 18:07:51 +01:00
Miss Islington (bot)
7f021952b2
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 8a76683cfb)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-06-14 08:07:05 -07:00
Miss Islington (bot)
9ee8752162
Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
(cherry picked from commit 5924243199)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-06-13 08:42:43 +01:00
Miss Islington (bot)
a9e20cf7bb
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 3ec3ee7d2e)

Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
2021-06-11 19:24:40 -04:00
Miss Islington (bot)
57b3ca7f0a
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568)
(cherry picked from commit 449e6f0ef3)

Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
2021-06-11 15:03:10 -07:00
Miss Islington (bot)
9580d3894a
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
(cherry picked from commit 5af56c6f2a)
2021-06-11 22:16:50 +01:00
Miss Islington (bot)
6df926f1c4
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) (GH-26675)
(cherry picked from commit 4cb6ba1432)

Co-authored-by: huzhaojie <hu.zj@foxmail.com>
2021-06-11 17:18:49 +01:00
Ethan Furman
e9726314df
[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
2021-06-11 01:26:32 -07:00
Lysandros Nikolaou
3ce35bfbbe
[3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659)
(cherry picked from commit e7b4644607)
2021-06-10 15:52:49 -07:00
Miss Islington (bot)
304ec53b53
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 8a4f0850d7)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 15:03:29 -07:00
Miss Islington (bot)
175ebc60d5
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26651)
(cherry picked from commit 6544b2532d)

Co-authored-by: Daniel Hahler <git@thequod.de>
2021-06-10 22:24:03 +01:00
Miss Islington (bot)
9b889433c7
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 42d5a4fc3b)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-06-10 12:40:39 -07:00
Miss Islington (bot)
865269458f
bpo-44363: Get test_capi passing with address sanitizer (GH-26639)
(cherry picked from commit 31aa0dbff4)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2021-06-10 05:01:22 -07:00
Miss Islington (bot)
d9f38d77c8
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 275d5f7957)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-09 13:41:24 -07:00
Miss Islington (bot)
c8353239ed
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
(cherry picked from commit 5571cabf1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-08 19:05:28 -07:00
Miss Islington (bot)
c03f0ab259
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 ab36b9f834)
2021-06-08 17:26:56 -04:00
Batuhan Taskaya
87f502231c
[3.9] bpo-11105: reduce the recursion limit for tests. (GH-26605)
(cherry picked from commit e58d762c1f)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
2021-06-08 20:39:47 +03:00
Terry Jan Reedy
d5f8bd60e1
[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 67dfa6f2a5)
2021-06-06 22:57:53 -04:00
Miss Islington (bot)
8e2c0fd7ad
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)
(cherry picked from commit 71be461704)

Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
2021-06-05 19:57:24 -07:00
Miss Islington (bot)
b3c50b29e1
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542)
(cherry picked from commit f171877ebe)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-04 16:59:55 -07:00
Miss Islington (bot)
ea298e1e33
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) (GH-26539)
(cherry picked from commit dda9ecbfec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-06-04 23:09:45 +01:00
Batuhan Taskaya
de58b319af
[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 f3491242e4)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
2021-06-03 22:22:34 +01:00
Gregory P. Smith
5a8ddcc452
[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 db0c5b786d)

Co-authored-by: M. Kocher <michael.kocher@me.com>

Co-authored-by: M. Kocher <michael.kocher@me.com>
2021-06-02 21:15:26 -07:00
Miss Islington (bot)
5df4abd6b0
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 e60ab843cb)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-06-02 21:10:22 -07:00
Joshua Root
991693a217
[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)
2021-06-02 20:25:15 -04:00
Miss Islington (bot)
85b587a38d
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 bdb56902a3)

Co-authored-by: stratakis <cstratak@redhat.com>
2021-06-03 01:50:55 +02:00
Irit Katriel
9a68862497
[3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481)
(cherry picked from commit 87272b70f1)

Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
2021-06-01 23:15:48 +01:00
Miss Islington (bot)
46b16d0bdb
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 142e5c5445)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-31 04:33:31 -07:00
Miss Islington (bot)
9bcb76c24f
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 af5a324843)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-29 04:16:34 -04:00
Miss Islington (bot)
7bd1304d49
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)
(cherry picked from commit 43cf7c864a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-28 20:53:40 -07:00
Miss Islington (bot)
a30cbaee84
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442)
(cherry picked from commit 8b55bc3f93)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-28 20:20:54 -07:00
Miss Islington (bot)
d5b657b964
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26437)
(cherry picked from commit 7e6f237569)

Co-authored-by: Sean Grady <vedicmonk@gmail.com>

Co-authored-by: Sean Grady <vedicmonk@gmail.com>
2021-05-28 21:07:39 -04:00
Miss Islington (bot)
8f8f2ea832
bpo-44249: Fix 3 README.rst typos (GH-26385)
(cherry picked from commit acac6c71ff)


Co-authored-by: Ayush Parikh <ayushparikh332@gmail.com>
2021-05-28 16:02:47 -04:00
Miss Islington (bot)
21a56a4bce
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 4e2e5c1c4f)
2021-05-28 09:39:59 +03:00
Miss Islington (bot)
427232f9d2
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26410)
(cherry picked from commit 164a4f46d1)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-05-27 19:23:51 +02:00
Miss Islington (bot)
65fb9a2701
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
(cherry picked from commit abc4bd5db9)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-27 08:08:00 -07:00
Miss Islington (bot)
bee66d3cb9
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26380)
(cherry picked from commit 46db39d7bd)

Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
2021-05-26 15:43:37 +01:00
Miss Islington (bot)
e7078ee116
Point to recent link to PyFLTK (GH-26315) (GH-26367)
(cherry picked from commit ee3d78ef73)

Co-authored-by: Mark <mark@qtrac.eu>

Co-authored-by: Mark <mark@qtrac.eu>
2021-05-25 18:03:43 -03:00
Miss Islington (bot)
8accb8c8cc
bpo-20408: Fix memoryview() signature in docs (GH-24431)
(cherry picked from commit d18e5dae91)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-25 17:30:42 +03:00
Miss Islington (bot)
3af61a7176
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 59acfd4a09)

Co-authored-by: Ned Deily <nad@python.org>
2021-05-25 00:21:28 -04:00
Miss Islington (bot)
ab4da07923
[3.9] bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317) (GH-26335)
(cherry picked from commit 7148293d96)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-24 10:33:03 -07:00
Miss Islington (bot)
099e6a4096
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 2a1e6698b1)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-22 23:23:11 +01:00
Mariusz Felisiak
b21193dd1e
[3.9] Remove duplicate words in docs. (GH-26167) (GH-26297)
(cherry picked from commit b06ed1d883)
2021-05-22 21:56:19 +01:00
Miss Islington (bot)
11b5045b0c
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 2edaf6a4fb)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-05-22 12:06:46 +01:00
Miss Islington (bot)
a373c80811
Specify Python Cookbook edition for reference (GH-26301) (#26303)
(cherry picked from commit 604cd71e50)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 23:48:31 +01:00
Zackery Spytz
96c9961bfe
bpo-43556: Fix the attr names for ast.expr and ast.stmt in the docs (GH-24940) 2021-05-21 21:29:12 +01:00
Miss Islington (bot)
e10bd76d47
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 2f47d8dcc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 11:17:10 -07:00
Miss Islington (bot)
bcd59134f5
[doc] Fix indentation in inspect documentation (GH-24846) (GH-26288)
(cherry picked from commit 642fdfdc04)

Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
2021-05-21 18:06:58 +01:00
Jakub Kulík
d3cc68900d
[3.9] bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096) (GH-25847)
(cherry picked from commit 9032cf5cb1)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-05-21 16:59:39 +02:00