This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 728eb1517f [Build] Fix version regex to anchor at line start in
pyproject.toml (#18892)
728eb1517f is described below
commit 728eb1517f1877d23b71edf91ebd0a288960503b
Author: Ruihang Lai <[email protected]>
AuthorDate: Mon Mar 9 13:58:43 2026 -0400
[Build] Fix version regex to anchor at line start in pyproject.toml (#18892)
Add ^ anchor to the version regex so it matches only the top-level
`version = "..."` instead of all three occurrences, which caused
hit_count == 3 and a RuntimeError in sync_version.
---
version.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/version.py b/version.py
index ee7d0cdb55..fc9d4449c3 100644
--- a/version.py
+++ b/version.py
@@ -180,7 +180,7 @@ def sync_version(pub_ver, local_ver, dry_run):
# pyproject.toml
update(
os.path.join(PROJ_ROOT, "pyproject.toml"),
- r"(?<=version = \")[.0-9a-z\+]+",
+ r"(?<=^version = \")[.0-9a-z\+]+",
pub_ver,
dry_run,
)