I like semver. My favorite part is point 12: Precedence MUST be calculated by separating the version into major, minor, patch, pre-release, and build identifiers in that order. Major, minor, and patch versions are always compared numerically. Pre-release and build version precedence MUST be determined by comparing each dot separated identifier as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or dashes are compared lexically in ASCII sort order. Numeric identifiers always have lower precedence than non-numeric identifiers. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0-rc.1+build.1 < 1.0.0 < 1.0.0+0.3.7 < 1.3.7+build < 1.3.7+build.2.b8f12d7 < 1.3.7+build.11.e0f985a. (No non-lexicographic comparisons). Unlike PEP-386 it would also allow DVCS revision ids to be included in the version string. Taking a look at pypi, ~1k of the latest releases do not parse as semver (if you extend it by making 1.0 equivalent to 1.0.0, as all semver versions have at least (major, minor, patch)). This is similar to the number of latest package versions that don't parse as PEP-386. I also found this blog post. http://blog.ziade.org/2009/07/03/dropping-pep-386-versions-comparison/ How much would it cost to endorse semver? Daniel H
On Tue, Oct 9, 2012 at 2:24 PM, Daniel Holth
How much would it cost to endorse semver?
I endorse it for free. :-) Seriously, if a version doesn't conform, I probably don't want to be using that piece of software, because it's versioning model is overly complicated. Integers are cheaper than these discussions; just increment the right one. Win: No more "dev" builds. Of course, I'm not known for being sympathetic regarding software. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> "A person who won't read has no advantage over one who can't read." --Samuel Langhorne Clemens
Daniel Holth
Taking a look at pypi, ~1k of the latest releases do not parse as semver (if you extend it by making 1.0 equivalent to 1.0.0, as all semver versions have at least (major, minor, patch)). This is similar to the number of latest package versions that don't parse as PEP-386.
My latest results show that ~3600 packages fail PEP 386 versioning, with ~5400 failing semantic versioning: Packages processed: 24882 Packages with no versions: 217 Number of packages clean for all schemes: 19004 Number of packages clean for normalized (PEP 386): 21066 Number of packages clean for legacy (setuptools): 24666 Number of packages clean for semantic (semver): 19271 Where "clean" means that all versions of the packages are valid for a particular scheme. Regards, Vinay Sajip
On 10/21/12 2:01 AM, Vinay Sajip wrote:
Daniel Holth
writes: Taking a look at pypi, ~1k of the latest releases do not parse as semver (if you extend it by making 1.0 equivalent to 1.0.0, as all semver versions have at least (major, minor, patch)). This is similar to the number of latest package versions that don't parse as PEP-386.
My latest results show that ~3600 packages fail PEP 386 versioning, with ~5400 failing semantic versioning:
Packages processed: 24882 Packages with no versions: 217 Number of packages clean for all schemes: 19004 Number of packages clean for normalized (PEP 386): 21066 Number of packages clean for legacy (setuptools): 24666 Number of packages clean for semantic (semver): 19271
Where "clean" means that all versions of the packages are valid for a particular scheme.
Regards,
Have you tried to process failed version in PEP 386 with suggest_normalized_version() ? that usually raises the % considerably
Vinay Sajip
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Tarek Ziadé
Have you tried to process failed version in PEP 386 with suggest_normalized_version() ?
that usually raises the % considerably
Fair point. Including the results for "proposed" meaning normalized + suggested, I got the following: Packages processed: 24891 Packages with no versions: 217 Packages with versions: 24674 Number of packages clean for all schemes: 19010 (77%) Number of packages clean for normalized: 21072 (85%) Number of packages clean for proposed: 23685 (96%) Number of packages clean for legacy: 24674 (100%, by you would expect) Number of packages clean for semantic: 19278 (78%) Regards, Vinay Sajip
On 10/21/12 3:17 PM, Vinay Sajip wrote:
Tarek Ziadé
writes: Have you tried to process failed version in PEP 386 with suggest_normalized_version() ?
that usually raises the % considerably
Fair point. Including the results for "proposed" meaning normalized + suggested, I got the following:
Packages processed: 24891 Packages with no versions: 217 Packages with versions: 24674 Number of packages clean for all schemes: 19010 (77%) Number of packages clean for normalized: 21072 (85%) Number of packages clean for proposed: 23685 (96%)
yeah that's close to what I remembered. and the 4% left are non-sense versions that said suggest_normalized_version() would probably work well with semver as well
Number of packages clean for legacy: 24674 (100%, by you would expect) Number of packages clean for semantic: 19278 (78%)
Regards,
Vinay Sajip
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Tarek Ziadé
yeah that's close to what I remembered. and the 4% left are non-sense versions
that said suggest_normalized_version() would probably work well with semver as well
Actually, sensible-looking semantic versions seem not to be amenable to having normalized versions suggested via suggest_normalized_version(). For example, the legal semantic version "0.1.0-build+post" fails both as-is, and for suggestion:
from distutils2 import version version.NormalizedVersion('0.1.0-build+post') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "distutils2/version.py", line 84, in __init__ self._parse(s, error_on_huge_major_num) File "distutils2/version.py", line 95, in _parse raise IrrationalVersionError(s) distutils2.errors.IrrationalVersionError: 0.1.0-build+post assert version.suggest_normalized_version('0.1.0-build+post') Traceback (most recent call last): File "<stdin>", line 1, in <module> AssertionError
So, some work might be required for NormalizedVersion to work with semantic versions. Regards, Vinay Sajip
participants (4)
-
Daniel Holth
-
Fred Drake
-
Tarek Ziadé
-
Vinay Sajip