Skip to content

Drop the static version entry from setup.cfg - #176

Merged
Dreamsorcerer merged 1 commit into
masterfrom
packaging/drop-setup-cfg-version
Jul 12, 2026
Merged

Drop the static version entry from setup.cfg#176
Dreamsorcerer merged 1 commit into
masterfrom
packaging/drop-setup-cfg-version

Conversation

@rodrigobnogueira

@rodrigobnogueira rodrigobnogueira commented Jul 11, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Remove version = attr: pytest_aiohttp.__version__ from [metadata] in setup.cfg.

The project already delegates versioning to setuptools-scm ([tool.setuptools_scm] in pyproject.toml, with pytest_aiohttp/_version.py as the write target). The attr: entry is a second, competing version source: it makes setuptools import the package during metadata generation, which in turn imports the generated _version.py, conflicting with the value setuptools-scm computes. See the explanation in pypa/setuptools-scm#1213 (comment referenced from the issue).

Are there changes in behavior for the user?

No. The published version is identical; it now comes from a single source.

Verified locally after the removal:

  • python -m build succeeds on a full clone (1.1.2.dev11+gfb93f0baa) and on a shallow clone (the CI lint-job condition)
  • python -m twine check dist/* passes for both the wheel and the sdist
  • pip install -e . resolves pytest_aiohttp.__version__ from SCM metadata
  • the test suite passes (7 passed)

Related issue number

Fixes #112

setuptools-scm owns the package version, but setup.cfg still carried
version = attr: pytest_aiohttp.__version__, a second version source
that makes setuptools import the package during metadata generation
and conflicts with the version setuptools-scm computes.

Fixes #112
@rodrigobnogueira
rodrigobnogueira marked this pull request as ready for review July 11, 2026 21:41
@Dreamsorcerer
Dreamsorcerer merged commit 845439d into master Jul 12, 2026
12 checks passed
@Dreamsorcerer
Dreamsorcerer deleted the packaging/drop-setup-cfg-version branch July 12, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[packaging][bug] Drop version entry from setup.cfg

2 participants