~netlandish/django-wiki

36ffb7d2cdf163a3652974d9332cc2543a5c8e10 — Benjamin Balder Bach 4 years ago a550502 + 33da457
Merge pull request #1019 from benjaoming/bump-sorl

Bump sorl-thumbnail and django-mptt for Django 3.0 support
M README.rst => README.rst +0 -2
@@ 19,8 19,6 @@ django-wiki
Django support
--------------

**NB! Django 3.0 support is pending support in various dependencies.**

The below table explains which Django versions are supported.

+------------------+----------------+--------------+

M docs/release_notes.rst => docs/release_notes.rst +4 -0
@@ 18,6 18,7 @@ Release plan
Added
~~~~~

* Django 3.0 support :url-issue:`1019` (Benjamin Bach, slinkymanbyday)
* New plugin ``wiki.plugins.editsection`` displays an ``[edit]`` link next to section headers (Frank Loemker) :url-issue:`652`

Fixed


@@ 34,6 35,9 @@ Changed
* Test coverage upped from 75 to 80+% :url-issue:`976` (Mads Jensen, Benjamin Bach)
* PDF attachment Content-Disposition header changed to ``inline`` for browser previewing :url-issue:`1010` (nicolazilio)
* PyTest upgraded to latest 5.3
* django-mptt updated from 0.9 to 0.11.0 :url-issue:`1019` (Benjamin Bach, slinkymanbyday)
* sorl-thumbnail bumped to 12.6.2 :url-issue:`1019` (Benjamin Bach, slinkymanbyday)
* Upgrade bleach from 2.1 to 3.1 :url-issue:`1020` (slinkymanbyday)

Removed
~~~~~~~

M setup.py => setup.py +4 -6
@@ 22,13 22,13 @@ def get_path(fname):


install_requirements = [
    "Django>=1.11,<2.3",
    "Django>=1.11,<3.1",
    "bleach>=3.1.0,<3.2",
    "Pillow",
    "django-nyt>=1.1.5,<1.2",
    "django-mptt>=0.9,<0.10",
    "django-mptt>=0.11,<0.12",
    "django-sekizai>=0.10",
    "sorl-thumbnail>=12,<13",
    "sorl-thumbnail>=12.6.2,<13",
    "Markdown>=3.1,<3.2.0",
]



@@ 49,9 49,7 @@ setup_requirements = [
    "pytest-runner",
]

development_requirements = (
    test_requirements + test_lint_requirements + ["pre-commit",]
)
development_requirements = test_requirements + test_lint_requirements + ["pre-commit"]

extras_requirements = {
    "devel": development_requirements,

A src/wiki/migrations/0003_mptt_upgrade.py => src/wiki/migrations/0003_mptt_upgrade.py +30 -0
@@ 0,0 1,30 @@
# 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

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("wiki", "0002_urlpath_moved_to"),
    ]

    operations = [
        migrations.AlterField(
            model_name="urlpath",
            name="level",
            field=models.PositiveIntegerField(editable=False),
        ),
        migrations.AlterField(
            model_name="urlpath",
            name="lft",
            field=models.PositiveIntegerField(editable=False),
        ),
        migrations.AlterField(
            model_name="urlpath",
            name="rght",
            field=models.PositiveIntegerField(editable=False),
        ),
    ]

M src/wiki/plugins/attachments/forms.py => src/wiki/plugins/attachments/forms.py +0 -7
@@ 87,13 87,6 @@ class AttachmentArchiveForm(AttachmentForm):
        required=False,
    )

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        ordered_fields = ["unzip_archive", "file"]
        self.fields.keyOrder = ordered_fields + [
            k for k in self.fields.keys() if k not in ordered_fields
        ]

    def clean_file(self):
        uploaded_file = self.cleaned_data.get("file", None)
        if uploaded_file and self.cleaned_data.get("unzip_archive", False):

M tests/core/test_accounts.py => tests/core/test_accounts.py +1 -1
@@ 38,7 38,7 @@ class AccountUpdateTest(

        # save a new revision
        response = self.client.post(resolve_url("wiki:profile_update"), example_data)
        self.assertContains(response, "Passwords don&#39;t match", status_code=200)
        self.assertContains(response, "Passwords don", status_code=200)  # Django 2/3 output different escaped versions of single quote in don't

        # Now check that we don't succeed with unmatching passwords
        example_data = {