portage/cache/mappings.py: Remove deprecated functions
authorSebastian Luther <SebastianLuther@gmx.de>
Wed, 11 Aug 2010 07:15:43 +0000 (09:15 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Aug 2010 07:51:27 +0000 (00:51 -0700)
pym/portage/cache/mappings.py

index 0ef5c3ac6afaea0562f69faffe119d480f527f79..60a918e010ce98a6dbfe4f04ce8ded9f5b654cd7 100644 (file)
@@ -6,7 +6,6 @@ __all__ = ["Mapping", "MutableMapping", "UserDict", "ProtectedDict",
        "LazyLoad", "slot_dict_class"]
 
 import sys
-import warnings
 import weakref
 
 class Mapping(object):
@@ -29,11 +28,6 @@ class Mapping(object):
        def keys(self):
                return list(self.__iter__())
 
-       def has_key(self, key):
-               warnings.warn("portage.cache.mappings.Mapping.has_key() " + \
-                       "is deprecated, use the in operator instead", DeprecationWarning)
-               return key in self
-
        def __contains__(self, key):
                try:
                        value = self[key]
@@ -268,12 +262,6 @@ class ProtectedDict(MutableMapping):
        def __contains__(self, key):
                return key in self.new or (key not in self.blacklist and key in self.orig)
 
-       def has_key(self, key):
-               warnings.warn("portage.cache.mapping.ProtectedDict.has_key() is"
-                       " deprecated, use the in operator instead",
-                       DeprecationWarning)
-               return key in self
-
        if sys.hexversion >= 0x3000000:
                keys = __iter__
 
@@ -303,13 +291,6 @@ class LazyLoad(Mapping):
                        self.pull = None
                return iter(self.d)
 
-       def has_key(self, key):
-               warnings.warn("portage.cache.mappings.LazyLoad.has_key() is "
-                       "deprecated, use the in operator instead",
-                       DeprecationWarning)
-               return key in self
-
-
        def __contains__(self, key):
                if key in self.d:
                        return True
@@ -454,12 +435,6 @@ def slot_dict_class(keys, prefix="_val_"):
                        def __contains__(self, k):
                                return hasattr(self, self._prefix + k)
 
-                       def has_key(self, k):
-                               warnings.warn("portage.cache.mappings.SlotDict.has_key()" + \
-                                       " is deprecated, use the in operator instead",
-                                       DeprecationWarning)
-                               return k in self
-
                        def pop(self, key, *args):
                                if len(args) > 1:
                                        raise TypeError(