Skip to content

Commit 5512947

Browse files
authored
Merge pull request #64 from pycompression/pypy
Add pypy to supported versions.
2 parents e1d7147 + 035d09e commit 5512947

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ jobs:
5757
strategy:
5858
matrix:
5959
python-version:
60-
- 3.6
61-
- 3.7
62-
- 3.8
63-
- 3.9
60+
- "3.6"
61+
- "3.7"
62+
- "3.8"
63+
- "3.9"
64+
- "pypy-3.6"
65+
- "pypy-3.7"
6466
os: ["ubuntu-latest"]
6567
include:
6668
- os: "macos-latest"
@@ -92,7 +94,7 @@ jobs:
9294
uses: ilammy/[email protected]
9395
if: runner.os == 'Windows'
9496
- name: Run tests
95-
run: tox -e py3
97+
run: tox
9698
- name: Upload coverage report
9799
uses: codecov/codecov-action@v1
98100

@@ -154,13 +156,13 @@ jobs:
154156
- name: Build wheels
155157
run: cibuildwheel --output-dir dist
156158
env:
157-
CIBW_BUILD: "cp3{6,7,8,9}-*"
158159
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit.
159160
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
160161
# Fully test the build wheels again.
161162
CIBW_TEST_REQUIRES: "pytest"
162163
# Simple test that requires the project to be build correctly
163-
CIBW_TEST_COMMAND: "pytest {project}/tests/test_igzip.py"
164+
CIBW_TEST_COMMAND: >-
165+
pytest {project}/tests/test_igzip.py {project}/tests/test_isal.py
164166
- name: Build sdist
165167
if: "runner.os == 'Linux'"
166168
run: python setup.py sdist

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Changelog
77
.. This document is user facing. Please word the changes in such a way
88
.. that users understand how the changes affect the new version.
99
10+
version 0.9.0-dev
11+
-----------------
12+
+ Add support for pypy by adding pypy tests to the CI and setting up wheel
13+
building support.
14+
1015
version 0.8.1
1116
-----------------
1217
+ Fix a bug where multi-member gzip files where read incorrectly due to an

src/isal/isal_zlib.pyx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,13 @@ DEFLATED = zlib.DEFLATED
9999

100100
# Strategies
101101
Z_DEFAULT_STRATEGY=zlib.Z_DEFAULT_STRATEGY
102-
Z_RLE=zlib.Z_RLE
103102
Z_HUFFMAN_ONLY=zlib.Z_HUFFMAN_ONLY
104103
Z_FILTERED=zlib.Z_FILTERED
105-
Z_FIXED=zlib.Z_FIXED
104+
# Following strategies not supported on all versions of zlib.
105+
if hasattr(zlib, "Z_RLE"):
106+
Z_RLE = zlib.Z_RLE
107+
if hasattr(zlib, "Z_FIXED"):
108+
Z_FIXED=zlib.Z_FIXED
106109

107110
# Flush methods
108111
Z_NO_FLUSH=zlib.Z_NO_FLUSH

tests/test_isal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def test_compress_compressobj(data_size, level, wbits, memLevel):
106106
memLevel=memLevel)
107107
compressed = compressobj.compress(data) + compressobj.flush()
108108
if wbits in range(8, 16):
109-
# In case a zlib header is used, determine the wbits automatically.
110-
# For some reason it fails if wbits is set manually.
111-
decompressed = zlib.decompress(compressed, wbits=0)
109+
# TODO: Apparently the wbits level is not correctly implemented in
110+
# ISA-L for the zlib stuff.
111+
decompressed = zlib.decompress(compressed, wbits=15)
112112
else:
113113
decompressed = zlib.decompress(compressed, wbits=wbits)
114114
assert data == decompressed

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
# Running plain tox will run the default environment (testenv) with the default
33
# python3 interpreter of the user.
4-
envlist=py3
4+
envlist=testenv
55
[testenv]
66
deps=pytest
77
coverage

0 commit comments

Comments
 (0)