summaryrefslogtreecommitdiff
path: root/dev-python/qtsass/files/qtsass-0.3.0-fix-py3.10.patch
blob: 4aa3342170e4bb8b466144c1a5c1da464bed039e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From cbea8d8729282106373a12b9e08bcaac8abeb52f Mon Sep 17 00:00:00 2001
From: goanpeca <goanpeca@gmail.com>
Date: Tue, 24 Mar 2020 11:51:28 -0500
Subject: [PATCH] Add check for deprecated api between 2 and 3 versions

---
 qtsass/api.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/qtsass/api.py b/qtsass/api.py
index 7ea4138..7a65fe2 100644
--- a/qtsass/api.py
+++ b/qtsass/api.py
@@ -13,9 +13,9 @@
 from __future__ import absolute_import, print_function
 
 # Standard library imports
-from collections import Mapping, Sequence
 import logging
 import os
+import sys
 
 # Third party imports
 import sass
@@ -26,6 +26,12 @@
 from qtsass.importers import qss_importer
 
 
+if sys.version_info[0] == 3:
+    from collections.abc import Mapping, Sequence
+else:
+    from collections import Mapping, Sequence
+
+
 # yapf: enable
 
 # Constants