bpo-41490: path and contents to aggressively close handles#22915
bpo-41490: path and contents to aggressively close handles#22915jaraco merged 4 commits intopython:masterfrom jaraco:bugfix/bpo-41490
path and contents to aggressively close handles#22915Conversation
|
I need to investigate why the zip test data changed. |
|
I see I refreshed those zips in python/importlib_resources@9342877, and this is the first sync since. |
|
Oh, that's interesting. |
…ences to the zipfile.
path method to aggressively close handlespath method to aggressively close handles
|
I don't want to apply the fix at |
…eagerly converted to a list if it's not already a sequence.
path method to aggressively close handlespath method to aggressively close handles
path method to aggressively close handlespath and contents to aggressively close handles
| self.zip_path.unlink() | ||
| del c | ||
|
|
||
| @unittest.skip("Desired but not supported.") |
There was a problem hiding this comment.
I should call out that this test is being skipped because it proved too difficult to support.
There was a problem hiding this comment.
This one is but the following one is not?
There was a problem hiding this comment.
Right. I found a way to support this use-case, but only by not supporting the latter... and the latter was more important to certifi.
|
I'd like to proceed with merging this change. We can iterate or revert later as needed. |
|
@jaraco: Please replace |
…ython#22915) * bpo-41490: ``path`` method to aggressively close handles * Add blurb * In ZipReader.contents, eagerly evaluate the contents to release references to the zipfile. * Instead use _ensure_sequence to ensure any iterable from a reader is eagerly converted to a list if it's not already a sequence.
As found in importlib_resources 3.1.1.
https://bugs.python.org/issue41490
Automerge-Triggered-By: GH:jaraco