Author serhiy.storchaka
Recipients brett.cannon, eric.snow, ncoghlan, pitrou, serhiy.storchaka
Date 2018-04-22.10:38:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za>
In-reply-to
Content
Since dict is ordered, modules in sys.modules are ordered for the time of importing. Currently they are cleaned in PyImport_Cleanup() in the direct order -- from imported first to imported later. I wonder if cleaning them in the reversed order can solve some problems with the interpreter shutdown.

For example reverting the order fixes issue33328 and may help in other cases.

If revert the order, should only iterating weaklist be reverted (with setting all module globals to None), or iterating sys.modules (with setting sys.module values to None) too?
History
Date User Action Args
2018-04-22 10:38:18serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, pitrou, eric.snow
2018-04-22 10:38:18serhiy.storchakasetmessageid: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za>
2018-04-22 10:38:18serhiy.storchakalinkissue33331 messages
2018-04-22 10:38:17serhiy.storchakacreate