diff options
author | Bernát Gábor <gaborjbernat@gmail.com> | 2022-10-31 06:20:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 23:20:56 -0700 |
commit | f99073c9f113b0d6d34555bb8d11d99b294b127e (patch) | |
tree | 9dd7df61d285e3a76aa761db0aaa21b09fa13a63 | |
parent | c97e0b8c3a71ec33bd13a322807a10c6f733a705 (diff) | |
download | tox-git-f99073c9f113b0d6d34555bb8d11d99b294b127e.tar.gz |
Bump tools and deps (#2522)
* Bump tools and deps
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Simplify docs conf
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
-rw-r--r-- | .github/workflows/check.yml | 10 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 16 | ||||
-rw-r--r-- | .readthedocs.yml (renamed from .readthedocs.yaml) | 8 | ||||
-rw-r--r-- | pyproject.toml | 38 | ||||
-rw-r--r-- | src/tox/config/loader/memory.py | 13 | ||||
-rw-r--r-- | src/tox/journal/__init__.py | 2 | ||||
-rw-r--r-- | src/tox/report.py | 2 | ||||
-rw-r--r-- | src/tox/tox_env/api.py | 6 | ||||
-rw-r--r-- | tox.ini | 8 |
9 files changed, 51 insertions, 52 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 11e74e71..f7a2d5c0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: py: - - "3.11.0-rc.1" + - "3.11" - "3.10" - "3.9" - "3.8" @@ -30,7 +30,7 @@ jobs: - name: Setup python for tox uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -81,10 +81,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup Python 3.10 + - name: Setup Python 3.11 uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install self-tox run: python -m pip install . - name: Run check for ${{ matrix.tox_env }} @@ -100,7 +100,7 @@ jobs: - name: Setup python to build package uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install build run: python -m pip install build - uses: actions/checkout@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f6ec5ce..74e5b702 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,12 +12,12 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/add-trailing-comma - rev: v2.2.3 + rev: v2.3.0 hooks: - id: add-trailing-comma args: [--py36-plus] - repo: https://github.com/asottile/pyupgrade - rev: v2.37.3 + rev: v3.2.0 hooks: - id: pyupgrade args: ["--py37-plus"] @@ -29,7 +29,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 22.10.0 hooks: - id: black args: [--safe] @@ -37,7 +37,7 @@ repos: rev: v1.12.1 hooks: - id: blacken-docs - additional_dependencies: [black==22.8] + additional_dependencies: [black==22.10] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.9.0 hooks: @@ -52,15 +52,15 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear==22.8.23 - - flake8-comprehensions==3.10 + - flake8-bugbear==22.10.27 + - flake8-comprehensions==3.10.1 - flake8-pytest-style==1.6 - flake8-spellcheck==0.28 - - flake8-unused-arguments==0.0.11 + - flake8-unused-arguments==0.0.12 - flake8-noqa==1.2.9 - pep8-naming==0.13.2 - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v2.7.1" + rev: "v3.0.0-alpha.4" hooks: - id: prettier additional_dependencies: diff --git a/.readthedocs.yaml b/.readthedocs.yml index e853ba18..ab301130 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yml @@ -1,10 +1,9 @@ version: 2 build: - image: latest -formats: - - htmlzip + os: ubuntu-22.04 + tools: + python: "3" python: - version: 3.8 install: - method: pip path: . @@ -13,3 +12,4 @@ python: sphinx: builder: html configuration: docs/conf.py + fail_on_warning: true diff --git a/pyproject.toml b/pyproject.toml index c7b3ef08..cacc7f02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = "hatchling.build" -requires = ["hatchling>=1.8.1", "hatch-vcs>=0.2"] +requires = ["hatchling>=1.11.1", "hatch-vcs>=0.2"] [project] name = "tox" @@ -23,21 +23,21 @@ requires-python = ">=3.7" dependencies = [ "cachetools>=5.2", "chardet>=5", - "colorama>=0.4.5", + "colorama>=0.4.6", "packaging>=21.3", "platformdirs>=2.5.2", "pluggy>=1", - "pyproject-api>=0.1.1", - 'tomli>=2.0.1;python_version<"3.11"', - "virtualenv>=20.16.5", - 'importlib-metadata>=4.12; python_version < "3.8"', - 'typing-extensions>=4.3; python_version < "3.8"', + "pyproject-api>=1.1.1", + 'tomli>=2.0.1; python_version < "3.11"', + "virtualenv>=20.16.6", + 'importlib-metadata>=5; python_version < "3.8"', + 'typing-extensions>=4.4; python_version < "3.8"', ] optional-dependencies.docs = [ - "furo>=2022.6.21", - "sphinx>=5.1.1", + "furo>=2022.9.29", + "sphinx>=5.3", "sphinx-argparse-cli>=1.10", - "sphinx-autodoc-typehints>=1.19.2", + "sphinx-autodoc-typehints>=1.19.4", "sphinx-copybutton>=0.5", "sphinx-inline-tabs>=2022.1.2b11", "sphinxcontrib-towncrier>=0.2.1a0", @@ -45,20 +45,20 @@ optional-dependencies.docs = [ ] optional-dependencies.testing = [ "covdefaults>=2.2", - "devpi-client>=6.0.1", - "devpi-server>=6.6", + "devpi-client>=6.0.2", + "devpi-server>=6.7", "distlib>=0.3.6", "filelock>=3.8", "flaky>=3.7", "hatch-vcs>=0.2", - "hatchling>=1.8.1", - "psutil>=5.9.2", - "pytest>=7.1.3", - "pytest-cov>=3", - "pytest-mock>=3.8.2", - "pytest-xdist>=2.5", + "hatchling>=1.11.1", + "psutil>=5.9.3", + "pytest>=7.2", + "pytest-cov>=4", + "pytest-mock>=3.10", + "pytest-xdist>=3.0.2", "re-assert>=1.1", - "time-machine>=2.8.1", + "time-machine>=2.8.2", ] scripts.tox = "tox.run:run" dynamic = ["version"] diff --git a/src/tox/config/loader/memory.py b/src/tox/config/loader/memory.py index 4cbe4580..03fcef6c 100644 --- a/src/tox/config/loader/memory.py +++ b/src/tox/config/loader/memory.py @@ -1,7 +1,7 @@ from __future__ import annotations from pathlib import Path -from typing import TYPE_CHECKING, Any, Iterator, TypeVar, cast +from typing import TYPE_CHECKING, Any, Iterator from tox.config.types import Command, EnvList @@ -11,7 +11,6 @@ from .str_convert import StrConvert if TYPE_CHECKING: from tox.config.main import Config -T = TypeVar("T") class MemoryLoader(Loader[Any]): @@ -19,8 +18,8 @@ class MemoryLoader(Loader[Any]): super().__init__(Section(prefix="<memory>", name=str(id(self))), []) self.raw: dict[str, Any] = {**kwargs} - def load_raw(self, key: Any, conf: Config | None, env_name: str | None) -> T: # noqa: U100 - return cast(T, self.raw[key]) + def load_raw(self, key: Any, conf: Config | None, env_name: str | None) -> Any: # noqa: U100 + return self.raw[key] def found_keys(self) -> set[str]: return set(self.raw.keys()) @@ -34,15 +33,15 @@ class MemoryLoader(Loader[Any]): return str(value) @staticmethod - def to_list(value: Any, of_type: type[Any]) -> Iterator[T]: # noqa: U100 + def to_list(value: Any, of_type: type[Any]) -> Iterator[Any]: # noqa: U100 return iter(value) @staticmethod - def to_set(value: Any, of_type: type[Any]) -> Iterator[T]: # noqa: U100 + def to_set(value: Any, of_type: type[Any]) -> Iterator[Any]: # noqa: U100 return iter(value) @staticmethod - def to_dict(value: Any, of_type: tuple[type[Any], type[Any]]) -> Iterator[tuple[T, T]]: # noqa: U100 + def to_dict(value: Any, of_type: tuple[type[Any], type[Any]]) -> Iterator[tuple[Any, Any]]: # noqa: U100 return value.items() # type: ignore[no-any-return] @staticmethod diff --git a/src/tox/journal/__init__.py b/src/tox/journal/__init__.py index decf2b81..b5609f3f 100644 --- a/src/tox/journal/__init__.py +++ b/src/tox/journal/__init__.py @@ -11,7 +11,7 @@ from .main import Journal def write_journal(path: Path | None, journal: Journal) -> None: if path is None: return - with open(path, "wt") as file_handler: + with open(path, "w") as file_handler: json.dump(journal.content, file_handler, indent=2, ensure_ascii=False) diff --git a/src/tox/report.py b/src/tox/report.py index 50bef51a..c9b97533 100644 --- a/src/tox/report.py +++ b/src/tox/report.py @@ -138,7 +138,7 @@ class ToxHandler(logging.StreamHandler): # type: ignore[type-arg] # is generic return self._local.out_err[1] @property # type: ignore[override] - def stream(self) -> IO[str]: # type: ignore[override] + def stream(self) -> IO[str]: """:return: the current stream to write to (alias for the current standard output)""" return self.stdout diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py index d9085866..55b2cb4a 100644 --- a/src/tox/tox_env/api.py +++ b/src/tox/tox_env/api.py @@ -243,7 +243,7 @@ class ToxEnv(ABC): finally: self._run_state["teardown"] = True - def _teardown(self) -> None: + def _teardown(self) -> None: # noqa: B027 # empty abstract base class pass def _platform_check(self) -> None: @@ -270,10 +270,10 @@ class ToxEnv(ABC): raise Recreate(f"env type changed from {old} to {conf}") self._handle_env_tmp_dir() - def _setup_with_env(self) -> None: + def _setup_with_env(self) -> None: # noqa: B027 # empty abstract base class pass - def _done_with_setup(self) -> None: + def _done_with_setup(self) -> None: # noqa: B027 # empty abstract base class """called when setup is done""" def _handle_env_tmp_dir(self) -> None: @@ -56,7 +56,7 @@ description = run type check on code base setenv = {tty:MYPY_FORCE_COLOR = 1} deps = - mypy==0.971 + mypy==0.982 types-cachetools>=5.2.1 types-chardet>=5.0.4 commands = @@ -76,8 +76,8 @@ commands = description = check that the long description is valid skip_install = true deps = - build[virtualenv]>=0.8 - check-wheel-contents>=0.3.4 + build[virtualenv]>=0.9 + check-wheel-contents>=0.4 twine>=4.0.1 commands = python -m build -o {envtmpdir} -s -w . @@ -88,7 +88,7 @@ commands = description = do a release, required posarg of the version number skip_install = true deps = - gitpython>=3.1.27 + gitpython>=3.1.29 packaging>=21.3 towncrier>=22.8 commands = |