diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index add6efa..0279380 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Set git to use LF on Windows if: runner.os == 'Windows' @@ -31,26 +32,11 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: actions/setup-python@v1 - if: runner.os != 'Windows' # see issue #174 - with: - python-version: 2.7 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: - python-version: 3.5 - - uses: actions/setup-python@v1 - with: - python-version: 3.9 - # - name: Install Visual C++ for Python 2.7 - # if: runner.os == 'Windows' - # run: choco install vcpython27 -f -y - - name: Run tests on Windows # see issue #174 - if: runner.os == 'Windows' - run: | - python -m pip install tox - tox -e py35,py39 - - name: Run tests on Linux and macOS - if: runner.os != 'Windows' + python-version: ${{ matrix.python-version }} + allow-prereleases: true + - name: Run tests run: | python -m pip install tox tox --skip-missing-interpreters @@ -63,7 +49,7 @@ jobs: submodules: recursive - uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.x - name: Build source package run: python setup.py sdist - name: Upload source package @@ -105,13 +91,13 @@ jobs: if: runner.os == 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp35-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}* - name: Build wheels for Linux and macOS if: runner.os != 'Windows' run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp27-${{ matrix.name }}* cp35-${{ matrix.name }}* pp*-${{ matrix.name }}* + CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}* CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel - uses: actions/upload-artifact@v2 diff --git a/HISTORY.rst b/HISTORY.rst index 013dca6..18ed2a4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,14 @@ Changelog ========= +1.1.0.0 (2023-09-14) +-------------------- + +- Upgraded libbrotli to v1.1.0 +- Added explicit support for Python 3.10, 3.11, and 3.12 +- Removed support for Python 2.7, 3.5, and 3.6 + + 1.0.9.2 (2021-04-06) -------------------- diff --git a/Makefile b/Makefile deleted file mode 100644 index 034f227..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -publish: - rm -rf dist/ - python setup.py sdist - twine upload -s dist/* - diff --git a/libbrotli b/libbrotli index e61745a..ed738e8 160000 --- a/libbrotli +++ b/libbrotli @@ -1 +1 @@ -Subproject commit e61745a6b7add50d380cfd7d3883dd6c62fc2c71 +Subproject commit ed738e842d2fbdf2d6459e39267a633c4a9b2f5d diff --git a/setup.cfg b/setup.cfg index 26c04da..8b7eaaf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,4 +4,5 @@ markers = slow: marks tests as slow (deselect with '-m "not slow"') [metadata] -license_file = LICENSE +license_files = + LICENSE diff --git a/setup.py b/setup.py index 85dc0e8..c545fd1 100644 --- a/setup.py +++ b/setup.py @@ -97,8 +97,8 @@ def finalize_options(self): ], install_requires=[ "cffi>=1.0.0", - "enum34;python_version<'3.4'", ], + python_requires=">=3.7", cffi_modules=["src/brotlicffi/_build.py:ffi"], packages=find_packages('src'), package_dir={'': 'src'}, @@ -112,15 +112,12 @@ def finalize_options(self): classifiers=[ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] ) diff --git a/src/brotlicffi/__init__.py b/src/brotlicffi/__init__.py index 7f07c9e..abc82e5 100644 --- a/src/brotlicffi/__init__.py +++ b/src/brotlicffi/__init__.py @@ -5,4 +5,4 @@ Compressor, MODE_GENERIC, MODE_TEXT, MODE_FONT, error, Error ) -__version__ = "1.0.9.2" +__version__ = "1.1.0.0" diff --git a/test/test_compatibility.py b/test/test_compatibility.py index c5f5918..8aeadab 100644 --- a/test/test_compatibility.py +++ b/test/test_compatibility.py @@ -29,15 +29,16 @@ def test_brotli_version(): dirname(dirname(abspath(__file__))), "libbrotli/c/common/version.h" ) with open(version_h) as f: - brotli_version = int( - re.search( - r"#define BROTLI_VERSION 0x([A-Fa-f0-9]+)", f.read() - ).group(1), - 16, + brotli_versions = dict( + re.findall( + r"#define BROTLI_VERSION_(MAJOR|MINOR|PATCH) ([0-9]+)", + f.read() + ) ) - major = brotli_version >> 24 - minor = (brotli_version >> 12) & 0xFFF - patch = brotli_version & 0xFFF assert brotlicffi.__version__.startswith( - "%d.%d.%d." % (major, minor, patch) + "%s.%s.%s." % ( + brotli_versions["MAJOR"], + brotli_versions["MINOR"], + brotli_versions["PATCH"] + ) ) diff --git a/tox.ini b/tox.ini index de096f0..8e4db44 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, py35, py36, py37, py38, py39, pypy, lint +envlist = py37, py38, py39, py310, py311, py312, pypy, lint [testenv] deps= -r{toxinidir}/test_requirements.txt