From 4c200320366eb8d8925ddae554881b227e6d5ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Mon, 7 Aug 2023 10:14:32 -0700 Subject: [PATCH] Bump tools and deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- .pre-commit-config.yaml | 8 ++++---- pyproject.toml | 23 +++++++++++------------ src/pyproject_api/_frontend.py | 7 +------ tests/test_frontend_setuptools.py | 5 +---- tox.ini | 4 ++-- 5 files changed, 19 insertions(+), 28 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dadc76a..6ff3e11 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.280" + rev: "v0.0.282" hooks: - id: ruff exclude: src/pyproject_api/_backend.py @@ -23,9 +23,9 @@ repos: rev: "0.13.0" hooks: - id: pyproject-fmt - additional_dependencies: ["tox>=4.6"] + additional_dependencies: ["tox>=4.6.4"] - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0" + rev: "v3.0.1" hooks: - id: prettier args: ["--print-width=120", "--prose-wrap=always"] @@ -33,7 +33,7 @@ repos: rev: 1.15.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.3] + additional_dependencies: [black==23.7] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index aa1646a..2ecc7a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs>=0.3", - "hatchling>=1.17.1", + "hatchling>=1.18", ] [project] @@ -19,7 +19,7 @@ keywords = [ license = "MIT" maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }] authors = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: tox", @@ -29,7 +29,6 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -47,18 +46,18 @@ dependencies = [ 'tomli>=2.0.1; python_version < "3.11"', ] optional-dependencies.docs = [ - "furo>=2023.5.20", - "sphinx>=7.0.1", - "sphinx-autodoc-typehints!=1.23.4,>=1.23", + "furo>=2023.7.26", + "sphinx>=7.1.2", + "sphinx-autodoc-typehints!=1.23.4,>=1.24", ] optional-dependencies.testing = [ "covdefaults>=2.3", - 'importlib-metadata>=6.6; python_version < "3.8"', - "pytest>=7.3.1", + 'importlib-metadata>=6.8; python_version < "3.8"', + "pytest>=7.4", "pytest-cov>=4.1", - "pytest-mock>=3.10", - "setuptools>=67.8", - "wheel>=0.40", + "pytest-mock>=3.11.1", + "setuptools>=68", + "wheel>=0.41.1", ] urls.Homepage = "http://pyproject_api.readthedocs.org" urls.Source = "https://github.com/tox-dev/pyproject-api" @@ -74,7 +73,7 @@ line-length = 120 [tool.ruff] select = ["ALL"] line-length = 120 -target-version = "py37" +target-version = "py38" isort = {known-first-party = ["pyproject_api"], required-imports = ["from __future__ import annotations"]} ignore = [ "INP001", # no implicit namespaces here diff --git a/src/pyproject_api/_frontend.py b/src/pyproject_api/_frontend.py index 4bae6b3..174fa92 100644 --- a/src/pyproject_api/_frontend.py +++ b/src/pyproject_api/_frontend.py @@ -8,18 +8,13 @@ from pathlib import Path from tempfile import NamedTemporaryFile, TemporaryDirectory from time import sleep -from typing import Any, Dict, Iterator, List, NamedTuple, NoReturn, Optional, cast +from typing import Any, Dict, Iterator, List, NamedTuple, NoReturn, Optional, TypedDict, cast from zipfile import ZipFile from packaging.requirements import Requirement from pyproject_api._util import ensure_empty_dir -if sys.version_info >= (3, 8): # pragma: no cover (py38+) - from typing import TypedDict -else: # pragma: no cover (py38+) - from typing_extensions import TypedDict - if sys.version_info >= (3, 11): # pragma: no cover (py311+) import tomllib else: # pragma: no cover (py311+) diff --git a/tests/test_frontend_setuptools.py b/tests/test_frontend_setuptools.py index cb2d346..f79fbc7 100644 --- a/tests/test_frontend_setuptools.py +++ b/tests/test_frontend_setuptools.py @@ -17,10 +17,7 @@ from _pytest.tmpdir import TempPathFactory from pytest_mock import MockerFixture -if sys.version_info >= (3, 8): # pragma: no cover (py38+) - from importlib.metadata import Distribution, EntryPoint -else: # pragma: no cover (=3.3.2 + pre-commit>=3.3.3 pass_env = {[testenv]passenv} PROGRAMDATA @@ -47,7 +47,7 @@ commands = [testenv:type] description = run type check on code base deps = - mypy==1.3 + mypy==1.4.1 set_env = {tty:MYPY_FORCE_COLOR = 1} commands =