From f522aabc3ddc4a55513c75a39d0b11378ba8f41b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 19 Feb 2009 02:52:36 +0000 Subject: In python-3.0, the UserDict.DictMixin class has been replaced by Mapping and MutableMapping from the collections module, but 2to3 doesn't currently account for this change: http://bugs.python.org/issue2876 As a workaround for the above issue, implement Mapping and MutableMapping classes as substitutes for UserDict.DictMixin so that code converted via 2to3 will run. svn path=/main/trunk/; revision=12628 --- pym/_emerge/__init__.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 10b85ea57..00ef6f705 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -56,7 +56,6 @@ from portage.sets import load_default_config, SETPREFIX from portage.sets.base import InternalPackageSet from itertools import chain, izip -from UserDict import DictMixin try: import cPickle as pickle @@ -4011,7 +4010,7 @@ class Dependency(SlotObject): if self.depth is None: self.depth = 0 -class BlockerCache(DictMixin): +class BlockerCache(portage.cache.mappings.MutableMapping): """This caches blockers of installed packages so that dep_check does not have to be done for every single installed package on every invocation of emerge. The cache is invalidated whenever it is detected that something @@ -4169,11 +4168,6 @@ class BlockerCache(DictMixin): """ return self.BlockerData(*self._cache_data["blockers"][cpv]) - def keys(self): - """This needs to be implemented so that self.__repr__() doesn't raise - an AttributeError.""" - return list(self) - class BlockerDB(object): def __init__(self, root_config): -- cgit v1.2.3-1-g7c22