Skip to content

Releases: pypa/setuptools-scm

setuptools-scm v10.0.0

26 Feb 11:11
Immutable release. Only release title and notes can be modified.
ccfd69c

Choose a tag to compare

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_to and version_file) are now written to the build directory
    during build_py instead 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.py is correctly written to mypackage/_version.py in the
    build directory based on the package_dir configuration.

    To restore the old behavior of writing version files at inference time (useful for
    development workflows), set the environment variable SETUPTOOLS_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.version when 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] extra

    A new streamlined way to enable version inference without requiring a [tool.setuptools_scm] section.
    When setuptools-scm[simple] is in build-system.requires and version is in project.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-scm console_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_METADATA environment variable to override individual ScmVersion fields
  • add scm parameter support to get_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_keyword to override infer_version when configuration differs
  • fix #554: document fallback_root parameter in programmatic usage and configuration

Changed

  • add pip to 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-files flag 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 autogenerated version.py files 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_to to 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_SCHEME and DEFAULT_LOCAL_SCHEME on the setuptools-scm package

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

  • fix #919: restore legacy version-file behaviour for external callers + add Deprecation warning
  • fix #918: use packaging from setuptools for self-build
  • fix #914: ignore the deprecated git archival plugin as its integrated now
  • fix #912: ensure mypy safety of the v...
Read more

v9.2.2

19 Oct 22:00
e56b78f

Choose a tag to compare

What's Changed

Full Changelog: v9.2.1...v9.2.2

v9.2.1

12 Oct 13:28
338f562

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v9.2.0...v9.2.1

v9.2.0

16 Aug 12:49
6bf6746

Choose a tag to compare

What's Changed

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)

11 Aug 14:05

Choose a tag to compare

What's Changed

Full Changelog: v9.1.0...v9.1.1

yanked after hitting regressions wrt legcy project setups triggering auto activate

v9.1.0 (yanked)

11 Aug 09:57
d7f1688

Choose a tag to compare

yanked

a regression makes some sdists report version 0.0.0

What's Changed

Full Changelog: v9.0.3...v9.1.0

v9.0.3 (yanked)

05 Aug 19:34
66e16e2

Choose a tag to compare

What's Changed

Full Changelog: v9.0.2...v9.0.3

yanked

regression wrt specific old project setups vs auto-activate

v9.0.2 (yanked)

05 Aug 17:02
3205db5

Choose a tag to compare

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)

05 Aug 11:27
d44633e

Choose a tag to compare

What's Changed

Full Changelog: v9.0.0...v9.0.1

yanked

  • edge cases around auto-activate

v9.0.0 (yanked)

04 Aug 09:14
5c7a701

Choose a tag to compare

Breaking

  • fix #1019: pass python version build tags from scm version to results propperly

Added

  • add setuptools-scm console_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_METADATA environment variable to override individual ScmVersion fields
  • add scm parameter support to get_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_keyword to override infer_version when configuration differs
  • fix #554: document fallback_root parameter in programmatic usage and configuration

Changed

  • add pip to 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