From 9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 21 Aug 2010 06:46:56 -0700 Subject: [PATCH] Add a deprecation warning to FetchlistDict.has_key(). --- pym/portage/dbapi/porttree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index a604260b2..dab75b278 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -1160,6 +1160,9 @@ class FetchlistDict(Mapping): def has_key(self, pkg_key): """Returns true if the given package exists within pkgdir.""" + warnings.warn("portage.dbapi.porttree.FetchlistDict.has_key() is " + "deprecated, use the 'in' operator instead", + DeprecationWarning, stacklevel=2) return pkg_key in self def __iter__(self): -- 2.26.2