Attached patch builds on Guido's:
- refactored - load_package() now also removes stuff from sys.modules if an error occurs and the stuff wasn't in sys.modules to begin with - patches test_pkgimport so it passes again (it was relying on junk remaining in sys.modules in one spot) - regrtest -uall passes on Windows with this patch (247 tests OK, 37 tests skipped). - oops -- fixes obsolute stuff in a docstring too (the LaTeX docs had already been corrected) - does not remove insane workarounds in .py modules (contortions trying to worm around that non-working modules were left behind by failing imports)
"curses on Windows" no longer screws up. Before:
$ regrtest.py -uall test_sundry test___all__ test_curses test_sundry test___all__ test test___all__ failed -- Traceback (most recent call last): File "C:\Code\python\lib\test\test___all__.py", line 150, in test_all self.check_all("rlcompleter") File "C:\Code\python\lib\test\test___all__.py", line 40, in check_all "%s has no __all__ attribute" % modname) File "C:\Code\python\lib\test\test_support.py", line 208, in verify raise TestFailed(reason) TestFailed: rlcompleter has no __all__ attribute
test_curses test test_curses crashed -- exceptions.AttributeError: 'module' object has no attribute 'endwin' 1 test OK. 2 tests failed: test___all__ test_curses
$ regrtest.py -uall test_sundry test___all__ test_curses test_sundry test___all__ test_curses test_curses skipped -- No module named _curses 2 tests OK. 1 test skipped: test_curses Those skips are all expected on win32.