diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2018-01-20 11:23:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-20 11:23:59 (GMT) |
commit | d911e40e788fb679723d78b6ea11cabf46caed5a (patch) | |
tree | f9743a329c64febe70f7be0b5d610c2a8ea4412d /Lib/test/libregrtest | |
parent | d57f26c753dce61f72b52b96db3a3253d9f2fc3e (diff) | |
download | cpython-d911e40e788fb679723d78b6ea11cabf46caed5a.zip cpython-d911e40e788fb679723d78b6ea11cabf46caed5a.tar.gz cpython-d911e40e788fb679723d78b6ea11cabf46caed5a.tar.bz2 |
bpo-32226: PEP 560: improve typing module (#4906)
This PR re-designs the internal typing API using the new PEP 560 features.
However, there are only few minor changes in the public API.
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r-- | Lib/test/libregrtest/refleak.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index 18d5bd0..2ca9aa8 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -135,11 +135,6 @@ def dash_R_cleanup(fs, ps, pic, zdc, abcs): # Clear ABC registries, restoring previously saved ABC registries. abs_classes = [getattr(collections.abc, a) for a in collections.abc.__all__] abs_classes = filter(isabstract, abs_classes) - if 'typing' in sys.modules: - t = sys.modules['typing'] - # These classes require special treatment because they do not appear - # in direct subclasses of collections.abc classes - abs_classes = list(abs_classes) + [t.ChainMap, t.Counter, t.DefaultDict] for abc in abs_classes: for obj in abc.__subclasses__() + [abc]: obj._abc_registry = abcs.get(obj, WeakSet()).copy() |