Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump tools and deps #92

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
22 changes: 10 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.3",
"hatchling>=1.17.1",
"hatchling>=1.18",
]

[project]
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/pyproject_api/_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+)
Expand Down
7 changes: 2 additions & 5 deletions tests/test_frontend_setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down