Message325269
I have several suggestions for steps to address this:
1. Don't create reference cycles. TarInfo.tarfile does not appear to be a documented attribute (https://docs.python.org/3/library/tarfile.html#tarinfo-objects) and could perhaps be deleted.
2. Issue a ResourceWarning in TarFile.__del__() if the TarFile was not closed prior to finalisation. ResourceWarnings are ignored by default but this would help when debugging. Given that the file may be corrupted perhaps something more visible than a ResourceWarning is required.
3. Make TarFile.__del__() close the TarFile cleanly. This is only possible if we can guarantee the underlying fileobj is finalized later (eg. because we have eliminated the reference cycle). |
|
Date |
User |
Action |
Args |
2018-09-13 17:39:45 | lordmauve | set | recipients:
+ lordmauve |
2018-09-13 17:39:44 | lordmauve | set | messageid: <1536860384.97.0.956365154283.issue34662@psf.upfronthosting.co.za> |
2018-09-13 17:39:44 | lordmauve | link | issue34662 messages |
2018-09-13 17:39:44 | lordmauve | create | |
|