I aim to have normal version numbers for python wheel releases, like 1.0.0
, and branch-specific version numbers for specific branches, like 1.0.0.dev1+hg.5.b11e5e6f0b0b
.
Unfortunately, Azure DevOps rejects most version numbers as invalid with one of these two error messages:
HTTPError: 400 Client Error: Bad Request - The package version provided is invalid. Versions should conform to the format described in PEP 440 and be under 128 characters. (DevOps Activity ID: 0000000-AAAA-2222-3333-11111111111) for url: https://pkgs.dev.azure.com/sample/_packaging/sample_libraries/pypi/upload
for version numbers like:
version='1.0.0.1.dev', ok
version='1.0.0.1.dev1', ok
version='1.0.0.1.dev_2', ok
version='1.0.0.1.dev_2_b', FAIL
version='1.0.0.1.dev_2-3', FAIL
version='1.0.0.1.dev_2.3', FAIL
version='1.0.0.1.dev_2.3', FAIL
version='1.0.0.d1.dev', FAIL
version='1.0.0.d.dev', FAIL
version='1.0.0.1d1.dev', FAIL
version='1.0.0.1d1.dev1', FAIL
version='1.0.0.1.dev1-3', FAIL
version='1.0.0.1.dev1.3', FAIL
version='1.0.0.1.dev1.3', FAIL
version='1.0.0.1.1.3', ok
version='1.0.0.1.1-3.3', FAIL
400 Client Error: Bad Request - The package version provided is invalid. Local version segments are not allowed.
for version numbers like: 1.0.0+33
Only the version numbers marked with "ok" in the segment above were accepted by the Azure pipeline.
Is there any way around this? Is there a way to include a development branch name in the version number of a wheel published in Azure DevOps as an artifact?