_get_socket() already prints a debug message for the host and port.
https://bugs.python.org/issue32793
Automerge-Triggered-By: @maxking
(cherry picked from commit 46a7564578)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
The test now waits until all threads complete to avoid leaking
running threads.
Also, use regular threads rather than daemon threads.
(cherry picked from commit 13ff396c01)
(cherry picked from commit f5393dc2a0)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).
Going into more detail for those who want it, the Tk change was made in [commit 591f68c](591f68cb38) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](591f68cb38/generic/tkScale.cGH-L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).
Automerge-Triggered-By: @pablogsal
(cherry picked from commit aecf036738)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
(cherry picked from commit 1fce240d6c)
Co-authored-by: Victor Stinner <vstinner@python.org>
Enable recursion checks which were disabled when get __bases__ of
non-type objects in issubclass() and isinstance() and when intern
strings. It fixes a stack overflow when getting __bases__ leads
to infinite recursion.
Originally recursion checks was disabled for PyDict_GetItem() which
silences all errors including the one raised in case of detected
recursion and can return incorrect result. But now the code uses
PyDict_GetItemWithError() and PyDict_SetDefault() instead.
(cherry picked from commit 9ece9cd65c)
'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
(cherry picked from commit 05cc881cbc)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The marker was added to the language in 3.8 and
3.7 only gets security patches.
(cherry picked from commit 40a0625792)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that.
Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad625)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d)
Co-authored-by: Victor Stinner <vstinner@python.org>
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This is a trivial PR to fix a typo in a docstring in typing.py. From reverences -> references.
(cherry picked from commit 84ef33c511)
Co-authored-by: Graham Bleaney <gbleaney@gmail.com>
Automerge-Triggered-By: @Mariatta
The error is exposed on non-UTF-8 locales.
(cherry picked from commit 67987acd5d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c73ee5acc9)
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.
Follow-up to GH-22017
(cherry picked from commit be435ae2b0)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
* bpo-41696: Fix handling of debug mode in asyncio.run
This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run
* 📜🤖 Added by blurb_it.
Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95cc)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae2e5)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>