Message315603
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? |
|
Date |
User |
Action |
Args |
2018-04-22 10:38:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, pitrou, eric.snow |
2018-04-22 10:38:18 | serhiy.storchaka | set | messageid: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za> |
2018-04-22 10:38:18 | serhiy.storchaka | link | issue33331 messages |
2018-04-22 10:38:17 | serhiy.storchaka | create | |
|