question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library is partially non-compliant with semver spec

See original GitHub issue

Breaking input: 0.0.0-0foo.1

Expected result:

>>> import semver
>>> semver.parse('0.0.0-0foo.1')
{'build': None, 'major': 0, 'patch': 0, 'minor': 0, 'prerelease': '0foo.1'}

Actual result:

>>> import semver
>>> semver.parse('0.0.0-0foo.1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/semver.py", line 65, in parse
    raise ValueError('%s is not valid SemVer string' % version)
ValueError: 0.0.0-0foo.1 is not valid SemVer string

Per item 9, only numeric IDs cannot contain leading zeros – since 0foo is not entirely numeric, it may contain a leading zero.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sirzoorocommented, Nov 20, 2019

Any update on this? We use git commit hash as a prerelease part, so sometimes we trigger this error too.

0reactions
tomschrcommented, Nov 21, 2019

Duplicate of #194 so closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Semver validation error when prerelease version contains a ...
I can't see any restriction about this in the semver documentation. ... Library is partially non-compliant with semver spec #114.
Read more >
Semantic Versioning 2.0.0 | Semantic Versioning
Semantic Versioning Specification (SemVer) The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, ...
Read more >
Phantom dependencies - language design - Rust Internals
According to the semver spec, addition of new backwards-compatible APIs requires incrementing the minor version. People are entirely justified ...
Read more >
Reference — python-semanticversion latest documentation
Check whether a version string matches a specification string: >>> match('>=0.1.1', '0.1.2') ... For non- partial versions, compare using the SemVer scheme.
Read more >
semver - npm Docs
semver. The semantic versioner for npm. Select CLI Version: ... A JavaScript implementation of the https://semver.org/ specification.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found