]> granicus.if.org Git - python/commit
bpo-30266: support "= None" pattern in AbstractContextManager (#1448)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Fri, 9 Jun 2017 15:21:47 +0000 (08:21 -0700)
committerGuido van Rossum <guido@python.org>
Fri, 9 Jun 2017 15:21:47 +0000 (08:21 -0700)
commit57161aac5eb9bcb0b43e551a1937ff0a84c1ec52
tree04296787a6bbf099a38d2b24ac91fc0c83a8e7df
parent3b5cf85edc188345668f987c824a2acb338a7816
bpo-30266: support "= None" pattern in AbstractContextManager (#1448)

contextlib.AbstractContextManager now supports anti-registration
by setting __enter__ = None or __exit__ = None, following the pattern
introduced in bpo-25958.
Lib/contextlib.py
Lib/test/test_contextlib.py
Misc/NEWS