[issue40564] Using zipfile.Path with several files prematurely closes zip
Jason R. Coombs
report at bugs.python.org
Wed Aug 26 18:26:58 EDT 2020
Jason R. Coombs <jaraco at jaraco.com> added the comment:
Implementing that last option:
```
diff --git a/zipp.py b/zipp.py
index 697d4a9..f244cba 100644
--- a/zipp.py
+++ b/zipp.py
@@ -111,6 +111,7 @@ class CompleteDirs(zipfile.ZipFile):
res = cls.__new__(cls)
vars(res).update(vars(source))
+ res.close = lambda: None
return res
```
Does appear to address the issue. I'm not super happy about the implementation, though.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40564>
_______________________________________
More information about the Python-bugs-list
mailing list