summaryrefslogtreecommitdiffstats
path: root/Doc/library/contextlib.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)Serhiy Storchaka2019-06-051-2/+2
| | | Turn deprecation warnings added in 3.8 into TypeError.
* bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)Serhiy Storchaka2019-06-011-1/+1
|
* bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)Serhiy Storchaka2018-12-191-7/+7
|
* Clarify that AsyncExitStack works with coroutine functions (GH-9405)Nathaniel J. Smith2018-09-181-2/+2
| | | | | | | | | | | | The docs were ambiguous about whether you pass in a coroutine function or a coroutine object, e.g. is it: aestack.push_async_exit(some_async_func) or aestack.push_async_exit(some_async_func()) (It's the first one.)
* Fixed typo with asynccontextmanager code example (GH-8845)Alexander Vasin2018-08-251-1/+1
| | | `yield conn`, instead of just `yield`.
* bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816)Matthias Bussonnier2018-07-231-11/+17
|
* bpo-34067: Include a more easily understood example for nullcontext (GH-8158)Daniel Porteous2018-07-091-1/+13
| | | Include a more easily understood example for nullcontext
* bpo-29302: Implement contextlib.AsyncExitStack. (#4790)Ilya Kulakov2018-01-251-0/+38
|
* bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)Jelle Zijlstra2017-12-141-0/+11
|
* bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464)Jesse-Bakker2017-11-231-18/+22
| | | | | Adds a simpler and faster alternative to ExitStack for handling single optional context managers without having to change the lexical structure of your code.
* bpo-29679: Implement @contextlib.asynccontextmanager (#360)Jelle Zijlstra2017-05-011-0/+30
|
* Closes #27904: Improved logging statements to defer formatting until needed.Vinay Sajip2016-08-311-2/+2
|
* Add a missing :term:.Brett Cannon2016-06-091-1/+1
|
* Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
|\ | | | | | | Original patch by James Edwards.
| * Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
| | | | | | | | Original patch by James Edwards.
* | Issue #25609: Introduce contextlib.AbstractContextManager andBrett Cannon2016-04-081-2/+14
|/ | | | typing.ContextManager.
* Remove redundant leading zeroes in PEP references.Serhiy Storchaka2016-03-311-1/+1
|
* Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-1/+1
|\
| * Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-1/+1
| |
* | Issue #25161: Merge full stops from 3.4 into 3.5Martin Panter2015-10-101-1/+1
|\ \ | |/
| * Issue #25161: Add full stops in documentation; patch by Takase ArihiroMartin Panter2015-10-101-1/+1
| |
* | Issue #22389: Add contextlib.redirect_stderr().Berker Peksag2014-11-281-0/+10
|/
* Issue #21061: correctly note redirect_stdout is reentrantNick Coghlan2014-10-121-1/+1
|
* Issue 22603: add missing 'self'. Patch by Francisco Fernández Castaño.Terry Jan Reedy2014-10-101-2/+2
|
* Issue 21558: Fix a typo in the contextlib docsRaymond Hettinger2014-05-261-1/+1
|
* Close #19403: make contextlib.redirect_stdout reentrantNick Coghlan2013-11-031-40/+77
|
* What's New updates prior to alphaNick Coghlan2013-10-201-2/+3
|
* contextlib doc updates and refactoringNick Coghlan2013-10-191-0/+116
| | | | | | | | | | | - explain single use, reusable and reentrant in docs - converted suppress to a reentrant class based impl - converted redirect_stdout to a reusable impl - moved both suppress and redirect_stdout behind a functional facade - added reentrancy tests for the updated suppress - added reusability tests for the updated redirect_stdio - slightly cleaned up an exception from contextmanager
* Close #19266: contextlib.ignore -> contextlib.suppressNick Coghlan2013-10-171-8/+18
| | | | Patch by Zero Piraeus.
* Fix spacing of toplevel items.Georg Brandl2013-10-131-0/+2
|
* Docs tweaks for contextlib additionsNick Coghlan2013-10-131-2/+12
|
* Rename contextlib.ignored() to contextlib.ignore().Raymond Hettinger2013-10-111-3/+3
|
* Issue #15805: Add contextlib.redirect_stdout()Raymond Hettinger2013-10-101-0/+31
|
* Merge 3.3Barry Warsaw2013-05-101-2/+3
|\
| * I was confused before. It's correct to not call .close() inside the withBarry Warsaw2013-05-101-2/+3
| | | | | | | | statement, but add a comment that clarifies the purpose of the code.
* | Merge 3.3Barry Warsaw2013-04-191-1/+1
|\ \ | |/
| * Minor typo in example.Barry Warsaw2013-04-191-1/+1
| |
* | Issue #17586: fix typo in contextlib.rstNed Deily2013-04-011-1/+1
| |
* | #17351: merge with 3.3.Ezio Melotti2013-03-111-1/+1
|\ \ | |/
| * #17351: merge with 3.2.Ezio Melotti2013-03-111-1/+1
| |\
* | | Issue #15806: Add contextlib.ignored().Raymond Hettinger2013-03-111-0/+20
|/ /
* | Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
* | Typo fixNick Coghlan2012-05-311-1/+1
| |
* | Additional ExitStack examples, and a few other cleanups for the ExitStack docsNick Coghlan2012-05-311-7/+75
| |
* | Fix the versionadded tags for a couple of my recent changesNick Coghlan2012-05-221-2/+2
| |
* | Close #13585: add contextlib.ExitStack to replace the ill-fated ↵Nick Coghlan2012-05-211-1/+278
|/ | | | contextlib.nested API
* Issue #11647: allow contextmanager objects to be used as decorators as ↵Nick Coghlan2011-05-051-2/+12
| | | | described in the docs. Initial patch by Ysj Ray.
* Separate source link from main text.Raymond Hettinger2011-01-101-0/+2
|
* Move source links to consistent location and remove wordy, big yellow boxes.Raymond Hettinger2011-01-101-5/+1
|
* Provide links to Python source where the code is short, readable andÉric Araujo2010-11-161-0/+5
| | | | | informative adjunct to the docs. Forward-port of Raymond's r86225 and r86245 using the new source reST role added in #10334.