Skip to content

Restore the setuptools build requirement lower bound to 47 - #1400

Merged
webknjaz merged 3 commits into
aio-libs:masterfrom
aiolibsbot:koan/implement-1399
Aug 23, 2026
Merged

webknjaz merged 3 commits into
aio-libs:masterfrom
aiolibsbot:koan/implement-1399

Conversation

@aiolibsbot

@aiolibsbot aiolibsbot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

What do these changes do?

Put the setuptools lower bound in build-system.requires back to
>= 47. That bound records the oldest setuptools able to build this
project, and Dependabot had been ratcheting it up on every release
(most recently to >= 83.0.0 in #1371), which excluded build
environments that work fine. Packaging metadata still lives in
setup.cfg and the only feature it needs is version = attr:, so 47
is the actual floor.

To stop the same automated bump from coming back, the pip ecosystem in
.github/dependabot.yml is scoped to /requirements so Dependabot no
longer rewrites pyproject.toml. Same fix as
aio-libs/propcache#225 and aio-libs/yarl#1764.

Pure C code and pure-Python code are untouched, so the dual-backend
concern does not apply here.

Are there changes in behavior for the user?

No, other than sdist builds working again on older setuptools.

Is it a substantial burden for the maintainers to support this?

No; it removes a recurring Dependabot pull request.

Related issue number

Fixes #1399

Checklist

  • I think the code is well written
  • Unit tests for the changes exist - N/A, packaging metadata change; verified by building against the declared floor (see below)
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt - N/A, no CONTRIBUTORS.txt in this repo
  • Add a new news fragment into the CHANGES/ folder

Drafted with Claude Opus 5 running under Kōan; reviewed by @bdraco.

Agent run details (optional, for reviewers)

Floor verified by building in an isolated environment with the build
backend pinned to the new lower bound:

$ uv venv --python 3.10 && uv pip install --build-constraints <(echo 'setuptools==47.0.0') .
      Built multidict @ file:///.../multidict
 + multidict==6.7.2.dev0
$ python -c "import multidict; print(multidict.MultiDict([('a',1),('a',2)]).getall('a'))"
[1, 2]

Negative control, with the constraint one version below the floor, to
confirm the constraint is honoured rather than silently ignored:

$ uv pip install --build-constraints <(echo 'setuptools==46.0.0') .
  x Failed to build `multidict`
  +-> No solution found when resolving: `setuptools>=47`

Tests, both backends:

$ pytest -q --c-extensions            -> 1661 passed
$ MULTIDICT_NO_EXTENSIONS=1 pytest -q --no-c-extensions  -> 849 passed, 811 deselected

Docs spell check: make doc-spelling reports no new misspellings
against the master baseline; dependabot and subdirectory were
added to docs/spelling_wordlist.txt for the news fragments. The
sandbox has a narrower system dictionary than CI, so a fixed set of
pre-existing CHANGES.rst words (workflow, metadata, ...) flags
identically on master and on this branch.

Lint: pre-commit run --files <changed files> passed (yamllint, news
fragment :user: role check).


Quality Report

Changes: 5 files changed, 11 insertions(+), 2 deletions(-)

Code scan: clean

Tests: failed (FAILED)

Branch hygiene: clean

Generated by Kōan

The lower bound in `build-system.requires` tracks the oldest
setuptools that can build this project, not the newest available
one; Dependabot had been raising it on every release, which
needlessly excluded working build environments. Metadata still
lives in setup.cfg and only needs `version = attr:` support, so
47 is the real floor.

Dependabot's pip ecosystem is scoped to the requirements
directory so it stops rewriting the build backend pin.
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Aug 23, 2026
@codspeed

codspeed Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.29%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 240 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_multidict_getall_str_hit[cs-c] 37.2 ms 42.2 ms -11.91%
❌ test_cimultidict_getall_istr_hit[c] 35.5 ms 39.8 ms -10.66%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing aiolibsbot:koan/implement-1399 (459ac50) with master (41c1b91)

Open in CodSpeed

Comment thread pyproject.toml Resolved
This is to match the style in other projects.
@webknjaz
webknjaz marked this pull request as ready for review August 23, 2026 14:15
@webknjaz
webknjaz requested a review from asvetlov as a code owner August 23, 2026 14:15
@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or non-blocking defects identified.

The current setup metadata and build script use functionality available in setuptools 47, and the Dependabot configuration validly preserves updates for requirement files while excluding the intentionally stable build-backend floor.

Reviews (1): Last reviewed commit: "Format `build-system.requires` as a mult..." | Re-trigger Greptile

@webknjaz
webknjaz merged commit 4c75c93 into aio-libs:master Aug 23, 2026
37 of 49 checks passed
@aiolibsbot
aiolibsbot deleted the koan/implement-1399 branch September 5, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revert the lower setuptools bound back to v47 and prevent Dependabot from bumping it again

2 participants