Releases: pypa/setuptools-scm
setuptools-scm v10.0.0
Removed
- Drop Python 3.8 and 3.9 support. Minimum Python version is now 3.10. (#1228)
Added
-
setuptools-scm now depends on vcs-versioning for core version inference logic. This enables other build backends to use the same version inference without setuptools dependency. (#1228)
-
Version files (
write_toandversion_file) are now written to the build directory
duringbuild_pyinstead of the source tree during version inference.
This enables installing packages from read-only source directories (e.g., Bazel builds).Path transformation is automatically applied for
src/layouts - a configured path like
src/mypackage/_version.pyis correctly written tomypackage/_version.pyin the
build directory based on thepackage_dirconfiguration.To restore the old behavior of writing version files at inference time (useful for
development workflows), set the environment variableSETUPTOOLS_SCM_WRITE_TO_SOURCE=1. (#1252)
Fixed
- Fix issue #1231: Don't warn about tool.setuptools.dynamic.version conflict when only using file finder without version inference. (#1231)
Miscellaneous
- Refactored should_infer from method to standalone function for better code organization. (#1228)
- Updated mypy version template test to use uvx, ensuring generated version files remain compatible with Python 3.8+ consumers. (#1228)
- Refactored TestBuildPackageWithExtra into parametrized function with custom INI-based decorator for cleaner test data specification. (#1228)
- Internal refactoring: modernized type annotations, improved CLI type safety, and enhanced release automation infrastructure. (#1228)
v9.2.2
Fixed
- fix #1231: don't warn about
tool.setuptools.dynamic.versionwhen only using file finder.
The warning about combining version guessing with setuptools dynamic versions should only
be issued when setuptools-scm is performing version inference, not when it's only being
used for its file finder functionality.
v9.2.1
Fixed
- fix #1216: accept and create a warning for usages of
version = attr:in setuptools config.
unfortunately dozens of projects cargo-culted that antipattern
v9.2.0
Added
-
add simplified activation via
setuptools-scm[simple]extraA new streamlined way to enable version inference without requiring a
[tool.setuptools_scm]section.
Whensetuptools-scm[simple]is inbuild-system.requiresandversionis inproject.dynamic,
version inference is automatically enabled with default settings.
Removed
- unchecked simplified activation - too many projects use setups where it would fail
Changed
- refine activation logic and add unittest for the relevant cases instead of trying to speedrun setuptools
v9.1.1 (yanked)
Fixed
- fix #1194: correctly handle version keyword when pyproject metadata is missing
v9.1.0 (yanked)
Fixed
-
complete reiteration of the decision logic for enabling version inference on setuptools_scm
- shared logic for the important parts
- proper deferring based in precedence of finalize options vs version keyword
- unittestable for the parsing parts and the decision steps
v9.0.3 (yanked)
Fixed
- fix #1184: verify version is dynamic if the dependency is used as indicator for enabling
v9.0.2 (yanked)
Fixed
- fix #1184: in case setuptools-scm is a indirect dependency and no pyproject.toml section exists - don't infer the version
v9.0.1 (yanked)
Fixed
- fix #1180: ensure version dumping works when no scm_version is given (problems in downstreams)
- fix #1181: config - reintroduce control over when we expect a section to be present
as it turns out there's valid use cases where setuptools_scm is not direct part of the dependencies - add codespell pre-commit hook
v9.0.0 (yanked)
Breaking
- fix #1019: pass python version build tags from scm version to results properly
Added
- add
setuptools-scmconsole_scripts entry point to make the CLI directly executable - make Mercurial command configurable by environment variable
SETUPTOOLS_SCM_HG_COMMAND - fix #1099 use file modification times for dirty working directory timestamps instead of current time
- fix #1059: add
SETUPTOOLS_SCM_PRETEND_METADATAenvironment variable to override individual ScmVersion fields - add
scmparameter support toget_version()function for nested SCM configuration - fix #987: expand documentation on git archival files and add cli tools for good defaults
- fix #311: document github/gitlab ci pipelines that enable auto-upload to test-pypi/pypi
- fix #1022: allow
version_keywordto overrideinfer_versionwhen configuration differs - fix #554: document
fallback_rootparameter in programmatic usage and configuration
Changed
- add
pipto test optional dependencies for improved uv venv compatibility - migrate to selectable entrypoints for better extensibility
- improve typing for entry_points
- refactor file modification time logic into shared helper function for better maintainability
- reduce complexity of HgWorkdir.get_meta method by extracting focused helper methods
- fix #1150: enable setuptools-scm when we are a build requirement
- feature #1154: add the commit id the the default version file template
- drop scriv
- fix #921: document setuptools version requirements more consistently - 61 as minimum asn 8 as recommended minimum
Fixed
- fix #1145: ensure GitWorkdir.get_head_date returns consistent UTC dates regardless of local timezone
- fix #687: ensure calendar versioning tests use consistent time context to prevent failures around midnight in non-UTC timezones
- reintroduce Python 3.9 entrypoints shim for compatibility
- fix #1136: update customizing.md to fix missing import
- fix #1001: document the missing version schemes and add examples in the docs
- fix #1115: explicitly document file finder behaviour
- fix #879: add test that validates case different behavior on windows
- migrate git describe command to new scm config
- add support for failing on missing submodules
- fix #279: expand errors when scm can be found upwards and relative_to wasn't used
- fix #577: introduce explicit scmversion node and short node
- fix #1100: add workaround for readthedocs worktress to the docs
- fix #790: document shallow fail for rtd
- fix #474: expand version not found error message to provide clearer guidance about SETUPTOOLS_SCM_PRETEND_VERSION_FOR_* environment variables
- fix #324: document/recommend the v tag prefix
- fix #501: add py.typed
- fix #804: git - use fallback version instead of 0.0 when no version is found at all
- fix #1139: use logging.lastResort instead of a own replica to avoid polluting logging._handlerList
- fix #873: don't infer version in cli if --no-version is given
- fix #535: accept tags from a release action in the gh ui
- fix #1073: explain namespaces for release-branch-semver
- fix #1052: use consistent node hash length across all SCM backends
- fix #1045: reindent the
__all__in the version template for better readability - fix #968: harden environment override finding with better normalization and typo suggestions
- fix #846: add support for failing on missing submodules
v8.3.1
Fixed
- fixed #1131: allow self-build without importlib_metadata available on python3.9
v8.3.0
Fixed
- fix #1013: use modern importlib_metadata in all cases to dedup distribution objects that must shadow based on pythonpath priority
starting with python 3.10 this is part of python itself
v8.2.1 (yanked due to legacy python issues)
Fixed
- fix #1119: also include pre/post release details in version_tuple
- fix #1112: unpin setuptools for own dependencies due to ubuntu lts bugs
- add python 3.13 to the support matrix
v8.2.0
Added
- fix #960: add a
--force-write-version-filesflag for the cli
Changed
- fix #950: ensure to pass encodings to io usage
- fix #957: add subprocess timeout control env var
- add sp-repo-review pre-commit hook
Fixed
- fix #1018: allow non-normalized versions for semver
- fix #1103: respect GIT_CEILING_DIRECTORIES when trying to find git toplevels
- fix #1081: add name normalized pipx entrypoint
- fix #1080: clean pdm from PYTHONPATH to protect mercurial
v8.1.0
Changed
- inclusion of
__all__in autogeneratedversion.pyfiles to aid IDE autoimports
v8.0.4
Changed
- introduce scriv for changelog management
- reconfigure local build backend to use an attribute instead of star imports from setuptools
- introduce ruff as a linter
- ensure the setuptools version keyword correctly load pyproject.toml configuration
- add build and wheel to the test requirements for regression testing
- move internal toml handling to own module
Fixed
- fix #925: allow
write_toto be an absolute path when it's a subdirectory of the root - fix #932: ensure type annotations in version file don't cause linter issues
- fix #930: temporary restore
DEFAULT_VERSION_SCHEMEandDEFAULT_LOCAL_SCHEMEon thesetuptools-scmpackage
v8.0.3
Fixed
- fix #918 for good - remove external importlib-metadata to avoid source only loop
- fix #926: ensure mypy on python3.8 works with the version file
v8.0.2
Fixed
v9.2.2
What's Changed
- fix: don't warn about tool.setuptools.dynamic.version when only using file finder by @RonnyPfannschmidt in #1232
Full Changelog: v9.2.1...v9.2.2
v9.2.1
What's Changed
- Mark recently yanked versions in changelog by @seifertm in #1209
- Fix 1216 explicitly deprecate setuptools dynamic version when active by @RonnyPfannschmidt in #1219
- prepare Release v9.2.1 by @RonnyPfannschmidt in #1226
New Contributors
Full Changelog: v9.2.0...v9.2.1
v9.2.0
What's Changed
- reiterate version inference by @RonnyPfannschmidt in #1202
simple activation now requires a extra instead of setting up many pre-existing projects for failure/error
Full Changelog: v9.1.1...v9.2.0
v9.1.1 (yanked)
What's Changed
- handle missing pyproject config in case version keyword is used by @RonnyPfannschmidt in #1195
Full Changelog: v9.1.0...v9.1.1
yanked after hitting regressions wrt legcy project setups triggering auto activate
v9.1.0 (yanked)
yanked
a regression makes some sdists report version 0.0.0
What's Changed
- reiterate version inference logic by @RonnyPfannschmidt in #1193
Full Changelog: v9.0.3...v9.1.0
v9.0.3 (yanked)
What's Changed
- fix 1184 infer version indirect should ignore by @RonnyPfannschmidt in #1190
Full Changelog: v9.0.2...v9.0.3
yanked
regression wrt specific old project setups vs auto-activate
v9.0.2 (yanked)
What's Changed
- in case infer-version finds neither the config section, nor the requirement - skip action by @RonnyPfannschmidt in #1189
Full Changelog: v9.0.1...v9.0.2
yanked
- new edge cases with auto-activate and preexisting projects
v9.0.1 (yanked)
What's Changed
- fix 1180 provide dummy scmversion for dump by @RonnyPfannschmidt in #1183
- fix 1181 version keyword doesnt need config by @RonnyPfannschmidt in #1185
- add codespell pre-commit hook by @RonnyPfannschmidt in #1188
Full Changelog: v9.0.0...v9.0.1
yanked
- edge cases around auto-activate
v9.0.0 (yanked)
Breaking
- fix #1019: pass python version build tags from scm version to results propperly
Added
- add
setuptools-scmconsole_scripts entry point to make the CLI directly executable - make Mercurial command configurable by environment variable
SETUPTOOLS_SCM_HG_COMMAND - fix #1099 use file modification times for dirty working directory timestamps instead of current time
- fix #1059: add
SETUPTOOLS_SCM_PRETEND_METADATAenvironment variable to override individual ScmVersion fields - add
scmparameter support toget_version()function for nested SCM configuration - fix #987: expand documentation on git archival files and add cli tools for good defaults
- fix #311: document github/gitlab ci pipelines that enable auto-upload to test-pypi/pypi
- fix #1022: allow
version_keywordto overrideinfer_versionwhen configuration differs - fix #554: document
fallback_rootparameter in programmatic usage and configuration
Changed
- add
pipto test optional dependencies for improved uv venv compatibility - migrate to selectable entrypoints for better extensibility
- improve typing for entry_points
- refactor file modification time logic into shared helper function for better maintainability
- reduce complexity of HgWorkdir.get_meta method by extracting focused helper methods
- fix #1150: enable setuptools-scm when we are a build requirement
- feature #1154: add the commit id the the default version file template
- drop scriv
- fix #921: document setuptools version requirements more consistently - 61 as minumum asn 8 as recommended minimum
Fixed
- fix #1145: ensure GitWorkdir.get_head_date returns consistent UTC dates regardless of local timezone
- fix #687: ensure calendar versioning tests use consistent time context to prevent failures around midnight in non-UTC timezones
- reintroduce Python 3.9 entrypoints shim for compatibility
- fix #1136: update customizing.md to fix missing import
- fix #1001: document the missing version schemes and add examples in the docs
- fix #1115: explicitly document file finder behaviour
- fix #879: add test that validates case different behavior on windows
- migrate git describe command to new scm config
- add support for failing on missing submodules
- fix #279: expand errors when scm can be found upwards and relative_to wasnt used
- fix #577: introduce explicit scmversion node and short node
- fix #1100: add workaround for readthedocs worktress to the docs
- fix #790: document shallow fail for rtd
- fix #474: expand version not found error message to provide clearer guidance about SETUPTOOLS_SCM_PRETEND_VERSION_FOR_* environment variables
- fix #324: document/recommend the v tag prefix
- fix #501: add py.typed
- fix #804: git - use fallback version instead of 0.0 when no version is found at all
- fix #1139: use logging.lastResort instead of a own replica to avoid polluting logging._handlerList
- fix #873: don't infer version in cli if --no-version is given
- fix #535: accept tags from a release action in the gh ui
- fix #1073: explain namespaces for release-branch-semver
- fix #1052: use consistent node hash length across all SCM backends
- fix #1045: reindent the
__all__in the version template to sort - fix #986: harden environment override finding with better normalization and typo suggestions
- fix #846: add support for failing on missing submodules
yanked
- regressions around auto-activate