Skip to content

Commit 185bed2

Browse files
authored
chore: update pyproject.toml for PEP 621/735 (#292)
1 parent e51861b commit 185bed2

File tree

4 files changed

+51
-67
lines changed

4 files changed

+51
-67
lines changed

.github/actions/setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
default: "3.12"
88
poetry-version:
99
description: "Poetry version to install"
10-
default: "2.1.1"
10+
default: "2.2.1"
1111
cache:
1212
description: "Cache directory"
1313
default: "${{ runner.temp }}/cache"
@@ -57,4 +57,4 @@ runs:
5757
run: |
5858
poetry config cache-dir "${{ inputs.cache }}/poetry"
5959
poetry env use "${{ steps.setup-python.outputs.python-path }}"
60-
poetry install --sync
60+
poetry sync --all-groups

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ jobs:
2121
python-version: "3.7"
2222
- os: windows-latest
2323
python-version: "3.7"
24-
- os: macos-13
25-
python-version: "3.7"
24+
# TODO: re-enable macOS + Python 3.7 once off Poetry
25+
# - os: macos-15-intel
26+
# python-version: "3.7"
2627
permissions:
2728
id-token: write
2829

poetry.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
[tool.poetry]
1+
[project]
22
name = "decoy"
33
version = "2.2.0"
44
description = "Opinionated mocking library for Python"
5-
authors = ["Michael Cousins <michael@cousins.io>"]
6-
license = "MIT"
75
readme = "README.md"
8-
repository = "https://github.com/mcous/decoy"
9-
homepage = "https://michael.cousins.io/decoy/"
10-
documentation = "https://michael.cousins.io/decoy/"
11-
6+
license = "MIT"
7+
requires-python = ">=3.7"
8+
authors = [
9+
{name = "Michael Cousins", email = "michael@cousins.io>"},
10+
]
1211
classifiers = [
1312
"Development Status :: 5 - Production/Stable",
1413
"Intended Audience :: Developers",
@@ -18,62 +17,50 @@ classifiers = [
1817
"Typing :: Typed",
1918
]
2019

21-
[tool.poetry.urls]
22-
"Changelog" = "https://github.com/mcous/decoy/releases"
20+
[project.urls]
21+
Homepage = "https://michael.cousins.io/decoy/"
22+
Documentation = "https://michael.cousins.io/decoy/"
23+
Repository = "https://github.com/mcous/decoy"
24+
Issues = "https://github.com/mcous/decoy/issues"
25+
Changelog = "https://github.com/mcous/decoy/releases"
2326

24-
[tool.poetry.dependencies]
25-
python = "^3.7"
27+
[project.entry-points."pytest11"]
28+
"decoy" = "decoy.pytest_plugin"
2629

27-
[tool.poetry.group.dev.dependencies]
28-
poethepoet = [
29-
{ version = "0.19.0", python = "<3.8" },
30-
{ version = "0.30.0", python = ">=3.8, <3.9" },
31-
{ version = "0.35.0", python = ">=3.9" },
30+
[dependency-groups]
31+
dev = [
32+
"poethepoet (==0.19.0) ; python_version < '3.8'",
33+
"poethepoet (==0.30.0) ; python_version >= '3.8' and python_version < '3.9'",
34+
"poethepoet (==0.35.0) ; python_version >= '3.9'",
3235
]
3336

34-
[tool.poetry.group.test.dependencies]
35-
coverage = [
36-
{ version = "7.2.7", extras = [
37-
"toml",
38-
], python = "<3.8" },
39-
{ version = "7.6.1", extras = [
40-
"toml",
41-
], python = ">=3.8, <3.9" },
42-
{ version = "7.9.1", extras = [
43-
"toml",
44-
], python = ">=3.9" },
45-
]
46-
mypy = [
47-
{ version = "1.4.1", python = "<3.8" },
48-
{ version = "1.14.1", python = ">=3.8, <3.9" },
49-
{ version = "1.16.0", python = ">=3.9" },
50-
]
51-
pytest = [
52-
{ version = "7.4.4", python = "<3.8" },
53-
{ version = "8.3.5", python = ">=3.8, <3.9" },
54-
{ version = "8.4.0", python = ">=3.9" },
37+
test = [
38+
"coverage[toml] (==7.2.7) ; python_version < '3.8'",
39+
"coverage[toml] (==7.6.1) ; python_version >= '3.8' and python_version < '3.9'",
40+
"coverage[toml] (==7.9.1) ; python_version >= '3.9'",
41+
"mypy (==1.4.1) ; python_version < '3.8'",
42+
"mypy (==1.14.1) ; python_version >= '3.8' and python_version < '3.9'",
43+
"mypy (==1.16.0) ; python_version >= '3.9'",
44+
"pytest (==7.4.4) ; python_version < '3.8'",
45+
"pytest (==8.3.5) ; python_version >= '3.8' and python_version < '3.9'",
46+
"pytest (==8.4.0) ; python_version >= '3.9'",
47+
"pytest-asyncio (==0.21.2) ; python_version < '3.8'",
48+
"pytest-asyncio (==0.24.0) ; python_version >= '3.8' and python_version < '3.9'",
49+
"pytest-asyncio (==1.0.0) ; python_version >= '3.9'",
50+
"pytest-mypy-plugins (==2.0.0) ; python_version < '3.8'",
51+
"pytest-mypy-plugins (==3.1.2) ; python_version >= '3.8' and python_version < '3.9'",
52+
"pytest-mypy-plugins (==3.2.0) ; python_version >= '3.9'",
53+
"pytest-xdist (==3.5.0) ; python_version < '3.8'",
54+
"pytest-xdist (==3.6.1) ; python_version >= '3.8' and python_version < '3.9'",
55+
"pytest-xdist (==3.7.0) ; python_version >= '3.9'",
56+
"ruff (==0.14.7)"
5557
]
56-
pytest-asyncio = [
57-
{ version = "0.21.2", python = "<3.8" },
58-
{ version = "0.24.0", python = ">=3.8, <3.9" },
59-
{ version = "1.0.0", python = ">=3.9" },
60-
]
61-
pytest-mypy-plugins = [
62-
{ version = "2.0.0", python = "<3.8" },
63-
{ version = "3.1.2", python = ">=3.8, <3.9" },
64-
{ version = "3.2.0", python = ">=3.9" },
65-
]
66-
pytest-xdist = [
67-
{ version = "3.5.0", python = "<3.8" },
68-
{ version = "3.6.1", python = ">=3.8, <3.9" },
69-
{ version = "3.7.0", python = ">=3.9" },
70-
]
71-
ruff = "0.14.7"
7258

73-
[tool.poetry.group.docs.dependencies]
74-
mkdocs = { version = "1.6.1", python = ">=3.10" }
75-
mkdocs-material = { version = "9.6.21", python = ">=3.10" }
76-
mkdocstrings = { version = "0.30.1", extras = ["python"], python = ">=3.10" }
59+
docs = [
60+
"mkdocs (==1.6.1) ; python_version >= '3.10'",
61+
"mkdocs-material (==9.6.21) ; python_version >= '3.10'",
62+
"mkdocstrings[python] (==0.30.1) ; python_version >= '3.10'"
63+
]
7764

7865
[tool.poe.tasks]
7966
all = [
@@ -100,9 +87,6 @@ check-ci = ["check", "lint", "format-check"]
10087
test-ci = ["test-once", "coverage-xml"]
10188
build-ci = ["docs-build", "build"]
10289

103-
[tool.poetry.plugins."pytest11"]
104-
"decoy" = "decoy.pytest_plugin"
105-
10690
[tool.pytest.ini_options]
10791
addopts = "--color=yes --mypy-ini-file=tests/typing/mypy.ini --mypy-only-local-stub"
10892
asyncio_mode = "auto"

0 commit comments

Comments
 (0)