mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-30152: Reduce the number of imports for argparse. (#1269)
This commit is contained in:
parent
f1502d097c
commit
81108375d9
8 changed files with 59 additions and 49 deletions
|
@ -21,7 +21,7 @@ from _weakref import (
|
|||
|
||||
from _weakrefset import WeakSet, _IterationGuard
|
||||
|
||||
import collections.abc # 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 @@ class WeakMethod(ref):
|
|||
__hash__ = ref.__hash__
|
||||
|
||||
|
||||
class WeakValueDictionary(collections.abc.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 @@ class KeyedRef(ref):
|
|||
super().__init__(ob, callback)
|
||||
|
||||
|
||||
class WeakKeyDictionary(collections.abc.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