R. David Murray added the comment:

Yes, python2 shutdown has this problem: modules and their attributes are set to 
None during interpreter shutdown.  Things are much better in python3.  If you 
want to avoid the error messages, finalize the objects explicitly (making sure 
to break gc cycles) before the end of your program, or keep explicit references 
to the objects you need during __del__ (eg: os_path = os.path in the global 
scope of your module).

As for your last comment, you are correct, the GC cleanup order is not 
deterministic.

----------
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to