Merged revisions 76836 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r76836 | antoine.pitrou | 2009-12-14 19:00:06 +0100 (lun., 14 déc. 2009) | 5 lines

  Issue #4757: `zlib.compress` and other methods in the zlib module now
  raise a TypeError when given an `str` object (rather than a `bytes`-like
  object).  Patch by Victor Stinner and Florent Xicluna.
........
This commit is contained in:
Antoine Pitrou 2009-12-14 18:23:30 +00:00
parent 999df780d1
commit c8428d3dce
5 changed files with 52 additions and 31 deletions

View file

@ -400,7 +400,7 @@ class _Stream:
except ImportError:
raise CompressionError("zlib module is not available")
self.zlib = zlib
self.crc = zlib.crc32("")
self.crc = zlib.crc32(b"")
if mode == "r":
self._init_read_gz()
else: