Skip to content

Commit

Permalink
fix(DeprecationWarning): use collections.abc module instead of collec…
Browse files Browse the repository at this point in the history
…tions (#1057)
  • Loading branch information
mwtoews authored Feb 15, 2021
1 parent 1332b96 commit 7d36b1c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions flopy/mf6/mfbase.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import glob
import importlib
import inspect, sys, traceback
import os, collections, copy
import os, copy
from collections import OrderedDict
from collections.abc import Iterable
from shutil import copyfile
from enum import Enum

Expand Down Expand Up @@ -233,10 +235,10 @@ def __init__(self, path):
self.existing_file_dict = {}
# keys:filenames,vals:instance name

self.model_relative_path = collections.OrderedDict()
self.model_relative_path = OrderedDict()

self._last_loaded_sim_path = None
self._last_loaded_model_relative_path = collections.OrderedDict()
self._last_loaded_model_relative_path = OrderedDict()

def copy_files(self, copy_relative_only=True):
num_files_copied = 0
Expand Down Expand Up @@ -677,7 +679,7 @@ def _load_only_dict(load_only):
return None
if isinstance(load_only, dict):
return load_only
if not isinstance(load_only, collections.Iterable):
if not isinstance(load_only, Iterable):
raise FlopyException(
"load_only must be iterable or None. "
'load_only value of "{}" is '
Expand Down

0 comments on commit 7d36b1c

Please sign in to comment.