Version does not conform to PEP440

Bug #1445949 reported by Václav Šmilauer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Fix Released
Undecided
Unassigned
python-setuptools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When looking for available python modules, pkg_resources issues the following warning:

    /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.

The package version should be conforming.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: python-apt 0.9.3.11build1
ProcVersionSignature: Ubuntu 3.13.0-46.79-lowlatency 3.13.11-ckt15
Uname: Linux 3.13.0-46-lowlatency x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Apr 19 18:00:31 2015
SourcePackage: python-apt
UpgradeStatus: Upgraded to vivid on 2012-03-12 (1133 days ago)

Related branches

Revision history for this message
Václav Šmilauer (eudoxos) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote :

No. It shouldn't. Unfortunately, PEP-440 describes a versioning scheme that is incompatible with the versioning long used in Debian and it's derivatives such as Ubuntu. As the PEP says, "The main reason to even have a standardised version scheme in the first place is to make it easier to do reliable automated dependency analysis." We already have another system to do that and python-apt is conforming to it.

If one were to conform to PEP 440, then the package would be incompatible with distro versioning requirements.

Note: This is not general issue for Python packages. It is only a conflict for Debian/Ubuntu native packages like python-apt.

Changed in python-apt (Ubuntu):
status: New → Invalid
Revision history for this message
Václav Šmilauer (eudoxos) wrote :

Feel free to assign it to another package, but triggering warning in unrelated code just because the package is installed is definitely undesirable.

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

Eh, I am not able to locate which part of code triggers the warning. In any case, debian version can be different from the one written in the .egg-info file (e.g. 0.9.3+11build1 is conforming to pep404, for instance).

Revision history for this message
Scott Kitterman (kitterman) wrote :

This warning ought to be suppressed. It's of interest to developers, not end users and in some cases wrong for Ubuntu packages anyway.

affects: python-apt (Ubuntu) → python-setuptools (Ubuntu)
Changed in python-setuptools (Ubuntu):
status: Invalid → New
Revision history for this message
Matthias Klose (doko) wrote :

no, the warning is correct. python-apt shouldn't encode any nmu number or build number into it's own version string.

Changed in python-setuptools (Ubuntu):
status: New → Invalid
Revision history for this message
Julian Andres Klode (juliank) wrote :

It's basically irrelevant, is it not? We only use the setup.py for building, python-apt cannot be used by any of Python's package installation tools.

Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in python-apt (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.0.0~beta3

---------------
python-apt (1.0.0~beta3) unstable; urgency=medium

  * tests/test_paths.py: Catch and assert the DeprecationWarning
  * setup.py: If no version is in the environment, return None
  * doc/source/library/apt_pkg.rst: Fix an example from old API to new API
  * apt.cache.FilteredCache: Fix multi-arch package lookups
  * apt.Cache: Introduce a connect2() callback connector
  * Break the FilteredCache <-> Cache reference cycle
  * apt.Cache: Issue a RuntimeWarning in connect()
  * doc: whatsnew: Document what's new in beta3

 -- Julian Andres Klode <email address hidden> Wed, 17 Jun 2015 18:28:44 +0200

Changed in python-apt (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Muelli (ubuntu-bugs-auftrags-killer) wrote :

Are we going to see this fix backported to, say, 15.04?

Revision history for this message
Julian Andres Klode (juliank) wrote :

It's backported in git already, we just need to get a permission to upload and upload it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.