cron.weekly script produces a warning since the Python 2.6 transition

Bug #339466 reported by Martin-Éric Racine
8
Affects Status Importance Assigned to Milestone
python-debian (Ubuntu)
Medium
Loïc Minier

Bug Description

Binary package hint: apt-xapian-index

/etc/cron.weekly/apt-xapian-index:
/var/lib/python-support/python2.6/debian_bundle/deb822.py:1039: DeprecationWarning: object.__init__() takes no parameters
 str.__init__(self, str_)

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: apt-xapian-index 0.16
PackageArchitecture: all
ProcEnviron:
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: apt-xapian-index
Uname: Linux 2.6.28-8-generic i686

Revision history for this message
Martin-Éric Racine (q-funk) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Tested with:
$PYTHON -c "import debian_bundle.deb822; print debian_bundle.deb822._strI('fAb') == 'fab'"
works with 2.5 and 2.6.

I'd like someone to comment on the sanity of the approach.

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Max Bowsher (maxb) wrote :

I agree that the patch is sane.

An alternative way to do it would be to simply remove the "str.__init__(self, str_)" line. That would be a slightly more minimal change, but your complete conversion to use __new__ is probably more technically correct, though both should accomplish exactly the same result.

Loïc Minier (lool)
Changed in python-debian (Ubuntu):
assignee: nobody → lool
importance: Undecided → Medium
Revision history for this message
Steve Langasek (vorlon) wrote :

acceptable from the release team's POV; appears low-risk enough, and sufficiently high impact, to accept post-RC. Please upload.

Changed in python-debian (Ubuntu):
status: New → Triaged
Revision history for this message
Loïc Minier (lool) wrote :

I re-tested the diff with "bzr import-dsc" which was also affected

Changed in python-debian (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-debian - 0.1.12ubuntu2

---------------
python-debian (0.1.12ubuntu2) jaunty; urgency=low

  * debian_bundle/deb822.py: _CaseInsensitiveString(): use __new__ instead of
    __init__ to avoid a warning with Python 2.6; LP: #339466.

 -- Loic Minier <email address hidden> Wed, 15 Apr 2009 10:36:34 +0200

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

Other bug subscribers