Replace deprecated import of ABCs from collections

ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Change-Id: I751b91feafbf54cbbf1244fa98091444424385c7
This commit is contained in:
Takashi Kajinami 2021-07-27 09:02:56 +09:00
parent d8cc88284b
commit 91922f2753
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import collections
from collections import abc
import functools
import inspect
import time
@ -99,7 +99,7 @@ def memoized(func):
@functools.wraps(func)
def wrapper(*args):
if not isinstance(args, collections.Hashable):
if not isinstance(args, abc.Hashable):
# args is not cacheable. just call the function.
return func(*args)
if args in cache: