dh_python3: TypeError when maximum version is specified

Bug #1048091 reported by IRIE Shinsuke
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Fix Released
Critical
Barry Warsaw
python3-defaults (Debian)
Fix Released
Unknown
python3-defaults (Ubuntu)
Fix Released
Critical
Barry Warsaw

Bug Description

Package: python3-defaults
Version: 3.2.3-5

I was building a deb package using python3 in my PPA. I want to specify a range of python3 version, but dh_python3 causes an error as follows if the maximum version is specified:

Traceback (most recent call last):
  File "/usr/bin/dh_python3", line 490, in <module>
    main()
  File "/usr/bin/dh_python3", line 422, in main
    dependencies.parse(stats, options)
  File "/usr/share/python3/debpython/depends.py", line 158, in parse
    self.depend("python3 (<< %s)" % vrepr(vr[1] + 1))
TypeError: can only concatenate tuple (not "int") to tuple

I specified the python3 version in debian/control as follows:

  X-Python3-Version: >= 3.2, << 3.3

The same error happens when I use -V command line option like:

  dh_python3 -V 3.2-3.3

I'm using dh_python3 only for private modules, not for public modules.

Tags: ftbfs quantal
Changed in python3-defaults (Debian):
status: Unknown → New
IRIE Shinsuke (irie)
tags: added: ftbfs
IRIE Shinsuke (irie)
description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1048091] Re: dh_python3: TypeError when maximum version is specified

I didn't replicate this. Can you provide a package that demonstrates the
problem?

Revision history for this message
IRIE Shinsuke (irie) wrote :

I encountered the problem in my Blender's PPA:

  ppa:irie/blender

You can see build log of the FTBFS:

  https://launchpad.net/~irie/+archive/blender/+build/3876314

Since Blender requires many libraries which are not officially debianized yet, you have to use some other PPAs if you want to test my blender package:

  ppa:irie/opencollada-builddep
  ppa:irie/ocio-static
  ppa:irie/openimageio (optional, maybe Ubuntu's offical package can be used instead)

Anyway, as I mentioned in Debian's tracker, each element of vr[] in depends.py is a tuple of the major and minor versions such as (3, 2), not an integer, so "vr[1] + 1" in the line 158 absolutely causes a TypeError.

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

Thanks. I'll have a look.

Revision history for this message
IRIE Shinsuke (irie) wrote :

Similar error in dh_python2 has been reported:

  http://lists.debian.org/debian-python/2012/06/msg00040.html

However, this issue seems not to be fixed yet.

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

As predicted, I had trouble building the version of blender in your PPA, so I
copied your packaging changes (less build-deps) into the Quantal package and
tried that. It built fine:

make[1]: Entering directory `/home/blender-2.63a'
dh_python3 -V 3.2-3.3 /usr/share/blender/2.63/scripts \
                   -X usr/share/blender/2.63/scripts/addons_extern
make[1]: Leaving directory `/home/blender-2.63a'

So while I don't doubt there's a bug here, I'm not sure exactly when it gets
triggered. I'm glad to work on this, but until I can recreate the problem,
I'm not going to be comfortable I've got a correct solution.

Revision history for this message
IRIE Shinsuke (irie) wrote :

I can redo FTBFS by very simple deb package (py3test) I attached.

Please check it.

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

Thanks. That does it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python3-defaults (Ubuntu):
status: New → Confirmed
Barry Warsaw (barry)
Changed in python3-defaults (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → Critical
milestone: none → ubuntu-12.10
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.2.3-5ubuntu1

---------------
python3-defaults (3.2.3-5ubuntu1) quantal; urgency=low

  * Avoid TypeError in dh_python3 when maximum version is specified.
    LP: #1048091
 -- Barry Warsaw <email address hidden> Wed, 10 Oct 2012 14:31:02 -0400

Changed in python3-defaults (Ubuntu):
status: Confirmed → Fix Released
Barry Warsaw (barry)
Changed in python-defaults (Ubuntu):
milestone: none → ubuntu-12.10
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-defaults - 2.7.3-0ubuntu7

---------------
python-defaults (2.7.3-0ubuntu7) quantal; urgency=low

  * Avoid TypeError in dh_python when maximum version is specified.
    LP: #1048091
 -- Barry Warsaw <email address hidden> Wed, 10 Oct 2012 15:45:02 -0400

Changed in python-defaults (Ubuntu):
status: New → Fix Released
Changed in python3-defaults (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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