<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Doc/library/contextlib.rst, branch dependabot/github_actions/actions/cache-v2.1.5</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Use the zero argument form of super() in examples for Python3 docs. (GH-22314)</title>
<updated>2021-04-26T22:13:54+00:00</updated>
<author>
<name>Andre Delfino</name>
<email>adelfino@gmail.com</email>
</author>
<published>2021-04-26T22:13:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=52cd6d5e1b2bece0d8efb58b1af41071c914ebe6'/>
<id>52cd6d5e1b2bece0d8efb58b1af41071c914ebe6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41543: contextlib.nullcontext can fill in for an async context manager (GH-21870)</title>
<updated>2020-11-09T12:34:07+00:00</updated>
<author>
<name>Tom Gringauz</name>
<email>tomgrin10@gmail.com</email>
</author>
<published>2020-11-09T12:34:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a117167d8dc8fa673a4646f509551c7950f824e5'/>
<id>a117167d8dc8fa673a4646f509551c7950f824e5</id>
<content type='text'>
Co-authored-by: Andrew Svetlov &lt;andrew.svetlov@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Andrew Svetlov &lt;andrew.svetlov@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[docs] fix wrongly named AsyncContextDecorator (GH-23164)</title>
<updated>2020-11-05T16:16:27+00:00</updated>
<author>
<name>kj</name>
<email>28750310+Fidget-Spinner@users.noreply.github.com</email>
</author>
<published>2020-11-05T16:16:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=133aa2d5816b69d8ee755e1a9d2d1977b9205736'/>
<id>133aa2d5816b69d8ee755e1a9d2d1977b9205736</id>
<content type='text'>
Also added versionchanged.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also added versionchanged.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40816 Add AsyncContextDecorator class (GH-20516)</title>
<updated>2020-11-05T08:52:24+00:00</updated>
<author>
<name>Kazantcev Andrey</name>
<email>45011689+heckad@users.noreply.github.com</email>
</author>
<published>2020-11-05T08:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=178695b7aee7a7aacd49a3086060e06347d1e556'/>
<id>178695b7aee7a7aacd49a3086060e06347d1e556</id>
<content type='text'>
Co-authored-by: Yury Selivanov &lt;yury@edgedb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Yury Selivanov &lt;yury@edgedb.com&gt;
</pre>
</div>
</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:48+00:00</updated>
<author>
<name>Joongi Kim</name>
<email>joongi@lablup.com</email>
</author>
<published>2020-11-02T08:02:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6e8dcdaaa49d4313bf9fab9f9923ca5828fbb10e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)</title>
<updated>2019-06-05T15:22:31+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-05T15:22:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=142566c028720934325f0b7fe28680afd046e00f'/>
<id>142566c028720934325f0b7fe28680afd046e00f</id>
<content type='text'>
Turn deprecation warnings added in 3.8 into TypeError.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turn deprecation warnings added in 3.8 into TypeError.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)</title>
<updated>2019-06-01T08:00:15+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-01T08:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2085bd0877e17ad4d98a4586d5eabb6faecbb190'/>
<id>2085bd0877e17ad4d98a4586d5eabb6faecbb190</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)</title>
<updated>2018-12-19T06:09:46+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2018-12-19T06:09:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2b57c43f21f891df4c6f2294a3b9e1b9029a16b6'/>
<id>2b57c43f21f891df4c6f2294a3b9e1b9029a16b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clarify that AsyncExitStack works with coroutine functions (GH-9405)</title>
<updated>2018-09-18T21:27:59+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-09-18T21:27:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a3c88ef12c7b8993912750b56a1e095652fe47c0'/>
<id>a3c88ef12c7b8993912750b56a1e095652fe47c0</id>
<content type='text'>
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.)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.)</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed typo with asynccontextmanager code example (GH-8845)</title>
<updated>2018-08-25T02:38:11+00:00</updated>
<author>
<name>Alexander Vasin</name>
<email>hi@alvass.in</email>
</author>
<published>2018-08-25T02:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=416cbce22d5d8879986125f07b3e293421bc975d'/>
<id>416cbce22d5d8879986125f07b3e293421bc975d</id>
<content type='text'>
`yield conn`, instead of just `yield`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`yield conn`, instead of just `yield`.</pre>
</div>
</content>
</entry>
</feed>
