cool-easter-32542
05/31/2023, 3:24 AMPANTS_UNSTABLE_VERSION to be the version in src/python/pants/VERSION, along with the first 8 characters of the commit sha. This should be fine, but not mentioned in https://www.python.org/dev/peps/pep-0440/#local-version-identifiers is that local build tags which consist of only numbers will have leading zeroes truncated, e.g.:
X> pex packaging setuptools
Python 2.7.15 (default, Jun 20 2018, 17:40:09)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from packaging.version import Version
>>> Version('1.15.0.dev4+06723833')
<Version('1.15.0.dev4+6723833')>
>>> str(Version('1.15.0.dev4+06723833'))
'1.15.0.dev4+6723833'
This required a fix in #7400 by prefacing the sha with a constant non-numeric string to avoid it getting parsed as a number.
While that was fixed, it might also be pretty useful to further modify the PANTS_UNSTABLE_VERSION, to add a timestamp before the SHA. This would allow ls to ensure the most recently produced wheel would always be at the bottom of the output.
pantsbuild/pantscool-easter-32542
05/31/2023, 3:24 AM