From 5dd4a1c4aa495a3d5e652169ab45f73842e441c9 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Thu, 30 Mar 2023 23:19:29 +0200 Subject: [PATCH] Drop Python 3.6 (#107) --- .github/workflows/tests.yml | 10 ++- powrap/powrap.py | 8 +- requirements-dev.in | 9 -- requirements-dev.txt | 166 ++---------------------------------- tox.ini | 2 +- 5 files changed, 19 insertions(+), 176 deletions(-) delete mode 100644 requirements-dev.in diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 971ebfc..af784e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,14 +15,16 @@ jobs: strategy: matrix: tox: - - py_version: '3.6' - env: py36 - py_version: '3.7' env: py37 - py_version: '3.8' - env: py38,flake8,mypy,black,pylint,pydocstyle + env: py38 - py_version: '3.9' env: py39 + - py_version: '3.10' + env: py310 + - py_version: '3.11' + env: py311,flake8,mypy,black,pylint,pydocstyle steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -39,4 +41,4 @@ jobs: - name: Install tox run: python3 -m pip install tox - name: Run tox - run: tox -q -p all -e ${{ matrix.tox.env }} + run: tox -q -e ${{ matrix.tox.env }} diff --git a/powrap/powrap.py b/powrap/powrap.py index 393a0f0..579acbc 100644 --- a/powrap/powrap.py +++ b/powrap/powrap.py @@ -80,16 +80,14 @@ def parse_args(): def path(path_str): path_obj = Path(path_str) if not path_obj.exists(): - raise argparse.ArgumentTypeError( - "File {!r} does not exists.".format(path_str) - ) + raise argparse.ArgumentTypeError(f"File {path_str!r} does not exists.") if not path_obj.is_file(): - raise argparse.ArgumentTypeError("{!r} is not a file.".format(path_str)) + raise argparse.ArgumentTypeError(f"{path_str!r} is not a file.") try: path_obj.read_text(encoding="utf-8") except PermissionError as read_error: raise argparse.ArgumentTypeError( - "{!r}: Permission denied.".format(path_str) + "{path_str!r}: Permission denied." ) from read_error return path_obj diff --git a/requirements-dev.in b/requirements-dev.in deleted file mode 100644 index 56dfdaf..0000000 --- a/requirements-dev.in +++ /dev/null @@ -1,9 +0,0 @@ --r requirements.txt -black -flake8 -mypy -pip-tools -pylint -pytest -tox -twine diff --git a/requirements-dev.txt b/requirements-dev.txt index 172a9ae..56dfdaf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,157 +1,9 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile requirements-dev.in -# -appdirs==1.4.4 - # via - # black - # virtualenv -astroid==2.5.6 - # via pylint -attrs==21.2.0 - # via pytest -black==21.5b2 - # via -r requirements-dev.in -bleach==3.3.0 - # via readme-renderer -certifi==2021.5.30 - # via requests -cffi==1.14.5 - # via cryptography -chardet==4.0.0 - # via requests -click==8.0.1 - # via - # black - # pip-tools -colorama==0.4.4 - # via twine -cryptography==3.4.7 - # via secretstorage -distlib==0.3.2 - # via virtualenv -docutils==0.17.1 - # via readme-renderer -filelock==3.0.12 - # via - # tox - # virtualenv -flake8==3.9.2 - # via -r requirements-dev.in -idna==2.10 - # via requests -importlib-metadata==4.5.0 - # via - # keyring - # twine -iniconfig==1.1.1 - # via pytest -isort==5.8.0 - # via pylint -jeepney==0.6.0 - # via - # keyring - # secretstorage -keyring==23.0.1 - # via twine -lazy-object-proxy==1.6.0 - # via astroid -mccabe==0.6.1 - # via - # flake8 - # pylint -mypy-extensions==0.4.3 - # via - # black - # mypy -mypy==0.812 - # via -r requirements-dev.in -packaging==20.9 - # via - # bleach - # pytest - # tox -pathspec==0.8.1 - # via black -pep517==0.10.0 - # via pip-tools -pip-tools==6.1.0 - # via -r requirements-dev.in -pkginfo==1.7.0 - # via twine -pluggy==0.13.1 - # via - # pytest - # tox -py==1.10.0 - # via - # pytest - # tox -pycodestyle==2.7.0 - # via flake8 -pycparser==2.20 - # via cffi -pyflakes==2.3.1 - # via flake8 -pygments==2.9.0 - # via readme-renderer -pylint==2.8.3 - # via -r requirements-dev.in -pyparsing==2.4.7 - # via packaging -pytest==6.2.4 - # via -r requirements-dev.in -readme-renderer==29.0 - # via twine -regex==2021.4.4 - # via black -requests-toolbelt==0.9.1 - # via twine -requests==2.25.1 - # via - # requests-toolbelt - # twine -rfc3986==1.5.0 - # via twine -secretstorage==3.3.1 - # via keyring -six==1.16.0 - # via - # bleach - # readme-renderer - # tox - # virtualenv -toml==0.10.2 - # via - # black - # pep517 - # pylint - # pytest - # tox -tox==3.23.1 - # via -r requirements-dev.in -tqdm==4.61.0 - # via - # -r requirements.txt - # twine -twine==3.4.1 - # via -r requirements-dev.in -typed-ast==1.4.3 - # via mypy -typing-extensions==3.10.0.0 - # via mypy -urllib3==1.26.5 - # via requests -virtualenv==20.4.7 - # via tox -webencodings==0.5.1 - # via bleach -wrapt==1.12.1 - # via astroid -zipp==3.4.1 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -# pip +-r requirements.txt +black +flake8 +mypy +pip-tools +pylint +pytest +tox +twine diff --git a/tox.ini b/tox.ini index 11de525..9d88e27 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ ignore = E203 max-line-length = 88 [tox] -envlist = py36, py37, py38, py39, py310, flake8, mypy, black, pydocstyle +envlist = py37, py38, py39, py310, py311, flake8, mypy, black, pydocstyle isolated_build = True skip_missing_interpreters = True