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>
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>
(cherry picked from commit 5924243199)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
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>
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>
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>
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>
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)
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)
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>
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>
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>
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)
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>
* _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>
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>
Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.
(cherry picked from commit 4e2e5c1c4f)
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>
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>
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>