From: Sebastian Luther Date: Wed, 11 Aug 2010 07:15:43 +0000 (+0200) Subject: portage/cache/mappings.py: Remove deprecated functions X-Git-Tag: v2.2_rc68~303 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27b5e425e16360f293d45722a8645f00326fabb8;p=portage.git portage/cache/mappings.py: Remove deprecated functions --- diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py index 0ef5c3ac6..60a918e01 100644 --- a/pym/portage/cache/mappings.py +++ b/pym/portage/cache/mappings.py @@ -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(