Skip to content

Commit

Permalink
Drop support for Python 2
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Sep 21, 2023
1 parent 543b328 commit d8d3b50
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: set up Python ${{ matrix.python-version }}
Expand Down
5 changes: 1 addition & 4 deletions liccheck/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

from liccheck.requirements import parse_requirements, resolve, resolve_without_deps

try:
from configparser import ConfigParser, NoOptionError
except ImportError:
from ConfigParser import ConfigParser, NoOptionError
from configparser import ConfigParser, NoOptionError
import enum
import functools
import re
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand All @@ -76,7 +74,7 @@
# this:
# py_modules=["my_module"],

python_requires='>=2.7',
python_requires='>=3.5',

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

Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pytest>=3.6.3
pytest-cov
python-openid;python_version<="2.7"
python3-openid;python_version>="3.0"
pytest-mock>=1.10
tox
9 changes: 4 additions & 5 deletions tests/test_get_packages_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ def test_license_strip(tmpfile):
def test_requirements_markers(tmpfile):
tmpfh, tmppath = tmpfile
tmpfh.write(
"python-openid;python_version<=\"2.7\"\n"
"python3-openid;python_version>=\"3.0\"\n"
"python3-openid;python_version>=\"3.9\"\n"
)
tmpfh.close()
if sys.version_info.major == 3:
assert len(get_packages_info(tmppath)) == 2
else:
if sys.version_info.minor >= 9:
assert len(get_packages_info(tmppath)) == 1
else:
assert len(get_packages_info(tmppath)) == 0


def test_editable_requirements_get_ignored(tmpfile):
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[tox]
envlist = py27, py35, py36, py37, py38, py39, py310, py311
envlist = py35, py36, py37, py38, py39, py310, py311
skip_missing_interpreters = True

[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
Expand Down

0 comments on commit d8d3b50

Please sign in to comment.