For subclasses of Task, explicitly assign __hash__ = Task.__hash__ for
authorZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 00:03:01 +0000 (00:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 00:03:01 +0000 (00:03 -0000)
compatibility with python-2.6_beta. Thanks to Arfrever for reporting.

svn path=/main/trunk/; revision=11020

pym/_emerge/__init__.py

index ff5c3d585457afa5aeda3582bc31a0cf403a55cd..5dbb447952f2101cd1dd23f0f6dbec4338f433d2 100644 (file)
@@ -1288,6 +1288,8 @@ class Task(SlotObject):
                return str(self._get_hash_key())
 
 class Blocker(Task):
+
+       __hash__ = Task.__hash__
        __slots__ = ("root", "atom", "cp", "satisfied")
 
        def __init__(self, **kwargs):
@@ -1302,6 +1304,8 @@ class Blocker(Task):
                return self._hash_key
 
 class Package(Task):
+
+       __hash__ = Task.__hash__
        __slots__ = ("built", "cpv", "depth",
                "installed", "metadata", "onlydeps", "operation",
                "root_config", "type_name",
@@ -2658,6 +2662,7 @@ class EbuildMerge(SlotObject):
 
 class PackageUninstall(Task):
 
+       __hash__ = Task.__hash__
        __slots__ = ("ldpath_mtimes", "opts", "pkg", "settings")
 
        def _get_hash_key(self):