From 88082a625487de3ba03e8f4c9a390b56f5fb4791 Mon Sep 17 00:00:00 2001 From: Vladimir Magamedov Date: Thu, 18 Apr 2024 18:11:30 +0300 Subject: [PATCH] Set Python 3.8 as minimal supported version, updated pinned dependencies --- .github/workflows/release-dry-run.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/test.yaml | 4 +- .readthedocs.yaml | 2 +- README.rst | 2 +- pi.yaml | 69 ++++++++++---------------- requirements/check.txt | 23 ++++----- requirements/docs.txt | 21 ++++---- requirements/release.txt | 45 +++++++++-------- requirements/runtime.txt | 6 +-- requirements/test.txt | 22 ++++---- setup.cfg | 3 +- setup.py | 2 +- setup.txt | 2 +- tests/test_client_channel.py | 3 -- tox.ini | 4 +- 16 files changed, 93 insertions(+), 119 deletions(-) diff --git a/.github/workflows/release-dry-run.yaml b/.github/workflows/release-dry-run.yaml index 48ca085..dd2cedd 100644 --- a/.github/workflows/release-dry-run.yaml +++ b/.github/workflows/release-dry-run.yaml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.8" - run: pip3 install -r requirements/release.txt - run: pip3 install -e . - run: make release diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ed8d961..0ec6984 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: key: pip-${{ hashFiles('requirements/release.txt') }} }} - uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.8" - run: pip3 install -r requirements/release.txt - run: pip3 install -e . - run: make release diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c7b6927..16defa9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,7 @@ jobs: key: pip-${{ hashFiles('requirements/check.txt') }} - uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.8" - run: pip3 install -r requirements/check.txt - run: pip3 install -e . - run: make proto @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - uses: actions/cache@v3 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 910951a..4dde98a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,7 +2,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.7" + python: "3.8" sphinx: configuration: docs/conf.py python: diff --git a/README.rst b/README.rst index a08c28b..5e4210a 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Pure-Python gRPC implementation for asyncio |project|_ |documentation|_ |version|_ |tag|_ |downloads|_ |license|_ -This project is based on `hyper-h2`_ and **requires Python >= 3.7**. +This project is based on `hyper-h2`_ and **requires Python >= 3.8**. .. contents:: :local: diff --git a/pi.yaml b/pi.yaml index f1b029f..57c0788 100644 --- a/pi.yaml +++ b/pi.yaml @@ -1,53 +1,36 @@ - !Image - name: py37 - from: &py37 !DockerImage python:3.7.12-slim - repository: localhost/grpclib/py37 + name: py38 + from: &py38 !DockerImage python:3.8.19-slim + repository: localhost/grpclib/py38 tasks: - run: pip3 install --no-cache-dir -r {{runtime}} runtime: !File "requirements/runtime.txt" - !Image - name: test37 - from: *py37 - repository: localhost/grpclib/test37 + name: test38 + from: *py38 + repository: localhost/grpclib/test38 tasks: - run: pip3 install --no-cache-dir -r {{test}} test: !File "requirements/test.txt" - !Image - name: check37 - from: *py37 - repository: localhost/grpclib/check37 + name: check38 + from: *py38 + repository: localhost/grpclib/check38 tasks: - run: pip3 install --no-cache-dir -r {{check}} check: !File "requirements/check.txt" - !Image - name: docs37 - from: *py37 - repository: localhost/grpclib/docs37 + name: docs38 + from: *py38 + repository: localhost/grpclib/docs38 tasks: - run: pip3 install --no-cache-dir -r {{docs}} docs: !File "requirements/docs.txt" -- !Image - name: py38 - from: &py38 !DockerImage python:3.8.3-slim - repository: localhost/grpclib/py38 - tasks: - - run: pip3 install --no-cache-dir -r {{runtime}} - runtime: !File "requirements/runtime.txt" - -- !Image - name: test38 - from: *py38 - repository: localhost/grpclib/test38 - tasks: - - run: pip3 install --no-cache-dir -r {{test}} - test: !File "requirements/test.txt" - - - !Command name: server image: py38 @@ -67,14 +50,14 @@ - !Command name: docs - image: docs37 + image: docs38 run: sphinx-build -b html docs build environ: PYTHONPATH: . - !Command - name: test37 - image: test37 + name: test38 + image: test38 run: [py.test] environ: PYTHONPATH: . @@ -88,34 +71,34 @@ - !Command name: flake8 - image: check37 + image: check38 run: [flake8] - !Command name: mypy - image: check37 + image: check38 run: [mypy] - !Image - name: py310 - from: &py310 !DockerImage python:3.10.0-slim - repository: localhost/grpclib/py310 + name: py312 + from: &py312 !DockerImage python:3.12.3-slim + repository: localhost/grpclib/py312 tasks: - run: pip3 install --no-cache-dir -r {{runtime}} runtime: !File "requirements/runtime.txt" - !Image - name: test310 - from: *py310 - repository: localhost/grpclib/test310 + name: test312 + from: *py312 + repository: localhost/grpclib/test312 tasks: - run: pip3 install --no-cache-dir -r {{test}} test: !File "requirements/test.txt" - !Command - name: test310 - image: test310 + name: test312 + image: test312 run: [py.test] environ: PYTHONPATH: . @@ -123,7 +106,7 @@ - !Image name: pip-compile - from: !DockerImage python:3.7.12-slim + from: !DockerImage python:3.8.19-slim repository: localhost/grpclib/pip-compile tasks: - run: pip3 install --no-cache-dir pip-tools diff --git a/requirements/check.txt b/requirements/check.txt index 046a2e9..02cd8d0 100644 --- a/requirements/check.txt +++ b/requirements/check.txt @@ -1,32 +1,29 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --annotation-style=line --config=pyproject.toml requirements/check.in +# pip-compile --annotation-style=line requirements/check.in # certifi==2024.2.2 # via -r requirements/runtime.in -flake8==5.0.4 # via -r requirements/check.in +flake8==7.0.0 # via -r requirements/check.in googleapis-common-protos==1.63.0 # via -r requirements/runtime.in grpcio==1.62.1 # via grpcio-tools grpcio-tools==1.62.1 # via -r requirements/check.in h2==4.1.0 # via -r requirements/../setup.txt hpack==4.0.0 # via -r requirements/../setup.txt, h2 hyperframe==6.0.1 # via -r requirements/../setup.txt, h2 -importlib-metadata==4.2.0 # via flake8 mccabe==0.7.0 # via flake8 multidict==6.0.5 # via -r requirements/../setup.txt -mypy==1.4.1 # via -r requirements/check.in +mypy==1.9.0 # via -r requirements/check.in mypy-extensions==1.0.0 # via mypy -mypy-protobuf==3.4.0 # via -r requirements/check.in -protobuf==4.24.4 # via -r requirements/runtime.in, googleapis-common-protos, grpcio-tools, mypy-protobuf -pycodestyle==2.9.1 # via flake8 -pyflakes==2.5.0 # via flake8 +mypy-protobuf==3.6.0 # via -r requirements/check.in +protobuf==4.25.3 # via -r requirements/runtime.in, googleapis-common-protos, grpcio-tools, mypy-protobuf +pycodestyle==2.11.1 # via flake8 +pyflakes==3.2.0 # via flake8 tomli==2.0.1 # via mypy -typed-ast==1.5.5 # via mypy types-certifi==2021.10.8.3 # via -r requirements/check.in -types-protobuf==4.24.0.4 # via mypy-protobuf -typing-extensions==4.7.1 # via importlib-metadata, mypy -zipp==3.15.0 # via importlib-metadata +types-protobuf==4.25.0.20240417 # via mypy-protobuf +typing-extensions==4.11.0 # via mypy # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/docs.txt b/requirements/docs.txt index 74381bf..b6f815b 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,39 +1,38 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --annotation-style=line --config=pyproject.toml requirements/docs.in +# pip-compile --annotation-style=line requirements/docs.in # alabaster==0.7.13 # via sphinx babel==2.14.0 # via sphinx certifi==2024.2.2 # via -r requirements/runtime.in, requests charset-normalizer==3.3.2 # via requests -docutils==0.19 # via sphinx, sphinx-rtd-theme +docutils==0.20.1 # via sphinx, sphinx-rtd-theme googleapis-common-protos==1.63.0 # via -r requirements/runtime.in h2==4.1.0 # via -r requirements/../setup.txt hpack==4.0.0 # via -r requirements/../setup.txt, h2 hyperframe==6.0.1 # via -r requirements/../setup.txt, h2 idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.7.0 # via sphinx +importlib-metadata==7.1.0 # via sphinx jinja2==3.1.3 # via sphinx markupsafe==2.1.5 # via jinja2 multidict==6.0.5 # via -r requirements/../setup.txt packaging==24.0 # via sphinx -protobuf==4.24.4 # via -r requirements/runtime.in, googleapis-common-protos +protobuf==4.25.3 # via -r requirements/runtime.in, googleapis-common-protos pygments==2.17.2 # via sphinx pytz==2024.1 # via babel requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==5.3.0 # via -r requirements/docs.in, sphinx-rtd-theme, sphinxcontrib-jquery +sphinx==7.1.2 # via -r requirements/docs.in, sphinx-rtd-theme, sphinxcontrib-jquery sphinx-rtd-theme==2.0.0 # via -r requirements/docs.in -sphinxcontrib-applehelp==1.0.2 # via sphinx +sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 # via sphinx +sphinxcontrib-htmlhelp==2.0.1 # via sphinx sphinxcontrib-jquery==4.1 # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -typing-extensions==4.7.1 # via importlib-metadata -urllib3==2.0.7 # via requests -zipp==3.15.0 # via importlib-metadata +urllib3==2.2.1 # via requests +zipp==3.18.1 # via importlib-metadata diff --git a/requirements/release.txt b/requirements/release.txt index b6d61d7..fd88b4c 100644 --- a/requirements/release.txt +++ b/requirements/release.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --annotation-style=line --config=pyproject.toml requirements/release.in +# pip-compile --annotation-style=line requirements/release.in # -bleach==6.0.0 # via readme-renderer +backports-tarfile==1.1.0 # via jaraco-context certifi==2024.2.2 # via requests -cffi==1.15.1 # via cryptography +cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests cryptography==42.0.5 # via secretstorage docutils==0.20.1 # via readme-renderer @@ -16,34 +16,35 @@ h2==4.1.0 # via -r requirements/../setup.txt hpack==4.0.0 # via -r requirements/../setup.txt, h2 hyperframe==6.0.1 # via -r requirements/../setup.txt, h2 idna==3.7 # via requests -importlib-metadata==6.7.0 # via keyring, twine -importlib-resources==5.12.0 # via keyring -jaraco-classes==3.2.3 # via keyring +importlib-metadata==7.1.0 # via keyring, twine +importlib-resources==6.4.0 # via keyring +jaraco-classes==3.4.0 # via keyring +jaraco-context==5.3.0 # via keyring +jaraco-functools==4.0.0 # via keyring jeepney==0.8.0 # via keyring, secretstorage -keyring==24.1.1 # via twine -markdown-it-py==2.2.0 # via rich +keyring==25.1.0 # via twine +markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -more-itertools==9.1.0 # via jaraco-classes +more-itertools==10.2.0 # via jaraco-classes, jaraco-functools multidict==6.0.5 # via -r requirements/../setup.txt -mypy-protobuf==3.4.0 # via -r requirements/release.in +mypy-protobuf==3.6.0 # via -r requirements/release.in +nh3==0.2.17 # via readme-renderer pkginfo==1.10.0 # via twine -protobuf==4.24.4 # via grpcio-tools, mypy-protobuf -pycparser==2.21 # via cffi +protobuf==4.25.3 # via grpcio-tools, mypy-protobuf +pycparser==2.22 # via cffi pygments==2.17.2 # via readme-renderer, rich -readme-renderer==37.3 # via twine +readme-renderer==43.0 # via twine requests==2.31.0 # via requests-toolbelt, twine requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine rich==13.7.1 # via twine secretstorage==3.3.3 # via keyring -six==1.16.0 # via bleach -twine==4.0.2 # via -r requirements/release.in -types-protobuf==4.24.0.4 # via mypy-protobuf -typing-extensions==4.7.1 # via importlib-metadata, markdown-it-py, rich -urllib3==2.0.7 # via requests, twine -webencodings==0.5.1 # via bleach -wheel==0.42.0 # via -r requirements/release.in -zipp==3.15.0 # via importlib-metadata, importlib-resources +twine==5.0.0 # via -r requirements/release.in +types-protobuf==4.25.0.20240417 # via mypy-protobuf +typing-extensions==4.11.0 # via rich +urllib3==2.2.1 # via requests, twine +wheel==0.43.0 # via -r requirements/release.in +zipp==3.18.1 # via importlib-metadata, importlib-resources # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/runtime.txt b/requirements/runtime.txt index 06e8bd0..76cb8e0 100644 --- a/requirements/runtime.txt +++ b/requirements/runtime.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --annotation-style=line --config=pyproject.toml requirements/runtime.in +# pip-compile --annotation-style=line requirements/runtime.in # certifi==2024.2.2 # via -r requirements/runtime.in googleapis-common-protos==1.63.0 # via -r requirements/runtime.in @@ -10,4 +10,4 @@ h2==4.1.0 # via -r requirements/../setup.txt hpack==4.0.0 # via -r requirements/../setup.txt, h2 hyperframe==6.0.1 # via -r requirements/../setup.txt, h2 multidict==6.0.5 # via -r requirements/../setup.txt -protobuf==4.24.4 # via -r requirements/runtime.in, googleapis-common-protos +protobuf==4.25.3 # via -r requirements/runtime.in, googleapis-common-protos diff --git a/requirements/test.txt b/requirements/test.txt index e68034c..cac8b42 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,29 +1,27 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --annotation-style=line --config=pyproject.toml requirements/test.in +# pip-compile --annotation-style=line requirements/test.in # async-timeout==4.0.3 # via -r requirements/test.in certifi==2024.2.2 # via -r requirements/runtime.in -coverage[toml]==7.2.7 # via pytest-cov +coverage[toml]==7.4.4 # via pytest-cov exceptiongroup==1.2.0 # via pytest -faker==18.13.0 # via -r requirements/test.in +faker==24.11.0 # via -r requirements/test.in googleapis-common-protos==1.63.0 # via -r requirements/runtime.in h2==4.1.0 # via -r requirements/../setup.txt hpack==4.0.0 # via -r requirements/../setup.txt, h2 hyperframe==6.0.1 # via -r requirements/../setup.txt, h2 -importlib-metadata==6.7.0 # via pluggy, pytest iniconfig==2.0.0 # via pytest multidict==6.0.5 # via -r requirements/../setup.txt packaging==24.0 # via pytest -pluggy==1.2.0 # via pytest -protobuf==4.24.4 # via -r requirements/runtime.in, googleapis-common-protos -pytest==7.4.4 # via -r requirements/test.in, pytest-asyncio, pytest-cov -pytest-asyncio==0.21.1 # via -r requirements/test.in -pytest-cov==4.1.0 # via -r requirements/test.in +pluggy==1.4.0 # via pytest +protobuf==4.25.3 # via -r requirements/runtime.in, googleapis-common-protos +pytest==8.1.1 # via -r requirements/test.in, pytest-asyncio, pytest-cov +pytest-asyncio==0.23.6 # via -r requirements/test.in +pytest-cov==5.0.0 # via -r requirements/test.in python-dateutil==2.9.0.post0 # via faker six==1.16.0 # via python-dateutil tomli==2.0.1 # via coverage, pytest -typing-extensions==4.7.1 # via async-timeout, faker, importlib-metadata, pytest-asyncio -zipp==3.15.0 # via importlib-metadata +typing-extensions==4.11.0 # via faker diff --git a/setup.cfg b/setup.cfg index fc59a3f..06617b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,6 @@ classifiers = License :: OSI Approved :: BSD License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -27,7 +26,7 @@ classifiers = [options] packages = find: -python_requires = >=3.7 +python_requires = >=3.8 install_requires= h2<5,>=3.1.0 multidict diff --git a/setup.py b/setup.py index c75d897..b86e591 100644 --- a/setup.py +++ b/setup.py @@ -2,5 +2,5 @@ setuptools.setup( name="grpclib", - python_requires='>=3.7', + python_requires='>=3.8', ) diff --git a/setup.txt b/setup.txt index 0759029..8a56540 100644 --- a/setup.txt +++ b/setup.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile --annotation-style=line --output-file=setup.txt setup.py diff --git a/tests/test_client_channel.py b/tests/test_client_channel.py index ebfdd70..377ff9b 100644 --- a/tests/test_client_channel.py +++ b/tests/test_client_channel.py @@ -1,5 +1,4 @@ import ssl -import sys import asyncio import tempfile import contextlib @@ -21,7 +20,6 @@ @pytest.mark.asyncio -@pytest.mark.skipif(sys.version_info < (3, 8), reason="Python < 3.8") async def test_concurrent_connect(loop): count = 5 reqs = [DummyRequest(value="ping") for _ in range(count)] @@ -62,7 +60,6 @@ def test_default_ssl_context(): @pytest.mark.asyncio -@pytest.mark.skipif(sys.version_info < (3, 8), reason="Python < 3.8") async def test_ssl_target_name_override(loop): config = Configuration(ssl_target_name_override="example.com") diff --git a/tox.ini b/tox.ini index a189df6..19a27f2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] -envlist = py{36,37,38,39},pypy3,lint,check +envlist = py{38,39},pypy3,lint,check [testenv] usedevelop = true commands = py.test deps = -r requirements/test.txt -[testenv:py37] +[testenv:py38] commands = py.test --cov [testenv:lint]