[PATCH v2 1/9] models: Remove 'permalink' decorator

2017-11-02 Thread Stephen Finucane
This is deprecated in Django 1.11 [1] Let's pre-empt the inevitable warnings...or not [2]. [1] https://docs.djangoproject.com/en/dev/releases/1.11/#features-deprecated-in-1-11 [2] https://docs.djangoproject.com/en/dev/releases/1.11/#deprecating-warnings-are-no-longer-loud-by-default Signed-off-

[PATCH v2 0/9] Add support for Django 1.11

2017-11-02 Thread Stephen Finucane
This is a sizable, albeit mostly trivial series focused on (a) adding support for Django 1.11 to Patchwork. Previously this also contained a series of patches aimed at resolving all 'DeprecationWarning's for the versions of Django that we support, but these have since been merged separately. Chang

[PATCH v2 7/9] tox: Add Django 1.11

2017-11-02 Thread Stephen Finucane
Add support for the latest release of Django, 1.11. This is the next LTS release (1.8 being the last one), so it's particularly important that we maintain support for this going forward. While neither the latest releases of django-rest-framework nor that of django-filter explicitly support Django

[PATCH v2 8/9] README: Add support for Django 1.11

2017-11-02 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 36515737..f55940c9 100644 --- a/README.rst +++ b/README.rst @@ -43,7 +43,7 @@ Requirements - Python (2.7, 3.3 - 3.5) -- Django (1.6 - 1.10) +- Djan

[PATCH v2 2/9] urls: Use new login/password change CBVs

2017-11-02 Thread Stephen Finucane
The function based views are deprecated in Django 1.11 [1], so support the newer class based views. [1] https://docs.djangoproject.com/en/dev/releases/1.11/#id2 Signed-off-by: Stephen Finucane --- patchwork/urls.py | 94 +-- 1 file changed, 70

[PATCH v2 9/9] requirements: Enable Django 1.11

2017-11-02 Thread Stephen Finucane
This is now completely supported. Let's enable it. Signed-off-by: Stephen Finucane --- requirements-dev.txt | 2 +- requirements-prod.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 8f88605d..7a8fdb9c 100644 --- a/requ

[PATCH v2 4/9] tox: Remove '--liveserver' parameter

2017-11-02 Thread Stephen Finucane
This parameter is no longer supported in Django 1.11 [1]. Remove this and instead set the 'DJANGO_LIVE_TEST_SERVER_ADDRESS' environment variable, which will do the same thing for Django < 1.11 and be ignored by Django >= 1.11. [1] https://docs.djangoproject.com/en/1.11/releases/1.11/#liveserverte

[PATCH v2 5/9] migrations: Mark 'RunPython' blocks as non-atomic

2017-11-02 Thread Stephen Finucane
This appears to be required to run migrations on MySQL backend. Without this, the following error messages are propagated: Executing DDL statements while in a transaction on databases that can't perform a rollback is prohibited. Signed-off-by: Stephen Finucane --- patchwork/migrations/0

[PATCH v2 3/9] trivial: noqa imports dotted through urls

2017-11-02 Thread Stephen Finucane
There are two imports not located in the top of the file due to how we use them. 'noqa' these to prevent issues with static code analysers. Signed-off-by: Stephen Finucane --- patchwork/urls.py | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/patchwork

[PATCH v2 6/9] REST: Allow for mutability of request.POST

2017-11-02 Thread Stephen Finucane
Using Django 1.11 yields the following error for the 'patchwork.tests .test_rest_api.TestCheckAPI.test_create' test: AttributeError: This QueryDict instance is immutable This occurs due to our modification of data to allow users to create instances using a slugified state instead of the under

Poor performance of '/api/events'

2017-11-02 Thread Stephen Finucane
I've noticed some poor performance for 'patchwork.ozlabs.org/api/events' when accessed via a browser or fetched via cURL. I haven't seen similar issues on any other endpoint and I also can't see anything funky going on with regards to number of database queries for this endpoint when running Patchw