Package: python-debian Version: 0.1.13 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jaunty ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following: * Merge from debian unstable, remaining changes: - debian_bundle/deb822.py: use __new__ instead of __init__ to avoid a warning with Python 2.6; LP: #339466. We thought you might be interested in doing the same. See also: https://bugs.launchpad.net/ubuntu/+source/python-debian/+bug/339466 and http://www.python.org/download/releases/2.2/descrintro/#__new__ -- System Information: Debian Release: squeeze/sid APT prefers karmic APT policy: (500, 'karmic') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru python-debian-0.1.13/debian_bundle/deb822.py python-debian-0.1.13ubuntu1/debian_bundle/deb822.py --- python-debian-0.1.13/debian_bundle/deb822.py 2009-04-07 11:02:10.000000000 +0200 +++ python-debian-0.1.13ubuntu1/debian_bundle/deb822.py 2009-04-17 06:03:31.000000000 +0200 @@ -1048,10 +1048,11 @@ """Case insensitive string. """ - def __init__(self, str_): - str.__init__(self, str_) - self.str_lower = str_.lower() - self.str_lower_hash = hash(self.str_lower) + def __new__(cls, str_): + s = str.__new__(cls, str_) + s.str_lower = str_.lower() + s.str_lower_hash = hash(s.str_lower) + return s def __hash__(self): return self.str_lower_hash