mirror of
https://github.com/semver/semver.git
synced 2026-07-11 04:52:47 -05:00
[GH-ISSUE #906] Separater for "pre-release version" #5686
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @buhtz on GitHub (Jan 2, 2023).
Original GitHub issue: https://github.com/semver/semver/issues/906
I try to understand the SemVer 2.0 rule about pre-release version.
Let me cite the beginning of the first sentence of that rule
What is about the hyphen? Is it a MUST HAVE when specifying a pre-release version? So the "MAY" in that cited sentence only refer to the case that a pre-release version can but don't have to be specified?
I observed that Python/pip/setuptools to ignore the hyphen.
In my
pyproject.tomlI specified the version that way.But when installing that package the
-is ignored and the version converted into0.0.0a7.You can see in the output of
pipthat the version number used is different from the number I specified in mypyproject.toml.How do you assess this situation in the context and from the viewpoint of SemVer? What is your opinion?
@steveklabnik commented on GitHub (Jan 3, 2023):
the MAY there is referring to the fact that a pre-release version MAY or may not exist. If a pre-release version exists, it must have the hyphen.
I'm not familiar enough with
pipto know if this is a bug or a true divergence from the spec.@jwdonahue commented on GitHub (Jan 23, 2023):
Until PEP-440 Python had a long history of supporting just about any version number scheme you can think of. Your packaging tool in this case is working hard to accept as wide a range of inputs as possible and transform them to standard PEP-440. Despite many references in Python related docs, they don't really adhere to SemVer specs, except possibly for their interpretation of the version triple (M.m.p).