Skip to content

Commit

Permalink
Merge pull request #1165 from atombrella/django_40
Browse files Browse the repository at this point in the history
Add support for Django 4.0.
  • Loading branch information
benjaoming committed Feb 14, 2022
2 parents 675061c + 13fe996 commit b8f30fb
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ workflows:
- tox:
tox_env: "py39-django32"
python_version: "3.9"
- tox:
tox_env: "py310-django32"
python_version: "3.10"
- tox:
tox_env: "py310-django40"
python_version: "3.10"
- tox:
tox_env: "lint"
python_version: "3.8"
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ The below table explains which Django versions are supported.
+------------------+----------------+--------------+
| Release | Django | Upgrade from |
+==================+================+==============+
| 0.8.x | 2.2, 3.0, 3.1, | 0.7 |
| | 3.2, 4.0 | |
+------------------+----------------+--------------+
| 0.7.x | 2.2, 3.0, 3.1, | 0.5 or 0.6 |
| | 3.2 | |
+------------------+----------------+--------------+
Expand Down
14 changes: 12 additions & 2 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ Release plan
- **0.7.x** Removes Django 2.1 support, adds Django 3.1, 3.2


0.7.11 (unreleased)
-------------------
0.8 (unreleased)
----------------

Added
~~~~~

- Support for Django 4.0 and Python 3.10 :url-issue:`1165` (Mads Jensen)

Changed
~~~~~~~

- Bump dependency versions of sorl-thumbnail, django-nyt, django-mptt and django-functest :url-issue:`1165` (Benjamin Balder Bach)

Fixed
~~~~~
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ def get_path(fname):


install_requirements = [
"Django>=2.1,<3.3",
"Django>=2.1,<4.1",
"bleach>=3.3.0,<3.4",
"Pillow",
"django-nyt>=1.2,<1.3",
"django-mptt>=0.11,<0.12",
"django-nyt>=1.2.2,<1.3",
"django-mptt>=0.13,<0.14",
"django-sekizai>=0.10",
"sorl-thumbnail>=12.6.2,<13",
"sorl-thumbnail>=12.8,<13",
"Markdown>=3.1,<3.3",
]

test_requirements = [
"django-functest>=1.0.3,<1.1",
"django-functest>=1.2,<1.3",
"pytest>=6.2.5,<6.3",
"pytest-django",
"pytest-cov",
Expand Down Expand Up @@ -95,6 +95,7 @@ def get_path(fname):
"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 :: Internet :: WWW/HTTP :: Dynamic Content",
Expand Down
12 changes: 12 additions & 0 deletions src/wiki/migrations/0003_mptt_upgrade.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Upgrades fields changed in django-mptt
# See: https://github.com/django-mptt/django-mptt/pull/578
# Generated by Django 2.2.7 on 2020-02-06 20:36
import django.db.models.deletion
from django.db import migrations
from django.db import models

Expand All @@ -27,4 +28,15 @@ class Migration(migrations.Migration):
name="rght",
field=models.PositiveIntegerField(editable=False),
),
# Added as a no-op when upgrading to django-mptt 0.13
migrations.AlterField(
model_name="articleforobject",
name="content_type",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="content_type_set_for_%(class)s",
to="contenttypes.contenttype",
verbose_name="content type",
),
),
]
2 changes: 1 addition & 1 deletion src/wiki/plugins/editsection/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


class EditSectionConfig(AppConfig):
Expand Down
2 changes: 1 addition & 1 deletion src/wiki/plugins/editsection/wiki_plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls import url
from django.urls import re_path as url
from wiki.core.plugins import registry
from wiki.core.plugins.base import BasePlugin
from wiki.plugins.editsection.markdown_extensions import EditSectionExtension
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {py35,py36,py37}-django{22},{py36,py37,py38,py39}-django{30,31,32},lint
envlist = {py35,py36,py37}-django{22},{py36,py37,py38,py39}-django{30,31,32},py310-django32,{py38,py39,py310}-django{40},lint

[testenv]
passenv = CODECOV_TOKEN
Expand All @@ -23,13 +23,15 @@ deps =
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1

basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10

[testenv:lint]
basepython: python3
Expand Down

0 comments on commit b8f30fb

Please sign in to comment.