[issue43326] About Zipfile

2021-02-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue43326] About Zipfile

2021-02-26 Thread Fcant


Change by Fcant :


--
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43326] About Zipfile

2021-02-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't think there's a problem with Python here.

The complaint seems to be one or more of:
- The creating software allowed a newline to be in the filename.
- Windows allows the creation of filenames with newlines.
- The Windows UI doesn't handle filenames with newlines well.

In any event, Python can't do anything about these problems. I suggest we close 
this issue.

--
nosy: +eric.smith

___
Python tracker 

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



[issue43326] About Zipfile

2021-02-26 Thread Fcant

Fcant  added the comment:

Because these special symbols are not handled under the Window, he will report 
an error and will not work properly

From:樊乘乘
Email:fcsc...@outlook.com<mailto:fcsc...@outlook.com>
Tel:17826260016

发件人: Ronald Oussoren<mailto:rep...@bugs.python.org>
发送时间: 2021年2月26日 樊乘 17:15
收件人: fcsc...@outlook.com<mailto:fcsc...@outlook.com>
主题: [issue43326] About Zipfile

Ronald Oussoren  added the comment:

I'm not sure what you are asking here.

Looking at the screenshot I'd say that the zipfile you are trying to extract 
contains files with a newline in their name. That's a perfectly valid (although 
annoying) name on unix-y platforms.

The zipfile module does not have an API for rewriting the file name when 
extracting. It is far from clear to me that adding such a API would be 
generally useful.

Emulating this is fairly easy though, something like:

zf = zipfile.ZipFile(...)
for name in zf.namelist():
stream = zf.open(name)
data = stream.read()
stream.close()
with open(name.replace(...), "w") as stream:
stream.write(data)

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43326>
___

--

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



[issue43326] About Zipfile

2021-02-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what you are asking here.

Looking at the screenshot I'd say that the zipfile you are trying to extract 
contains files with a newline in their name. That's a perfectly valid (although 
annoying) name on unix-y platforms. 

The zipfile module does not have an API for rewriting the file name when 
extracting. It is far from clear to me that adding such a API would be 
generally useful. 

Emulating this is fairly easy though, something like:

zf = zipfile.ZipFile(...)
for name in zf.namelist():
stream = zf.open(name)
data = stream.read()
stream.close()
with open(name.replace(...), "w") as stream:
stream.write(data)

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue43326] About Zipfile

2021-02-25 Thread Fcant

New submission from Fcant :

When I Unzip a package using the zipfile module, the package’s filename has a 
newline character, which causes the Unzip to fail, so the UNZIP filename needs 
to be processed

--
components: Library (Lib)
files: Fcant_2021-02-26_11-26-37.jpg
messages: 387705
nosy: Fcscanf
priority: normal
severity: normal
status: open
title: About Zipfile
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49836/Fcant_2021-02-26_11-26-37.jpg

___
Python tracker 

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