File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 22
33from __future__ import unicode_literals , absolute_import
44
5- from collections import Mapping
5+ import sys
66from abc import ABCMeta
77
88from .base_api_json_object import BaseAPIJSONObject , BaseAPIJSONObjectMeta
99from ..util .compat import with_metaclass
1010
11+ if sys .version_info >= (3 , 3 ):
12+ from collections .abc import Mapping # pylint:disable=no-name-in-module,import-error
13+ else :
14+ from collections import Mapping # pylint:disable=no-name-in-module,import-error
15+
1116
1217class APIJSONObjectMeta (BaseAPIJSONObjectMeta , ABCMeta ):
1318 """
Original file line number Diff line number Diff line change 22
33from __future__ import unicode_literals
44
5+ import sys
56from abc import ABCMeta , abstractmethod
6- import collections
77
88from six import add_metaclass
99
1010from boxsdk .pagination .page import Page
1111
12+ if sys .version_info >= (3 , 3 ):
13+ from collections .abc import Iterator # pylint:disable=no-name-in-module,import-error
14+ else :
15+ from collections import Iterator # pylint:disable=no-name-in-module,import-error
16+
1217
1318@add_metaclass (ABCMeta )
14- class BoxObjectCollection (collections . Iterator , object ):
19+ class BoxObjectCollection (Iterator ):
1520 """
1621 An iterator that represents a collection of Box objects (BaseObject).
1722
Original file line number Diff line number Diff line change 22
33from __future__ import unicode_literals , absolute_import
44
5- from collections import Sequence
65import copy
6+ import sys
77
8+ if sys .version_info >= (3 , 3 ):
9+ from collections .abc import Sequence # pylint:disable=no-name-in-module,import-error
10+ else :
11+ from collections import Sequence # pylint:disable=no-name-in-module,import-error
812
9- class Page (Sequence , object ):
13+
14+ class Page (Sequence ):
1015 """
1116 A sequence of BaseObjects that belong to a page returned from a paging api call.
1217
Original file line number Diff line number Diff line change 22
33from __future__ import unicode_literals
44
5- from collections import Mapping
65import logging
76try :
87 from logging import NullHandler
@@ -14,6 +13,11 @@ def emit(self, record):
1413
1514from six import string_types , iteritems
1615
16+ if sys .version_info >= (3 , 3 ):
17+ from collections .abc import Mapping # pylint:disable=no-name-in-module,import-error
18+ else :
19+ from collections import Mapping # pylint:disable=no-name-in-module,import-error
20+
1721
1822_no_logger = object ()
1923
You can’t perform that action at this time.
0 commit comments