From 07e8577907b1af53fda08f210057c861f17b86f3 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Wed, 14 Jun 2023 16:42:51 -0400 Subject: [PATCH] Update deprecated collections imports --- .gitignore | 2 +- _vendor/collections_extended/bags.py | 2 +- _vendor/collections_extended/bijection.py | 2 +- _vendor/collections_extended/range_map.py | 3 ++- _vendor/collections_extended/setlists.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c4ce894b..6812cac0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ README.html *multidata *multisave EnemizerCLI/ -.mypy_cache/ \ No newline at end of file +.mypy_cache/ diff --git a/_vendor/collections_extended/bags.py b/_vendor/collections_extended/bags.py index cce132fe..8bd29d60 100644 --- a/_vendor/collections_extended/bags.py +++ b/_vendor/collections_extended/bags.py @@ -1,7 +1,7 @@ """Bag class definitions.""" import heapq from operator import itemgetter -from collections import Set, MutableSet, Hashable +from collections.abc import Set, MutableSet, Hashable from . import _compat diff --git a/_vendor/collections_extended/bijection.py b/_vendor/collections_extended/bijection.py index f9641de4..90d7fe44 100644 --- a/_vendor/collections_extended/bijection.py +++ b/_vendor/collections_extended/bijection.py @@ -1,6 +1,6 @@ """Class definition for bijection.""" -from collections import MutableMapping, Mapping +from collections.abc import MutableMapping, Mapping class bijection(MutableMapping): diff --git a/_vendor/collections_extended/range_map.py b/_vendor/collections_extended/range_map.py index 19a61238..46753ea1 100644 --- a/_vendor/collections_extended/range_map.py +++ b/_vendor/collections_extended/range_map.py @@ -1,6 +1,7 @@ """RangeMap class definition.""" from bisect import bisect_left, bisect_right -from collections import namedtuple, Mapping, MappingView, Set +from collections import namedtuple +from collections.abc import Mapping, MappingView, Set # Used to mark unmapped ranges diff --git a/_vendor/collections_extended/setlists.py b/_vendor/collections_extended/setlists.py index 2976077c..fd4a3993 100644 --- a/_vendor/collections_extended/setlists.py +++ b/_vendor/collections_extended/setlists.py @@ -1,7 +1,7 @@ """Setlist class definitions.""" import random as random_ -from collections import ( +from collections.abc import ( Sequence, Set, MutableSequence,