<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/contextlib.py, branch 3.7</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.7</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/contextlib.py?h=3.7'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2020-08-14T09:44:00Z</updated>
<entry>
<title>bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() (GH-7467) (GH-21878)</title>
<updated>2020-08-14T09:44:00Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-08-14T09:44:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cf79cbf4479e395bf7c4df2907f5a444639b4f6f'/>
<id>urn:sha1:cf79cbf4479e395bf7c4df2907f5a444639b4f6f</id>
<content type='text'>
(cherry picked from commit 52698c7ad9eae9feb35839fde17a7d1da8036a9b)

Co-authored-by: Yury Selivanov &lt;yury@magic.io&gt;
</content>
</entry>
<entry>
<title>[3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645)</title>
<updated>2019-04-01T07:59:24Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-04-01T07:59:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a37f356de19828241bf19129f804369794c72ed3'/>
<id>urn:sha1:a37f356de19828241bf19129f804369794c72ed3</id>
<content type='text'>
The following arguments can be passed as keyword arguments for passing
to other function if the corresponding required argument is passed as
positional:

- "func" in functools.partialmethod(), weakref.finalize(),
  profile.Profile.runcall(), cProfile.Profile.runcall(),
  bdb.Bdb.runcall(), trace.Trace.runfunc() and
  curses.wrapper().
- "function" in unittest.addModuleCleanup() and
  unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
  and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
  contextlib.AsyncExitStack.callback() and
  contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in multiprocessing.managers.Server.create().
- "obj" in weakref.finalize().

(cherry picked from commit 42a139ed88c487f325a241c6ee8b308b3c045975)</content>
</entry>
<entry>
<title>bpo-30306: release arguments of contextmanager (GH-1500)</title>
<updated>2018-01-28T04:17:46Z</updated>
<author>
<name>Martin Teichmann</name>
<email>lkb.teichmann@gmail.com</email>
</author>
<published>2018-01-28T04:17:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dd0e087edc8f1e4d2c0913236b1a62a77d9db6d8'/>
<id>urn:sha1:dd0e087edc8f1e4d2c0913236b1a62a77d9db6d8</id>
<content type='text'>
The arguments to a generator function which is declared as a
contextmanager are stored inside the context manager, and
thus are kept alive, even when it is used as a regular context
manager, and not as a function decorator (where it needs
the original arguments to recreate the generator on each
call).

This is a possible unnecessary memory leak, so this changes
contextmanager.__enter__ to release the saved arguments,
as that method being called means that particular CM instance
isn't going to need to recreate the underlying generator.

Patch by Martin Teichmann.
</content>
</entry>
<entry>
<title>bpo-29302: Implement contextlib.AsyncExitStack. (#4790)</title>
<updated>2018-01-25T20:51:18Z</updated>
<author>
<name>Ilya Kulakov</name>
<email>kulakov.ilya@gmail.com</email>
</author>
<published>2018-01-25T20:51:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1aa094f74039cd20fdc7df56c68f6848c18ce4dd'/>
<id>urn:sha1:1aa094f74039cd20fdc7df56c68f6848c18ce4dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)</title>
<updated>2017-12-14T01:19:17Z</updated>
<author>
<name>Jelle Zijlstra</name>
<email>jelle.zijlstra@gmail.com</email>
</author>
<published>2017-12-14T01:19:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf'/>
<id>urn:sha1:176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464)</title>
<updated>2017-11-23T00:23:28Z</updated>
<author>
<name>Jesse-Bakker</name>
<email>jessebakker00@gmail.com</email>
</author>
<published>2017-11-23T00:23:28Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0784a2e5b174d2dbf7b144d480559e650c5cf64c'/>
<id>urn:sha1:0784a2e5b174d2dbf7b144d480559e650c5cf64c</id>
<content type='text'>
Adds a simpler and faster alternative to ExitStack for handling
single optional context managers without having to change the
lexical structure of your code.</content>
</entry>
<entry>
<title>bpo-30266: support "= None" pattern in AbstractContextManager (#1448)</title>
<updated>2017-06-09T15:21:47Z</updated>
<author>
<name>Jelle Zijlstra</name>
<email>jelle.zijlstra@gmail.com</email>
</author>
<published>2017-06-09T15:21:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=57161aac5eb9bcb0b43e551a1937ff0a84c1ec52'/>
<id>urn:sha1:57161aac5eb9bcb0b43e551a1937ff0a84c1ec52</id>
<content type='text'>
contextlib.AbstractContextManager now supports anti-registration
by setting __enter__ = None or __exit__ = None, following the pattern
introduced in bpo-25958.</content>
</entry>
<entry>
<title>bpo-29679: Implement @contextlib.asynccontextmanager (#360)</title>
<updated>2017-05-01T01:25:58Z</updated>
<author>
<name>Jelle Zijlstra</name>
<email>jelle.zijlstra@gmail.com</email>
</author>
<published>2017-05-01T01:25:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2e624690bd74071358566300b7ef0bc45f444a30'/>
<id>urn:sha1:2e624690bd74071358566300b7ef0bc45f444a30</id>
<content type='text'>

</content>
</entry>
<entry>
<title>bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949)</title>
<updated>2017-04-11T09:11:13Z</updated>
<author>
<name>svelankar</name>
<email>siddharth.velankar@gmail.com</email>
</author>
<published>2017-04-11T09:11:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=00c75e9a45ff0366c185e9e8a2e23af5a35481b0'/>
<id>urn:sha1:00c75e9a45ff0366c185e9e8a2e23af5a35481b0</id>
<content type='text'>
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.</content>
</entry>
<entry>
<title>Clarify exception handler scope in contextlib</title>
<updated>2017-03-01T06:18:27Z</updated>
<author>
<name>amosonn</name>
<email>amosonn@gmail.com</email>
</author>
<published>2017-03-01T06:18:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=680e20beee8bbce9f857b8e7795009191f98b0ba'/>
<id>urn:sha1:680e20beee8bbce9f857b8e7795009191f98b0ba</id>
<content type='text'>
Moved explicit raise from inside try to try...else.</content>
</entry>
</feed>
