[pypy-issue] Issue #2372: bug in wheel.tests.test_wheelfile:test_verifying_zipfile() (pypy/pypy)

Daniel Holth issues-reply at bitbucket.org
Sun Aug 21 22:48:58 EDT 2016


New issue 2372: bug in wheel.tests.test_wheelfile:test_verifying_zipfile()
https://bitbucket.org/pypy/pypy/issues/2372/bug-in-wheelteststest_wheelfile

Daniel Holth:

I'm having a strange issue with the wheel tests, failing in pypy2-v5.3.1-linux64 but not pypy 4.0.0 or CPython.

Wheel replaces _update_crc on individual instances of ZipExtFile to do sha256 hashing instead of crc32.

The third time it tries to do this at vzf.open("three") in the test, the ZipExtFile instance calls _update_crc from the class instead of the one from the instance. You can notice this from the failing test or by playing with the debugger around line 672 of the standard Python zipfile.py. Look at self._update_crc, step into it, wrong function.

```
#!python

            if self._compress_type == ZIP_STORED:
                self._update_crc(data, eof=(self._compress_left==0))
```

```
#!shell

python -c "import wheel.test.test_wheelfile ; wheel.test.test_wheelfile.test_verifying_zipfile()"
```

The test passes if I comment out the first two vzf.open("one") and vzf.open("two") .




More information about the pypy-issue mailing list