From patchwork Thu Sep 30 10:55:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=gkzIcBMc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsN0tGyz9sRf for ; Thu, 30 Sep 2021 20:55:35 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsM23Qnz2yXf for ; Thu, 30 Sep 2021 20:55:35 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=gkzIcBMc; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.116; helo=mail-108-mta116.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=gkzIcBMc; dkim-atps=neutral Received: from mail-108-mta116.mxroute.com (mail-108-mta116.mxroute.com [136.175.108.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsJ1vWxz2yQB for ; Thu, 30 Sep 2021 20:55:30 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta116.mxroute.com (ZoneMTA) with ESMTPSA id 17c36583d200008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:24 +0000 X-Zone-Loop: 95d52a741edbfdd6317053b1a75f6066f6fbdb7b68b0 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To: From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=YkZxG0OyyHMgIdmRAoHx4OwqpqZcQXM+F3zdGsH003s=; b=g kzIcBMcumYRoxbcZ39PZCsTfUnT3yggIj2dYIwmTyLgfr16/Urlq5t7XYz0qwjzjf9dqExRDt4a94 APxoh8HWeHowfYPg9L1nGSxHR1kX91hbL/VvAaamobPkOlo+RKRI/BBmHK+mEoJ+uNKyGYtMqcSAN mV+FWxfXK/9GnW/1wFjUEtr+4dOhnSVFtP/vAedkJczmICownU8FjLlqgOOoo9Okv/S/nDhsQiiks YamcrlC02vx0UBgC8TFal69kfGpBPlL2EPkNvm8xxi3s9h4xRDlUhX9fR+HMLffGcjt3eWLfltGSF +fOYphkEeeMS5An9nDcB/z601fulrOg+Q==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 1/6] Revert "docs: prevent build error by rolling back Sphinx version" Date: Thu, 30 Sep 2021 11:55:13 +0100 Message-Id: <20210930105518.487744-1-stephen@that.guru> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" This reverts commit 65547c8701004f1a2a9ed9d16f1a372f4bd856e4. There is a new release of sphinxcontrib-httpdomain [1] that fixes the issues with Sphinx 4.1.x and later [2] [1] https://github.com/sphinx-contrib/httpdomain/releases/tag/1.8.0 [2] https://github.com/sphinx-contrib/httpdomain/pull/54 --- docs/requirements.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git docs/requirements.txt docs/requirements.txt index b60bca53..e2641c8f 100644 --- docs/requirements.txt +++ docs/requirements.txt @@ -1,6 +1,4 @@ -# sphinx 4.1.x breaks sphinxcontrib-httpdomain which sphinxcontrib-openapi depends on -# see https://github.com/sphinx-contrib/httpdomain/pull/51 -sphinx>=2.0,<4.1 +sphinx>=2.0 reno>=2.2 sphinx_rtd_theme~=0.5.0 jinja2~=2.11.2 From patchwork Thu Sep 30 10:55:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=vYk1uAWG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsS5zwJz9sRf for ; Thu, 30 Sep 2021 20:55:40 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsS4RV9z2ywQ for ; Thu, 30 Sep 2021 20:55:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=vYk1uAWG; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.243; helo=mail-108-mta243.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=vYk1uAWG; dkim-atps=neutral Received: from mail-108-mta243.mxroute.com (mail-108-mta243.mxroute.com [136.175.108.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsJ2KkLz2yV5 for ; Thu, 30 Sep 2021 20:55:31 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta243.mxroute.com (ZoneMTA) with ESMTPSA id 17c36583e620008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:25 +0000 X-Zone-Loop: 1dff8dee1e38d3f3ae8deeb82e72c0c133dabca0f7b5 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SpqJB0zgcDSkmY/STq/obIzOa/+ZJtMgVWgSUBeLK+8=; b=vYk1uAWGToIuKCDfOpg0IB/ESl eTLAXSb0IWYQvWtLsCybc4/F5iO8HV8/7UfAiHMRX3R5IZcZuqaoqoZ15IIHgTtiMAWVN1Rzn6rPA K9YqllC4EJpvqwsyeOgaTEBKtoWCv/BPD88U8X8L/Nvlf7nkmNjcsgc7+yD/6shxz4oqqIXflW6uM oqUy2F06K0W4RODJvNlddHVH/+ZppqSAkTXztL033xnFUOZTCx/bFUl9HgfFN83FIlgmSEWGH7K7x PLkTfmp3ha7OYJtZaDpUr87DyALcaS8hW+2UopDyXV/P/D+oabNisfsQ8/0ZlnrWZIqVsuImI1B45 y3ROz7Tw==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 2/6] requirements: Bump doc requirements Date: Thu, 30 Sep 2021 11:55:14 +0100 Message-Id: <20210930105518.487744-2-stephen@that.guru> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210930105518.487744-1-stephen@that.guru> References: <20210930105518.487744-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" We were suggesting we supported positively ancient versions of Sphinx and reno in particular. Bump these. Signed-off-by: Stephen Finucane --- docs/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git docs/requirements.txt docs/requirements.txt index e2641c8f..f17cb789 100644 --- docs/requirements.txt +++ docs/requirements.txt @@ -1,5 +1,5 @@ -sphinx>=2.0 -reno>=2.2 -sphinx_rtd_theme~=0.5.0 -jinja2~=2.11.2 +sphinx>=4.2.0 +reno>=3.4.0 +sphinx-rtd-theme~=1.0 +jinja2~=3.0 sphinxcontrib-openapi~=0.7.0 From patchwork Thu Sep 30 10:55:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=tYAzRYNo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsq0sCjz9sRf for ; Thu, 30 Sep 2021 20:55:58 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsp4g83z30Qv for ; Thu, 30 Sep 2021 20:55:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=tYAzRYNo; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.182; helo=mail-108-mta182.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=tYAzRYNo; dkim-atps=neutral Received: from mail-108-mta182.mxroute.com (mail-108-mta182.mxroute.com [136.175.108.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsJ2BTmz2yR8 for ; Thu, 30 Sep 2021 20:55:30 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta182.mxroute.com (ZoneMTA) with ESMTPSA id 17c36583ed60008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:25 +0000 X-Zone-Loop: 32fe4f122286de0546efa2922e89a8103bf14e3ddae4 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=g7t3CY1r5v3XVZWW5Jo7/Y6ClNsZtQwTVkFURvK7Rso=; b=tYAzRYNoTqqgkTaf0+8IpzZ0og 0brGzC4cWdkHHpka/GYzOP8zLCrHsAsAbJISlP4iaJ3wyJQgnajD109guTVQNEDwtxfG97delfkF2 eEQ6tM3YKb8GVozgIqO+u3KpL+bzNkxvaMqMMDvVKE/3OfslfyIGCpYVEZiJDVHF+s2+9bVDCeMFN aDnoZYbqG4zAiE+lrUyGBZKaqYGitjsc9R7r8jIK6UoVIZtp7uHk6uLATHZM5yqIKUVIZIQd/2JVy kmB1wddwZFgNbjaoayqXUpssUQeKoxUvUgTOPn6n1honn0k5Da2KlR0II0efvb3AgLqbLSiYXdIvf zq6zJeXA==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 3/6] requirements: Bump Django to 3.2.x, django-filter to 21.1 Date: Thu, 30 Sep 2021 11:55:15 +0100 Message-Id: <20210930105518.487744-3-stephen@that.guru> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210930105518.487744-1-stephen@that.guru> References: <20210930105518.487744-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" It seems the ORM is now smarter and requires less JOINs that previously in two tests. In addition, a new setting is required to ensure the type of our primary field columns doesn't change when Django 4.0 is released. We drop support for Django 3.1 in the process, though this doesn't have much of a real-world impact since we still support Django 2.2, an LTS release. Signed-off-by: Stephen Finucane --- patchwork/settings/base.py | 4 ++++ patchwork/tests/api/test_event.py | 6 +++++- patchwork/tests/api/test_patch.py | 6 +++++- .../notes/django-3-2-support-363b32e74bdcf017.yaml | 9 +++++++++ requirements-dev.txt | 4 ++-- requirements-prod.txt | 4 ++-- tox.ini | 12 ++++++------ 7 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 releasenotes/notes/django-3-2-support-363b32e74bdcf017.yaml diff --git patchwork/settings/base.py patchwork/settings/base.py index c1bb9b27..ff14d91b 100644 --- patchwork/settings/base.py +++ patchwork/settings/base.py @@ -68,6 +68,10 @@ TEMPLATES = [ }, ] +# TODO(stephenfin): Consider changing to BigAutoField when we drop support for +# Django < 3.2 +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' + DEFAULT_FROM_EMAIL = 'Patchwork ' SERVER_EMAIL = DEFAULT_FROM_EMAIL diff --git patchwork/tests/api/test_event.py patchwork/tests/api/test_event.py index 32e99366..62506a5b 100644 --- patchwork/tests/api/test_event.py +++ patchwork/tests/api/test_event.py @@ -5,6 +5,7 @@ import unittest +import django from django.conf import settings from django.urls import reverse @@ -187,7 +188,10 @@ class TestEventAPI(utils.APITestCase): for _ in range(3): self._create_events() - with self.assertNumQueries(28): + # TODO(stephenfin): Remove when we drop support for Django < 3.2 + num_queries = 28 if django.VERSION < (3, 2) else 27 + + with self.assertNumQueries(num_queries): self.client.get(self.api_url()) def test_order_by_date_default(self): diff --git patchwork/tests/api/test_patch.py patchwork/tests/api/test_patch.py index 1c616409..36c3e5f9 100644 --- patchwork/tests/api/test_patch.py +++ patchwork/tests/api/test_patch.py @@ -7,6 +7,7 @@ import email.parser from email.utils import make_msgid import unittest +import django from django.conf import settings from django.urls import NoReverseMatch from django.urls import reverse @@ -228,7 +229,10 @@ class TestPatchAPI(utils.APITestCase): series = create_series() create_patches(5, series=series) - with self.assertNumQueries(7): + # TODO(stephenfin): Remove when we drop support for Django < 3.2 + num_queries = 7 if django.VERSION < (3, 2) else 5 + + with self.assertNumQueries(num_queries): self.client.get(self.api_url()) @utils.store_samples('patch-detail') diff --git releasenotes/notes/django-3-2-support-363b32e74bdcf017.yaml releasenotes/notes/django-3-2-support-363b32e74bdcf017.yaml new file mode 100644 index 00000000..039535e9 --- /dev/null +++ releasenotes/notes/django-3-2-support-363b32e74bdcf017.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + `Django 3.2 `_ is now + supported. +upgrade: + - | + Django 3.1 is no longer supported. It is no longer supported upstream and + most distributions provide a newer version. diff --git requirements-dev.txt requirements-dev.txt index d58dfaa9..437b1e8b 100644 --- requirements-dev.txt +++ requirements-dev.txt @@ -1,6 +1,6 @@ -Django~=3.1.0 +Django~=3.2.0 djangorestframework~=3.12.0 -django-filter~=2.4.0 +django-filter~=21.1.0 django-debug-toolbar~=3.2.0 django-dbbackup~=3.3.0 -r requirements-test.txt diff --git requirements-prod.txt requirements-prod.txt index 6bac4d6a..fa6bc95f 100644 --- requirements-prod.txt +++ requirements-prod.txt @@ -1,5 +1,5 @@ -Django~=3.1.0 +Django~=3.2.0 djangorestframework~=3.12.0 -django-filter~=2.4.0 +django-filter~=21.1.0 psycopg2-binary~=2.8.0 sqlparse~=0.4.0 diff --git tox.ini tox.ini index 46d72517..8eab01da 100644 --- tox.ini +++ tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.2 -envlist = pep8,docs,py{36,37,38,39}-django{22,30,31} +envlist = pep8,docs,py{36,37,38,39}-django{22,31,32} skipsdist = true ignore_basepython_conflict = true @@ -10,13 +10,13 @@ deps = -r{toxinidir}/requirements-test.txt django22: django>=2.2,<2.3 django22: djangorestframework>=3.10,<3.13 - django22: django-filter>=2.1,<3.0 - django30: django>=3.0,<3.1 - django30: djangorestframework>=3.10,<3.13 - django30: django-filter>=2.2,<3.0 + django22: django-filter~=21.1.0 django31: django>=3.1,<3.2 django31: djangorestframework>=3.10,<3.13 - django31: django-filter>=2.3,<3.0 + django31: django-filter~=21.1.0 + django32: django>=3.2,<3.3 + django32: djangorestframework>=3.10,<3.13 + django32: django-filter~=21.1.0 setenv = DJANGO_SETTINGS_MODULE = patchwork.settings.dev PYTHONDONTWRITEBYTECODE = 1 From patchwork Thu Sep 30 10:55:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=sEdBGNa4; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsZ24CHz9sRf for ; Thu, 30 Sep 2021 20:55:46 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsZ1CxTz2ypP for ; Thu, 30 Sep 2021 20:55:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=sEdBGNa4; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.128; helo=mail-108-mta128.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=sEdBGNa4; dkim-atps=neutral Received: from mail-108-mta128.mxroute.com (mail-108-mta128.mxroute.com [136.175.108.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsJ1zSBz2yQm for ; Thu, 30 Sep 2021 20:55:30 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta128.mxroute.com (ZoneMTA) with ESMTPSA id 17c36583f110008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:25 +0000 X-Zone-Loop: 1af44634ffe4e3aea3936ded763d654ebd6331e8b37a X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pIp0+V2x2+lTRKy2I0Wehta2fwE20p6Ntm32N+D3zxY=; b=sEdBGNa4UyLyG6yTyW7HMsixcc kkzj3j/Bbv0ujkSVz2UETIzDWGPG8cPxcXhKjINnrbT1kwjYYiEVvYGsTWF/cr2UmWI9BG6rVFGSd LKFY/Xek3BaP9a4qm3jZqVtwo/y5X4vcrEp4r+obrK/5xsMq3Y10xLpMLVV4sGiKgh12j9Z86NZPA uLtQNLo/9x4sNUiancHHDuptCzFaJeJGLkH3vTYoNW2e9p9Nm7Rb+0VmqqPvrKsfYrISSe8rtAhWj Lm6BYSq9adbk0jFxE/hYDQD/x2ooTsrU9NRsWzWuxeouZjIOLQh8QC6DcSqFzjSw465h47qXCfzPc CC8Lfx8Q==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 4/6] tox: Use compatible minor releases Date: Thu, 30 Sep 2021 11:55:16 +0100 Message-Id: <20210930105518.487744-4-stephen@that.guru> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210930105518.487744-1-stephen@that.guru> References: <20210930105518.487744-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" As we previously did for the requirements files (commit c90473ea44), switch to use compatible releases for tox. We previously avoided doing this on the basis that the existing system gave an idea of supported package versions, but we weren't actually testing these combinations since pip will always install the latest available version of each package. This will apply to anyone using pip to manage their dependencies, while anyone using distro packages can rely on the distro having done this testing for them. Given the above, this makes our effort to track supported ranges moot. So long as we cap newer versions of e.g. django-filter when they're not compatible with older Django versions, we should be good. Signed-off-by: Stephen Finucane --- tox.ini | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git tox.ini tox.ini index 8eab01da..1de53ac3 100644 --- tox.ini +++ tox.ini @@ -8,14 +8,14 @@ ignore_basepython_conflict = true basepython = python3 deps = -r{toxinidir}/requirements-test.txt - django22: django>=2.2,<2.3 - django22: djangorestframework>=3.10,<3.13 + django22: django~=2.2.0 + django22: djangorestframework~=3.12.0 django22: django-filter~=21.1.0 - django31: django>=3.1,<3.2 - django31: djangorestframework>=3.10,<3.13 + django31: django~=3.1.0 + django31: djangorestframework~=3.12.0 django31: django-filter~=21.1.0 - django32: django>=3.2,<3.3 - django32: djangorestframework>=3.10,<3.13 + django32: django>=3.2.0 + django32: djangorestframework~=3.12.0 django32: django-filter~=21.1.0 setenv = DJANGO_SETTINGS_MODULE = patchwork.settings.dev From patchwork Thu Sep 30 10:55:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=MBIZwnw8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsh5TkQz9sRf for ; Thu, 30 Sep 2021 20:55:52 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsh47q3z2yV5 for ; Thu, 30 Sep 2021 20:55:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=MBIZwnw8; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.105; helo=mail-108-mta105.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=MBIZwnw8; dkim-atps=neutral Received: from mail-108-mta105.mxroute.com (mail-108-mta105.mxroute.com [136.175.108.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsJ2H18z2yRS for ; Thu, 30 Sep 2021 20:55:31 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta105.mxroute.com (ZoneMTA) with ESMTPSA id 17c36583fe20008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:25 +0000 X-Zone-Loop: 5dedf33de251822dba4234f2e4b41e5d2faa4a0ede39 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hf2FP1QR9vOkWgllnonoc0zL4YYo8fttIiKGhhxUi+g=; b=MBIZwnw8seV1cG8nzhbF5bhCEH jsThX3kgOPvw3ivGtz0mJM6pXG/y1AFILIkn+Yq6VDIZUDw/vNkBt4hAI/KbzEHrqHAGJgERxuhEN 100y5sMML2wRgl/0p1+yt3ufWn08uiiSohf5JS3CBmt9+0bEvFo59QvnHxqAeIICwqoEtMn3HLbza EuXAUu3G3PUoNK7S4xxvZjk9YBL6SdlCde3X0oqwPxkZ8qIvFMVu8UX681GsOSWuWnnnge4QgbZSS ktlFA92A5qN2aCPsQJUQkCBZ5ZWb6G4k3TnbgQLjOqyhyg0EzGQzibF78HOIr3EeZGl3zbPL2ehHq hIvXBEvg==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 5/6] requirements: Bump psycopg2-binary, openapi-core Date: Thu, 30 Sep 2021 11:55:17 +0100 Message-Id: <20210930105518.487744-5-stephen@that.guru> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210930105518.487744-1-stephen@that.guru> References: <20210930105518.487744-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Once again, openapi-core has moved stuff around internally. Nothing we can't fix though, as it seems the thing moved is no longer necessary. Signed-off-by: Stephen Finucane --- patchwork/tests/api/validator.py | 6 +----- requirements-test.txt | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git patchwork/tests/api/validator.py patchwork/tests/api/validator.py index 2b1921a3..96912227 100644 --- patchwork/tests/api/validator.py +++ patchwork/tests/api/validator.py @@ -10,8 +10,7 @@ from django.urls import resolve import openapi_core from openapi_core.contrib.django import DjangoOpenAPIRequestFactory from openapi_core.contrib.django import DjangoOpenAPIResponseFactory -from openapi_core.schema.media_types.exceptions import OpenAPIMediaTypeError -from openapi_core.schema.parameters.exceptions import OpenAPIParameterError +from openapi_core.exceptions import OpenAPIParameterError from openapi_core.templating import util from openapi_core.unmarshalling.schemas.formatters import Formatter from openapi_core.validation.request.validators import RequestValidator @@ -113,9 +112,6 @@ def validate_data(path, request, response, validate_request, result = validator.validate(request) try: result.raise_for_errors() - except OpenAPIMediaTypeError: - if response.status_code != status.HTTP_400_BAD_REQUEST: - raise except OpenAPIParameterError: # TODO(stephenfin): In API v2.0, this should be an error. As things # stand, we silently ignore these issues. diff --git requirements-test.txt requirements-test.txt index c8ce258b..7f03b0fc 100644 --- requirements-test.txt +++ requirements-test.txt @@ -1,6 +1,6 @@ mysqlclient~=2.0.0 -psycopg2-binary~=2.8.0 +psycopg2-binary~=2.9.0 sqlparse~=0.4.0 python-dateutil~=2.8.0 tblib~=1.7.0 -openapi-core~=0.13.4 +openapi-core~=0.14.2 From patchwork Thu Sep 30 10:55:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1534771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=s/04KNRz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKqsw56Msz9sRf for ; Thu, 30 Sep 2021 20:56:04 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HKqsw3Tm1z305d for ; Thu, 30 Sep 2021 20:56:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=s/04KNRz; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=136.175.108.255; helo=mail-108-mta255.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=that.guru header.i=@that.guru header.a=rsa-sha256 header.s=x header.b=s/04KNRz; dkim-atps=neutral Received: from mail-108-mta255.mxroute.com (mail-108-mta255.mxroute.com [136.175.108.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HKqsS1fx8z30BM for ; Thu, 30 Sep 2021 20:55:39 +1000 (AEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta255.mxroute.com (ZoneMTA) with ESMTPSA id 17c365841cb0008545.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 30 Sep 2021 10:55:26 +0000 X-Zone-Loop: e25caecdddd097dc50844050ddcca9993bb9d0198c73 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=e6VNXQfHGywhLxxcElHSilkEOJb8/RyU8XSmLLrSKPk=; b=s/04KNRzUksdkkWcK/QrNG+Api MRXJtJ/vItOx4ik8s4iARtCGnB8D7vA3iJbqMzsuA51GbljYHcL9zrXYeogP5eaRFQEb6qZWCbZTP TVeGvYPzmM3CHwDC6w0UQeaxRV4i2pEe4tQEvdSHBAE0chrUTxbKUPUejvtgJpLl3gAE/B6phWN2e dMT9XXoCu1emHXhUNw7P22imVsJYnKQ3c90AeRiB9RV4Di7otP0BE5lBWKuRUwCXqjpeqGb0EOTwv hTEewIfOmw/dXbCWzWwPi1HOC0McbczHOhgYQyQB4xZ+Y0uCHWhwDmmP2IUhmqrTvTQg9F6IkdT7H 7o3KKEZg==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 6/6] trivial: Stop universally disabling F405 check Date: Thu, 30 Sep 2021 11:55:18 +0100 Message-Id: <20210930105518.487744-6-stephen@that.guru> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210930105518.487744-1-stephen@that.guru> References: <20210930105518.487744-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" We only need this for one file. Simply filter out the things we want to ignore. Signed-off-by: Stephen Finucane --- patchwork/settings/dev.py | 6 ++++-- tox.ini | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git patchwork/settings/dev.py patchwork/settings/dev.py index aa3ee3c5..2b7fc954 100644 --- patchwork/settings/dev.py +++ patchwork/settings/dev.py @@ -7,6 +7,8 @@ Design based on: http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/ """ +import os + from .base import * # noqa try: @@ -77,7 +79,7 @@ PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher'] # django-debug-toolbar if debug_toolbar: - INSTALLED_APPS += [ + INSTALLED_APPS += [ # noqa: F405 'debug_toolbar' ] @@ -86,7 +88,7 @@ if debug_toolbar: # This should go first in the middleware classes MIDDLEWARE = [ 'debug_toolbar.middleware.DebugToolbarMiddleware', - ] + MIDDLEWARE + ] + MIDDLEWARE # noqa: F405 INTERNAL_IPS = [ '127.0.0.1', '::1', diff --git tox.ini tox.ini index 1de53ac3..494e9fb5 100644 --- tox.ini +++ tox.ini @@ -47,9 +47,8 @@ commands = flake8 {posargs:patchwork manage.py} # Some rules are ignored as their use makes the code more difficult to read: # # E129 visually indented line with same indent as next logical line -# F405 'name' may be undefined, or defined from star imports: 'module' # W504 line break after binary operator -ignore = E129, F405, W504 +ignore = E129, W504 [testenv:docs] deps =