Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.13] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it ↵ | Miss Islington (bot) | 2024-06-05 | 1 | -1/+3 |
| | | | | | | | | from contextlib.suppress (GH-119657) (#120105) gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (cherry picked from commit 5c02ea8bae2287a828840f5734966da23dc573dc) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | ||||
* | [3.13] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119872) | Miss Islington (bot) | 2024-05-31 | 1 | -1/+1 |
| | | | | Reported by Michael Kass on docs@ (cherry picked from commit f3fc800d5f17b144a752a262102b750bedcdaa14) | ||||
* | Fix a typo in the contextlib documentation (#114507) | Daniel Hollas | 2024-01-24 | 1 | -1/+1 |
| | |||||
* | gh-66944: Note that the `contextlib.closing` example is for illustrative ↵ | Ville Skyttä | 2024-01-23 | 1 | -0/+8 |
| | | | | | purposes (#112198) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> | ||||
* | gh-101100: Fix Sphinx nits in `library/contextlib.rst` (#112870) | Alex Waygood | 2023-12-08 | 1 | -7/+7 |
| | |||||
* | gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910) | Zac Hatfield-Dodds | 2023-11-10 | 1 | -3/+3 |
| | |||||
* | GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112) | Adam Turner | 2023-10-19 | 1 | -11/+11 |
| | |||||
* | gh-103791: Make contextlib.suppress also act on exceptions within an ↵ | Łukasz Langa | 2023-04-24 | 1 | -0/+7 |
| | | | | | ExceptionGroup (#103792) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | ||||
* | Formatting fixes in contextlib docs (#98111) | Stanley | 2022-10-12 | 1 | -11/+17 |
| | |||||
* | gh-93675: Fix typos in `Doc/` (GH-93676) | luzpaz | 2022-06-21 | 1 | -1/+1 |
| | | | Closes #93675 | ||||
* | gh-92082: contextlib docs: Change aclosing from a class to a function for ↵ | Thaddeus1499 | 2022-05-02 | 1 | -1/+1 |
| | | | | | consistency (#92155) Signed-off-by: prwatson <prwatson@redhat.com> | ||||
* | bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) | vidhya | 2022-03-28 | 1 | -0/+3 |
| | | | | | | The enter_context is updated with following information: 'The :meth:`__enter__` method returns the ExitStack instance, and performs no additional operations.' Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | ||||
* | bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) | Zbigniew Siciarz | 2021-11-25 | 1 | -0/+2 |
| | | | Automerge-Triggered-By: GH:asvetlov | ||||
* | bpo-25625: [doc] fix async/aync typo (GH-29091) | Thomas Grainger | 2021-10-20 | 1 | -1/+1 |
| | |||||
* | bpo-25625: add contextlib.chdir (GH-28271) | Filipe Laíns | 2021-10-19 | 1 | -2/+19 |
| | | | | | | | | Added non parallel-safe :func:`~contextlib.chdir` context manager to change the current working directory and then restore it on exit. Simple wrapper around :func:`~os.chdir`. Signed-off-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | Update URLs in comments and metadata to use HTTPS (GH-27458) | Noah Kantrowitz | 2021-07-30 | 1 | -1/+1 |
| | |||||
* | Doc: fix a rst tag. (GH-26965) | Julien Palard | 2021-06-30 | 1 | -6/+6 |
| | |||||
* | bpo-44471: Change error type for bad objects in ExitStack.enter_context() ↵ | Serhiy Storchaka | 2021-06-29 | 1 | -0/+8 |
| | | | | | | | | | (GH-26820) A TypeError is now raised instead of an AttributeError in ExitStack.enter_context() and AsyncExitStack.enter_async_context() for objects which do not support the context manager or asynchronous context manager protocols correspondingly. | ||||
* | bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) | Irit Katriel | 2021-06-04 | 1 | -1/+1 |
| | |||||
* | bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) | MapleCCC | 2021-06-01 | 1 | -2/+3 |
| | |||||
* | bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as ↵ | Peter Law | 2021-05-26 | 1 | -3/+4 |
| | | | | context var (GH-21199) | ||||
* | bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as ↵ | naglis | 2021-05-19 | 1 | -2/+2 |
| | | | | coroutine methods (GH-20870) | ||||
* | Use the zero argument form of super() in examples for Python3 docs. (GH-22314) | Andre Delfino | 2021-04-26 | 1 | -1/+1 |
| | |||||
* | bpo-41543: contextlib.nullcontext can fill in for an async context manager ↵ | Tom Gringauz | 2020-11-09 | 1 | -0/+18 |
| | | | | | (GH-21870) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> | ||||
* | [docs] fix wrongly named AsyncContextDecorator (GH-23164) | kj | 2020-11-05 | 1 | -3/+5 |
| | | | Also added versionchanged. | ||||
* | bpo-40816 Add AsyncContextDecorator class (GH-20516) | Kazantcev Andrey | 2020-11-05 | 1 | -0/+62 |
| | | | | Co-authored-by: Yury Selivanov <yury@edgedb.com> | ||||
* | bpo-41229: Update docs for explicit aclose()-required cases and add ↵ | Joongi Kim | 2020-11-02 | 1 | -0/+33 |
| | | | | | | | | | | | | | | | | | | | contextlib.aclosing() method (GH-21545) This is a PR to: * Add `contextlib.aclosing` which ia analogous to `contextlib.closing` but for async-generators with an explicit test case for [bpo-41229]() * Update the docs to describe when we need explicit `aclose()` invocation. which are motivated by the following issues, articles, and examples: * [bpo-41229]() * https://github.com/njsmith/async_generator * https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/#cleanup-in-generators-and-async-generators * https://www.python.org/dev/peps/pep-0533/ * https://github.com/achimnol/aiotools/blob/ef7bf0cea7af/src/aiotools/context.py#L152 Particuarly regarding [PEP-533](https://www.python.org/dev/peps/pep-0533/), its acceptance (`__aiterclose__()`) would make this little addition of `contextlib.aclosing()` unnecessary for most use cases, but until then this could serve as a good counterpart and analogy to `contextlib.closing()`. The same applies for `contextlib.closing` with `__iterclose__()`. Also, still there are other use cases, e.g., when working with non-generator objects with `aclose()` methods. | ||||
* | [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) | Serhiy Storchaka | 2019-06-05 | 1 | -2/+2 |
| | | | Turn deprecation warnings added in 3.8 into TypeError. | ||||
* | bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) | Serhiy Storchaka | 2019-06-01 | 1 | -1/+1 |
| | |||||
* | bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) | Serhiy Storchaka | 2018-12-19 | 1 | -7/+7 |
| | |||||
* | Clarify that AsyncExitStack works with coroutine functions (GH-9405) | Nathaniel J. Smith | 2018-09-18 | 1 | -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 Vasin | 2018-08-25 | 1 | -1/+1 |
| | | | `yield conn`, instead of just `yield`. | ||||
* | bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) | Matthias Bussonnier | 2018-07-23 | 1 | -11/+17 |
| | |||||
* | bpo-34067: Include a more easily understood example for nullcontext (GH-8158) | Daniel Porteous | 2018-07-09 | 1 | -1/+13 |
| | | | Include a more easily understood example for nullcontext | ||||
* | bpo-29302: Implement contextlib.AsyncExitStack. (#4790) | Ilya Kulakov | 2018-01-25 | 1 | -0/+38 |
| | |||||
* | bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412) | Jelle Zijlstra | 2017-12-14 | 1 | -0/+11 |
| | |||||
* | bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464) | Jesse-Bakker | 2017-11-23 | 1 | -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 Zijlstra | 2017-05-01 | 1 | -0/+30 |
| | |||||
* | Closes #27904: Improved logging statements to defer formatting until needed. | Vinay Sajip | 2016-08-31 | 1 | -2/+2 |
| | |||||
* | Add a missing :term:. | Brett Cannon | 2016-06-09 | 1 | -1/+1 |
| | |||||
* | Issue #23921: Standardized documentation whitespace formatting. | Serhiy Storchaka | 2016-05-10 | 1 | -1/+1 |
|\ | | | | | | | Original patch by James Edwards. | ||||
| * | Issue #23921: Standardized documentation whitespace formatting. | Serhiy Storchaka | 2016-05-10 | 1 | -1/+1 |
| | | | | | | | | Original patch by James Edwards. | ||||
* | | Issue #25609: Introduce contextlib.AbstractContextManager and | Brett Cannon | 2016-04-08 | 1 | -2/+14 |
|/ | | | | typing.ContextManager. | ||||
* | Remove redundant leading zeroes in PEP references. | Serhiy Storchaka | 2016-03-31 | 1 | -1/+1 |
| | |||||
* | Issue #25523: Merge a-to-an corrections from 3.4. | Serhiy Storchaka | 2015-11-02 | 1 | -1/+1 |
|\ | |||||
| * | Issue #25523: Further a-to-an corrections. | Serhiy Storchaka | 2015-11-02 | 1 | -1/+1 |
| | | |||||
* | | Issue #25161: Merge full stops from 3.4 into 3.5 | Martin Panter | 2015-10-10 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #25161: Add full stops in documentation; patch by Takase Arihiro | Martin Panter | 2015-10-10 | 1 | -1/+1 |
| | | |||||
* | | Issue #22389: Add contextlib.redirect_stderr(). | Berker Peksag | 2014-11-28 | 1 | -0/+10 |
|/ | |||||
* | Issue #21061: correctly note redirect_stdout is reentrant | Nick Coghlan | 2014-10-12 | 1 | -1/+1 |
| |