Roundup Robot added the comment:
New changeset 87d49e2cdd34 by Nick Coghlan in branch 'default':
Close #19403: make contextlib.redirect_stdout reentrant
http://hg.python.org/cpython/rev/87d49e2cdd34
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
status: open -
Raymond Hettinger added the comment:
+1
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19403
___
___
Python-bugs-list mailing
Changes by Nick Coghlan ncogh...@gmail.com:
--
dependencies: +Use public classes for contextlib.suppress and redirect_stdout
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19403
___
New submission from Nick Coghlan:
I realised making contextlib.redirect_stdout reentrant was actually fairly easy
(thread safety is inherently impossible due to the process global side effect).
Since making it reentrant makes it more user-friendly, I'll tweak the
implementation to work that
Nick Coghlan added the comment:
I think this change also makes for nicer examples of reentrant (using the
updated redirect_stdout) and reusable-but-not-reentrant (using ExitStack)
behaviour in the docs.
--
keywords: +patch
Added file: