[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1004746: lintian: provide a check for Python package version numbers validity



Package: lintian
Version: 2.114.0
Severity: wishlist
X-Debbugs-Cc: Debian Python Team <debian-python@lists.debian.org>

I just hit two packages which gave me the following warning when
pkg_resources tried to load them:

/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.12.1-git20200711.33e2d80-dfsg1-0.6 is an invalid version and will not be supported in a future release
  warnings.warn(

(and a different version number in the other case).  The upstream
Python developers have a clear idea of what is accepted as a version
number, and it appears in
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py
(in the python3-pkg-resources package) in the definition of
VERSION_PATTERN.

The version number that is being examined is that stored in
/usr/lib/python3/dist-packages/*.egg-info or
/usr/lib/python3/dist-packages/*.egg-info/PKG-INFO on the line
beginning "Version: ".

This appears to be a fairly rare bug: only two packages on my system
have this issue (and I've just reported bugs against them).
Nonetheless, if it is easy, it would be nice to have a lintian test
for it.

Best wishes,

   Julian


Reply to: