Skip to content

Commit

Permalink
build: drop support for 3.7 and Django 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jul 9, 2023
1 parent b821fc6 commit 8d6c103
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
python-version:
# When changing this list, be sure to check the [gh-actions] list in
# tox.ini so that tox will run properly.
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down Expand Up @@ -86,7 +85,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.7"
python-version: "3.8"

- name: "Install dependencies"
run: |
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ A `coverage.py`_ plugin to measure test coverage of Django templates.
Supported on:

- Python: 3.7 through 3.11.
- Python: 3.8 through 3.11.

- Django: 1.11, 2.x, 3.x and 4.x.
- Django: 2.x, 3.x and 4.x.

- Coverage.py: 4.x or higher.
- Coverage.py: 6.x or higher.

The plugin is pip installable::

Expand Down
9 changes: 3 additions & 6 deletions django_coverage_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def check_debug():
return True


if django.VERSION < (1, 11):
raise RuntimeError("Django Coverage Plugin requires Django 1.11 or higher")
if django.VERSION < (2, 0):
raise RuntimeError("Django Coverage Plugin requires Django 2.x or higher")


# Since we are grabbing at internal details, we have to adapt as they
Expand Down Expand Up @@ -312,10 +312,7 @@ def lines(self):
if SHOW_PARSING:
print(f"-------------- {self.filename}")

if django.VERSION >= (1, 9):
lexer = Lexer(self.source())
else:
lexer = Lexer(self.source(), self.filename)
lexer = Lexer(self.source())
tokens = lexer.tokenize()

# Are we inside a comment?
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def read(*names, **kwargs):
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -43,7 +42,7 @@ def read(*names, **kwargs):
Framework :: Django :: 1.11
Framework :: Django :: 2.2
Framework :: Django :: 3.2
Framework :: Django :: 4.1
Framework :: Django :: 4.2
"""

setup(
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

[tox]
envlist =
py37-django{111,22,32}-cov{6,7,tip},
py38-django{22,32,42}-cov{6,7,tip},
py39-django{22,32,42}-cov{6,7,tip},
py310-django{32,42,tip}-cov{6,7,tip},
Expand All @@ -26,7 +25,6 @@ deps =
cov6: coverage>=6.0,<7.0
cov7: coverage>=7.0,<8.0
covtip: git+https://github.com/nedbat/coveragepy.git
django111: Django>=1.11,<2.0
django22: Django>=2.2,<3.0
django32: Django>=3.2,<4.0
django42: Django>=4.2,<5.0
Expand Down Expand Up @@ -74,7 +72,6 @@ commands =

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand Down

0 comments on commit 8d6c103

Please sign in to comment.