rbarrois / python-semanticversion

Semantic version comparison for Python (see http://semver.org/)
BSD 2-Clause "Simplified" License
281 stars 74 forks source link

Incorrect compare version with `partial=True` in Python 2 #131

Closed shadchin closed 1 year ago

shadchin commented 2 years ago

Version 2.6.0

In [1]: import semantic_version

In [2]: semantic_version.__version__
Out[2]: '2.6.0'

In [3]: semantic_version.Version('0.10', partial=True) < semantic_version.Version('0.10.0')
Out[3]: False

Version 2.9.0

In [1]: import semantic_version

In [2]: semantic_version.__version__
Out[2]: '2.9.0'

In [3]: semantic_version.Version('0.10', partial=True) < semantic_version.Version('0.10.0')
contrib/python/ipython/py2/IPython/__init__.py:1: DeprecationWarning: Partial versions will be removed in 3.0; use SimpleSpec('1.x.x') instead.
  # encoding: utf-8
Out[3]: True
rbarrois commented 2 years ago

Hi,

That could be seen as a regression, although the comparison behaviour of partial versions was never documented to begin with.

However, that feature of the library has been deprecated for a long time, with a replacement in SimpleSpec for version range descriptions. How are you using "partial" versions?

rbarrois commented 1 year ago

I'm going to close this issue, as it relates to undocumented behaviour on old Python.

Feel free to reopen the issue if you're still meeting this problem or meet another problem with upgrading ;)