Skip to content

Commit cce5376

Browse files
authored
Merge pull request #109 from abompard/drop-2.7
Drop support for Python 2
2 parents 543b328 + f3635a9 commit cce5376

File tree

7 files changed

+9
-35
lines changed

7 files changed

+9
-35
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
12-
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
12+
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: set up Python ${{ matrix.python-version }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-20.04
1111
strategy:
1212
matrix:
13-
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
13+
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
1414
steps:
1515
- uses: actions/checkout@v3
1616
- name: set up Python ${{ matrix.python-version }}

liccheck/command_line.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
from liccheck.requirements import parse_requirements, resolve, resolve_without_deps
66

7-
try:
8-
from configparser import ConfigParser, NoOptionError
9-
except ImportError:
10-
from ConfigParser import ConfigParser, NoOptionError
7+
from configparser import ConfigParser, NoOptionError
118
import enum
129
import functools
1310
import re

setup.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656

5757
# Specify the Python versions you support here. In particular, ensure
5858
# that you indicate whether you support Python 2, Python 3 or both.
59-
'Programming Language :: Python :: 2',
60-
'Programming Language :: Python :: 2.7',
6159
'Programming Language :: Python :: 3',
6260
'Programming Language :: Python :: 3.5',
6361
'Programming Language :: Python :: 3.6',
@@ -76,24 +74,10 @@
7674
# this:
7775
# py_modules=["my_module"],
7876

79-
python_requires='>=2.7',
77+
python_requires='>=3.5',
8078

8179
install_requires=['semantic_version>=2.7.0', 'toml'],
8280

83-
# List additional groups of dependencies here (e.g. development
84-
# dependencies). You can install these using the following syntax,
85-
# for example:
86-
# $ pip install -e .[dev,test]
87-
extras_require={
88-
':python_version < "3.4"': [
89-
'ConfigParser',
90-
'enum34',
91-
],
92-
':python_version >= "3.4"': [
93-
'configparser',
94-
],
95-
},
96-
9781
# If there are data files included in your packages that need to be
9882
# installed, specify them here. If using Python 2.6 or less, then these
9983
# have to be included in MANIFEST.in as well.

test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pytest>=3.6.3
22
pytest-cov
3-
python-openid;python_version<="2.7"
43
python3-openid;python_version>="3.0"
54
pytest-mock>=1.10
65
tox

tests/test_get_packages_info.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ def test_license_strip(tmpfile):
1515
def test_requirements_markers(tmpfile):
1616
tmpfh, tmppath = tmpfile
1717
tmpfh.write(
18-
"python-openid;python_version<=\"2.7\"\n"
19-
"python3-openid;python_version>=\"3.0\"\n"
18+
"python3-openid;python_version>=\"3.9\"\n"
2019
)
2120
tmpfh.close()
22-
if sys.version_info.major == 3:
21+
if sys.version_info.minor >= 9:
2322
assert len(get_packages_info(tmppath)) == 2
2423
else:
25-
assert len(get_packages_info(tmppath)) == 1
24+
assert len(get_packages_info(tmppath)) == 0
2625

2726

2827
def test_editable_requirements_get_ignored(tmpfile):
@@ -42,11 +41,7 @@ def test_editable_requirements_get_ignored(tmpfile):
4241
('no_deps', 'expected_packages'), (
4342
pytest.param(
4443
False,
45-
('configparser', 'liccheck', 'semantic-version', 'toml'),
46-
marks=pytest.mark.skipif(
47-
sys.version_info[0] < 3,
48-
reason='with py2 there are more dependencies',
49-
),
44+
('liccheck', 'semantic-version', 'toml'),
5045
id='with deps'
5146
),
5247
pytest.param(True, ('liccheck',), id='without deps'),

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[tox]
2-
envlist = py27, py35, py36, py37, py38, py39, py310, py311
2+
envlist = py35, py36, py37, py38, py39, py310, py311
33
skip_missing_interpreters = True
44

55
[gh-actions]
66
python =
7-
2.7: py27
87
3.5: py35
98
3.6: py36
109
3.7: py37

0 commit comments

Comments
 (0)