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:
parent
d8cc88284b
commit
91922f2753
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue