Plainbox tests are broken by PEP 440 incompatible Debian/Ubuntu packages

Bug #1465549 reported by Zygmunt Krynicki on 2015-06-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Undecided
Unassigned
apturl (Ubuntu)
Undecided
Unassigned
ufw (Ubuntu)
Undecided
Unassigned

Bug Description

When running unit tests on my vivid VM I've noticed that many tests fail because there are extra lines printed by pkg_resources:

- /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'apturl (0.5.2ubuntu6)' 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.
- PEP440Warning,
- /usr/lib/python3/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.
- PEP440Warning,
- /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'ufw (0.34-rc-0ubuntu5)' 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.
- PEP440Warning,

I've discussed this with Barry Warsaw and a few other people and the result is that yes, it's a bug in _each_ of those packages and those should be fixed.

I think there are two things we need to do:
 - a long term plan should be based on fixing all of those one by one upstream in debian/ubuntu
 - a short term plan should be to prevent those additional lines from break our tests

Zygmunt Krynicki (zyga) on 2015-06-16
summary: - tests broken by PEP 440 incompatible Debian/Ubuntu packages
+ Plainbox tests are broken by PEP 440 incompatible Debian/Ubuntu packages
affects: ufw → ufw (Ubuntu)
Zygmunt Krynicki (zyga) on 2015-06-16
affects: python-apt → python-apt (Ubuntu)
affects: apturl → apturl (Ubuntu)
Changed in plainbox:
status: New → Confirmed
Zygmunt Krynicki (zyga) wrote :
Julian Andres Klode (juliank) wrote :

For python-apt, that's a duplicate of bug 1445949. This has been fixed in the 1.0 beta in Debian unstable.

Here's the function I used to translate the Debian version to the PEP440 (in most cases it works, there are some corner cases like ~ubuntu that are not expressible):

http://anonscm.debian.org/cgit/apt/python-apt.git/commit/?id=165c3e534716c7f300a6419e2f0ccc331f63c0c9

Julian Andres Klode (juliank) wrote :

It would be great to have a function we could call during build to check if the version number passes PEP440 and raise an exception otherwise. And a translation for the ~ubuntu type of releases would be good to have as well.

Changed in python-apt (Ubuntu):
status: New → Fix Committed
Julian Andres Klode (juliank) wrote :

Just looked at the apturl diff: The proposed fix does not handle rebuilds. In my function, I opted to strip them away, and translate the ubuntu part to a local label, that is 1.0ubuntu1 becomes 1.0+ubuntu1. 1.0ubuntu1build1 would be the same PEP440 version number, but that's fine.

Zygmunt Krynicki (zyga) wrote :
Zygmunt Krynicki (zyga) wrote :

Thanks for fixing the apturl package. Do you plan on releasing the fix back to vivid?

The attachment "Fix for apturl" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Zygmunt Krynicki (zyga) wrote :
Martin Pitt (pitti) wrote :

I'll drop the python-apt task as it's tracked in bug 1445949 but we can't make this bug a duplicate because of the other tasks.

no longer affects: python-apt (Ubuntu)
Martin Pitt (pitti) wrote :

apturl fix committed to bzr and uploaded. Thanks!

Changed in apturl (Ubuntu):
status: New → Fix Committed
Martin Pitt (pitti) wrote :

ufw uploaded too, thanks!

Changed in ufw (Ubuntu):
status: New → Fix Committed

Thanks!

On Fri, Jun 26, 2015 at 11:04 AM, Martin Pitt <email address hidden> wrote:
> ufw uploaded too, thanks!
>
> ** Changed in: ufw (Ubuntu)
> Status: New => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1465549
>
> Title:
> Plainbox tests are broken by PEP 440 incompatible Debian/Ubuntu
> packages
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/plainbox/+bug/1465549/+subscriptions

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apturl - 0.5.2ubuntu7

---------------
apturl (0.5.2ubuntu7) wily; urgency=medium

  * Don't include Debian version in the python module version (LP: #1465549)

 -- Zygmunt Krynicki <email address hidden> Fri, 26 Jun 2015 11:01:58 +0200

Changed in apturl (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.34~rc-0ubuntu6

---------------
ufw (0.34~rc-0ubuntu6) wily; urgency=medium

  * Don't include Debian version in the python module version (LP: #1465549)

 -- Zygmunt Krynicki <email address hidden> Fri, 26 Jun 2015 11:03:39 +0200

Changed in ufw (Ubuntu):
status: Fix Committed → Fix Released
Zygmunt Krynicki (zyga) on 2015-07-03
Changed in plainbox:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers