Kaydet (Commit) 401edd69 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #4188: Avoid creating dummy thread objects when logging operations

from the threading module (with the internal verbose flag activated).
üst 988dbd7b
......@@ -55,8 +55,14 @@ if __debug__:
def _note(self, format, *args):
if self._verbose:
format = format % args
format = "%s: %s\n" % (
current_thread().name, format)
# Issue #4188: calling current_thread() can incur an infinite
# recursion if it has to create a DummyThread on the fly.
ident = _get_ident()
try:
name = _active[ident].name
except KeyError:
name = "<OS thread %d>" % ident
format = "%s: %s\n" % (name, format)
_sys.stderr.write(format)
else:
......
......@@ -20,6 +20,9 @@ Core and Builtins
Library
-------
- Issue #4188: Avoid creating dummy thread objects when logging operations
from the threading module (with the internal verbose flag activated).
- Issue #10711: Remove HTTP 0.9 support from http.client. The ``strict``
parameter to HTTPConnection and friends is deprecated.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment