Skip to content

v1.0.0 (2019-10-26)

Compare
Choose a tag to compare
@mtkennerly mtkennerly released this 27 Oct 02:14
· 232 commits to master since this release
  • 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 own Version instance with one and serialized it) and always set dev to 0 in the from_git/etc methods. The serialize method then tried to generalize those PEP 440 concepts to other versioning schemes, as in 0.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), but dev.0 is no longer added for Semantic Versioning because it served no purpose there.

    API changes:

    • post has been renamed to distance, and its type is simply int rather than Optional[int]
    • epoch and dev have been removed
    • pre_type has been renamed to stage
    • pre_number has been renamed to revision, 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 and stage are separated by a hyphen.
    • It now recognizes when the stage and revision are separated by a dot.
    • It now allows a stage without a revision.