<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/contextlib.py, branch 3.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/contextlib.py?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/contextlib.py?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2021-10-05T06:21:34Z</updated>
<entry>
<title>[3.10] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) (GH-28730)</title>
<updated>2021-10-05T06:21:34Z</updated>
<author>
<name>John Belmonte</name>
<email>john@neggie.net</email>
</author>
<published>2021-10-05T06:21:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=872b1e537e96d0dc4ff37c738031940b5d271366'/>
<id>urn:sha1:872b1e537e96d0dc4ff37c738031940b5d271366</id>
<content type='text'>
Make enter_context(foo()) / enter_async_context(foo()) equivalent to
`[async] with foo()` regarding __context__ when an exception is raised.

Previously exceptions would be caught and re-raised with the wrong
context when explicitly overriding __context__ with None..
(cherry picked from commit e6d1aa1ac65b6908fdea2c70ec3aa8c4f1dffcb5)

Co-authored-by: John Belmonte &lt;john@neggie.net&gt;

Automerge-Triggered-By: GH:njsmith</content>
</entry>
<entry>
<title>bpo-44566: resolve differences between asynccontextmanager and contextmanager (GH-27024) (#27266)</title>
<updated>2021-07-20T19:12:47Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-07-20T19:12:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=68b4690b010d0006e9b0235903afd367191f3c51'/>
<id>urn:sha1:68b4690b010d0006e9b0235903afd367191f3c51</id>
<content type='text'>
(cherry picked from commit 7f1c330da31c54e028dceaf3610877914c2a4497)

Co-authored-by: Thomas Grainger &lt;tagrain@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-42395: Add aclosing to __all__ (GH-23356)</title>
<updated>2020-11-17T23:18:05Z</updated>
<author>
<name>Tom Gringauz</name>
<email>tomgrin10@gmail.com</email>
</author>
<published>2020-11-17T23:18:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d0d4a450679bfc90eae7be4fdb5499e87f661b3e'/>
<id>urn:sha1:d0d4a450679bfc90eae7be4fdb5499e87f661b3e</id>
<content type='text'>
Automerge-Triggered-By: GH:asvetlov</content>
</entry>
<entry>
<title>bpo-41543: contextlib.nullcontext can fill in for an async context manager (GH-21870)</title>
<updated>2020-11-09T12:34:07Z</updated>
<author>
<name>Tom Gringauz</name>
<email>tomgrin10@gmail.com</email>
</author>
<published>2020-11-09T12:34:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a117167d8dc8fa673a4646f509551c7950f824e5'/>
<id>urn:sha1:a117167d8dc8fa673a4646f509551c7950f824e5</id>
<content type='text'>
Co-authored-by: Andrew Svetlov &lt;andrew.svetlov@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-40816 Add AsyncContextDecorator class (GH-20516)</title>
<updated>2020-11-05T08:52:24Z</updated>
<author>
<name>Kazantcev Andrey</name>
<email>45011689+heckad@users.noreply.github.com</email>
</author>
<published>2020-11-05T08:52:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=178695b7aee7a7aacd49a3086060e06347d1e556'/>
<id>urn:sha1:178695b7aee7a7aacd49a3086060e06347d1e556</id>
<content type='text'>
Co-authored-by: Yury Selivanov &lt;yury@edgedb.com&gt;
</content>
</entry>
<entry>
<title>bpo-41229: Update docs for explicit aclose()-required cases and add contextlib.aclosing() method (GH-21545)</title>
<updated>2020-11-02T08:02:48Z</updated>
<author>
<name>Joongi Kim</name>
<email>joongi@lablup.com</email>
</author>
<published>2020-11-02T08:02:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6e8dcdaaa49d4313bf9fab9f9923ca5828fbb10e'/>
<id>urn:sha1:6e8dcdaaa49d4313bf9fab9f9923ca5828fbb10e</id>
<content type='text'>
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.</content>
</entry>
<entry>
<title>bpo-39481: Implementation for PEP 585 (#18239)</title>
<updated>2020-04-07T16:50:06Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2020-04-07T16:50:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=48b069a003ba6c684a9ba78493fbbec5e89f10b8'/>
<id>urn:sha1:48b069a003ba6c684a9ba78493fbbec5e89f10b8</id>
<content type='text'>
This implements things like `list[int]`,
which returns an object of type `types.GenericAlias`.
This object mostly acts as a proxy for `list`,
but has attributes `__origin__` and `__args__`
that allow recovering the parts (with values `list` and `(int,)`.

There is also an approximate notion of type variables;
e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`.
Type variables are objects of type `typing.TypeVar`.
</content>
</entry>
<entry>
<title>[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)</title>
<updated>2019-06-05T15:22:31Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-05T15:22:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=142566c028720934325f0b7fe28680afd046e00f'/>
<id>urn:sha1:142566c028720934325f0b7fe28680afd046e00f</id>
<content type='text'>
Turn deprecation warnings added in 3.8 into TypeError.</content>
</entry>
<entry>
<title>bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)</title>
<updated>2019-06-01T08:00:15Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-01T08:00:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2085bd0877e17ad4d98a4586d5eabb6faecbb190'/>
<id>urn:sha1:2085bd0877e17ad4d98a4586d5eabb6faecbb190</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)</title>
<updated>2019-05-06T19:40:27Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-05-06T19:40:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d53cf99dca4605ace4b81b1e585616b3e1b74fa6'/>
<id>urn:sha1:d53cf99dca4605ace4b81b1e585616b3e1b74fa6</id>
<content type='text'>
</content>
</entry>
</feed>
