From fcf256a0021ca126af7fbc0127bc203f6bff1551 Mon Sep 17 00:00:00 2001 From: Igor Davydenko Date: Thu, 23 Nov 2023 15:02:51 +0100 Subject: [PATCH] build: Monthly maintenance (Nov 2023) Update dev Python version to 3.11.6, as well as bump GitHub Actions and pre-commit hooks to use. --- .github/actions/install_badabump/action.yml | 2 +- .../install_python_and_poetry/action.yml | 4 +- .github/actions/run_pre_commit/action.yml | 2 +- .github/actions/run_tox/action.yml | 2 +- .github/workflows/ci.yml | 4 +- .github/workflows/ci_package.yml | 4 +- .github/workflows/ci_release.yml | 2 +- .github/workflows/ci_verify_docs_build.yml | 2 +- .github/workflows/release_pr.yml | 6 +- .github/workflows/release_tag.yml | 4 +- .pre-commit-config.yaml | 30 ++-- .python-version | 2 +- poetry.lock | 150 ++++++------------ pyproject.toml | 10 +- src/aiohttp_middlewares/annotations.py | 6 +- 15 files changed, 86 insertions(+), 144 deletions(-) diff --git a/.github/actions/install_badabump/action.yml b/.github/actions/install_badabump/action.yml index 32fc523..90bc57d 100644 --- a/.github/actions/install_badabump/action.yml +++ b/.github/actions/install_badabump/action.yml @@ -12,7 +12,7 @@ runs: steps: - id: "python" name: "Install Python" - uses: "actions/setup-python@v4.5.0" + uses: "actions/setup-python@v4.7.1" with: python-version-file: ".python-version" diff --git a/.github/actions/install_python_and_poetry/action.yml b/.github/actions/install_python_and_poetry/action.yml index 347c897..78cd9da 100644 --- a/.github/actions/install_python_and_poetry/action.yml +++ b/.github/actions/install_python_and_poetry/action.yml @@ -39,7 +39,7 @@ runs: steps: - id: "python" name: "Install Python" - uses: "actions/setup-python@v4.5.0" + uses: "actions/setup-python@v4.7.1" with: python-version: "${{ inputs.python-version }}" python-version-file: "${{ inputs.python-version-file }}" @@ -49,7 +49,7 @@ runs: run: "pipx install --python='${{ steps.python.outputs.python-path }}' poetry==${{ inputs.poetry-version }}" - name: "Cache venv" - uses: "actions/cache@v3.3.1" + uses: "actions/cache@v3.3.2" with: path: "./.venv/" key: "venv-${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}${{ inputs.cache-key-suffix }}" diff --git a/.github/actions/run_pre_commit/action.yml b/.github/actions/run_pre_commit/action.yml index 3091a75..e1e87e5 100644 --- a/.github/actions/run_pre_commit/action.yml +++ b/.github/actions/run_pre_commit/action.yml @@ -14,7 +14,7 @@ runs: shell: "bash" - name: "Cache mypy" - uses: "actions/cache@v3.3.1" + uses: "actions/cache@v3.3.2" with: path: "./.mypy_cache/" key: "mypy-${{ runner.os }}-${{ inputs.python-version }}" diff --git a/.github/actions/run_tox/action.yml b/.github/actions/run_tox/action.yml index 2c6b97c..3d7ca35 100644 --- a/.github/actions/run_tox/action.yml +++ b/.github/actions/run_tox/action.yml @@ -41,7 +41,7 @@ runs: shell: "bash" - name: "Cache tox" - uses: "actions/cache@v3.3.1" + uses: "actions/cache@v3.3.2" with: path: ".tox/" key: "tox-${{ inputs.python-version }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d61360..d9fb96a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: runs-on: "${{ matrix.os }}" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" - id: "python_and_poetry" uses: "./.github/actions/install_python_and_poetry" @@ -59,7 +59,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" - id: "python_and_poetry" uses: "./.github/actions/install_python_and_poetry" diff --git a/.github/workflows/ci_package.yml b/.github/workflows/ci_package.yml index 9efcf83..af6577d 100644 --- a/.github/workflows/ci_package.yml +++ b/.github/workflows/ci_package.yml @@ -25,7 +25,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" - id: "python_and_poetry" uses: "./.github/actions/install_python_and_poetry" @@ -43,7 +43,7 @@ jobs: - name: "Publish package" if: "${{ startsWith(github.ref, 'refs/tags/') }}" - uses: "pypa/gh-action-pypi-publish@v1.8.4" + uses: "pypa/gh-action-pypi-publish@v1.8.10" with: user: "${{ secrets.pypi-user }}" password: "${{ secrets.pypi-password }}" diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index fed3433..5f0a5dd 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -14,7 +14,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" - name: "Fetch git data" run: | diff --git a/.github/workflows/ci_verify_docs_build.yml b/.github/workflows/ci_verify_docs_build.yml index 6731770..b9dbfeb 100644 --- a/.github/workflows/ci_verify_docs_build.yml +++ b/.github/workflows/ci_verify_docs_build.yml @@ -14,7 +14,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" - id: "python_and_poetry" uses: "./.github/actions/install_python_and_poetry" diff --git a/.github/workflows/release_pr.yml b/.github/workflows/release_pr.yml index e449bfc..a96796c 100644 --- a/.github/workflows/release_pr.yml +++ b/.github/workflows/release_pr.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" with: ref: "main" @@ -41,13 +41,13 @@ jobs: run: "badabump --ci ${{ github.event.inputs.args }}" - id: "token" - uses: "tibdex/github-app-token@v1.8.0" + uses: "tibdex/github-app-token@v2.1.0" with: app_id: "${{ secrets.BADABUMP_APP_ID }}" private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}" - name: "Create pull request with changed files" - uses: "peter-evans/create-pull-request@v4.2.4" + uses: "peter-evans/create-pull-request@v5.0.2" with: token: "${{ steps.token.outputs.token }}" commit-message: | diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 9375b29..eca2d01 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -20,12 +20,12 @@ jobs: steps: - id: "token" - uses: "tibdex/github-app-token@v1.8.0" + uses: "tibdex/github-app-token@v2.1.0" with: app_id: "${{ secrets.BADABUMP_APP_ID }}" private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}" - - uses: "actions/checkout@v3.5.0" + - uses: "actions/checkout@v4.1.1" with: ref: "main" token: "${{ steps.token.outputs.token }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a608ee..53fe5c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,9 +2,10 @@ default_language_version: python: &python_version "python3.11" exclude: ^(archive|assets|migrations)/.*|.*/(migrations|test-data|vendor)/.*|.*\.svg$ minimum_pre_commit_version: "1.17.0" + repos: - repo: "https://github.com/commitizen-tools/commitizen" - rev: "v2.42.1" + rev: "3.12.0" hooks: - id: "commitizen" # By default commitizen using `python3` language version, so @@ -26,14 +27,14 @@ repos: exclude: ^docs/.*$ - repo: "https://github.com/psf/black" - rev: "23.3.0" + rev: "23.11.0" hooks: - id: "black" name: "Format code (black)" exclude: ^docs/.*$ - repo: "https://github.com/asottile/blacken-docs" - rev: "1.13.0" + rev: "1.16.0" hooks: - id: "blacken-docs" name: "Format docs (blacken-docs)" @@ -42,7 +43,7 @@ repos: - "black==23.3.0" - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v4.4.0" + rev: "v4.5.0" hooks: - id: "end-of-file-fixer" - id: "trailing-whitespace" @@ -60,27 +61,28 @@ repos: - id: "rst-inline-touching-normal" - repo: "https://github.com/PyCQA/flake8" - rev: "6.0.0" + rev: "6.1.0" hooks: - id: "flake8" name: "Lint code (flake8)" additional_dependencies: &flake8_additional_dependencies - - "flake8-bugbear==23.3.23" - - "flake8-builtins==2.1.0" - - "flake8-comprehensions==3.11.1" - - "flake8-isort==6.0.0" + - "flake8-bugbear==23.9.16" + - "flake8-builtins==2.2.0" + - "flake8-comprehensions==3.14.0" + - "flake8-implicit-str-concat==0.4.0" + - "flake8-isort==6.1.1" - "flake8-mutable==1.2.0" - "flake8-pie==0.16.0" - "flake8-quotes==3.3.2" - "flake8-string-format==0.3.0" - - "flake8-tidy-imports==4.8.0" - - "flake8-variables-names==0.0.5" - - "flake8==6.0.0" + - "flake8-tidy-imports==4.10.0" + - "flake8-variables-names==0.0.6" + - "flake8==6.1.0" - "pep8-naming==0.13.3" exclude: ^docs/.*$ - repo: "https://github.com/asottile/yesqa" - rev: "v1.4.0" + rev: "v1.5.0" hooks: - id: "yesqa" name: "Lint code (yesqa)" @@ -98,7 +100,7 @@ repos: exclude: ^(.*/)?(docs|migrations|tests)/.*$ - repo: "https://github.com/shellcheck-py/shellcheck-py" - rev: "v0.9.0.2" + rev: "v0.9.0.6" hooks: - id: "shellcheck" name: "Lint scripts (shellcheck)" diff --git a/.python-version b/.python-version index 1e33456..375f5ca 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11.2 +3.11.6 diff --git a/poetry.lock b/poetry.lock index 9d4a9ee..3bdc2da 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. [[package]] name = "aiohttp" version = "3.8.4" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -115,7 +114,6 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -130,7 +128,6 @@ frozenlist = ">=1.1.0" name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -142,7 +139,6 @@ files = [ name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -157,7 +153,6 @@ typing-extensions = {version = ">=3.6.5", markers = "python_version < \"3.8\""} name = "asynctest" version = "0.13.0" description = "Enhance the standard unittest package with features for testing asyncio libraries" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -169,7 +164,6 @@ files = [ name = "attrs" version = "22.2.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -188,7 +182,6 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy name = "babel" version = "2.12.1" description = "Internationalization utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -203,7 +196,6 @@ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} name = "beautifulsoup4" version = "4.12.0" description = "Screen-scraping library" -category = "dev" optional = false python-versions = ">=3.6.0" files = [ @@ -222,7 +214,6 @@ lxml = ["lxml"] name = "certifi" version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -234,7 +225,6 @@ files = [ name = "charset-normalizer" version = "3.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -319,7 +309,6 @@ files = [ name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -331,7 +320,6 @@ files = [ name = "coverage" version = "6.5.0" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -397,7 +385,6 @@ toml = ["tomli"] name = "coveralls" version = "3.3.1" description = "Show coverage stats online via coveralls.io" -category = "dev" optional = false python-versions = ">= 3.5" files = [ @@ -406,7 +393,7 @@ files = [ ] [package.dependencies] -coverage = ">=4.1,<6.0.0 || >6.1,<6.1.1 || >6.1.1,<7.0" +coverage = ">=4.1,<6.0.dev0 || >6.1,<6.1.1 || >6.1.1,<7.0" docopt = ">=0.6.1" requests = ">=1.0.0" @@ -417,7 +404,6 @@ yaml = ["PyYAML (>=3.10)"] name = "docopt" version = "0.6.2" description = "Pythonic argument parser, that will make you smile" -category = "dev" optional = false python-versions = "*" files = [ @@ -428,7 +414,6 @@ files = [ name = "docutils" version = "0.19" description = "Docutils -- Python Documentation Utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -440,7 +425,6 @@ files = [ name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -455,7 +439,6 @@ test = ["pytest (>=6)"] name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -539,7 +522,6 @@ files = [ name = "furo" version = "2023.3.27" description = "A clean customisable Sphinx documentation theme." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -557,7 +539,6 @@ sphinx-basic-ng = "*" name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -569,7 +550,6 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -581,7 +561,6 @@ files = [ name = "importlib-metadata" version = "6.1.0" description = "Read metadata from Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -602,7 +581,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -614,7 +592,6 @@ files = [ name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -632,7 +609,6 @@ i18n = ["Babel (>=2.7)"] name = "livereload" version = "2.6.3" description = "Python LiveReload is an awesome tool for web developers" -category = "dev" optional = false python-versions = "*" files = [ @@ -648,7 +624,6 @@ tornado = {version = "*", markers = "python_version > \"2.7\""} name = "markupsafe" version = "2.1.2" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -708,7 +683,6 @@ files = [ name = "multidict" version = "6.0.4" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -790,45 +764,44 @@ files = [ [[package]] name = "mypy" -version = "1.1.1" +version = "1.4.1" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mypy-1.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39c7119335be05630611ee798cc982623b9e8f0cff04a0b48dfc26100e0b97af"}, - {file = "mypy-1.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:61bf08362e93b6b12fad3eab68c4ea903a077b87c90ac06c11e3d7a09b56b9c1"}, - {file = "mypy-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbb19c9f662e41e474e0cff502b7064a7edc6764f5262b6cd91d698163196799"}, - {file = "mypy-1.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:315ac73cc1cce4771c27d426b7ea558fb4e2836f89cb0296cbe056894e3a1f78"}, - {file = "mypy-1.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:5cb14ff9919b7df3538590fc4d4c49a0f84392237cbf5f7a816b4161c061829e"}, - {file = "mypy-1.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:26cdd6a22b9b40b2fd71881a8a4f34b4d7914c679f154f43385ca878a8297389"}, - {file = "mypy-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b5f81b40d94c785f288948c16e1f2da37203c6006546c5d947aab6f90aefef2"}, - {file = "mypy-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21b437be1c02712a605591e1ed1d858aba681757a1e55fe678a15c2244cd68a5"}, - {file = "mypy-1.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d809f88734f44a0d44959d795b1e6f64b2bbe0ea4d9cc4776aa588bb4229fc1c"}, - {file = "mypy-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:a380c041db500e1410bb5b16b3c1c35e61e773a5c3517926b81dfdab7582be54"}, - {file = "mypy-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b7c7b708fe9a871a96626d61912e3f4ddd365bf7f39128362bc50cbd74a634d5"}, - {file = "mypy-1.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1c10fa12df1232c936830839e2e935d090fc9ee315744ac33b8a32216b93707"}, - {file = "mypy-1.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0a28a76785bf57655a8ea5eb0540a15b0e781c807b5aa798bd463779988fa1d5"}, - {file = "mypy-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:ef6a01e563ec6a4940784c574d33f6ac1943864634517984471642908b30b6f7"}, - {file = "mypy-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d64c28e03ce40d5303450f547e07418c64c241669ab20610f273c9e6290b4b0b"}, - {file = "mypy-1.1.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:64cc3afb3e9e71a79d06e3ed24bb508a6d66f782aff7e56f628bf35ba2e0ba51"}, - {file = "mypy-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce61663faf7a8e5ec6f456857bfbcec2901fbdb3ad958b778403f63b9e606a1b"}, - {file = "mypy-1.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2b0c373d071593deefbcdd87ec8db91ea13bd8f1328d44947e88beae21e8d5e9"}, - {file = "mypy-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:2888ce4fe5aae5a673386fa232473014056967f3904f5abfcf6367b5af1f612a"}, - {file = "mypy-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:19ba15f9627a5723e522d007fe708007bae52b93faab00f95d72f03e1afa9598"}, - {file = "mypy-1.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:59bbd71e5c58eed2e992ce6523180e03c221dcd92b52f0e792f291d67b15a71c"}, - {file = "mypy-1.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9401e33814cec6aec8c03a9548e9385e0e228fc1b8b0a37b9ea21038e64cdd8a"}, - {file = "mypy-1.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4b398d8b1f4fba0e3c6463e02f8ad3346f71956b92287af22c9b12c3ec965a9f"}, - {file = "mypy-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:69b35d1dcb5707382810765ed34da9db47e7f95b3528334a3c999b0c90fe523f"}, - {file = "mypy-1.1.1-py3-none-any.whl", hash = "sha256:4e4e8b362cdf99ba00c2b218036002bdcdf1e0de085cdb296a49df03fb31dfc4"}, - {file = "mypy-1.1.1.tar.gz", hash = "sha256:ae9ceae0f5b9059f33dbc62dea087e942c0ccab4b7a003719cb70f9b8abfa32f"}, + {file = "mypy-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:566e72b0cd6598503e48ea610e0052d1b8168e60a46e0bfd34b3acf2d57f96a8"}, + {file = "mypy-1.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca637024ca67ab24a7fd6f65d280572c3794665eaf5edcc7e90a866544076878"}, + {file = "mypy-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dde1d180cd84f0624c5dcaaa89c89775550a675aff96b5848de78fb11adabcd"}, + {file = "mypy-1.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8c4d8e89aa7de683e2056a581ce63c46a0c41e31bd2b6d34144e2c80f5ea53dc"}, + {file = "mypy-1.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:bfdca17c36ae01a21274a3c387a63aa1aafe72bff976522886869ef131b937f1"}, + {file = "mypy-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7549fbf655e5825d787bbc9ecf6028731973f78088fbca3a1f4145c39ef09462"}, + {file = "mypy-1.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:98324ec3ecf12296e6422939e54763faedbfcc502ea4a4c38502082711867258"}, + {file = "mypy-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:141dedfdbfe8a04142881ff30ce6e6653c9685b354876b12e4fe6c78598b45e2"}, + {file = "mypy-1.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8207b7105829eca6f3d774f64a904190bb2231de91b8b186d21ffd98005f14a7"}, + {file = "mypy-1.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:16f0db5b641ba159eff72cff08edc3875f2b62b2fa2bc24f68c1e7a4e8232d01"}, + {file = "mypy-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:470c969bb3f9a9efcedbadcd19a74ffb34a25f8e6b0e02dae7c0e71f8372f97b"}, + {file = "mypy-1.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5952d2d18b79f7dc25e62e014fe5a23eb1a3d2bc66318df8988a01b1a037c5b"}, + {file = "mypy-1.4.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:190b6bab0302cec4e9e6767d3eb66085aef2a1cc98fe04936d8a42ed2ba77bb7"}, + {file = "mypy-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9d40652cc4fe33871ad3338581dca3297ff5f2213d0df345bcfbde5162abf0c9"}, + {file = "mypy-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:01fd2e9f85622d981fd9063bfaef1aed6e336eaacca00892cd2d82801ab7c042"}, + {file = "mypy-1.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2460a58faeea905aeb1b9b36f5065f2dc9a9c6e4c992a6499a2360c6c74ceca3"}, + {file = "mypy-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2746d69a8196698146a3dbe29104f9eb6a2a4d8a27878d92169a6c0b74435b6"}, + {file = "mypy-1.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ae704dcfaa180ff7c4cfbad23e74321a2b774f92ca77fd94ce1049175a21c97f"}, + {file = "mypy-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:43d24f6437925ce50139a310a64b2ab048cb2d3694c84c71c3f2a1626d8101dc"}, + {file = "mypy-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c482e1246726616088532b5e964e39765b6d1520791348e6c9dc3af25b233828"}, + {file = "mypy-1.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43b592511672017f5b1a483527fd2684347fdffc041c9ef53428c8dc530f79a3"}, + {file = "mypy-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34a9239d5b3502c17f07fd7c0b2ae6b7dd7d7f6af35fbb5072c6208e76295816"}, + {file = "mypy-1.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5703097c4936bbb9e9bce41478c8d08edd2865e177dc4c52be759f81ee4dd26c"}, + {file = "mypy-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:e02d700ec8d9b1859790c0475df4e4092c7bf3272a4fd2c9f33d87fac4427b8f"}, + {file = "mypy-1.4.1-py3-none-any.whl", hash = "sha256:45d32cec14e7b97af848bddd97d85ea4f0db4d5a149ed9676caa4eb2f7402bb4"}, + {file = "mypy-1.4.1.tar.gz", hash = "sha256:9bbcd9ab8ea1f2e1c8031c21445b511442cc45c89951e49bbf852cbb70755b1b"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} -typing-extensions = ">=3.10" +typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -840,7 +813,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -852,7 +824,6 @@ files = [ name = "packaging" version = "23.0" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -864,7 +835,6 @@ files = [ name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -883,7 +853,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pygments" version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -896,18 +865,16 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.2.2" +version = "7.4.3" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.2.2-py3-none-any.whl", hash = "sha256:130328f552dcfac0b1cec75c12e3f005619dc5f874f0a06e8ff7263f0ee6225e"}, - {file = "pytest-7.2.2.tar.gz", hash = "sha256:c99ab0c73aceb050f68929bc93af19ab6db0558791c6a0715723abe9d0ade9d4"}, + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -917,18 +884,17 @@ pluggy = ">=0.12,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-aiohttp" -version = "1.0.4" +version = "1.0.5" description = "Pytest plugin for aiohttp support" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-aiohttp-1.0.4.tar.gz", hash = "sha256:39ff3a0d15484c01d1436cbedad575c6eafbf0f57cdf76fb94994c97b5b8c5a4"}, - {file = "pytest_aiohttp-1.0.4-py3-none-any.whl", hash = "sha256:1d2dc3a304c2be1fd496c0c2fb6b31ab60cd9fc33984f761f951f8ea1eb4ca95"}, + {file = "pytest-aiohttp-1.0.5.tar.gz", hash = "sha256:880262bc5951e934463b15e3af8bb298f11f7d4d3ebac970aab425aff10a780a"}, + {file = "pytest_aiohttp-1.0.5-py3-none-any.whl", hash = "sha256:63a5360fd2f34dda4ab8e6baee4c5f5be4cd186a403cabd498fced82ac9c561e"}, ] [package.dependencies] @@ -941,14 +907,13 @@ testing = ["coverage (==6.2)", "mypy (==0.931)"] [[package]] name = "pytest-asyncio" -version = "0.21.0" +version = "0.21.1" description = "Pytest support for asyncio" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-asyncio-0.21.0.tar.gz", hash = "sha256:2b38a496aef56f56b0e87557ec313e11e1ab9276fc3863f6a7be0f1d0e415e1b"}, - {file = "pytest_asyncio-0.21.0-py3-none-any.whl", hash = "sha256:f2b3366b7cd501a4056858bd39349d5af19742aed2d81660b7998b6341c7eb9c"}, + {file = "pytest-asyncio-0.21.1.tar.gz", hash = "sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d"}, + {file = "pytest_asyncio-0.21.1-py3-none-any.whl", hash = "sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b"}, ] [package.dependencies] @@ -961,14 +926,13 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy [[package]] name = "pytest-cov" -version = "4.0.0" +version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"}, - {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"}, + {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, + {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, ] [package.dependencies] @@ -982,7 +946,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytz" version = "2023.3" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -994,7 +957,6 @@ files = [ name = "requests" version = "2.28.2" description = "Python HTTP for Humans." -category = "dev" optional = false python-versions = ">=3.7, <4" files = [ @@ -1016,7 +978,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1028,7 +989,6 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" optional = false python-versions = "*" files = [ @@ -1040,7 +1000,6 @@ files = [ name = "soupsieve" version = "2.4" description = "A modern CSS selector implementation for Beautiful Soup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1052,7 +1011,6 @@ files = [ name = "sphinx" version = "5.3.0" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1088,7 +1046,6 @@ test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] name = "sphinx-autobuild" version = "2021.3.14" description = "Rebuild Sphinx documentation on changes, with live-reload in the browser." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1108,7 +1065,6 @@ test = ["pytest", "pytest-cov"] name = "sphinx-autodoc-typehints" version = "1.22" description = "Type hints (PEP 484) support for the Sphinx autodoc extension" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1128,7 +1084,6 @@ type-comment = ["typed-ast (>=1.5.4)"] name = "sphinx-basic-ng" version = "1.0.0b1" description = "A modern skeleton for Sphinx themes." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1146,7 +1101,6 @@ docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-ta name = "sphinx-copybutton" version = "0.5.1" description = "Add a copy button to each of your code cells." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1165,7 +1119,6 @@ rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1181,7 +1134,6 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1197,7 +1149,6 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1213,7 +1164,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1228,7 +1178,6 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1244,7 +1193,6 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1260,7 +1208,6 @@ test = ["pytest"] name = "sphinxext-opengraph" version = "0.7.5" description = "Sphinx Extension to enable OGP support" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1275,7 +1222,6 @@ sphinx = ">=4.0" name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1287,7 +1233,6 @@ files = [ name = "tornado" version = "6.2" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "dev" optional = false python-versions = ">= 3.7" files = [ @@ -1308,7 +1253,6 @@ files = [ name = "typed-ast" version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1342,7 +1286,6 @@ files = [ name = "typing-extensions" version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1354,7 +1297,6 @@ files = [ name = "urllib3" version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -1371,7 +1313,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "yarl" version = "1.8.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1460,7 +1401,6 @@ typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1475,4 +1415,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "e5d44865a168eb545b3a5bb048595395e535170b2ae71f7fab78d010afc8fa8d" +content-hash = "8345a8b328822988f1ba0449e1daf96dead899c5f9d23a988e68f4fbafa46e96" diff --git a/pyproject.toml b/pyproject.toml index 457097f..c46c20a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ async-timeout = "^4.0.2" yarl = "^1.5.1" [tool.poetry.group.dev.dependencies] -mypy = "^1.1.1" +mypy = "~1.4.1" [tool.poetry.group.docs.dependencies] furo = "^2023.3.27" @@ -108,10 +108,10 @@ sphinxext-opengraph = "^0.7.5" [tool.poetry.group.test.dependencies] coverage = "^6.5.0" coveralls = "^3.3.1" -pytest = "^7.2.2" -pytest-aiohttp = "^1.0.4" -pytest-asyncio = "^0.21.0" -pytest-cov = "^4.0.0" +pytest = "^7.4.3" +pytest-aiohttp = "^1.0.5" +pytest-asyncio = "^0.21.1" +pytest-cov = "^4.1.0" [tool.pytest.ini_options] minversion = "7.2.0" diff --git a/src/aiohttp_middlewares/annotations.py b/src/aiohttp_middlewares/annotations.py index 80badee..2e2bb2c 100644 --- a/src/aiohttp_middlewares/annotations.py +++ b/src/aiohttp_middlewares/annotations.py @@ -8,7 +8,6 @@ """ import importlib - from typing import ( Any, Awaitable, @@ -23,12 +22,13 @@ from aiohttp import web from yarl import URL + try: # (<3.9.0) Try to import Middleware from aiohttp.web_middlewares - Middleware = importlib.import_module('aiohttp.web_middlewares')._Middleware + Middleware = importlib.import_module("aiohttp.web_middlewares")._Middleware except AttributeError: # (>=3.9.0) If that fails, import Middleware from aiohttp.typedefs - Middleware = importlib.import_module('aiohttp.typedefs').Middleware + Middleware = importlib.import_module("aiohttp.typedefs").Middleware # Make flake8 happy (Middleware,)