Package: python-debian Version: 0.1.12 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jaunty ubuntu-patch
Hey, With python2.6, I get this warning from a bunch of tools: /var/lib/python-support/python2.6/debian_bundle/deb822.py:1039: DeprecationWarning: object.__init__() takes no parameters I filed this originally at https://bugs.launchpad.net/ubuntu/+source/python-debian/+bug/339466 where I included a patch (attached); it seems to still apply to 0.1.13; could you please consider merging it? Thanks, -- Loïc Minier
diff --git a/debian_bundle/deb822.py b/debian_bundle/deb822.py index cfd470f..6e4265c 100644 --- a/debian_bundle/deb822.py +++ b/debian_bundle/deb822.py @@ -1040,10 +1040,11 @@ class _CaseInsensitiveString(str): """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