Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rework setuptools-scm configuration#1192

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
seifertm merged 9 commits intopytest-dev:mainfromseifertm:fix-broken-build
Aug 17, 2025

Conversation

@seifertm
Copy link
Contributor

pytest-asyncio has an unnecessarily complex setuptools-scm configuration, which is split over multiple files (pyproject.toml and setup.cfg). This setup broke with the recent release of setuptools-scm v9.2 leading tobuild errors.

This PR addresses several issues:

  • it providespytest_asyncio.__version__ throughimportlib.metadata as opposed to a version file leading to simpler configuration
  • it bumps setuptools-scm to v9.2.0
  • it pins the versions build dependencies (setuptools and setuptools-scm) to make builds reproducible. Build dependencies should be updated by dependabot nowadays

This patch sets an upper bound for setuptools_scm which has breaking changes and prevents the project from being built.
This is required for reproducible builds. Pinned build dependencies should be updated by dependabot.
This is required for reproducible builds. Pinned build dependencies should be updated by dependabot.
This replaces the existing approach that uses a version file generated by setuptools-scm.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.91%. Comparing base (4fbe1e0) to head (d28f82e).

Additional details and impacted files
@@            Coverage Diff             @@##             main    #1192      +/-   ##==========================================+ Coverage   88.88%   88.91%   +0.02%==========================================  Files           2        2                Lines         405      406       +1       Branches       44       44              ==========================================+ Hits          360      361       +1  Misses         35       35                Partials       10       10

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seifertmseifertm added this pull request to themerge queueAug 17, 2025
Merged via the queue intopytest-dev:main with commitdb36483Aug 17, 2025
21 of 22 checks passed
@seifertmseifertm deleted the fix-broken-build branchAugust 17, 2025 14:14
@webknjaz
Copy link
Member

@seifertm FYI this way of packaging with pinning the build deps is actively harmful for downstreams like Linux distribution packagers. Instead, use pip constraints to make the upstream packaging predictable.

seifertm reacted with thumbs up emoji

@webknjaz
Copy link
Member

We were just talking about it the other day over at PyPUG, by the way:pypa/packaging.python.org#1886

@seifertm
Copy link
ContributorAuthor

seifertm commentedAug 17, 2025
edited
Loading

@seifertm FYI this way of packaging with pinning the build deps is actively harmful for downstreams like Linux distribution packagers. Instead, use pip constraints to make the upstream packaging predictable.

@webknjaz Thanks for bringing this up, I didn't think of this.

My understanding is that downstream packagers may want to build from source using the build dependencies that are available in their respective package repositories. Specifying exact versions of build dependencies would interfere with that. Is that about right?

In that case, let's revert to specifying lower(and upper?) bounds for build dependencies and pin the version using a different mechanism, as you suggested.

@webknjaz
Copy link
Member

My understanding is that downstream packagers may want to build from source using the build dependencies that are available in their respective package repositories. Specifying exact versions of build dependencies would interfere with that. Is that about right?

@seifertm yes. Downstreams usually don't have per-venv separation and so there's exactly one version of a build deps on the system at a time. For example, one version ofsetuptools installed globally. This causes conflicts and would cause headache as they'll be trying to patch out the limitations.

In that case, let's revert to specifying lower(and upper?) bounds for build dependencies and pin the version using a different mechanism, as you suggested.

I usually recommend the lower bound corresponding to a version where a feature you use was added. Upper bounds cause almost as many problems as hard pins. Version exclusions (!=) are fine. Though, some build backends (uv, flit core) still advertise upper bounds, which isn't friendly with downstreams nevertheless.

Though, while the metadata shouldn't be overly tight, you can still set the$PIP_CONSTRAINT env var where you call pypa/build or pip (in CI/tox/nox/etc). Point it to a file with all the transitive deps pinned. You can generate/manage this file usingpip-tools that knows how to extract PEP 517 build deps.

@seifertmseifertm restored the fix-broken-build branchAugust 24, 2025 06:15
seifertm added a commit to seifertm/pytest-asyncio that referenced this pull requestAug 24, 2025
@seifertm
Copy link
ContributorAuthor

Reverting the version pinning in pyproject.toml in#1201

webknjaz reacted with eyes emoji

@seifertmseifertm deleted the fix-broken-build branchAugust 24, 2025 06:17
@seifertmseifertm restored the fix-broken-build branchAugust 24, 2025 12:58
@seifertmseifertm deleted the fix-broken-build branchAugust 24, 2025 14:30
seifertm added a commit to seifertm/pytest-asyncio that referenced this pull requestSep 3, 2025
github-merge-queuebot pushed a commit that referenced this pull requestSep 3, 2025
@EmilienMEmilienM mentioned this pull requestSep 11, 2025
seifertm added a commit to seifertm/pytest-asyncio that referenced this pull requestSep 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@TincheTincheAwaiting requested review from TincheTinche is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@seifertm@codecov-commenter@webknjaz

[8]ページ先頭

©2009-2025 Movatter.jp