11 Feb
2013
11 Feb
'13
3:28 p.m.
On Feb 10, 2013, at 10:36 AM, Chris Withers wrote:
One rough edge I've hit: I see the atexit module has moved to be C-based and, as far as I can tell, no longer allows you to introspect what atexit functions have been registered.
If I'm writing tests for code that registers atexit handlers, how can I check that they've been correctly registered?
Looks like you can't through the atexit module. Even though Python 2's atexit._exithandlers is a private, undocumented attribute, the lack of an introspection API in Python 3's atexit seems like a functional regression. Please file a bug, although it will have to be a new feature for Python 3.4. Cheers, -Barry