Commit graph

16 commits

Author SHA1 Message Date
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