[issue6584] gzip module has no custom exception

2019-05-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> 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



[issue6584] gzip module has no custom exception

2019-05-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset cf599f6f6f1c392d8f12936982a370d533782195 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)
https://github.com/python/cpython/commit/cf599f6f6f1c392d8f12936982a370d533782195


--

___
Python tracker 

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



[issue6584] gzip module has no custom exception

2019-04-30 Thread Zackery Spytz


Zackery Spytz  added the comment:

I'd like to see this issue move forward, so I've created a PR.

--
nosy: +ZackerySpytz
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue6584] gzip module has no custom exception

2019-04-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +12944
stage: needs patch -> patch review

___
Python tracker 

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



[issue6584] gzip module has no custom exception

2012-12-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

read32() should raise BadGzipFile when less than 4 bytes read. Also you should 
introduce read8() function which raises BadGzipFile when less than 1 byte read.

See also issue4844 and issue14315 for zipfile.

--
stage: commit review - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I added some comments on Rietveld.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2012-11-10 Thread Michele Orrù

Michele Orrù added the comment:

done!

--
Added file: http://bugs.python.org/file27943/issue6584_6.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2012-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Not all invalid gzip files raise BadGzipFile.  Some of them raises ZlibError.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2012-11-10 Thread Michele Orrù

Michele Orrù added the comment:

Well, I specified the word ``files`` everywhere for that reason. Looking at 
Doc/library/zlib.rst I see:

  For reading and writing .gz files see the gzip module.

Also, I specified 'the gzip module' on the whatsnew section.
Is there anything more specific I could have done?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2012-11-03 Thread Ezio Melotti

Ezio Melotti added the comment:

The new exception should also be documented, and a versionadded and 
Doc/whatsnew/3.4.rst entry added.

--
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-08-24 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-08-20 Thread Michele Orrù

Michele Orrù maker...@gmail.com added the comment:

The attached patch follows Ezio's hints.

--
nosy: +maker
Added file: http://bugs.python.org/file22956/6584_4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-08-20 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


Added file: http://bugs.python.org/file22958/6584_5.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-06-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Ezio has found a few other things to improve (follow the “review” link to the 
right of the patch link).

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-06-17 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Bump! Antoine, do you think the patch is acceptable and can be committed now?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-06-17 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Your changes appear to address all three of Antoine's 'nits'.

--
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-03-15 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

I had some time today, so I managed to fix the patch. I hope now everything is 
ok.

--
Added file: http://bugs.python.org/file21209/6584_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Bump! How about commiting this patch? Or maybe there is something missing? I'll 
be happy to fix it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Since the patch makes BadGzipFile a subclass of IOError, it doesn't look 
unreasonable.
Some nits:
- a gzipped file is not an archive
- the unit tests should use either the with statement, or try/finally blocks 
to properly close the file even when the test fails
- you should probably explicitly test that BadGzipFile is a subclass of IOError

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

I'll be very happy to fix this after Friday. Thanks for your comments.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-01-26 Thread David Stanek

Changes by David Stanek dsta...@dstanek.com:


--
nosy: +dstanek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2011-01-26 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: needs patch - patch review
versions: +Python 3.3 -Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

I have created a small patch, that introduces BadGzipFile exception. It is a 
subclass of IOError, so it would be backward compatible and will be still 
caught by old code, but this way is distinct from IOError.

--
keywords: +patch
nosy: +gruszczy
Added file: http://bugs.python.org/file16565/6584_1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Modified patch with test, that catches both BadGzipFile and IOError exceptions.

--
Added file: http://bugs.python.org/file16566/6584_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2009-07-31 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Unless something in the docs claims that there is/should be such a
thing, this is a feature request, not a bug ('behavior') report, and
only applicable to future x.y versions.

--
nosy: +tjreedy
type: behavior - feature request
versions: +Python 2.7 -Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2009-07-27 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

Much like zipfile.BadZipfile, we need a base custom exception for the 
gzip module. At least, catch gzip-related exceptions and throw a 
tarfile.TarError when used *via* tarfile.*.

See the following example (the exception escaped the try... except 
tarfile.TarError: ..  block!):

***
  [...]
  File /home/sridharr/as/pypm/src/pypm/common/compression.py, line 
199, in _ensure_read_write_access
for tarinfo in tarfileobj.getmembers():
  File /opt/ActivePython-2.6/lib/python2.6/tarfile.py, line 1791, in 
getmembers
self._load()# all members, we first have to
  File /opt/ActivePython-2.6/lib/python2.6/tarfile.py, line 2352, in 
_load
tarinfo = self.next()
  File /opt/ActivePython-2.6/lib/python2.6/tarfile.py, line 2307, in 
next
self.fileobj.seek(self.offset)
  File /opt/ActivePython-2.6/lib/python2.6/gzip.py, line 382, in seek
self.read(1024)
  File /opt/ActivePython-2.6/lib/python2.6/gzip.py, line 219, in read
self._read(readsize)
  File /opt/ActivePython-2.6/lib/python2.6/gzip.py, line 284, in _read
self._read_eof()
  File /opt/ActivePython-2.6/lib/python2.6/gzip.py, line 304, in 
_read_eof
hex(self.crc)))
IOError: CRC check failed 0x115929f0 != 0x9f074a38L

--
components: Library (Lib)
messages: 90976
nosy: srid
severity: normal
status: open
title: gzip module has no custom exception
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2009-07-27 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar sridh...@activestate.com:


--
versions: +Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6584] gzip module has no custom exception

2009-07-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com