M .travis.yml => .travis.yml +9 -30
@@ 1,19 1,11 @@
-#cache: pip
+cache: pip
language: python
matrix:
include:
- python: 3.5
- dist: trusty
- sudo: false
- env: DJANGO="1.11"
- - python: 3.5
- dist: trusty
- sudo: false
- env: DJANGO="2.0"
- - python: 3.5
- dist: trusty
+ dist: xenial
sudo: false
env: DJANGO="2.1"
- python: 3.5
@@ 22,39 14,26 @@ matrix:
env: DJANGO="2.2"
- python: 3.6
- dist: trusty
- sudo: false
- env: DJANGO="1.11"
- - python: 3.6
- dist: trusty
- sudo: false
- env: DJANGO="2.0"
- - python: 3.6
- dist: trusty
+ dist: xenial
sudo: false
env: DJANGO="2.1"
- python: 3.6
dist: xenial
sudo: false
env: DJANGO="2.2"
-
- - python: 3.7
+ - python: 3.6
dist: xenial
- sudo: true
- env: DJANGO="2.0"
+ sudo: false
+ env: DJANGO="3.0"
+
- python: 3.7
dist: xenial
sudo: true
- env: DJANGO="2.1"
+ env: DJANGO="2.2"
- python: 3.7
dist: xenial
sudo: true
- env: DJANGO="2.2"
-
- - python: pypy
- dist: trusty
- sudo: false
- env: DJANGO="1.11"
+ env: DJANGO="3.0"
addons:
apt:
M README.rst => README.rst +4 -2
@@ 26,6 26,8 @@ The below table explains which Django versions are supported.
+------------------+----------------+--------------+
| Release | Django | Upgrade from |
+==================+================+==============+
+| 0.5.x (DEV) | 2.1, 2.2, 3.0 | 0.4 |
++------------------+----------------+--------------+
| 0.4.x | 1.11, 2.0, 2.1 | 0.3 |
+------------------+----------------+--------------+
| 0.3.x | 1.8, 1.9, | 0.2 |
@@ 128,7 130,7 @@ Docs
See the docs/ folder, or read them at:
-http://django-wiki.readthedocs.io/en/latest/
+https://django-wiki.readthedocs.io/en/latest/
If you wish to add something, please ask in the google group or raise an
issue if you're in doubt about whether something might change.
@@ 183,7 185,7 @@ on your host system.
- `django-sekizai <https://github.com/ojii/django-sekizai/>`__
- `sorl-thumbnail <https://github.com/mariocesar/sorl-thumbnail>`__
- `Pillow (Python Imaging Library) <https://pillow.readthedocs.io/en/latest/installation.html>`__
-- Python>=3.4
+- Python>=3.5
M src/wiki/plugins/attachments/markdown_extensions.py => src/wiki/plugins/attachments/markdown_extensions.py +1 -1
@@ 88,7 88,7 @@ class AttachmentPreprocessor(markdown.preprocessors.Preprocessor):
).format(attachment_id)
line = line.replace(
'[' + m.group(2) + ']',
- self.markdown.htmlStash.store(html)
+ self.markdown.htmlStash.store(html)
)
new_text.append(before + line + after)
return new_text
M src/wiki/plugins/attachments/views.py => src/wiki/plugins/attachments/views.py +1 -3
@@ 5,9 5,7 @@ from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.base import TemplateView, View
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
+from django.views.generic import FormView, ListView, TemplateView, View
from wiki.core.http import send_file
from wiki.core.paginator import WikiPaginator
from wiki.decorators import get_article, response_forbidden
M src/wiki/plugins/images/views.py => src/wiki/plugins/images/views.py +1 -3
@@ 5,9 5,7 @@ from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.base import RedirectView
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
+from django.views.generic import FormView, ListView, RedirectView
from wiki.conf import settings as wiki_settings
from wiki.core.paginator import WikiPaginator
from wiki.decorators import get_article
M src/wiki/plugins/links/mdx/urlize.py => src/wiki/plugins/links/mdx/urlize.py +1 -1
@@ 155,7 155,7 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
el = markdown.util.etree.Element("a")
el.set('href', url)
el.set('target', '_blank')
- el.set('rel', 'nofollow')
+ el.set('rel', 'nofollow')
el.append(icon)
el.append(span_text)
M src/wiki/plugins/links/views.py => src/wiki/plugins/links/views.py +1 -1
@@ 1,5 1,5 @@
from django.utils.decorators import method_decorator
-from django.views.generic.base import View
+from django.views.generic import View
from wiki import models
from wiki.core.utils import object_to_json_response
from wiki.decorators import get_article
M src/wiki/plugins/macros/mdx/wikilinks.py => src/wiki/plugins/macros/mdx/wikilinks.py +1 -0
@@ 57,6 57,7 @@ class WikiLinks(wikilinks.WikiLinksInlineProcessor):
a.set('class', html_class)
return a, m.start(0), m.end(0)
+
def makeExtension(*args, **kwargs):
"""Return an instance of the extension."""
return WikiLinkExtension(*args, **kwargs)
M src/wiki/plugins/notifications/views.py => src/wiki/plugins/notifications/views.py +3 -3
@@ 3,7 3,7 @@ from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.edit import FormView
+from django.views.generic import FormView
from . import forms, models
@@ 40,12 40,12 @@ class NotificationSettings(FormView):
).distinct()
def get_form_kwargs(self):
- kwargs = FormView.get_form_kwargs(self)
+ kwargs = super().get_form_kwargs(self)
kwargs['user'] = self.request.user
return kwargs
def get_context_data(self, **kwargs):
- context = FormView.get_context_data(self, **kwargs)
+ context = super().get_context_data(self, **kwargs)
if 'form' not in context:
context['form'] = self.get_form()
context['formset'] = context['form']
M src/wiki/views/accounts.py => src/wiki/views/accounts.py +1 -2
@@ 16,8 16,7 @@ from django.contrib.auth.forms import AuthenticationForm
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import gettext as _
-from django.views.generic.base import View
-from django.views.generic.edit import CreateView, FormView, UpdateView
+from django.views.generic import CreateView, FormView, UpdateView, View
from wiki import forms
from wiki.conf import settings
M src/wiki/views/article.py => src/wiki/views/article.py +1 -4
@@ 11,11 11,8 @@ from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _, ngettext
-from django.views.generic import DetailView
-from django.views.generic.base import RedirectView, TemplateView, View
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
from django.views.decorators.clickjacking import xframe_options_sameorigin
+from django.views.generic import DetailView, FormView, ListView, RedirectView, TemplateView, View
from wiki import editors, forms, models
from wiki.conf import settings
from wiki.core import permissions
M tests/plugins/links/test_urlize.py => tests/plugins/links/test_urlize.py +3 -4
@@ 1,5 1,4 @@
import html
-from unittest import mock
import markdown
import pytest
@@ 151,15 150,15 @@ FIXTURE_NEGATIVE_MATCHES = [
'<p>localhosts</p>'
),
(
- 'localhost',
+ 'localhost',
'<p>localhost</p>'
),
(
- 'localhost:8000',
+ 'localhost:8000',
'<p>localhost:8000</p>'
),
-
+
# Incomplete FQDNs.
(
'example.',
M tox.ini => tox.ini +3 -7
@@ 1,6 1,6 @@
[tox]
# Ensure you add to .travis.yml if you add here, using `tox -l`
-envlist = {py35,py36}-django{111,20,21,22},py37-django{20,21,22},lint
+envlist = {py35,py36,py37}-django{21,22},{py36,py37,py38}-django{30},lint
[travis]
python =
@@ 10,10 10,8 @@ python =
[travis:env]
DJANGO =
- 1.11: django111
- 2.0: django20
- 2.1: django21
2.2: django22
+ 3.0: django30
LINT =
yes: lint
@@ 34,17 32,15 @@ usedevelop = false
deps =
.[test]
- django111: Django>=1.11,<2.0
- django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.3
+ django30: Django>=3.0a1,<3.1
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
-
[testenv:lint]
basepython = python3
deps = .[testlint]