Codebase list python-frozendict / ab5577b
Python 3.10 compatibility: collections.Mapping removed "Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working" Andrej Shadura 2 years ago
2 changed file(s) with 28 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: Andrej Shadura <andrewsh@debian.org>
1 Date: Thu, 18 Nov 2021 00:55:57 +0100
2 Subject: Python 3.10 compatibility: collections.Mapping removed
3
4 "Using or importing the ABCs from 'collections' instead of from
5 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will
6 stop working"
7 ---
8 frozendict/__init__.py | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11 diff --git a/frozendict/__init__.py b/frozendict/__init__.py
12 index 399948a..5bb99bb 100644
13 --- a/frozendict/__init__.py
14 +++ b/frozendict/__init__.py
15 @@ -13,9 +13,9 @@ except ImportError: # python < 2.7
16 iteritems = getattr(dict, 'iteritems', dict.items) # py2-3 compatibility
17
18
19 -class frozendict(collections.Mapping):
20 +class frozendict(collections.abc.Mapping):
21 """
22 - An immutable wrapper around dictionaries that implements the complete :py:class:`collections.Mapping`
23 + An immutable wrapper around dictionaries that implements the complete :py:class:`collections.abc.Mapping`
24 interface. It can be used as a drop-in replacement for dictionaries where immutability is desired.
25 """
26
0 py3.10.patch