Skip to content

Commit

Permalink
Update Django and Python version support
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksihakli committed Jan 8, 2022
1 parent 3f37b3d commit 593fa02
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 14 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,32 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
django-version: ['2.2', '3.0', '3.1', '3.2', 'main']
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
django-version: ['2.2', '3.2', '4.0', 'main']
include:
# Tox configuration for QA environment
- python-version: '3.8'
django-version: 'qa'
# Django main
- python-version: '3.8'
django-version: 'main'
experimental: true
- python-version: '3.9'
django-version: 'main'
experimental: true
- python-version: '3.10'
django-version: 'main'
experimental: true
- python-version: 'pypy-3.8'
django-version: 'main'
experimental: true
exclude:
# Exclude Django 4.0 for Python 3.7
- python-version: '3.7'
django-version: '4.0'
# Exclude Django 2.2 for Python 3.10
- python-version: '3.10'
django-version: '2.2'

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@
url="https://github.com/jazzband/django-widget-tweaks",
description="Tweak the form field rendering in templates, not in python-level form definitions.",
long_description=open("README.rst").read() + "\n\n" + open("CHANGES.rst").read(),
long_description_content_type='text/x-rst',
long_description_content_type="text/x-rst",
license="MIT license",
requires=["django (>=2.2)"],
packages=["widget_tweaks", "widget_tweaks.templatetags"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
30 changes: 20 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,45 +1,55 @@
[tox]
envlist =
py{36,37,38,39}-dj{22,30,31,32}
py{38,39}-djmain
qa
py{37,38,39,py3}-dj22
py{37,38,39,310,py3}-dj32
py{38,39,310,py3}-dj40
py{38,39,310}-djmain
py310-djqa

[gh-actions]
python =
3.6: py36, qa
3.7: py37
3.8: py38
3.9: py39
3.10: py310
pypy3: pypy3

[gh-actions:env]
DJANGO =
2.2: dj22
3.0: dj30
3.1: dj31
3.2: dj32
4.0: dj40
main: djmain
qa: djqa

[testenv]
deps =
coverage
dj22: django>=2.2,<2.3
dj30: django>=3.0,<3.1
dj31: django>=3.1,<3.2
dj32: django>=3.2,<3.3
dj40: django>=4.0,<4.1
djmain: https://github.com/django/django/archive/main.tar.gz
usedevelop = True
setenv =
PYTHONDONTWRITEBYTECODE=1
# Django development version is allowed to fail the test matrix
ignore_outcome =
djmain: True
ignore_errors =
djmain: True
commands =
{envbindir}/coverage run {envbindir}/django-admin test -v2 --settings=tests.settings
{envbindir}/coverage report -m
{envbindir}/coverage xml

[testenv:qa]
[testenv:py310-djqa]
ignore_errors = true
basepython = python3.10
deps =
black
django
prospector
skip_install = true
commands =
prospector
black -t py36 --check --diff .
black -t py38 --check --diff .

0 comments on commit 593fa02

Please sign in to comment.