Commit graph

23 commits

Author SHA1 Message Date
Nick Coghlan
cf0cece837 Add back refresh_cm 2021-06-26 16:40:28 +10:00
Nick Coghlan
17b0a93e5b Issue #12: sync contextlib from Python 3.10 2021-06-26 16:36:23 +10:00
Nick Coghlan
eed96067d7 Exception chaining is now always available 2021-06-26 16:04:26 +10:00
Nick Coghlan
cb66e76cd8 Remove no longer used Py2 compatibility code 2021-06-26 15:59:43 +10:00
John Vandenberg
a8e6733e21 Add AbstractContextManager
Closes https://github.com/jazzband/contextlib2/issues/16
2019-09-09 23:22:33 +07:00
John Vandenberg
656a4eba29 Add nullcontext
Related to https://github.com/jazzband/contextlib2/issues/16
2019-09-09 23:02:56 +07:00
Aleksandr Sterkhov
977da10ab0 Dropped support for Python 2.6 as it reached EOL in 2013 and not supported by both tox and setuptools anymore
Enabled back Travis CI testing in pypy3 env, using stable python 3.7
Updated setup.py according to all the changes
Fixed several formatting issues to better comply with PEP8
2019-03-26 23:39:03 +01:00
Nick Coghlan
2f4fd22e2f Issue #7: Backport fix for CPython issue #27122
Prevents a potential infinite loop on Python 3.5 when handling
``RuntimeError``.

(CPython updates by Gregory P. Smith & Serhiy Storchaka)
2016-07-31 13:31:39 +10:00
Nick Coghlan
911b459522 Issue #5: support old-style classes in ExitStack 2016-05-02 16:41:56 +10:00
Devin Jeanpierre
e48fbea5a5 Make all classes new-style in Python 2, allowing them to be used with ExitStack. 2016-01-29 14:11:25 -08:00
Armin Ronacher
15485962d1 Restored support for Python 2.6 2016-01-13 13:25:09 +01:00
Nick Coghlan
6d77165d63 Rebase on Python 3.5 contextlib 2016-01-12 18:51:33 +10:00
Nick Coghlan
f1d447328a 2.6 compatibility 2013-10-26 22:00:05 +10:00
Nick Coghlan
30515dbe4f Update to Python 3.4 alpha version 2013-10-26 21:42:03 +10:00
Nick Coghlan
21a5d8b0a4 Issue #8: Switch to ExitStack instead of ContextStack 2012-05-01 21:50:17 +10:00
Nick Coghlan
0cbb244909 Issue #6: fix various problems related to the callback wrappers, including correctly looking up __exit__ on the type in register_exit() 2012-01-04 00:26:17 +10:00
Nick Coghlan
8bca9f8cd0 Issue #5: ContextStack.register no longer pointlessly returns the wrapped function 2012-01-03 23:58:00 +10:00
Nick Coghlan
580d9bde76 Issue #3: Accept context managers in ContextStack.register_exit() 2012-01-03 22:21:27 +10:00
Nick Coghlan
8e373d228e Issue #1: Add ContextStack.preserve() 2012-01-03 15:05:55 +10:00
Nick Coghlan
7f99236d3b Properly wrap callbacks in ContextStack.register() and actually assert something in TestContextStack.test_register() 2012-01-03 14:00:18 +10:00
Nick Coghlan
dbc0c6d23f Add link back to original tracker issue, fix typo noticed by Chris Neugebauer 2011-12-15 22:30:55 +10:00
Nick Coghlan
4e624974a6 Rename CleanupManager to ContextStack and fix usage of the test module as __main__ 2011-12-15 21:07:03 +10:00
Nick Coghlan
0077233514 Initial project commit 2011-12-13 22:41:17 +10:00