mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
This commit is contained in:
parent
9eb5ca0774
commit
2e576f5aec
22 changed files with 90 additions and 85 deletions
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
from _weakrefset import WeakSet, _IterationGuard
|
||||
|
||||
import collections # Import after _weakref to avoid circular import.
|
||||
import collections.abc # Import after _weakref to avoid circular import.
|
||||
import sys
|
||||
import itertools
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ def __ne__(self, other):
|
|||
__hash__ = ref.__hash__
|
||||
|
||||
|
||||
class WeakValueDictionary(collections.MutableMapping):
|
||||
class WeakValueDictionary(collections.abc.MutableMapping):
|
||||
"""Mapping class that references values weakly.
|
||||
|
||||
Entries in the dictionary will be discarded when no strong
|
||||
|
|
@ -340,7 +340,7 @@ def __init__(self, ob, callback, key):
|
|||
super().__init__(ob, callback)
|
||||
|
||||
|
||||
class WeakKeyDictionary(collections.MutableMapping):
|
||||
class WeakKeyDictionary(collections.abc.MutableMapping):
|
||||
""" Mapping class that references keys weakly.
|
||||
|
||||
Entries in the dictionary will be discarded when there is no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue