Skip to content

Commit

Permalink
Bump tools and deps (#92)
Browse files Browse the repository at this point in the history
gaborbernat authored Aug 7, 2023
1 parent ac47dea commit 91cb132
Showing 6 changed files with 20 additions and 31 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -18,12 +18,11 @@ jobs:
fail-fast: false
matrix:
py:
- "3.12.0-beta.1"
- "3.12.0-rc.1"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
os:
- ubuntu-latest
- windows-latest
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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,17 +23,17 @@ 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"]
- repo: https://github.com/asottile/blacken-docs
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:
22 changes: 10 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]" }]
authors = [{ name = "Bernát Gábor", email = "[email protected]" }]
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,17 @@ 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.24",
]
optional-dependencies.testing = [
"covdefaults>=2.3",
'importlib-metadata>=6.6; python_version < "3.8"',
"pytest>=7.3.1",
"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 +72,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
7 changes: 1 addition & 6 deletions src/pyproject_api/_frontend.py
Original file line number Diff line number Diff line change
@@ -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+)
7 changes: 2 additions & 5 deletions tests/test_frontend_setuptools.py
Original file line number Diff line number Diff line change
@@ -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 (<py38)
from importlib_metadata import Distribution, EntryPoint
from importlib.metadata import Distribution, EntryPoint


@pytest.fixture(scope="session")
@@ -78,7 +75,7 @@ def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: Subpro
assert dist.metadata["Name"] == "demo"
values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"] # type: ignore[attr-defined]
# ignore because "PackageMetadata" has no attribute "items"
assert values == ["requests (>2)", "magic (>3)"]
assert values == ["requests >2", "magic >3"]
assert isinstance(result.out, str)
assert isinstance(result.err, str)

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ labels = test
description = run formatter and linters
skip_install = true
deps =
pre-commit>=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 =

0 comments on commit 91cb132

Please sign in to comment.