Drop the static version entry from setup.cfg - #176
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Remove
version = attr: pytest_aiohttp.__version__from[metadata]insetup.cfg.The project already delegates versioning to
setuptools-scm([tool.setuptools_scm]inpyproject.toml, withpytest_aiohttp/_version.pyas the write target). Theattr: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 valuesetuptools-scmcomputes. 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 buildsucceeds 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 sdistpip install -e .resolvespytest_aiohttp.__version__from SCM metadataRelated issue number
Fixes #112