Message240255
Ah, yet one purpose of the patch is to make close() methods more robust when called at shutdown. Objects can be partially deconstructed at that time, attributes can be set to None to break reference loops. That is why I use None as signaling value and always check some attribute for None.
The changes to aifc make sense. close() is called from __exit__(). When context manager is used in a generator, it creates a reference loop. So self.file is None in this case and self.file.close() will raise an AttributeError. |
|
Date |
User |
Action |
Args |
2015-04-08 10:44:59 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, martin.panter |
2015-04-08 10:44:59 | serhiy.storchaka | set | messageid: <1428489899.44.0.0595864360872.issue23865@psf.upfronthosting.co.za> |
2015-04-08 10:44:59 | serhiy.storchaka | link | issue23865 messages |
2015-04-08 10:44:59 | serhiy.storchaka | create | |
|