Bug#524061: /var/lib/python-support/python2.6/debian_bundle/deb822.py:1039: DeprecationWarning: object.__init__() takes no parameters

2009-04-27 Thread Stefano Zacchiroli
tags 524061 + pending
thanks

On Tue, Apr 14, 2009 at 04:50:22PM +0200, Loïc Minier wrote:
  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 for the patch!, it has been merged in Git.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...| ..: | Je dis tu à tous ceux que j'aime



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#524061: /var/lib/python-support/python2.6/debian_bundle/deb822.py:1039: DeprecationWarning: object.__init__() takes no parameters

2009-04-14 Thread Loïc Minier
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