python-semanticversion icon indicating copy to clipboard operation
python-semanticversion copied to clipboard

Whitespace in specifications

Open ekmartin opened this issue 9 years ago • 2 comments

PEP 0440 states the following:

Whitespace between a conditional operator and the following version identifier is optional, as is the whitespace around the commas.

However, currently the following fails:

Spec('== 1.4.0') # ValueError

ekmartin avatar Feb 23 '16 22:02 ekmartin

Well, this is inspired from the semver spec, which doesn't cover ranges.

So, where should we go:

  • Choose one range description spec (Python, NPM, Debian, ...)
  • Formalize our own new "range description spec"
  • Add optional support for many range description flavors
  • etc.

I'd be interested in getting @skwashd opinion as well: he as implemented NPM-style extensions, you're pushing for Python-style ones; how do we support both? Should we? ;)

rbarrois avatar Feb 28 '16 16:02 rbarrois

@rbarrois I'm all for flexibility I agree that we need to be clearer about which comparison spec will be used.

How about we have a base class that implements a strict version of the official semver spec? Additional classes could extend this class with additional rules such as python, npm/composer, Debian etc. The biggest issue I see in all of this is, what do we call the npm/composer implementation class.

skwashd avatar Mar 26 '16 05:03 skwashd