Skip to content

Commit

Permalink
Revert "Import abstract base classes from collection.abc in python 3.3+"
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryKuzmenko authored Oct 1, 2019
1 parent 8bf3527 commit a10b149
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
6 changes: 1 addition & 5 deletions salt/modules/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
import glob
import hashlib
import mmap
try:
from collections.abc import Iterable, Mapping
except ImportError:
from collections import Iterable, Mapping
from collections import namedtuple
from collections import Iterable, Mapping, namedtuple
from functools import reduce # pylint: disable=redefined-builtin

# pylint: disable=import-error,no-name-in-module,redefined-builtin
Expand Down
5 changes: 1 addition & 4 deletions salt/modules/win_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
import logging
# pylint: disable=W0611
import operator # do not remove
try:
from collections.abc import Iterable, Mapping # do not remove
except ImportError:
from collections import Iterable, Mapping # do not remove
from collections import Iterable, Mapping # do not remove
from functools import reduce # do not remove
import datetime # do not remove.
import tempfile # do not remove. Used in salt.modules.file.__clean_tmp
Expand Down
6 changes: 1 addition & 5 deletions salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,7 @@ def run():
import sys
import time
import traceback
from collections import defaultdict
try:
from collections.abc import Iterable, Mapping
except ImportError:
from collections import Iterable, Mapping
from collections import Iterable, Mapping, defaultdict
from datetime import datetime, date # python3 problem in the making?

# Import salt libs
Expand Down
5 changes: 1 addition & 4 deletions salt/utils/dictdiffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
'''
from __future__ import absolute_import, print_function, unicode_literals
import copy
try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping
from collections import Mapping
from salt.ext import six


Expand Down

0 comments on commit a10b149

Please sign in to comment.