Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor PackageVersion based on PEP440Version
This commit switches package versioning scheme from SemVer to PEP 440. Main reasons: 1. SemVer handles pre-releases choreographically with unexpected outcome. e.g.: ``1.0.0-rc2 < 1.0.0-rc10`` evaluates to ``False``. 2. Libraries are evaluated against PEP 440 to be able to install WHEELs. They have however also been evaluated as SemVer as all repository providers (JSON, Github, Gitlab, Bitbucket) only know that scheme. 3. Maintaining 2 possibly conflicting versioning schemes for packages and libraries is not desirable. 4. A major release such as PC 4.0.0 with all its other major changes is a good chance to make the switch. Notes: 1. all final SemVer versions are compatible with PEP 440. PEP 440 versions even handle missing minor,micro parts out of the box. 2. most commonly used SemVer pre-release tags are compatible with PEP 440, if possibly different sorting order is not taken into account. As users actively need to opt-int to `install_prereleases`, the number of effected users and the chance to break something seems rather moderate. 3. incompatible SemVer pre-releases are converted to PEP 440 dev-releases with the incompatible SemVer pre-release tag converted to a PEP 440 local-version. e.g.: 1.0.0-incompatible1 => 1.0.0-dev0+incompatible1 About 6 packages on packagecontrol.io are effected, none of them breaking. 4. The `_pre_semver_pattern` is removed as no package registered on packagecontrol.io is using it and SemVer has been introduced about 10 years ago.
- Loading branch information