Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop python2 support #115

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading