Commit graph

15 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
Nick Coghlan
6d77165d63 Rebase on Python 3.5 contextlib 2016-01-12 18:51:33 +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
7d3f886c77 Fallback to unittest2 when necessary 2012-05-01 20:42:19 +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
c1d261921b If one is going to mark scripts executable, one had best add a shebang line... 2011-12-15 21:13:03 +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