Skip to content

Commit cbea8d8

Browse files
committed
Add check for deprecated api between 2 and 3 versions
1 parent 5478288 commit cbea8d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

qtsass/api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
from __future__ import absolute_import, print_function
1414

1515
# Standard library imports
16-
from collections import Mapping, Sequence
1716
import logging
1817
import os
18+
import sys
1919

2020
# Third party imports
2121
import sass
@@ -26,6 +26,12 @@
2626
from qtsass.importers import qss_importer
2727

2828

29+
if sys.version_info[0] == 3:
30+
from collections.abc import Mapping, Sequence
31+
else:
32+
from collections import Mapping, Sequence
33+
34+
2935
# yapf: enable
3036

3137
# Constants

0 commit comments

Comments
 (0)