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

Partial version comparison

Open ekmartin opened this issue 10 years ago • 5 comments

Shouldn't partial versions be compared too? At the moment Version('1.0', partial=True) == Version('1.0.5', partial=True) is True.

ekmartin avatar Sep 27 '15 23:09 ekmartin

Works by coercing both and then comparing, but isn't that the result you'd want by comparing the original ones in the first place?

ekmartin avatar Sep 27 '15 23:09 ekmartin

:+1:

lukeyeager avatar Sep 30 '15 21:09 lukeyeager

Hi,

Thanks for the suggestion. However, partials are intended as an implementation detail for specs; I haven't found a real-world use case for them.

How would you use this feature?

rbarrois avatar Oct 05 '15 20:10 rbarrois

Some packages use both partial version numbers and regular ones, i.e. using 1.8 together with 1.8.1 (e.g. Django). To compare them correctly 1.8 has to be considered as 1.8.0.

ekmartin avatar Oct 06 '15 09:10 ekmartin

Well, the overall design is that users would first move from the real world of heterogeneous version numbers to the purer world of semver through coerce, and perform all operations on sanitized versions.

rbarrois avatar Feb 28 '16 16:02 rbarrois