Skip to content

Commit 1db7348

Browse files
committed
Drop support for Python <=3.6
1 parent 01bb740 commit 1db7348

File tree

6 files changed

+11
-23
lines changed

6 files changed

+11
-23
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
PYTHON_VERSION: ['2.7', '3.7', '3.10']
25+
PYTHON_VERSION: ['3.7', '3.10']
2626
steps:
2727
- name: Checkout branch
2828
uses: actions/checkout@v2
@@ -46,7 +46,7 @@ jobs:
4646
conda info
4747
conda list
4848
- name: Format
49-
if: matrix.PYTHON_VERSION == '2.7'
49+
if: matrix.PYTHON_VERSION == '3.7'
5050
shell: bash -l {0}
5151
run: python run_checks_and_format.py
5252
- name: Run tests
@@ -108,7 +108,7 @@ jobs:
108108
strategy:
109109
fail-fast: false
110110
matrix:
111-
PYTHON_VERSION: ['2.7', '3.7', '3.8', '3.9', '3.10']
111+
PYTHON_VERSION: ['3.7', '3.8', '3.9', '3.10']
112112
steps:
113113
- name: Checkout branch
114114
uses: actions/checkout@v2
@@ -149,7 +149,7 @@ jobs:
149149
strategy:
150150
fail-fast: false
151151
matrix:
152-
PYTHON_VERSION: ['2.7', '3.7', '3.8', '3.9', '3.10']
152+
PYTHON_VERSION: ['3.7', '3.8', '3.9', '3.10']
153153
steps:
154154
- name: Checkout branch
155155
uses: actions/checkout@v2

qtsass/api.py

+1-7
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.abc import Mapping, Sequence
1617
import logging
1718
import os
18-
import sys
1919

2020
# Third party imports
2121
import sass
@@ -26,12 +26,6 @@
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-
3529
# yapf: enable
3630

3731
# Constants

requirements/dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ flaky
33
isort==4.3.15
44
pycodestyle==2.5.0
55
pydocstyle==3.0.0
6-
PySide2; python_version=="3.6"
6+
PySide2; python_version=="3.7"
77
pytest
88
pytest-cov
99
yapf==0.26

run_checks_and_format.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313

1414
# Standard library imports
1515
from subprocess import PIPE, Popen
16-
import os
1716
import sys
1817

1918

2019
# yapf: enable
2120

2221
# Constants
23-
PY3 = sys.version[0] == '3'
2422
COMMANDS = [
2523
['pydocstyle', 'qtsass'],
2624
['pycodestyle', 'qtsass'],
@@ -38,9 +36,8 @@ def run_process(cmd_list):
3836
raise OSError('Could not call command list: "%s"' % cmd_list)
3937

4038
out, err = p.communicate()
41-
if PY3:
42-
out = out.decode()
43-
err = err.decode()
39+
out = out.decode()
40+
err = err.decode()
4441
return out, err
4542

4643

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license_files = LICENSE.txt
1010
# support. Removing this line (or setting universal to 0) will prevent
1111
# bdist_wheel from trying to make a universal wheel. For more see:
1212
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels
13-
universal=1
13+
universal=0
1414

1515
# pydocstyle
1616
# http://www.pydocstyle.org/en/latest/usage.html

setup.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ def get_description():
6868
'Natural Language :: English',
6969
'Operating System :: OS Independent',
7070
'Programming Language :: Python',
71-
'Programming Language :: Python :: 2',
72-
'Programming Language :: Python :: 2.7',
7371
'Programming Language :: Python :: 3',
74-
'Programming Language :: Python :: 3.5',
75-
'Programming Language :: Python :: 3.6',
7672
'Programming Language :: Python :: 3.7',
7773
'Programming Language :: Python :: 3.8',
7874
'Programming Language :: Python :: 3.9',
@@ -81,7 +77,8 @@ def get_description():
8177
'Topic :: Software Development :: Libraries :: Python Modules',
8278
),
8379
install_requires=[
84-
'libsass<=0.21.0',
80+
'libsass>=0.22.0',
8581
],
82+
python_requires='>=3.7',
8683
keywords='qt sass qtsass scss css qss stylesheets',
8784
)

0 commit comments

Comments
 (0)