mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +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
|
@ -1,4 +1,4 @@
|
|||
import collections
|
||||
import collections.abc
|
||||
import io
|
||||
import os
|
||||
import errno
|
||||
|
@ -1408,7 +1408,7 @@ class _BasePathTest(object):
|
|||
P = self.cls
|
||||
p = P(BASE)
|
||||
it = p.glob("fileA")
|
||||
self.assertIsInstance(it, collections.Iterator)
|
||||
self.assertIsInstance(it, collections.abc.Iterator)
|
||||
_check(it, ["fileA"])
|
||||
_check(p.glob("fileB"), [])
|
||||
_check(p.glob("dir*/file*"), ["dirB/fileB", "dirC/fileC"])
|
||||
|
@ -1432,7 +1432,7 @@ class _BasePathTest(object):
|
|||
P = self.cls
|
||||
p = P(BASE)
|
||||
it = p.rglob("fileA")
|
||||
self.assertIsInstance(it, collections.Iterator)
|
||||
self.assertIsInstance(it, collections.abc.Iterator)
|
||||
_check(it, ["fileA"])
|
||||
_check(p.rglob("fileB"), ["dirB/fileB"])
|
||||
_check(p.rglob("*/fileA"), [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue