Skip to content

Commit 71ea82b

Browse files
authored
Stop testing on Python < 3.8 (#149)
1 parent 2ff0e8d commit 71ea82b

File tree

3 files changed

+1
-52
lines changed

3 files changed

+1
-52
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
python-version:
15-
- 2.7
16-
- 3.5
17-
- 3.6
18-
- 3.7
1915
- 3.8
2016
- 3.9
2117
- '3.10'
2218
- 3.11
2319
- 3.12
2420
# As per https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#pypy list of versions
25-
- pypy-2.7
26-
- pypy-3.6
27-
- pypy-3.7
2821
- pypy-3.8
2922
- pypy-3.9
3023
- pypy-3.10
@@ -58,17 +51,6 @@ jobs:
5851
with:
5952
python-version: ${{ matrix.python-version }}
6053

61-
- name: Set up Python 2.7
62-
if: matrix.python-version == '2.7'
63-
run: |
64-
sudo apt-get update
65-
sudo apt-get install python2.7 -y
66-
# Get everything to use this new Python as the default.
67-
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
68-
sudo python2.7 get-pip.py
69-
sudo ln -sf /usr/bin/pip2 /usr/bin/pip
70-
sudo ln -sf /usr/bin/python2.7 /usr/bin/python
71-
7254
- name: Install dependencies
7355
run: |
7456
pip install --upgrade coveralls pytest setuptools setuptools_scm pep517
@@ -79,19 +61,13 @@ jobs:
7961
# Not an exact mypy version, as we need 0.942 for pypy-3.8 support, but it's not available on 3.5
8062
pip install types-six "mypy>=0.910,<=0.942"
8163
python -m mypy asttokens tests/*.py
82-
# fromJson because https://i.8713187.xyzmunity/t/passing-an-array-literal-to-contains-function-causes-syntax-error/17213/3
83-
if: ${{ !contains(fromJson('["2.7", "pypy-2.7", "pypy-3.6", "pypy-3.7"]'), matrix.python-version) }}
84-
# pypy < 3.8 very doesn't work
85-
# 2.7 is tested separately in mypy-py2, as we need to run mypy under Python 3.x
8664
8765
- name: Fast tests with coverage
8866
run: |
8967
pytest --cov -n auto -m "not slow"
9068
coverage report -m
9169
9270
- name: Slow tests without coverage
93-
# Python 2.7 doesn't have any slow tests
94-
if: ${{ !contains(fromJson('["2.7", "pypy-2.7"]'), matrix.python-version) }}
9571
run: |
9672
pytest -n auto -m slow
9773
@@ -102,27 +78,6 @@ jobs:
10278
pip3 install --upgrade coveralls
10379
python3 -m coveralls --service=github
10480
105-
# Can't run mypy on Python 2.7, but can run it in Python 2 mode
106-
mypy-py2:
107-
runs-on: ubuntu-latest
108-
steps:
109-
- uses: actions/checkout@v3
110-
111-
- name: Set up Python 3.9
112-
uses: actions/setup-python@v4
113-
with:
114-
python-version: 3.9
115-
116-
- name: Install dependencies
117-
run: |
118-
pip install --upgrade setuptools setuptools_scm pep517
119-
pip install .[test]
120-
pip install types-six==1.16.10 mypy[python2]==0.910
121-
122-
- name: Mypy testing for Python 2
123-
run: |
124-
python -m mypy --py2 asttokens
125-
12681
finish:
12782
needs: test
12883
runs-on: ubuntu-latest

setup.cfg

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ classifiers =
1818
Topic :: Software Development :: Pre-processors
1919
Environment :: Console
2020
Operating System :: OS Independent
21-
Programming Language :: Python :: 2
22-
Programming Language :: Python :: 2.7
23-
Programming Language :: Python :: 3
24-
Programming Language :: Python :: 3.5
25-
Programming Language :: Python :: 3.6
26-
Programming Language :: Python :: 3.7
2721
Programming Language :: Python :: 3.8
2822
Programming Language :: Python :: 3.9
2923
Programming Language :: Python :: 3.10

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{27,35,36,37,38,39,310,311,py,py3}
7+
envlist = py{38,39,310,311,py,py3}
88

99
[testenv]
1010
commands = pytest {posargs}

0 commit comments

Comments
 (0)