Skip to content

Commit 65d6bf3

Browse files
committed
Using ABCs from collections instead of collections.abc is deprecated.
And it will stop working in Python 3.8 according to the warning.
1 parent d2cf189 commit 65d6bf3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

babel/_compat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
cmp = lambda a, b: (a > b) - (a < b)
3030

3131
array_tobytes = array.array.tobytes
32+
from collections import abc
3233

3334
else:
3435
text_type = unicode
@@ -54,7 +55,7 @@
5455
cmp = cmp
5556

5657
array_tobytes = array.array.tostring
57-
58+
import collections as abc
5859

5960
number_types = integer_types + (float,)
6061

babel/localedata.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414

1515
import os
1616
import threading
17-
from collections import MutableMapping
1817
from itertools import chain
1918

20-
from babel._compat import pickle, string_types
19+
from babel._compat import pickle, string_types, abc
2120

2221

2322
_cache = {}
@@ -187,7 +186,7 @@ def resolve(self, data):
187186
return data
188187

189188

190-
class LocaleDataDict(MutableMapping):
189+
class LocaleDataDict(abc.MutableMapping):
191190
"""Dictionary wrapper that automatically resolves aliases to the actual
192191
values.
193192
"""

0 commit comments

Comments
 (0)