Skip to content

Commit

Permalink
Merge pull request #115 from ymattw/drop-py2
Browse files Browse the repository at this point in the history
Drop python2 support
  • Loading branch information
ymattw authored Mar 30, 2024
2 parents b6662c7 + aca132c commit b895e36
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 30 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
python-version:
# Available versions:
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
- "2.7.18"
- "3.7"
- "3.8"
- "3.9"
Expand All @@ -50,8 +49,8 @@ jobs:

- name: "Install dependencies"
run: |
python -VV
python -m pip install -r requirements-dev.txt
python3 -VV
python3 -m pip install -r requirements-dev.txt
- name: "Run tests"
run: |
make test
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ FROM python:3-alpine3.15

COPY requirements-dev.txt /tmp/

RUN apk add --no-cache python2 bash git less make && \
python2 -m ensurepip && \
python2 -m pip install -r /tmp/requirements-dev.txt && \
RUN apk add --no-cache bash git less make && \
python3 -m pip install -r /tmp/requirements-dev.txt
26 changes: 4 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TESTPYPI = pypitest
PYPI = pypi

.PHONY: dogfood lint doc-check doc-preview clean build dist-test dist \
test test3 cov cov3 html reg reg3 profile profile3
test cov html reg profile

dogfood:
./ydiff.py
Expand All @@ -24,40 +24,22 @@ doc-preview:

test: lint doc-check cov reg

test2: lint doc-check cov2 reg2

test3: lint doc-check cov3 reg3

cov:
coverage run tests/test_ydiff.py
coverage report --show-missing

cov2:
python2 `which coverage` run tests/test_ydiff.py
python2 `which coverage` report --show-missing

cov3:
python3 `which coverage` run tests/test_ydiff.py
python3 `which coverage` report --show-missing

html:
coverage html
python -m webbrowser -n "file://$(shell pwd)/htmlcov/index.html"

reg:
tests/regression.sh

reg2:
PYTHON=python2 tests/regression.sh

reg3:
PYTHON=python3 tests/regression.sh

profile:
PYTHON=python3 tests/profile.sh tests/*/in.diff
tests/profile.sh tests/*/in.diff

profile-difflib:
PYTHON=python3 tests/profile.sh tests/large-hunk/tao.diff
tests/profile.sh tests/large-hunk/tao.diff

clean:
rm -f MANIFEST profile*.tmp* .coverage
Expand All @@ -76,7 +58,7 @@ dist: clean build

docker-test:
docker run -v $(shell pwd):$(shell pwd) -w $(shell pwd) --rm \
ymattw/ydiff-dev make test2 test3
ymattw/ydiff-dev make test

docker-image:
docker build -t ymattw/ydiff-dev .
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from __future__ import with_statement
Expand Down
2 changes: 1 addition & 1 deletion ydiff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
Expand Down

0 comments on commit b895e36

Please sign in to comment.