Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/933973/?format=api
{ "id": 933973, "url": "http://patchwork.ozlabs.org/api/patches/933973/?format=api", "web_url": "http://patchwork.ozlabs.org/project/patchwork/patch/20180624195557.19909-4-stephen@that.guru/", "project": { "id": 16, "url": "http://patchwork.ozlabs.org/api/projects/16/?format=api", "name": "Patchwork", "link_name": "patchwork", "list_id": "patchwork.lists.ozlabs.org", "list_email": "patchwork@lists.ozlabs.org", "web_url": "http://jk.ozlabs.org/projects/patchwork/", "scm_url": "git://github.com/getpatchwork/patchwork", "webscm_url": "https://github.com/getpatchwork/patchwork", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180624195557.19909-4-stephen@that.guru>", "list_archive_url": null, "date": "2018-06-24T19:55:50", "name": "[04/11] Remove support for Django 1.8, 1.9, 1.10", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3f40fb35336c7d9d13dd3965d9b4df62ec3e23f4", "submitter": { "id": 69991, "url": "http://patchwork.ozlabs.org/api/people/69991/?format=api", "name": "Stephen Finucane", "email": "stephen@that.guru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/patchwork/patch/20180624195557.19909-4-stephen@that.guru/mbox/", "series": [ { "id": 51752, "url": "http://patchwork.ozlabs.org/api/series/51752/?format=api", "web_url": "http://patchwork.ozlabs.org/project/patchwork/list/?series=51752", "date": "2018-06-24T19:55:49", "name": "[01/11] REST: Check.user is not read-only", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/51752/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/933973/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/933973/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "patchwork@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "patchwork@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41DNPr09cMz9ry1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Jun 2018 05:57:36 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41DNPq5jDDzF14j\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Jun 2018 05:57:35 +1000 (AEST)", "from common.maple.relay.mailchannels.net\n\t(common.maple.relay.mailchannels.net [23.83.214.38])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41DNNH6LKszF14s\n\tfor <patchwork@lists.ozlabs.org>;\n\tMon, 25 Jun 2018 05:56:15 +1000 (AEST)", "from relay.mailchannels.net (localhost [127.0.0.1])\n\tby relay.mailchannels.net (Postfix) with ESMTP id 4218C12228D\n\tfor <patchwork@lists.ozlabs.org>;\n\tSun, 24 Jun 2018 19:56:13 +0000 (UTC)", "from one.mxroute.com (unknown [100.96.18.110])\n\t(Authenticated sender: 5xi41l16bi)\n\tby relay.mailchannels.net (Postfix) with ESMTPA id E7D18121F5F\n\tfor <patchwork@lists.ozlabs.org>;\n\tSun, 24 Jun 2018 19:56:08 +0000 (UTC)", "from one.mxroute.com (one-outgoing.mxroute.com [172.18.36.240])\n\t(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)\n\tby 0.0.0.0:2500 (trex/5.15.2); Sun, 24 Jun 2018 19:56:13 +0000" ], "Authentication-Results": [ "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=that.guru", "ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"gVOQ7IaN\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=that.guru", "lists.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"gVOQ7IaN\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=that.guru\n\t(client-ip=23.83.214.38; helo=common.maple.relay.mailchannels.net;\n\tenvelope-from=stephen@that.guru; receiver=<UNKNOWN>)", "lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=that.guru", "lists.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"gVOQ7IaN\"; dkim-atps=neutral" ], "X-Sender-Id": [ "5xi41l16bi|x-authuser|stephen@that.guru", "5xi41l16bi|x-authuser|stephen@that.guru" ], "X-MC-Relay": "Neutral", "X-MailChannels-SenderId": "5xi41l16bi|x-authuser|stephen@that.guru", "X-MailChannels-Auth-Id": "5xi41l16bi", "X-Chemical-Supply": "4b5c011063c95572_1529870169158_846868064", "X-MC-Loop-Signature": "1529870169158:4223968879", "X-MC-Ingress-Time": "1529870169157", "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru;\n\ts=default;\n\th=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:\n\tSender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:\n\tContent-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:\n\tResent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:\n\tList-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=qcp+thuQ7Q26kiUVAEot9CxZsG2LB3fwgU3DnpiYtls=;\n\tb=gVOQ7IaNxkcsAgwlSicZARzhYg\n\tOcnxQgdo19yd8YtayvxJTxS65qeG2auFhOFkPB0zP7JjV75NRGAufHL1Ree4a4ogvHrdvR0gtcbg5\n\t7rWKfMF8ogV/pmow8/mVrjZU/MuBNh+lbXml3RTBupNOv+m876t+xrB52VQwSvzk8bCbv2yrwqghC\n\tCV92aE18u7Wc7uyuUxyDSW8rvKiYCSfoJUphu1q2qxqiyU6ftgM6AZrNyBYXAzj4zl/UZEifsi10q\n\tDYpUZEYx+0A7JT0Mth+HHNHN0AWI9a51JuvmxsJPlpR7NnSfoiyabRIEnKPh8QEWtDfjmEiV7cvct\n\tFjj1H8dQ==;", "From": "Stephen Finucane <stephen@that.guru>", "To": "patchwork@lists.ozlabs.org", "Subject": "[PATCH 04/11] Remove support for Django 1.8, 1.9, 1.10", "Date": "Sun, 24 Jun 2018 20:55:50 +0100", "Message-Id": "<20180624195557.19909-4-stephen@that.guru>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180624195557.19909-1-stephen@that.guru>", "References": "<20180624195557.19909-1-stephen@that.guru>", "X-AuthUser": "stephen@that.guru", "X-BeenThere": "patchwork@lists.ozlabs.org", "X-Mailman-Version": "2.1.26", "Precedence": "list", "List-Id": "Patchwork development <patchwork.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/patchwork>,\n\t<mailto:patchwork-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/patchwork/>", "List-Post": "<mailto:patchwork@lists.ozlabs.org>", "List-Help": "<mailto:patchwork-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/patchwork>,\n\t<mailto:patchwork-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Patchwork\"\n\t<patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "These are now all EOL and Debian Testing supports Django 1.11 (LTS). We\ncan and should drop them.\n\nThis change does not remove the many compat wrappers. These will be\nremoved separately (there are a lot of them).\n\nThis leaves 1.11 as the only supported version. This will be remedied\nshortly with the inclusion of Django 2.0 support.\n\nSigned-off-by: Stephen Finucane <stephen@that.guru>\n---\n README.rst | 4 ++--\n .../migrations/0021_django_1_10_fixes.py | 13 ++++++-------\n patchwork/models.py | 8 +-------\n patchwork/settings/base.py | 17 +++++------------\n patchwork/settings/dev.py | 19 ++++++-------------\n patchwork/settings/production.example.py | 8 ++++----\n requirements-dev.txt | 2 +-\n requirements-prod.txt | 2 +-\n tox.ini | 10 ++--------\n 9 files changed, 28 insertions(+), 55 deletions(-)", "diff": "diff --git a/README.rst b/README.rst\nindex 94ac32c3..062166e9 100644\n--- a/README.rst\n+++ b/README.rst\n@@ -43,9 +43,9 @@ Requirements\n \n - Python (2.7, 3.4 - 3.6)\n \n-- Django (1.8 - 1.11)\n+- Django (1.11 - 2.0)\n \n-- Django REST Framework (3.4 - 3.8)\n+- Django REST Framework (3.6 - 3.8)\n \n - Django Filters (1.0 - 1.1)\n \ndiff --git a/patchwork/migrations/0021_django_1_10_fixes.py b/patchwork/migrations/0021_django_1_10_fixes.py\nindex 55aedbec..ff1d8875 100644\n--- a/patchwork/migrations/0021_django_1_10_fixes.py\n+++ b/patchwork/migrations/0021_django_1_10_fixes.py\n@@ -18,10 +18,9 @@ class Migration(migrations.Migration):\n ),\n ]\n \n- if django.VERSION >= (1, 10):\n- operations += [\n- migrations.AlterModelOptions(\n- name='patch',\n- options={'base_manager_name': 'objects', 'verbose_name_plural': 'Patches'},\n- ),\n- ]\n+ operations += [\n+ migrations.AlterModelOptions(\n+ name='patch',\n+ options={'base_manager_name': 'objects', 'verbose_name_plural': 'Patches'},\n+ ),\n+ ]\ndiff --git a/patchwork/models.py b/patchwork/models.py\nindex 6268f5b7..71a07c94 100644\n--- a/patchwork/models.py\n+++ b/patchwork/models.py\n@@ -26,7 +26,6 @@ import datetime\n import random\n import re\n \n-import django\n from django.conf import settings\n from django.contrib.auth.models import User\n from django.core.exceptions import ValidationError\n@@ -309,10 +308,6 @@ class PatchQuerySet(models.query.QuerySet):\n \n \n class PatchManager(models.Manager):\n- use_for_related_fields = True\n- # NOTE(stephenfin): This is necessary to silence a warning with Django >=\n- # 1.10. Remove when 1.10 is the minimum supported version.\n- silence_use_for_related_fields_deprecation = True\n \n def get_queryset(self):\n return PatchQuerySet(self.model, using=self.db)\n@@ -595,8 +590,7 @@ class Patch(SeriesMixin, Submission):\n \n class Meta:\n verbose_name_plural = 'Patches'\n- if django.VERSION >= (1, 10):\n- base_manager_name = 'objects'\n+ base_manager_name = 'objects'\n \n \n class Comment(EmailMixin, models.Model):\ndiff --git a/patchwork/settings/base.py b/patchwork/settings/base.py\nindex 4b0d5513..f96f3694 100644\n--- a/patchwork/settings/base.py\n+++ b/patchwork/settings/base.py\n@@ -4,14 +4,12 @@ Base settings for patchwork project.\n \n import os\n \n-import django\n-\n ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),\n os.pardir, os.pardir)\n \n #\n # Core settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings\n #\n \n INSTALLED_APPS = [\n@@ -26,7 +24,7 @@ INSTALLED_APPS = [\n 'patchwork',\n ]\n \n-_MIDDLEWARE_CLASSES = [\n+MIDDLEWARE = [\n 'django.middleware.common.CommonMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n@@ -37,11 +35,6 @@ _MIDDLEWARE_CLASSES = [\n 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n ]\n \n-if django.VERSION >= (1, 10):\n- MIDDLEWARE = _MIDDLEWARE_CLASSES\n-else:\n- MIDDLEWARE_CLASSES = _MIDDLEWARE_CLASSES\n-\n TIME_ZONE = 'Australia/Canberra'\n \n LANGUAGE_CODE = 'en-au'\n@@ -83,7 +76,7 @@ SERVER_EMAIL = DEFAULT_FROM_EMAIL\n \n #\n # Auth settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#auth\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#auth\n #\n \n LOGIN_URL = 'auth_login'\n@@ -93,7 +86,7 @@ LOGIN_REDIRECT_URL = 'user-profile'\n \n #\n # Sites settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#sites\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#sites\n #\n \n SITE_ID = 1\n@@ -101,7 +94,7 @@ SITE_ID = 1\n \n #\n # Static files settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files\n #\n \n STATIC_URL = '/static/'\ndiff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py\nindex 7bdfdffa..62d98929 100644\n--- a/patchwork/settings/dev.py\n+++ b/patchwork/settings/dev.py\n@@ -9,13 +9,11 @@ Design based on:\n \n from __future__ import absolute_import\n \n-import django\n-\n from .base import * # noqa\n \n #\n # Core settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings\n #\n \n \n@@ -46,11 +44,11 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n \n #\n # Auth settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#auth\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#auth\n #\n \n # Use a faster, though less secure, password hasher for faster tests\n-# https://docs.djangoproject.com/es/1.9/topics/testing/overview/#password-hashing\n+# https://docs.djangoproject.com/es/1.11/topics/testing/overview/#password-hashing\n PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']\n \n #\n@@ -66,14 +64,9 @@ INSTALLED_APPS += [\n DEBUG_TOOLBAR_PATCH_SETTINGS = False\n \n # This should go first in the middleware classes\n-if django.VERSION >= (1, 10):\n- MIDDLEWARE = [\n- 'debug_toolbar.middleware.DebugToolbarMiddleware',\n- ] + MIDDLEWARE\n-else:\n- MIDDLEWARE_CLASSES = [\n- 'debug_toolbar.middleware.DebugToolbarMiddleware',\n- ] + MIDDLEWARE_CLASSES\n+MIDDLEWARE = [\n+ 'debug_toolbar.middleware.DebugToolbarMiddleware',\n+] + MIDDLEWARE\n \n INTERNAL_IPS = [\n '127.0.0.1', '::1',\ndiff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py\nindex e97ba578..0c7a88c0 100644\n--- a/patchwork/settings/production.example.py\n+++ b/patchwork/settings/production.example.py\n@@ -15,7 +15,7 @@ from .base import * # noqa\n \n #\n # Core settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings\n #\n \n # Security\n@@ -51,7 +51,7 @@ ADMINS = (\n #\n # If you're using a postgres database, connecting over a local unix-domain\n # socket, then the following setting should work for you. Otherwise,\n-# see https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n+# see https://docs.djangoproject.com/en/1.11/ref/settings/#databases\n \n DATABASES = {\n 'default': {\n@@ -66,8 +66,8 @@ DATABASES = {\n \n #\n # Static files settings\n-# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files\n-# https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#manifeststaticfilesstorage\n+# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files\n+# https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#manifeststaticfilesstorage\n #\n \n STATIC_ROOT = os.environ.get('STATIC_ROOT', '/srv/patchwork/htdocs/static')\ndiff --git a/requirements-dev.txt b/requirements-dev.txt\nindex 1d58df71..8bad8f07 100644\n--- a/requirements-dev.txt\n+++ b/requirements-dev.txt\n@@ -1,4 +1,4 @@\n-Django>=1.8,<2.0\n+Django>=1.11,<2.0\n djangorestframework>=3.4,<3.9\n django-filter>=1.0,<1.2\n -r requirements-test.txt\ndiff --git a/requirements-prod.txt b/requirements-prod.txt\nindex 59e2c1e6..c30688cc 100644\n--- a/requirements-prod.txt\n+++ b/requirements-prod.txt\n@@ -1,4 +1,4 @@\n-Django>=1.8,<2.0\n+Django>=1.11,<2.0\n djangorestframework>=3.4,<3.9\n django-filter>=1.0,<1.2\n psycopg2>=2.7,<2.8\ndiff --git a/tox.ini b/tox.ini\nindex 9aac8247..5f3d7e72 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -1,20 +1,14 @@\n [tox]\n minversion = 2.0\n-envlist = pep8,docs,py{27,34,35}-django{18,19,110,111},py36-django111\n+envlist = pep8,docs,py{27,34,35,36}-django111\n skipsdist = True\n \n [testenv]\n deps =\n -r{toxinidir}/requirements-test.txt\n- django18: django>=1.8,<1.9\n- django19: django>=1.9,<1.10\n- django110: django>=1.10,<1.11\n django111: django>=1.11,<2.0\n- django{18,19}: djangorestframework>=3.4,<3.7\n- django110: djangorestframework>=3.4,<3.9\n django111: djangorestframework>=3.6,<3.9\n- django18: django-filter>=1.0,<1.1\n- django{19,110,111}: django-filter>=1.0,<1.2\n+ django111: django-filter>=1.0,<1.2\n setenv =\n DJANGO_SETTINGS_MODULE = patchwork.settings.dev\n PYTHONDONTWRITEBYTECODE = 1\n", "prefixes": [ "04/11" ] }