Skip to content

Commit

Permalink
django 4 support (#37)
Browse files Browse the repository at this point in the history
* Added django 4 alpha to tests

* Updated test project URLs

* Added separate tests for pre release

* 0.9.0 release prep
  • Loading branch information
marksweb committed Sep 28, 2021
1 parent 676badf commit 3bd6255
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 13 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:
python-version: [ 3.6, 3.7, 3.8, 3.9, ]
django-version: [
'2.2',
'3.0', # Strings because otherwise 3.0 becomes 3
'3.1',
'3.2'
'3.2',
]
os: [
ubuntu-20.04,
Expand All @@ -37,3 +35,28 @@ jobs:
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1

pre-release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --pre django bleach coverage mock
python setup.py install
- name: Run tests
run: |
cd testproject
python manage.py test django_bleach
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 0.9.0
=============
###### 28-09-2021
* Drop support for django <2.2
* Added support for django 4.0

Version 0.8.0
=============
###### 18-09-2021
Expand Down
2 changes: 1 addition & 1 deletion django_bleach/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__author__ = "Tim Heap & Mark Walker"
__version__ = "0.8.0"
__version__ = "0.9.0"

VERSION = __version__.split(".")
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,16 @@ def find_variable(variable, *parts):
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Framework :: Django',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Development Status :: 5 - Production/Stable',
],
)
4 changes: 4 additions & 0 deletions testproject/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#
# pip-compile
#
--trusted-host pypi.python.org
--trusted-host pypi.org
--trusted-host files.pythonhosted.org

alabaster==0.7.12
# via sphinx
asgiref==3.4.1
Expand Down
11 changes: 4 additions & 7 deletions testproject/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
try:
from django.conf.urls import url
except ImportError:
from django.conf.urls.defaults import url
from django.urls import path

from .views import (home, model_form)
from .views import home, model_form

urlpatterns = [
url('^$', home, name='home'),
url('^model_form$', model_form, name='model_form'),
path('', home, name='home'),
path('model_form/', model_form, name='model_form'),
]

0 comments on commit 3bd6255

Please sign in to comment.