v1.0.0 (2019-10-26)
-
Changed the
Version
class to align with Dunamai's own semantics instead of PEP 440's semantics.Previously,
Version
implemented all of PEP 440's features, like epochs and dev releases, even though Dunamai itself did not use epochs (unless you created your ownVersion
instance with one and serialized it) and always set dev to 0 in thefrom_git
/etc methods. Theserialize
method then tried to generalize those PEP 440 concepts to other versioning schemes, as in0.1.0-epoch.1
for Semantic Versioning, even though that doesn't have an equivalent meaning in that scheme.Now, the
Version
class implements the semantics used by Dunamai, giving it more power in the serialization to map those concepts in an appropriate way for each scheme. For example,dev0
is now only added for PEP 440 (in order to be compatible with Pip's--pre
flag), butdev.0
is no longer added for Semantic Versioning because it served no purpose there.API changes:
post
has been renamed todistance
, and its type is simplyint
rather thanOptional[int]
epoch
anddev
have been removedpre_type
has been renamed tostage
pre_number
has been renamed torevision
, and it is no longer required when specifying a stage
-
Improved error reporting when the version control system cannot be detected and when a specified VCS is unavailable.
-
Improved the default regular expression for tags:
- It now requires a full match of the tag.
- It now recognizes when the
base
andstage
are separated by a hyphen. - It now recognizes when the
stage
andrevision
are separated by a dot. - It now allows a
stage
without arevision
.