diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-10-25 18:21:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-25 18:21:46 (GMT) |
commit | df8d4c83a6e1727e766191896aeabde886979587 (patch) | |
tree | a286f28927d1cd736787880784d2c1af908b45b8 /Misc | |
parent | c32f2976b8f4034724c3270397aa16f38daf470f (diff) | |
download | cpython-df8d4c83a6e1727e766191896aeabde886979587.zip cpython-df8d4c83a6e1727e766191896aeabde886979587.tar.gz cpython-df8d4c83a6e1727e766191896aeabde886979587.tar.bz2 |
bpo-41490: ``path`` and ``contents`` to aggressively close handles (#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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-10-23-08-54-47.bpo-41490.-Yk6OD.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-10-23-08-54-47.bpo-41490.-Yk6OD.rst b/Misc/NEWS.d/next/Library/2020-10-23-08-54-47.bpo-41490.-Yk6OD.rst new file mode 100644 index 0000000..5ad6af3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-23-08-54-47.bpo-41490.-Yk6OD.rst @@ -0,0 +1,3 @@ +In ``importlib.resources``, ``.path`` method is more aggressive about +releasing handles to zipfile objects early, enabling use-cases like certifi +to leave the context open but delete the underlying zip file. |