Replace iteritems/itervalues/iterkeys with native versions. (#7692)

This commit is contained in:
Patrick Cloke 2020-06-15 07:03:36 -04:00 committed by GitHub
parent 2d11ea385c
commit bd6dc17221
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 184 additions and 263 deletions

View file

@ -21,8 +21,6 @@ import threading
from typing import Any, Tuple, Union, cast
from weakref import WeakValueDictionary
from six import itervalues
from prometheus_client import Gauge
from typing_extensions import Protocol
@ -281,7 +279,7 @@ class Cache(object):
def invalidate_all(self):
self.check_thread()
self.cache.clear()
for entry in itervalues(self._pending_deferred_cache):
for entry in self._pending_deferred_cache.values():
entry.invalidate()
self._pending_deferred_cache.clear()