From 34a0dbbd1548ffaec9a842b2ce2ed23b4b9ad01c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 2 Aug 2023 01:09:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Divide=20pip=20constraints=20int?= =?UTF-8?q?o=20distinct=20pairs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The in+txt key pairs can be managed by pip-tools and upgraded by Dependabot natively. --- .github/workflows/ci-cd.yml | 30 +-- .github/workflows/post-dependabot.yml | 49 ----- .github/workflows/update-pre-commit.yml | 5 +- .pip-tools.toml | 4 + .pre-commit-config.yaml | 2 +- Makefile | 22 +- requirements/base.in | 5 + requirements/base.txt | 45 +++- requirements/constraints.in | 8 +- requirements/constraints.txt | 96 +++++---- requirements/cython.in | 4 + requirements/cython.txt | 13 +- requirements/dev.in | 6 + requirements/dev.txt | 267 +++++++++++++++++++++++- requirements/doc-spelling.in | 3 + requirements/doc-spelling.txt | 102 ++++++++- requirements/doc.in | 7 + requirements/doc.txt | 90 +++++++- requirements/lint.in | 8 + requirements/lint.txt | 62 +++++- requirements/multidict.in | 1 + requirements/multidict.txt | 7 + requirements/runtime-deps.in | 11 + requirements/runtime-deps.txt | 36 ++++ requirements/test.in | 14 ++ requirements/test.txt | 120 ++++++++++- requirements/typing-extensions.in | 1 + requirements/typing-extensions.txt | 9 +- setup.cfg | 8 +- 29 files changed, 888 insertions(+), 147 deletions(-) delete mode 100644 .github/workflows/post-dependabot.yml create mode 100644 .pip-tools.toml create mode 100644 requirements/base.in create mode 100644 requirements/cython.in create mode 100644 requirements/dev.in create mode 100644 requirements/doc-spelling.in create mode 100644 requirements/doc.in create mode 100644 requirements/lint.in create mode 100644 requirements/multidict.in create mode 100644 requirements/runtime-deps.in create mode 100644 requirements/runtime-deps.txt create mode 100644 requirements/test.in create mode 100644 requirements/typing-extensions.in diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e6aa3e3c3d0..852f352e067 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -38,6 +38,13 @@ jobs: uses: actions/checkout@v3 with: submodules: true + - name: >- + Verify that `requirements/runtime-deps.in` + is in sync with `setup.cfg` + run: | + set -eEuo pipefail + make sync-direct-runtime-deps + git diff --exit-code -- requirements/runtime-deps.in - name: Setup Python uses: actions/setup-python@v4 with: @@ -54,10 +61,10 @@ jobs: python -m pip install -U pip wheel setuptools build twine - name: Install dependencies run: | - python -m pip install -r requirements/lint.txt -c requirements/constraints.txt + python -m pip install -r requirements/lint.in -c requirements/lint.txt - name: Install self run: | - python -m pip install . + python -m pip install . -c requirements/runtime-deps.txt env: AIOHTTP_NO_EXTENSIONS: 1 - name: Run mypy @@ -67,14 +74,14 @@ jobs: run: | # Some extra requirements are needed to ensure all modules # can be scanned by slotscheck. - pip install -r requirements/base.txt -c requirements/constraints.txt + pip install -r requirements/base.in -c requirements/base.txt slotscheck -v -m aiohttp - name: Install libenchant run: | sudo apt install libenchant-2-dev - name: Install spell checker run: | - pip install -r requirements/doc-spelling.txt -c requirements/constraints.txt + pip install -r requirements/doc-spelling.in -c requirements/doc-spelling.txt - name: Run docs spelling run: | # towncrier --yes # uncomment me after publishing a release @@ -203,7 +210,7 @@ jobs: python -m pip install -U pip wheel setuptools build twine - name: Install dependencies run: | - python -m pip install -r requirements/test.txt -c requirements/constraints.txt + python -m pip install -r requirements/test.in -c requirements/test.txt - name: Cythonize if: ${{ matrix.no-extensions == '' }} run: | @@ -294,8 +301,9 @@ jobs: run: | python -m pip install -U pip wheel setuptools build twine - name: Install cython - run: | - python -m pip install -r requirements/cython.txt -c requirements/constraints.txt + run: >- + python -m + pip install -r requirements/cython.in -c requirements/cython.txt - name: Restore llhttp generated files uses: actions/download-artifact@v3 with: @@ -359,8 +367,9 @@ jobs: run: | python -m pip install -U pip wheel setuptools build twine - name: Install cython - run: | - python -m pip install -r requirements/cython.txt -c requirements/constraints.txt + run: >- + python -m + pip install -r requirements/cython.in -c requirements/cython.txt - name: Restore llhttp generated files uses: actions/download-artifact@v3 with: @@ -396,9 +405,6 @@ jobs: uses: actions/checkout@v3 with: submodules: true - - name: Update pip, wheel, setuptools, build, twine - run: | - python -m pip install -U pip wheel setuptools build twine - name: Login run: | echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token diff --git a/.github/workflows/post-dependabot.yml b/.github/workflows/post-dependabot.yml deleted file mode 100644 index de9c2b43da7..00000000000 --- a/.github/workflows/post-dependabot.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Dependabot post-update -on: - pull_request_target: - action: [opened, synchronize, reopened] - branches: - - 'master' - - '[0-9].[0-9]+' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -permissions: {} -jobs: - post-update: - permissions: - pull-requests: read # for gh pr checkout - contents: write # to push code in repo (stefanzweifel/git-auto-commit-action) - - if: ${{ github.actor == 'dependabot[bot]' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Login - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - - name: Checkout - run: | - gh pr checkout ${{ github.event.pull_request.number }} - - name: Setup Python - uses: actions/setup-python@v4 - - name: Cache PyPI - uses: actions/cache@v3.0.4 - with: - key: post-update - path: ~/.cache/pip - restore-keys: | - post-update- - - name: Update pip-tools - run: | - python -m pip install -U pip-tools - - name: Run pip-compile - run: | - make compile-deps - - name: Commit and push if needed - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Recompile requirements/constraints.txt diff --git a/.github/workflows/update-pre-commit.yml b/.github/workflows/update-pre-commit.yml index e4226d31f82..a0a4fdb4d50 100644 --- a/.github/workflows/update-pre-commit.yml +++ b/.github/workflows/update-pre-commit.yml @@ -14,9 +14,8 @@ jobs: with: python-version: 3.8 - name: Install dependencies - uses: py-actions/py-dependency-install@v4 - with: - path: requirements/lint.txt + run: >- + pip install -r requirements/lint.in -c requirements/lint.txt - name: Run pre-commit autoupdate run: pre-commit autoupdate - id: generate_token diff --git a/.pip-tools.toml b/.pip-tools.toml new file mode 100644 index 00000000000..82737a2d4f6 --- /dev/null +++ b/.pip-tools.toml @@ -0,0 +1,4 @@ +[pip-tools] +allow-unsafe = true +resolver = "backtracking" +strip-extras = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f41fbfe50ba..ef6096df36f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: ^docs/[^/]*\.svg$ - id: requirements-txt-fixer exclude: >- - ^requirements/constraints[.]txt$ + ^requirements/.*\.txt$ - id: trailing-whitespace - id: file-contents-sorter args: ['--ignore-case'] diff --git a/Makefile b/Makefile index f899a12c802..103de1ec745 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ endif @python -m pip install --upgrade pip .install-cython: .update-pip $(call to-hash,requirements/cython.txt) - @python -m pip install -r requirements/cython.txt -c requirements/constraints.txt + @python -m pip install -r requirements/cython.in -c requirements/cython.txt @touch .install-cython aiohttp/_find_header.c: $(call to-hash,aiohttp/hdrs.py ./tools/gen.py) @@ -74,7 +74,7 @@ generate-llhttp: .llhttp-gen cythonize: .install-cython $(PYXS:.pyx=.c) .install-deps: .install-cython $(PYXS:.pyx=.c) $(call to-hash,$(CYS) $(REQS)) - @python -m pip install -r requirements/dev.txt -c requirements/constraints.txt + @python -m pip install -r requirements/dev.in -c requirements/dev.txt @touch .install-deps .PHONY: lint @@ -89,7 +89,7 @@ mypy: mypy .develop: .install-deps generate-llhttp $(call to-hash,$(PYS) $(CYS) $(CS)) - python -m pip install -e . -c requirements/constraints.txt + python -m pip install -e . -c requirements/runtime-deps.txt @touch .develop .PHONY: test @@ -177,15 +177,17 @@ doc: doc-spelling: @make -C docs spelling SPHINXOPTS="-W --keep-going -n -E" -.PHONY: compile-deps -compile-deps: .update-pip $(REQS) - pip-compile --no-header --allow-unsafe -q --strip-extras \ - -o requirements/constraints.txt \ - requirements/constraints.in - .PHONY: install install: .update-pip - @python -m pip install -r requirements/dev.txt -c requirements/constraints.txt + @python -m pip install -r requirements/dev.in -c requirements/dev.txt .PHONY: install-dev install-dev: .develop + +.PHONY: sync-direct-runtime-deps +sync-direct-runtime-deps: + @echo Updating 'requirements/runtime-deps.in' from 'setup.cfg'... >&2 + @echo '# Extracted from `setup.cfg` via `make sync-direct-runtime-deps`' > requirements/runtime-deps.in + @echo >> requirements/runtime-deps.in + @python -c 'from configparser import ConfigParser; from itertools import chain; from pathlib import Path; cfg = ConfigParser(); cfg.read_string(Path("setup.cfg").read_text()); print("\n".join(line.strip() for line in chain(cfg["options"].get("install_requires").splitlines(), "\n".join(cfg["options.extras_require"].values()).splitlines()) if line.strip()))' \ + >> requirements/runtime-deps.in diff --git a/requirements/base.in b/requirements/base.in new file mode 100644 index 00000000000..df67f78afde --- /dev/null +++ b/requirements/base.in @@ -0,0 +1,5 @@ +-r typing-extensions.in +-r runtime-deps.in + +gunicorn +uvloop; platform_system != "Windows" and implementation_name == "cpython" # MagicStack/uvloop#14 diff --git a/requirements/base.txt b/requirements/base.txt index 7b9b92c6792..07234534732 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,13 +1,44 @@ --r multidict.txt --r typing-extensions.txt -# required c-ares will not build on windows -aiodns==3.0.0; sys_platform=="linux" or sys_platform=="darwin" +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/base.txt --strip-extras requirements/base.in +# +aiodns==3.0.0 ; sys_platform == "linux" or sys_platform == "darwin" + # via -r requirements/runtime-deps.in aiosignal==1.3.1 + # via -r requirements/runtime-deps.in async-timeout==4.0.2 -Brotli==1.0.9 -cchardet==2.1.7; python_version < "3.10" # Unmaintained: aio-libs/aiohttp#6819 + # via -r requirements/runtime-deps.in +brotli==1.0.9 + # via -r requirements/runtime-deps.in +cchardet==2.1.7 ; python_version < "3.10" + # via -r requirements/runtime-deps.in +cffi==1.15.1 + # via pycares charset-normalizer==3.2.0 + # via -r requirements/runtime-deps.in frozenlist==1.4.0 + # via + # -r requirements/runtime-deps.in + # aiosignal gunicorn==21.2.0 -uvloop==0.17.0; platform_system!="Windows" and implementation_name=="cpython" and python_version<"3.9" # MagicStack/uvloop#14 + # via -r requirements/base.in +idna==3.4 + # via yarl +multidict==6.0.4 + # via + # -r requirements/runtime-deps.in + # yarl +packaging==23.1 + # via gunicorn +pycares==4.3.0 + # via aiodns +pycparser==2.21 + # via cffi +typing-extensions==4.1.1 + # via -r requirements/typing-extensions.in +uvloop==0.17.0 ; platform_system != "Windows" and implementation_name == "cpython" + # via -r requirements/base.in yarl==1.9.2 + # via -r requirements/runtime-deps.in diff --git a/requirements/constraints.in b/requirements/constraints.in index 7b166e59fa5..0d5180ddffc 100644 --- a/requirements/constraints.in +++ b/requirements/constraints.in @@ -1,4 +1,4 @@ --r cython.txt --r dev.txt --r doc-spelling.txt --r lint.txt +-r cython.in +-r dev.in +-r doc-spelling.in +-r lint.in diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 21ce665e56c..ec47ee63445 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -1,16 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --strip-extras requirements/constraints.in +# aiodns==3.0.0 ; sys_platform == "linux" or sys_platform == "darwin" - # via -r requirements/base.txt + # via -r requirements/runtime-deps.in aiohttp-theme==0.1.6 - # via -r requirements/doc.txt + # via -r requirements/doc.in aioredis==2.0.1 - # via -r requirements/lint.txt + # via -r requirements/lint.in aiosignal==1.3.1 - # via -r requirements/base.txt + # via -r requirements/runtime-deps.in alabaster==0.7.12 # via sphinx async-timeout==4.0.2 # via - # -r requirements/base.txt + # -r requirements/runtime-deps.in # aioredis babel==2.9.1 # via sphinx @@ -19,11 +25,11 @@ backports-entry-points-selectable==1.1.0 blockdiag==2.0.1 # via sphinxcontrib-blockdiag brotli==1.0.9 - # via - # -r requirements/base.txt - # -r requirements/test.txt + # via -r requirements/runtime-deps.in build==0.10.0 # via pip-tools +cchardet==2.1.7 ; python_version < "3.10" + # via -r requirements/runtime-deps.in certifi==2022.12.7 # via requests cffi==1.15.0 @@ -34,10 +40,10 @@ cfgv==3.3.1 # via pre-commit charset-normalizer==3.2.0 # via - # -r requirements/base.txt + # -r requirements/runtime-deps.in # requests cherry-picker==2.1.0 - # via -r requirements/dev.txt + # via -r requirements/dev.in click==8.0.3 # via # cherry-picker @@ -51,14 +57,14 @@ click-default-group==1.2.2 # via towncrier coverage==7.2.7 # via - # -r requirements/test.txt + # -r requirements/test.in # pytest-cov cryptography==39.0.1 # via # pyjwt # trustme cython==3.0.0 - # via -r requirements/cython.txt + # via -r requirements/cython.in distlib==0.3.3 # via virtualenv docutils==0.20.1 @@ -68,19 +74,19 @@ exceptiongroup==1.1.2 filelock==3.3.2 # via virtualenv freezegun==1.1.0 - # via -r requirements/test.txt + # via -r requirements/test.in frozenlist==1.4.0 # via - # -r requirements/base.txt + # -r requirements/runtime-deps.in # aiosignal funcparserlib==1.0.1 # via - # -r requirements/doc.txt + # -r requirements/doc.in # blockdiag gidgethub==5.0.1 # via cherry-picker gunicorn==21.2.0 - # via -r requirements/base.txt + # via -r requirements/base.in identify==2.3.3 # via pre-commit idna==3.3 @@ -90,6 +96,10 @@ idna==3.3 # yarl imagesize==1.4.1 # via sphinx +importlib-metadata==6.8.0 + # via sphinx +importlib-resources==6.0.0 + # via towncrier incremental==21.3.0 # via towncrier iniconfig==1.1.1 @@ -102,12 +112,13 @@ markupsafe==2.0.1 # via jinja2 multidict==6.0.4 # via - # -r requirements/multidict.txt + # -r requirements/multidict.in + # -r requirements/runtime-deps.in # yarl mypy==1.4.1 ; implementation_name == "cpython" # via - # -r requirements/lint.txt - # -r requirements/test.txt + # -r requirements/lint.in + # -r requirements/test.in mypy-extensions==1.0.0 # via mypy nodeenv==1.6.0 @@ -121,15 +132,15 @@ packaging==21.2 pillow==9.3.0 # via blockdiag pip-tools==7.1.0 - # via -r requirements/dev.txt + # via -r requirements/dev.in platformdirs==2.4.0 # via virtualenv pluggy==1.0.0 # via pytest pre-commit==3.3.3 - # via -r requirements/lint.txt + # via -r requirements/lint.in proxy-py==2.4.4rc4 - # via -r requirements/test.txt + # via -r requirements/test.in pycares==4.3.0 # via aiodns pycparser==2.20 @@ -148,24 +159,24 @@ pyproject-hooks==1.0.0 # via build pytest==7.4.0 # via - # -r requirements/lint.txt - # -r requirements/test.txt + # -r requirements/lint.in + # -r requirements/test.in # pytest-cov # pytest-mock pytest-cov==4.1.0 - # via -r requirements/test.txt + # via -r requirements/test.in pytest-mock==3.11.1 - # via -r requirements/test.txt + # via -r requirements/test.in python-dateutil==2.8.2 # via freezegun python-on-whales==0.63.0 - # via -r requirements/test.txt + # via -r requirements/test.in pytz==2021.3 # via babel pyyaml==6.0.1 # via pre-commit re-assert==1.1.0 - # via -r requirements/test.txt + # via -r requirements/test.in regex==2021.11.2 # via re-assert requests==2.31.0 @@ -174,25 +185,25 @@ requests==2.31.0 # python-on-whales # sphinx setuptools-git==1.2 - # via -r requirements/test.txt + # via -r requirements/test.in six==1.16.0 # via # python-dateutil # virtualenv slotscheck==0.16.5 - # via -r requirements/lint.txt + # via -r requirements/lint.in snowballstemmer==2.1.0 # via sphinx sphinx==7.1.1 # via - # -r requirements/doc.txt + # -r requirements/doc.in # sphinxcontrib-blockdiag # sphinxcontrib-spelling # sphinxcontrib-towncrier sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-blockdiag==3.0.0 - # via -r requirements/doc.txt + # via -r requirements/doc.in sphinxcontrib-devhelp==1.0.2 # via sphinx sphinxcontrib-htmlhelp==2.0.0 @@ -204,9 +215,9 @@ sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 # via sphinx sphinxcontrib-spelling==8.0.0 ; platform_system != "Windows" - # via -r requirements/doc-spelling.txt + # via -r requirements/doc-spelling.in sphinxcontrib-towncrier==0.3.2a0 - # via -r requirements/doc.txt + # via -r requirements/doc.in toml==0.10.2 # via cherry-picker tomli==1.2.2 @@ -221,37 +232,42 @@ tomli==1.2.2 # towncrier towncrier==23.6.0 # via - # -r requirements/doc.txt + # -r requirements/doc.in # sphinxcontrib-towncrier tqdm==4.62.3 # via python-on-whales trustme==1.1.0 ; platform_machine != "i686" - # via -r requirements/test.txt + # via -r requirements/test.in typer==0.6.1 # via python-on-whales typing-extensions==4.1.1 # via - # -r requirements/typing-extensions.txt + # -r requirements/typing-extensions.in # aioredis # mypy # pydantic # python-on-whales + # slotscheck uritemplate==4.1.1 # via gidgethub urllib3==1.26.7 # via requests uvloop==0.17.0 ; platform_system != "Windows" - # via -r requirements/lint.txt + # via -r requirements/lint.in virtualenv==20.10.0 # via pre-commit wait-for-it==2.2.2 - # via -r requirements/test.txt + # via -r requirements/test.in webcolors==1.11.1 # via blockdiag wheel==0.38.1 # via pip-tools yarl==1.9.2 - # via -r requirements/base.txt + # via -r requirements/runtime-deps.in +zipp==3.16.2 + # via + # importlib-metadata + # importlib-resources # The following packages are considered to be unsafe in a requirements file: pip==23.2.1 diff --git a/requirements/cython.in b/requirements/cython.in new file mode 100644 index 00000000000..ee07533e17c --- /dev/null +++ b/requirements/cython.in @@ -0,0 +1,4 @@ +-r multidict.in +-r typing-extensions.in # required for parsing aiohttp/hdrs.py by tools/gen.py + +Cython diff --git a/requirements/cython.txt b/requirements/cython.txt index 3f996dbf400..caab39e940d 100644 --- a/requirements/cython.txt +++ b/requirements/cython.txt @@ -1,3 +1,12 @@ --r multidict.txt --r typing-extensions.txt # required for parsing aiohttp/hdrs.py by tools/gen.py +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/cython.txt --strip-extras requirements/cython.in +# cython==3.0.0 + # via -r requirements/cython.in +multidict==6.0.4 + # via -r requirements/multidict.in +typing-extensions==4.1.1 + # via -r requirements/typing-extensions.in diff --git a/requirements/dev.in b/requirements/dev.in new file mode 100644 index 00000000000..780eae45f5e --- /dev/null +++ b/requirements/dev.in @@ -0,0 +1,6 @@ +-r lint.in +-r test.in +-r doc.in + +cherry_picker +pip-tools diff --git a/requirements/dev.txt b/requirements/dev.txt index e2260f720c8..7c5391578cd 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,264 @@ --r lint.txt --r test.txt --r doc.txt -cherry_picker==2.1.0 +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/dev.in +# +aiodns==3.0.0 ; sys_platform == "linux" or sys_platform == "darwin" + # via -r requirements/runtime-deps.in +aiohttp-theme==0.1.6 + # via -r requirements/doc.in +aioredis==2.0.1 + # via -r requirements/lint.in +aiosignal==1.3.1 + # via -r requirements/runtime-deps.in +alabaster==0.7.13 + # via sphinx +async-timeout==4.0.2 + # via + # -r requirements/runtime-deps.in + # aioredis +babel==2.12.1 + # via sphinx +blockdiag==3.0.0 + # via sphinxcontrib-blockdiag +brotli==1.0.9 + # via -r requirements/runtime-deps.in +build==0.10.0 + # via pip-tools +cchardet==2.1.7 ; python_version < "3.10" + # via -r requirements/runtime-deps.in +certifi==2023.7.22 + # via requests +cffi==1.15.1 + # via + # cryptography + # pycares +cfgv==3.3.1 + # via pre-commit +charset-normalizer==3.2.0 + # via + # -r requirements/runtime-deps.in + # requests +cherry-picker==2.1.0 + # via -r requirements/dev.in +click==8.1.6 + # via + # cherry-picker + # click-default-group + # pip-tools + # slotscheck + # towncrier + # typer + # wait-for-it +click-default-group==1.2.2 + # via towncrier +coverage==7.2.7 + # via + # -r requirements/test.in + # pytest-cov +cryptography==41.0.2 + # via + # pyjwt + # trustme +distlib==0.3.7 + # via virtualenv +docutils==0.20.1 + # via sphinx +exceptiongroup==1.1.2 + # via pytest +filelock==3.12.2 + # via virtualenv +freezegun==1.1.0 + # via -r requirements/test.in +frozenlist==1.4.0 + # via + # -r requirements/runtime-deps.in + # aiosignal +funcparserlib==1.0.1 + # via + # -r requirements/doc.in + # blockdiag +gidgethub==5.3.0 + # via cherry-picker +gunicorn==21.2.0 + # via -r requirements/base.in +identify==2.5.26 + # via pre-commit +idna==3.4 + # via + # requests + # trustme + # yarl +imagesize==1.4.1 + # via sphinx +importlib-metadata==6.8.0 + # via sphinx +importlib-resources==6.0.0 + # via towncrier +incremental==22.10.0 + # via towncrier +iniconfig==2.0.0 + # via pytest +jinja2==3.1.2 + # via + # sphinx + # towncrier +markupsafe==2.1.3 + # via jinja2 +multidict==6.0.4 + # via + # -r requirements/runtime-deps.in + # yarl +mypy==1.4.1 ; implementation_name == "cpython" + # via + # -r requirements/lint.in + # -r requirements/test.in +mypy-extensions==1.0.0 + # via mypy +nodeenv==1.8.0 + # via pre-commit +packaging==23.1 + # via + # build + # gunicorn + # pytest + # sphinx +pillow==10.0.0 + # via blockdiag pip-tools==7.1.0 + # via -r requirements/dev.in +platformdirs==3.10.0 + # via virtualenv +pluggy==1.2.0 + # via pytest +pre-commit==3.3.3 + # via -r requirements/lint.in +proxy-py==2.4.4rc4 + # via -r requirements/test.in +pycares==4.3.0 + # via aiodns +pycparser==2.21 + # via cffi +pydantic==1.10.2 + # via python-on-whales +pygments==2.15.1 + # via sphinx +pyjwt==2.8.0 + # via gidgethub +pyproject-hooks==1.0.0 + # via build +pytest==7.4.0 + # via + # -r requirements/lint.in + # -r requirements/test.in + # pytest-cov + # pytest-mock +pytest-cov==4.1.0 + # via -r requirements/test.in +pytest-mock==3.11.1 + # via -r requirements/test.in +python-dateutil==2.8.2 + # via freezegun +python-on-whales==0.63.0 + # via -r requirements/test.in +pyyaml==6.0.1 + # via pre-commit +re-assert==1.1.0 + # via -r requirements/test.in +regex==2023.6.3 + # via re-assert +requests==2.31.0 + # via + # cherry-picker + # python-on-whales + # sphinx +setuptools-git==1.2 + # via -r requirements/test.in +six==1.16.0 + # via python-dateutil +slotscheck==0.16.5 + # via -r requirements/lint.in +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.1.1 + # via + # -r requirements/doc.in + # sphinxcontrib-blockdiag + # sphinxcontrib-towncrier +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-blockdiag==3.0.0 + # via -r requirements/doc.in +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +sphinxcontrib-towncrier==0.3.2a0 + # via -r requirements/doc.in +toml==0.10.2 + # via cherry-picker +tomli==2.0.1 + # via + # build + # coverage + # mypy + # pip-tools + # pyproject-hooks + # pytest + # slotscheck + # towncrier +towncrier==23.6.0 + # via + # -r requirements/doc.in + # sphinxcontrib-towncrier +tqdm==4.65.0 + # via python-on-whales +trustme==1.1.0 ; platform_machine != "i686" + # via -r requirements/test.in +typer==0.9.0 + # via python-on-whales +typing-extensions==4.1.1 + # via + # -r requirements/typing-extensions.in + # aioredis + # mypy + # pydantic + # python-on-whales + # slotscheck + # typer +uritemplate==4.1.1 + # via gidgethub +urllib3==2.0.4 + # via requests +uvloop==0.17.0 ; platform_system != "Windows" + # via -r requirements/lint.in +virtualenv==20.24.2 + # via pre-commit +wait-for-it==2.2.2 + # via -r requirements/test.in +webcolors==1.13 + # via blockdiag +wheel==0.41.0 + # via pip-tools +yarl==1.9.2 + # via -r requirements/runtime-deps.in +zipp==3.16.2 + # via + # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +pip==23.2.1 + # via pip-tools +setuptools==68.0.0 + # via + # blockdiag + # nodeenv + # pip-tools diff --git a/requirements/doc-spelling.in b/requirements/doc-spelling.in new file mode 100644 index 00000000000..2468c2b5637 --- /dev/null +++ b/requirements/doc-spelling.in @@ -0,0 +1,3 @@ +-r doc.in + +sphinxcontrib-spelling; platform_system!="Windows" # We only use it in GitHub Actions CI/CD diff --git a/requirements/doc-spelling.txt b/requirements/doc-spelling.txt index 4f4b64425d3..189464e74f8 100644 --- a/requirements/doc-spelling.txt +++ b/requirements/doc-spelling.txt @@ -1,2 +1,100 @@ --r doc.txt -sphinxcontrib-spelling==8.0.0; platform_system!="Windows" # We only use it in Travis CI +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/doc-spelling.txt --strip-extras requirements/doc-spelling.in +# +aiohttp-theme==0.1.6 + # via -r requirements/doc.in +alabaster==0.7.13 + # via sphinx +babel==2.12.1 + # via sphinx +blockdiag==3.0.0 + # via sphinxcontrib-blockdiag +certifi==2023.7.22 + # via requests +charset-normalizer==3.2.0 + # via requests +click==8.1.6 + # via + # click-default-group + # towncrier +click-default-group==1.2.2 + # via towncrier +docutils==0.20.1 + # via sphinx +funcparserlib==1.0.1 + # via + # -r requirements/doc.in + # blockdiag +idna==3.4 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==6.8.0 + # via sphinx +importlib-resources==6.0.0 + # via towncrier +incremental==22.10.0 + # via towncrier +jinja2==3.1.2 + # via + # sphinx + # towncrier +markupsafe==2.1.3 + # via jinja2 +packaging==23.1 + # via sphinx +pillow==10.0.0 + # via blockdiag +pyenchant==3.2.2 + # via sphinxcontrib-spelling +pygments==2.15.1 + # via sphinx +requests==2.31.0 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.1.1 + # via + # -r requirements/doc.in + # sphinxcontrib-blockdiag + # sphinxcontrib-spelling + # sphinxcontrib-towncrier +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-blockdiag==3.0.0 + # via -r requirements/doc.in +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +sphinxcontrib-spelling==8.0.0 ; platform_system != "Windows" + # via -r requirements/doc-spelling.in +sphinxcontrib-towncrier==0.3.2a0 + # via -r requirements/doc.in +tomli==2.0.1 + # via towncrier +towncrier==23.6.0 + # via + # -r requirements/doc.in + # sphinxcontrib-towncrier +urllib3==2.0.4 + # via requests +webcolors==1.13 + # via blockdiag +zipp==3.16.2 + # via + # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.0.0 + # via blockdiag diff --git a/requirements/doc.in b/requirements/doc.in new file mode 100644 index 00000000000..d0841c3132b --- /dev/null +++ b/requirements/doc.in @@ -0,0 +1,7 @@ +aiohttp-theme +# Temp fix till updated: https://github.com/blockdiag/blockdiag/pull/148 +funcparserlib +sphinx +sphinxcontrib-blockdiag +sphinxcontrib-towncrier +towncrier diff --git a/requirements/doc.txt b/requirements/doc.txt index 2460f9a930b..d688d5bd540 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,7 +1,95 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/doc.txt --strip-extras requirements/doc.in +# aiohttp-theme==0.1.6 -# Temp fix till updated: https://github.com/blockdiag/blockdiag/pull/148 + # via -r requirements/doc.in +alabaster==0.7.13 + # via sphinx +babel==2.12.1 + # via sphinx +blockdiag==3.0.0 + # via sphinxcontrib-blockdiag +certifi==2023.7.22 + # via requests +charset-normalizer==3.2.0 + # via requests +click==8.1.6 + # via + # click-default-group + # towncrier +click-default-group==1.2.2 + # via towncrier +docutils==0.20.1 + # via sphinx funcparserlib==1.0.1 + # via + # -r requirements/doc.in + # blockdiag +idna==3.4 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==6.8.0 + # via sphinx +importlib-resources==6.0.0 + # via towncrier +incremental==22.10.0 + # via towncrier +jinja2==3.1.2 + # via + # sphinx + # towncrier +markupsafe==2.1.3 + # via jinja2 +packaging==23.1 + # via sphinx +pillow==10.0.0 + # via blockdiag +pygments==2.15.1 + # via sphinx +requests==2.31.0 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx sphinx==7.1.1 + # via + # -r requirements/doc.in + # sphinxcontrib-blockdiag + # sphinxcontrib-towncrier +sphinxcontrib-applehelp==1.0.4 + # via sphinx sphinxcontrib-blockdiag==3.0.0 + # via -r requirements/doc.in +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx sphinxcontrib-towncrier==0.3.2a0 + # via -r requirements/doc.in +tomli==2.0.1 + # via towncrier towncrier==23.6.0 + # via + # -r requirements/doc.in + # sphinxcontrib-towncrier +urllib3==2.0.4 + # via requests +webcolors==1.13 + # via blockdiag +zipp==3.16.2 + # via + # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.0.0 + # via blockdiag diff --git a/requirements/lint.in b/requirements/lint.in new file mode 100644 index 00000000000..34616155912 --- /dev/null +++ b/requirements/lint.in @@ -0,0 +1,8 @@ +-r typing-extensions.in + +aioredis +mypy; implementation_name == "cpython" +pre-commit +pytest +slotscheck +uvloop; platform_system != "Windows" diff --git a/requirements/lint.txt b/requirements/lint.txt index 6a1f6e3fe9f..a92d3d39b8f 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -1,7 +1,63 @@ --r typing-extensions.txt +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/lint.txt --strip-extras requirements/lint.in +# aioredis==2.0.1 -mypy==1.4.1; implementation_name=="cpython" + # via -r requirements/lint.in +async-timeout==4.0.2 + # via aioredis +cfgv==3.3.1 + # via pre-commit +click==8.1.6 + # via slotscheck +distlib==0.3.7 + # via virtualenv +exceptiongroup==1.1.2 + # via pytest +filelock==3.12.2 + # via virtualenv +identify==2.5.26 + # via pre-commit +iniconfig==2.0.0 + # via pytest +mypy==1.4.1 ; implementation_name == "cpython" + # via -r requirements/lint.in +mypy-extensions==1.0.0 + # via mypy +nodeenv==1.8.0 + # via pre-commit +packaging==23.1 + # via pytest +platformdirs==3.10.0 + # via virtualenv +pluggy==1.2.0 + # via pytest pre-commit==3.3.3 + # via -r requirements/lint.in pytest==7.4.0 + # via -r requirements/lint.in +pyyaml==6.0.1 + # via pre-commit slotscheck==0.16.5 -uvloop==0.17.0; platform_system!="Windows" + # via -r requirements/lint.in +tomli==2.0.1 + # via + # mypy + # pytest + # slotscheck +typing-extensions==4.1.1 + # via + # -r requirements/typing-extensions.in + # aioredis + # mypy + # slotscheck +uvloop==0.17.0 ; platform_system != "Windows" + # via -r requirements/lint.in +virtualenv==20.24.2 + # via pre-commit + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.0.0 + # via nodeenv diff --git a/requirements/multidict.in b/requirements/multidict.in new file mode 100644 index 00000000000..afcecdff082 --- /dev/null +++ b/requirements/multidict.in @@ -0,0 +1 @@ +multidict diff --git a/requirements/multidict.txt b/requirements/multidict.txt index 08a91b3d9ef..a8eb7064471 100644 --- a/requirements/multidict.txt +++ b/requirements/multidict.txt @@ -1 +1,8 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/multidict.txt --strip-extras requirements/multidict.in +# multidict==6.0.4 + # via -r requirements/multidict.in diff --git a/requirements/runtime-deps.in b/requirements/runtime-deps.in new file mode 100644 index 00000000000..711a3958020 --- /dev/null +++ b/requirements/runtime-deps.in @@ -0,0 +1,11 @@ +# Extracted from `setup.cfg` via `make sync-direct-runtime-deps` + +charset-normalizer >=2.0, < 4.0 +multidict >=4.5, < 7.0 +async-timeout >= 4.0, < 5.0 +yarl >= 1.0, < 2.0 +frozenlist >= 1.1.1 +aiosignal >= 1.1.2 +aiodns >= 1.1; sys_platform=="linux" or sys_platform=="darwin" +Brotli +cchardet; python_version < "3.10" diff --git a/requirements/runtime-deps.txt b/requirements/runtime-deps.txt new file mode 100644 index 00000000000..0ecd2169bf7 --- /dev/null +++ b/requirements/runtime-deps.txt @@ -0,0 +1,36 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/runtime-deps.txt --strip-extras requirements/runtime-deps.in +# +aiodns==3.0.0 ; sys_platform == "linux" or sys_platform == "darwin" + # via -r requirements/runtime-deps.in +aiosignal==1.3.1 + # via -r requirements/runtime-deps.in +async-timeout==4.0.2 + # via -r requirements/runtime-deps.in +brotli==1.0.9 + # via -r requirements/runtime-deps.in +cchardet==2.1.7 ; python_version < "3.10" + # via -r requirements/runtime-deps.in +cffi==1.15.1 + # via pycares +charset-normalizer==3.2.0 + # via -r requirements/runtime-deps.in +frozenlist==1.4.0 + # via + # -r requirements/runtime-deps.in + # aiosignal +idna==3.4 + # via yarl +multidict==6.0.4 + # via + # -r requirements/runtime-deps.in + # yarl +pycares==4.3.0 + # via aiodns +pycparser==2.21 + # via cffi +yarl==1.9.2 + # via -r requirements/runtime-deps.in diff --git a/requirements/test.in b/requirements/test.in new file mode 100644 index 00000000000..3510b31ad0f --- /dev/null +++ b/requirements/test.in @@ -0,0 +1,14 @@ +-r base.in + +coverage +freezegun +mypy; implementation_name == "cpython" +proxy.py +pytest +pytest-cov +pytest-mock +python-on-whales +re-assert +setuptools-git +trustme; platform_machine != "i686" # no 32-bit wheels +wait-for-it diff --git a/requirements/test.txt b/requirements/test.txt index 48b5c4f6a1d..00fa1cadd8d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,14 +1,124 @@ --r base.txt -Brotli==1.0.9 +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/test.txt --strip-extras requirements/test.in +# +aiodns==3.0.0 ; sys_platform == "linux" or sys_platform == "darwin" + # via -r requirements/runtime-deps.in +aiosignal==1.3.1 + # via -r requirements/runtime-deps.in +async-timeout==4.0.2 + # via -r requirements/runtime-deps.in +brotli==1.0.9 + # via -r requirements/runtime-deps.in +cchardet==2.1.7 ; python_version < "3.10" + # via -r requirements/runtime-deps.in +certifi==2023.7.22 + # via requests +cffi==1.15.1 + # via + # cryptography + # pycares +charset-normalizer==3.2.0 + # via + # -r requirements/runtime-deps.in + # requests +click==8.1.6 + # via + # typer + # wait-for-it coverage==7.2.7 + # via + # -r requirements/test.in + # pytest-cov +cryptography==41.0.2 + # via trustme +exceptiongroup==1.1.2 + # via pytest freezegun==1.1.0 -mypy==1.4.1; implementation_name=="cpython" -proxy.py==2.4.4rc4 + # via -r requirements/test.in +frozenlist==1.4.0 + # via + # -r requirements/runtime-deps.in + # aiosignal +gunicorn==21.2.0 + # via -r requirements/base.in +idna==3.4 + # via + # requests + # trustme + # yarl +iniconfig==2.0.0 + # via pytest +multidict==6.0.4 + # via + # -r requirements/runtime-deps.in + # yarl +mypy==1.4.1 ; implementation_name == "cpython" + # via -r requirements/test.in +mypy-extensions==1.0.0 + # via mypy +packaging==23.1 + # via + # gunicorn + # pytest +pluggy==1.2.0 + # via pytest +proxy-py==2.4.4rc4 + # via -r requirements/test.in +pycares==4.3.0 + # via aiodns +pycparser==2.21 + # via cffi +pydantic==1.10.2 + # via python-on-whales pytest==7.4.0 + # via + # -r requirements/test.in + # pytest-cov + # pytest-mock pytest-cov==4.1.0 + # via -r requirements/test.in pytest-mock==3.11.1 + # via -r requirements/test.in +python-dateutil==2.8.2 + # via freezegun python-on-whales==0.63.0 + # via -r requirements/test.in re-assert==1.1.0 + # via -r requirements/test.in +regex==2023.6.3 + # via re-assert +requests==2.31.0 + # via python-on-whales setuptools-git==1.2 -trustme==1.1.0; platform_machine!="i686" # no 32-bit wheels + # via -r requirements/test.in +six==1.16.0 + # via python-dateutil +tomli==2.0.1 + # via + # coverage + # mypy + # pytest +tqdm==4.65.0 + # via python-on-whales +trustme==1.1.0 ; platform_machine != "i686" + # via -r requirements/test.in +typer==0.9.0 + # via python-on-whales +typing-extensions==4.1.1 + # via + # -r requirements/typing-extensions.in + # mypy + # pydantic + # python-on-whales + # typer +urllib3==2.0.4 + # via requests +uvloop==0.17.0 ; platform_system != "Windows" and implementation_name == "cpython" + # via -r requirements/base.in wait-for-it==2.2.2 + # via -r requirements/test.in +yarl==1.9.2 + # via -r requirements/runtime-deps.in diff --git a/requirements/typing-extensions.in b/requirements/typing-extensions.in new file mode 100644 index 00000000000..5fd4f05f341 --- /dev/null +++ b/requirements/typing-extensions.in @@ -0,0 +1 @@ +typing_extensions diff --git a/requirements/typing-extensions.txt b/requirements/typing-extensions.txt index 37e36b213d3..705a53f2b75 100644 --- a/requirements/typing-extensions.txt +++ b/requirements/typing-extensions.txt @@ -1 +1,8 @@ -typing_extensions==4.1.1 +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --output-file=requirements/typing-extensions.txt --strip-extras requirements/typing-extensions.in +# +typing-extensions==4.1.1 + # via -r requirements/typing-extensions.in diff --git a/setup.cfg b/setup.cfg index 622788bc5e2..cea5314177e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,7 +49,7 @@ include_package_data = True install_requires = charset-normalizer >=2.0, < 4.0 multidict >=4.5, < 7.0 - async_timeout >= 4.0, < 5.0 + async-timeout >= 4.0, < 5.0 yarl >= 1.0, < 2.0 frozenlist >= 1.1.1 aiosignal >= 1.1.2 @@ -61,8 +61,10 @@ install_requires = [options.extras_require] speedups = - aiodns >= 1.1 + # required c-ares (aiodns' backend) will not build on windows + aiodns >= 1.1; sys_platform=="linux" or sys_platform=="darwin" Brotli + # cchardet is unmaintained: aio-libs/aiohttp#6819 cchardet; python_version < "3.10" [options.packages.find] @@ -93,7 +95,7 @@ per-file-ignores = # flake8-requirements known-modules = proxy.py:[proxy] -requirements-file = requirements/test.txt +requirements-file = requirements/test.in requirements-max-depth = 4 [isort]