Switch to collections.abc.*

The abstract base classes previously defined in 'collections' were moved
to 'collections.abc' in 3.3. The aliases will be removed in 3.10.
Preempt this change now with a simple find-replace:

  $ ag -l 'collections.($TYPES)' | \
      xargs sed -i 's/\(collections\)\.\($TYPES\)/\1.abc.\2/g'

Where $TYPES is the list of moved ABCs from [1].

[1] https://docs.python.org/3/library/collections.abc.html

Credit for this commit message to Stephen Finucane <stephenfin@redhat.com>

Change-Id: I782f2449832398cf2cfb886f561635de3d8ac18d
This commit is contained in:
Joel Capitao 2021-02-11 12:09:38 +01:00
parent 5188cc77c5
commit 8271ba8719
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ class CommandsBaseTest(testtools.TestCase):
self.cmd_base.verbose = False
class MockIterable(collections.Iterable):
class MockIterable(collections.abc.Iterable):
links = ["item"]
count = 1