[issue41640] module zipfile issue on closing

2020-08-29 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks, I am closing this in favor of issue40564. Jason has provided some 
possible approaches in issue40564 (msg375964) and would be helpful to follow 
the discussion there since it has more details.

--
nosy: +jaraco
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using zipfile.Path with several files prematurely closes zip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41640] module zipfile issue on closing

2020-08-26 Thread Bastian Ebeling


Bastian Ebeling  added the comment:

My used python Version is
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
Indead - this issue seems to be the same as 40564, but maybe my suggested 
solution is helpful?

--
components: +Library (Lib)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41640] module zipfile issue on closing

2020-08-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a duplicate of issue40564 . Can you please add the python 
version you are using?

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41640] module zipfile issue on closing

2020-08-26 Thread Bastian Ebeling


New submission from Bastian Ebeling :

When trying to open an archive and read internal binary streams, for me it 
occurs, that the file-stream gets closed.
As a code-Snippet:

import zipfile
srcfile=zipfile.ZipFile('file.zip')
a=zipfile.Path(srcfile,"data1.bin").read_bytes()
b=zipfile.Path(srcfile,"data2.bin").read_bytes()

the second call results in the ValueError: seek of closed file

A quick and dirty solution (as an idea) is to change close() for the 
_SharedFile to run self.close() instead of self._close(findeobj) in the end 
(somehow around line 772).

Hopefully that helps

--
messages: 375917
nosy: bastian.ebeling
priority: normal
severity: normal
status: open
title: module zipfile issue on closing
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com