[issue7164] pickle test failure after test_imp/test_import (_make_stat_result is not the same object as os._make_stat_result)

Nick Coghlan report at bugs.python.org
Sun Oct 18 07:16:33 CEST 2009


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Must have missed running the full test suite before checking that one
in. Whoops...

Anyway, the culprit is a couple of copy_reg calls that the os module
runs on import to register pickle support methods. CleanImport's
simplistic approach to reversion leaves the replacement handlers
registered even after the original os module has been restored, leading
to copy_reg complaining when you attempt to use the registered pickle
handlers.

I'll narrow the scope to just reverting os.environ and otherwise leave
the new os module in place.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7164>
_______________________________________


More information about the Python-bugs-list mailing list