Skip to content

Commit 9eed750

Browse files
committed
Convert test and dev dependencies to groups
- test dependencies are organized into per-framework groups, and then aggregated in a `test-all-frameworks` group -- which is still used in tox in order to keep test times down - dev dependencies are moved to a dedicated group as well - the 'setuptools' pin for pyramid is moved into the pyramid test group
1 parent 753279e commit 9eed750

2 files changed

Lines changed: 38 additions & 28 deletions

File tree

pyproject.toml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,6 @@ Issues = "https://github.com/marshmallow-code/webargs/issues"
5555
Source = "https://github.com/marshmallow-code/webargs"
5656
Tidelift = "https://tidelift.com/subscription/pkg/pypi-webargs?utm_source=pypi-webargs&utm_medium=pypi"
5757

58-
[project.optional-dependencies]
59-
frameworks = [
60-
"Flask>=3.1.0",
61-
"Django>=5.2.0",
62-
"bottle>=0.13.0",
63-
"tornado>=6.5.0",
64-
"pyramid>=2.0.2",
65-
"falcon>=4.1.0",
66-
"aiohttp>=3.13.0",
67-
]
68-
tests = [
69-
"webargs[frameworks]",
70-
"pytest",
71-
"pytest-asyncio",
72-
"webtest==3.0.7",
73-
"webtest-aiohttp==2.0.0",
74-
"pytest-aiohttp>=0.3.0",
75-
"packaging>=17.0",
76-
]
77-
dev = ["webargs[tests]", "tox", "pre-commit>=3.5,<5.0"]
78-
7958
[build-system]
8059
requires = ["flit_core<4"]
8160
build-backend = "flit_core.buildapi"
@@ -88,6 +67,43 @@ docs = [
8867
"furo==2025.12.19",
8968
]
9069

70+
tests = [
71+
"pytest",
72+
"pytest-asyncio",
73+
"webtest==3.0.7",
74+
"webtest-aiohttp==2.0.0",
75+
"pytest-aiohttp>=0.3.0",
76+
"packaging>=17.0",
77+
]
78+
test-flask = ["Flask>=3.1.0", {include-group = "tests"}]
79+
test-django = ["Django>=5.2.0", {include-group = "tests"}]
80+
test-bottle = ["bottle>=0.13.0", {include-group = "tests"}]
81+
test-tornado = ["tornado>=6.5.0", {include-group = "tests"}]
82+
test-pyramid = [
83+
"pyramid>=2.0.2", {include-group = "tests"},
84+
# temporary pin: hold back `setuptools` so that `pyramid` testing works
85+
# pyramid uses pkg_resources, which has been long deprecated and finally removed
86+
#
87+
# see https://github.com/Pylons/pyramid/issues/3731 for discussion within pyramid
88+
"setuptools < 82.0"
89+
]
90+
test-falcon = ["falcon>=4.1.0", {include-group = "tests"}]
91+
test-aiohttp = ["aiohttp>=3.13.0", {include-group = "tests"}]
92+
# for efficiency of testing, we define this group and test all frameworks at once, because it works
93+
# however, each is declared separately in case we ever encounter conflicts and need to break one off
94+
# from the rest of the group
95+
test-all-frameworks = [
96+
{include-group = "test-flask"},
97+
{include-group = "test-django"},
98+
{include-group = "test-bottle"},
99+
{include-group = "test-tornado"},
100+
{include-group = "test-pyramid"},
101+
{include-group = "test-falcon"},
102+
{include-group = "test-aiohttp"},
103+
]
104+
105+
dev = ["tox", "pre-commit>=3.5,<5.0", {include-group = "tests"}]
106+
91107
[tool.flit.sdist]
92108
include = [
93109
"docs/",

tox.ini

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ envlist=
77
docs
88

99
[testenv]
10-
extras = tests
10+
dependency_groups = test-all-frameworks
1111
deps =
1212
marshmallow: marshmallow>=4.0.0,<5.0.0
1313
marshmallowdev: https://github.com/marshmallow-code/marshmallow/archive/dev.tar.gz
@@ -19,12 +19,6 @@ deps =
1919
lowest: falcon==4.1.0
2020
lowest: aiohttp==3.13.0
2121
lowest: marshmallow==3.13.0
22-
23-
# temporary pin: hold back `setuptools` so that `pyramid` testing works
24-
# pyramid uses pkg_resources, which has been long deprecated and finally removed
25-
#
26-
# see https://github.com/Pylons/pyramid/issues/3731 for discussion within pyramid
27-
setuptools < 82.0
2822
commands = pytest {posargs}
2923

3024
[testenv:lint]

0 commit comments

Comments
 (0)