This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年10月26日 06:43 by ncoghlan, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue19403_reentrant_redirect_stdout.diff | ncoghlan, 2013年10月26日 14:18 | Make redirect_stdout reentrant | review | |
| Messages (4) | |||
|---|---|---|---|
| msg201318 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2013年10月26日 06:43 | |
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 way. Need to resolve issue 19330 first, though. As part of this change, the reusable-but-not-reentrant example in the docs needs to be updated to use contextlib.ExitStack rather than this (that's inherently not reentrant, since all the context managers in the stack would be triggered when the innermost context ends). |
|||
| msg201358 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2013年10月26日 14:18 | |
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. |
|||
| msg201514 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2013年10月28日 06:11 | |
+1 |
|||
| msg202001 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年11月03日 07:02 | |
New changeset 87d49e2cdd34 by Nick Coghlan in branch 'default': Close #19403: make contextlib.redirect_stdout reentrant http://hg.python.org/cpython/rev/87d49e2cdd34 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:52 | admin | set | github: 63602 |
| 2013年11月03日 07:02:23 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg202001 resolution: fixed stage: resolved |
| 2013年10月28日 06:11:41 | rhettinger | set | nosy:
+ rhettinger messages: + msg201514 |
| 2013年10月26日 14:18:22 | ncoghlan | set | files:
+ issue19403_reentrant_redirect_stdout.diff keywords: + patch messages: + msg201358 |
| 2013年10月26日 06:44:17 | ncoghlan | set | dependencies: + Use public classes for contextlib.suppress and redirect_stdout |
| 2013年10月26日 06:43:50 | ncoghlan | create | |