From de325abc8aa6d8bbb77b79053411a05096a5944d Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Sat, 10 Dec 2022 17:37:25 +0200 Subject: [PATCH 1/6] Update to more modern versions - Test against Python 3.10 final, and Python 3.11 - Update everything in requirements.txt - Remove positional db argument from from_url: not compatible with latest versions of redis-py --- .github/workflows/build.yml | 3 +- birdisle/redis.py | 4 +-- requirements.txt | 56 ++++++++++++++++++------------------- setup.py | 1 + 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d79e57a..cff071f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,8 @@ jobs: - "3.7" - "3.8" - "3.9" - - "3.10.0-rc.1" + - "3.10" + - "3.11" - "pypy3" runs-on: ubuntu-20.04 steps: diff --git a/birdisle/redis.py b/birdisle/redis.py index 2a597d2..d385577 100644 --- a/birdisle/redis.py +++ b/birdisle/redis.py @@ -93,11 +93,11 @@ def __init__(self, server=None, host='localhost', port=6379, health_check_interval, client_name, username) @classmethod - def from_url(cls, url, db=None, **kwargs): + def from_url(cls, url, **kwargs): server = kwargs.pop('server', None) if server is None: server = birdisle.Server() - self = super().from_url(url, db, **kwargs) + self = super().from_url(url, **kwargs) self.connection_pool.connection_class = LocalSocketConnection self.connection_pool.connection_kwargs['server'] = server # When url is a unix:// URL, connection_kwargs will include 'path', diff --git a/requirements.txt b/requirements.txt index 527c909..37f56e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,70 +1,70 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # pip-compile requirements.in # aioredis==1.3.1 # via -r requirements.in -async-timeout==3.0.1 - # via aioredis -attrs==21.2.0 +async-timeout==4.0.2 + # via + # aioredis + # redis +attrs==22.1.0 # via pytest certifi==2022.12.7 # via requests -cffi==1.14.6 +cffi==1.15.1 # via -r requirements.in -charset-normalizer==2.0.4 +charset-normalizer==2.1.1 # via requests -coverage==5.5 +coverage[toml]==6.5.0 # via # -r requirements.in # coveralls # pytest-cov -coveralls==3.2.0 +coveralls==3.3.1 # via -r requirements.in docopt==0.6.2 # via coveralls -flake8==3.9.2 +exceptiongroup==1.0.4 + # via pytest +flake8==6.0.0 # via -r requirements.in hiredis==2.0.0 # via aioredis -idna==3.2 +idna==3.4 # via requests iniconfig==1.1.1 # via pytest -mccabe==0.6.1 +mccabe==0.7.0 # via flake8 -packaging==21.0 +packaging==22.0 # via pytest pluggy==1.0.0 # via pytest -py==1.10.0 - # via pytest -pycodestyle==2.7.0 +pycodestyle==2.10.0 # via flake8 -pycparser==2.20 +pycparser==2.21 # via cffi -pyflakes==2.3.1 +pyflakes==3.0.1 # via flake8 -pyparsing==2.4.7 - # via packaging -pytest==6.2.5 +pytest==7.2.0 # via # -r requirements.in # pytest-asyncio # pytest-cov -pytest-asyncio==0.15.1 +pytest-asyncio==0.20.3 # via -r requirements.in -pytest-cov==2.12.1 +pytest-cov==4.0.0 # via -r requirements.in -redis==3.5.3 +redis==4.4.0 # via -r requirements.in -requests==2.26.0 +requests==2.28.1 # via coveralls -toml==0.10.2 +tomli==2.0.1 # via + # coverage # pytest - # pytest-cov -urllib3==1.26.6 +urllib3==1.26.13 # via requests diff --git a/setup.py b/setup.py index e119e6b..1d39ba5 100755 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Database', 'Topic :: Software Development :: Testing' ], From ff8d3fe1abf3737546c80e2cce91cff215603a81 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Mon, 12 Dec 2022 20:41:30 +0200 Subject: [PATCH 2/6] Downgrade dependencies to support Python 3.6 --- requirements.txt | 49 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/requirements.txt b/requirements.txt index 37f56e4..aea291f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: +# This file is autogenerated by pip-compile with python 3.6 +# To update, run: # # pip-compile requirements.in # @@ -16,9 +16,9 @@ certifi==2022.12.7 # via requests cffi==1.15.1 # via -r requirements.in -charset-normalizer==2.1.1 +charset-normalizer==2.0.12 # via requests -coverage[toml]==6.5.0 +coverage[toml]==6.2 # via # -r requirements.in # coveralls @@ -27,44 +27,61 @@ coveralls==3.3.1 # via -r requirements.in docopt==0.6.2 # via coveralls -exceptiongroup==1.0.4 - # via pytest -flake8==6.0.0 +flake8==5.0.4 # via -r requirements.in hiredis==2.0.0 # via aioredis idna==3.4 # via requests +importlib-metadata==4.2.0 + # via + # flake8 + # pluggy + # pytest + # redis iniconfig==1.1.1 # via pytest mccabe==0.7.0 # via flake8 -packaging==22.0 - # via pytest +packaging==21.3 + # via + # pytest + # redis pluggy==1.0.0 # via pytest -pycodestyle==2.10.0 +py==1.11.0 + # via pytest +pycodestyle==2.9.1 # via flake8 pycparser==2.21 # via cffi -pyflakes==3.0.1 +pyflakes==2.5.0 # via flake8 -pytest==7.2.0 +pyparsing==3.0.9 + # via packaging +pytest==7.0.1 # via # -r requirements.in # pytest-asyncio # pytest-cov -pytest-asyncio==0.20.3 +pytest-asyncio==0.16.0 # via -r requirements.in pytest-cov==4.0.0 # via -r requirements.in -redis==4.4.0 +redis==4.3.5 # via -r requirements.in -requests==2.28.1 +requests==2.27.1 # via coveralls -tomli==2.0.1 +tomli==1.2.3 # via # coverage # pytest +typing-extensions==4.1.1 + # via + # async-timeout + # importlib-metadata + # redis urllib3==1.26.13 # via requests +zipp==3.6.0 + # via importlib-metadata From f98e75681a4b0ae71aa1d53edf1bc50d62643c58 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Mon, 12 Dec 2022 20:49:56 +0200 Subject: [PATCH 3/6] Add more modern versions to cibuildwheel --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9c5f5bc..7a41e16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = ["setuptools", "wheel", "cffi", "setuptools_scm"] [tool.cibuildwheel] -build = ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*", "pp37-*"] +build = ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"] build-frontend = "build" [tool.cibuildwheel.linux] From 8b3dd55e55515e209dec7aaee129bc97a045c696 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Mon, 12 Dec 2022 20:52:28 +0200 Subject: [PATCH 4/6] Bump all the versions in github workflow --- .github/workflows/build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cff071f..2a4c37b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,10 @@ jobs: - "pypy3" runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - run: sudo apt-get install -y libffi-dev @@ -34,16 +34,16 @@ jobs: needs: test runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.11" - run: pip install -U pip setuptools wheel - - run: pip install build==0.6.0.post1 + - run: pip install build==0.9.0 - run: python -m build --sdist . - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: sdist path: ./dist/*.tar.gz @@ -51,12 +51,12 @@ jobs: needs: test runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Build wheels - uses: pypa/cibuildwheel@v2.1.1 - - uses: actions/upload-artifact@v2 + uses: pypa/cibuildwheel@v2.11.3 + - uses: actions/upload-artifact@v3 with: name: wheels path: ./wheelhouse/*.whl From a524f6eb42a3f36b23d4a101be455c3086b0d221 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Mon, 12 Dec 2022 20:56:16 +0200 Subject: [PATCH 5/6] Update format of pypy versions in github flow --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a4c37b..f295730 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,9 @@ jobs: - "3.9" - "3.10" - "3.11" - - "pypy3" + - "pypy3.7" + - "pypy3.8" + - "pypy3.9" runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 From 994e1cae86c002895e8a62efe60e14d30abd3a09 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Mon, 12 Dec 2022 21:10:11 +0200 Subject: [PATCH 6/6] Only build manylinux, not musllinux Will need more work to figure out how to install libffi-devel on musllinux --- pyproject.toml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7a41e16..33154d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,17 @@ requires = ["setuptools", "wheel", "cffi", "setuptools_scm"] [tool.cibuildwheel] -build = ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"] +build = [ + "cp36-manylinux_*", + "cp37-manylinux_*", + "cp38-manylinux_*", + "cp39-manylinux_*", + "cp310-manylinux_*", + "cp311-manylinux_*", + "pp37-manylinux_*", + "pp38-manylinux_*", + "pp39-manylinux_*" +] build-frontend = "build" [tool.cibuildwheel.linux]