Commit Graph

5 Commits

Author SHA1 Message Date
Tim Peters 012b69cb30 The atexit module effectively turned itself off if sys.exitfunc already
existed at the time atexit first got imported.  That's a bug, and this
fixes it.

Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.

Bugfix candidate, but it's messy so I'll backport to 2.2 myself.
2002-07-16 19:30:59 +00:00
Tim Peters 384fd106e8 Bug #128475: mimetools.encode (sometimes) fails when called from a thread.
pythonrun.c:  In Py_Finalize, don't reset the initialized flag until after
the exit funcs have run.
atexit.py:  in _run_exitfuncs, mutate the list of pending calls in a
threadsafe way.  This wasn't a contributor to bug 128475, it just burned
my eyeballs when looking at that bug.
2001-01-21 03:40:37 +00:00
Skip Montanaro e99d5ea25b added __all__ lists to a number of Python modules
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
2001-01-20 19:54:20 +00:00
Tim Peters 146965abf2 Whitespace standardization. 2001-01-14 18:09:23 +00:00
Fred Drake c19425d520 Added the atexit module and documentation from Skip Montanaro
<skip@mojam.com>.  Revisions to the markup to make it pass LaTeX, added
an index entry and a reference from the sys.exitfunc documentation.

This closes SourceForge patch #100620.
2000-06-28 15:07:31 +00:00