diff --git a/.travis.yml b/.travis.yml index 6df6b36..9db7c78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,7 @@ python: - "3.4" - "3.5" - "3.6" + - "3.7" + - "3.8" install: pip install tox-travis script: tox diff --git a/README.rst b/README.rst index 1416fdd..8409149 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ .. |versions| image:: https://img.shields.io/pypi/pyversions/django_coverage_plugin.svg :target: https://pypi.python.org/pypi/django_coverage_plugin :alt: Supported Python Versions -.. |djversions| image:: https://img.shields.io/badge/Django-1.8%20%7C%201.11%20%7C%202.0%20%7C%202.1-44b78b.svg +.. |djversions| image:: https://img.shields.io/badge/Django-1.8%20%7C%201.11%20%7C%202.0%20%7C%202.1%20%7C%202.2%20%7C%203.0-44b78b.svg :target: https://pypi.python.org/pypi/django_coverage_plugin :alt: Supported Django Versions @@ -26,9 +26,9 @@ Django Template Coverage.py Plugin A `coverage.py`_ plugin to measure test coverage of Django templates. -Supported Python versions: 2.7, 3.4, 3.5 and 3.6. +Supported Python versions: 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. -Supported Django versions: 1.8, 1.11, 2.0, and 2.1. +Supported Django versions: 1.8, 1.11, 2.0, 2.1, 2.2 and 3.0. Supported coverage.py versions are 4.0 and higher. diff --git a/django_coverage_plugin/plugin.py b/django_coverage_plugin/plugin.py index 60c61df..e777f4f 100644 --- a/django_coverage_plugin/plugin.py +++ b/django_coverage_plugin/plugin.py @@ -134,7 +134,13 @@ def read_template_source(filename): settings.configure() with open(filename, "rb") as f: - text = f.read().decode(settings.FILE_CHARSET) + # The FILE_CHARSET setting will be removed in 3.1: + # https://docs.djangoproject.com/en/3.0/ref/settings/#file-charset + if django.VERSION >= (3, 1): + charset = 'utf-8' + else: + charset = settings.FILE_CHARSET + text = f.read().decode(charset) return text diff --git a/setup.py b/setup.py index 4c1c435..174fdac 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,8 @@ def read(*names, **kwargs): Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 +Programming Language :: Python :: 3.7 +Programming Language :: Python :: 3.8 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Software Development :: Quality Assurance @@ -46,6 +48,8 @@ def read(*names, **kwargs): Framework :: Django :: 1.11 Framework :: Django :: 2.0 Framework :: Django :: 2.1 +Framework :: Django :: 2.2 +Framework :: Django :: 3.0 """ setup( @@ -63,7 +67,7 @@ def read(*names, **kwargs): url='https://github.com/nedbat/django_coverage_plugin', packages=['django_coverage_plugin'], install_requires=[ - 'coverage >= 4.0', + 'coverage >= 4.0 , < 5', 'six >= 1.4.0', ], license='Apache 2.0', diff --git a/tox.ini b/tox.ini index 58250ca..31061a9 100644 --- a/tox.ini +++ b/tox.ini @@ -16,9 +16,10 @@ envlist = py27-django{18,19,110,111,111tip}, py34-django{18,19,110,111,111tip,20}, - py35-django{18,19,110,111,111tip,20,21,tip}, - py36-django{18,19,110,111,111tip,20,21,tip}, - py37-django{20,21,tip}, + py35-django{18,19,110,111,111tip,20,21,22}, + py36-django{18,19,110,111,111tip,20,21,22,30,tip}, + py37-django{20,21,22,30,tip}, + py38-django{22,30,tip}, check,pkgcheck,doc [testenv] @@ -31,6 +32,8 @@ deps = django111tip: https://github.com/django/django/archive/stable/1.11.x.tar.gz django20: Django>=2.0,<2.1 django21: Django>=2.1,<2.2 + django22: Django>=2.2,<3.0 + django30: Django>=3.0,<3.1 djangotip: https://github.com/django/django/archive/master.tar.gz commands =