Skip to content

Commit f18c005

Browse files
committed
Fix MutableMapping on python 3.10
1 parent aa87b52 commit f18c005

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

udger/base.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
from .queries import Queries
1111
from .wdetector import *
1212

13+
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
14+
15+
from collections.abc import MutableMapping
16+
else:
17+
from collections import MutableMapping
1318

1419
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
1520
from collections.abc import MutableMapping
@@ -37,7 +42,7 @@ def __get__(self, instance, unused_type=None):
3742
return res
3843

3944

40-
class LRUDict(collections.MutableMapping):
45+
class LRUDict(MutableMapping):
4146
def __init__(self, maxlen, *a, **k):
4247
self.maxlen = maxlen
4348
self.d = dict(*a, **k)

0 commit comments

Comments
 (0)