diff mbox series

[02/24] python3-vcs-versioning: upgrade 2.4.0 -> 2.5.0

Message ID 20260930-mathieu-upgrades-2026-02-29-v1-2-102c38be04df@bootlin.com
State Under Review
Headers show
Series 2026-09-29 upgrades | expand

Commit Message

Mathieu Dubois-Briand Sept. 30, 2026, 8:16 a.m. UTC
- Add `discover_file_workdir()`, which finds the checkout a project sits in for
  the purpose of listing files. `discover_workdir()` answers which checkout
  defines the version, scoped by `root` and `search_parent_directories`; which
  files a project ships is a separate question, and a project in a subdirectory
  of a checkout still ships that checkout's files. ([#1543]( ))

- Accept the `tool` keyword in `_version_missing()` again. setuptools-scm 10.1.0
  through 10.2.3 pass it and allow any `vcs-versioning<3`; since 2.4.1 removed
  it,
  a build without a detectable version failed with
  `TypeError: _version_missing() got an unexpected keyword argument 'tool'`
  instead of the `LookupError` that says how to set a version. The keyword is
  ignored; the tool is taken from the configuration's environment. ([#1550]( ))

- The error raised when a `.jj/` directory is found but `jj` is not installed
  now names the environment variables that actually disable jj discovery
  (`SETUPTOOLS_SCM_DISABLE_JJ=1` / `VCS_VERSIONING_DISABLE_JJ=1`) instead of an
  unprefixed `DISABLE_JJ=1`, which was never read. ([#1537]( ))
- The "unable to detect version" error now names the environment variables the
  running integration actually reads. It previously suggested
  `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME}` unconditionally,
  which is not read by `vcs-versioning` on its own (or by any other integrator),
  and it named setuptools-scm as the failing tool regardless of which one ran.

  When the distribution name is known the suggested variable is spelled out in
  full. When it is not, the generic variables are suggested instead, with a note
  that the per-distribution `..._FOR_<DIST>` form needs a dist name to match --
  the previous message offered a `${NORMALIZED_DIST_NAME}` template that could
  never be filled in. ([#1539]( ))
- Warn when file discovery is suppressed while a VCS marker sits in the
  project directory. `scm_search_known_failed()` means an integrator already
  looked and found no checkout, so a `.git`, `.hg` or `.jj` right there
  contradicts it and the artifact is about to lose every tracked file. That
  combination was the signature of the pretend-version regression and stayed
  invisible for three releases. Parent directories are not searched, since an
  unpacked sdist inside an unrelated checkout is the case the suppression
  exists for, and roots listed in `IGNORE_VCS_ROOTS` are skipped. ([#1540]( ))

- Environment variable names are now built in one place (`env_var_name` /
  `EnvReader.candidate_names`), shared by the lookup in `EnvReader.read` and by
  every error message that suggests a variable, so a message cannot name a
  variable the lookup would not honour.

The "repository found in a parent directory" error no longer offers a
  `get_version(relative_to=...)` call to integrators that do not ship one; the
  remaining options are renumbered instead. ([#1539]( ))

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 ...{python3-vcs-versioning_2.4.1.bb => python3-vcs-versioning_2.5.0.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-vcs-versioning_2.4.1.bb b/meta/recipes-devtools/python/python3-vcs-versioning_2.5.0.bb
similarity index 91%
rename from meta/recipes-devtools/python/python3-vcs-versioning_2.4.1.bb
rename to meta/recipes-devtools/python/python3-vcs-versioning_2.5.0.bb
index 36bb2856a0ba..16e009c16dbd 100644
--- a/meta/recipes-devtools/python/python3-vcs-versioning_2.4.1.bb
+++ b/meta/recipes-devtools/python/python3-vcs-versioning_2.5.0.bb
@@ -5,7 +5,7 @@  library that can be used independently of setuptools."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c9b06ad2ebd7e2e82d34b3caf353e7d5"
 
-SRC_URI[sha256sum] = "d4575de3115ec9434393c87c80ffb0eb98a16056bfe2b11ce0f3a97aff67fe0a"
+SRC_URI[sha256sum] = "956a796e31f80fe714d219d6d1df15a6bf247d10f6d851bf4b98279d0a42da55"
 
 SRC_URI += "\
     file://run-ptest \