zopefoundation / z3c.checkversions

Find newer package versions on PyPI
Other
2 stars 6 forks source link

Deprecation warning under current 'setuptools' #6

Closed tseaver closed 6 years ago

tseaver commented 8 years ago
$ bin/checkversions 
# Checking your installed distributions
<PATH_TO>/eggs/setuptools-20.2.2-py3.5.egg/pkg_resources/__init__.py:194: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,
mauritsvanrees commented 8 years ago

I see this in lots of buildout runs, so this may not be specific to z3c.checkversions.

Ah, but you see this when running the tool itself. That is probably this line: https://github.com/zopefoundation/z3c.checkversions/blob/5917d862b8022f8b573f3c2df89d40ae481b16f2/src/z3c/checkversions/base.py#L23

I guess the only solution would be to require setuptools >= 8 in our setup.py. Or have some code that first checks which setuptools version is used and then does something else in the 8+ case.

tseaver commented 8 years ago

Given that setuptools 8.0 is 18 months old, I think we could just bump our requirement: folks who need to pin old setuptools are already flatlined. I'm not sure what the "approved" spelling would be for excluding non-final versions.

icemac commented 6 years ago

Should be fixed by #9.