From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601049532; cv=none; d=zohomail.com; s=zohoarc; b=Am5avhSFEsReuxnhtTMPIJlBJ0jWN9beGCZGtsuOAkJRwJzbs7vugB4MVZGRC/ONEpwGNAvYAhH8hZBVdtVAogEQB7EGN9qwPbUW6jfhFqbxMK8tKmiEKCHmgZL3ONC5qJwQgJY9eVsPnhY5A9po3+DyAA3cBJrGBXgifGzB8sw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601049532; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NnokX04cuQNyQ7qpaggbOzR6MYHTEmX81PJsUZZlobA=; b=eYzKVhXoC6HnLLr/wl9k8Dl8wiVhH1uVOF3QRQfREzOno4avpx7gUTdsPw2MFIhVWdBGnfTcmDCnoj3hyYw1LDZTBmd1UKABRLm8W5iXlOO0wW/2HcwL28E+tVV98OeWDE4x5gQtJRvzaU+1TgM7ApW14i2lrOAonlRROzvszIg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 160104953250926.495048529313408; Fri, 25 Sep 2020 08:58:52 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-556-keBFAS6gNcuuJJtPdgrwow-1; Fri, 25 Sep 2020 11:58:46 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CE3410219E4; Fri, 25 Sep 2020 15:58:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0411110013C1; Fri, 25 Sep 2020 15:58:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F0BEE8C7A2; Fri, 25 Sep 2020 15:58:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFwhFw025802 for ; Fri, 25 Sep 2020 11:58:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6CF0C11E5A8; Fri, 25 Sep 2020 15:58:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67DF911E5AF for ; Fri, 25 Sep 2020 15:58:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75A86186E120 for ; Fri, 25 Sep 2020 15:58:40 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-e2CnH92HOMq9412TVN5TGQ-1; Fri, 25 Sep 2020 11:58:37 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048590101224.30826642867305; Fri, 25 Sep 2020 23:43:10 +0800 (CST) X-MC-Unique: keBFAS6gNcuuJJtPdgrwow-1 X-MC-Unique: e2CnH92HOMq9412TVN5TGQ-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-2-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:33 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFwhFw025802 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 01/11] cli: Fix --applier-mode X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng Now we have a default args.repo, we could never run --applier-mode because of this check. Fix it. --- patchew-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchew-cli b/patchew-cli index 13aa451..98eb833 100755 --- a/patchew-cli +++ b/patchew-cli @@ -928,7 +928,7 @@ class ApplyCommand(SubCommand): =20 def do(self, args, argv): if args.applier_mode: - if args.repo or args.branch or args.force_branch or args.tag: + if args.repo not in [None, '.'] or args.branch or args.force_b= ranch or args.tag: print("--applier-mode conflicts with -C, -b, -B and -t") return 1 return self._applier_mode(args) --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601049544; cv=none; d=zohomail.com; s=zohoarc; b=IPcBDkaLxu3caHMnyVVr83WgT6O+RY3YVGbEisRmCZO74rvR4b9uobPA1q1i20u/r1vy/UF7GnNC2RLnDvnF1ORkzrN5F8SsR3U8m59KERMeK5U5NpXMSrwYlXob+Uqm7CO1/r8EaFWqrzZsxqHD8t7PPO8Zv2hTXMDHAM6jZ5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601049544; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=99DfogqohcpSDgMHOOSnz+6jfDlKSyNjaThc4LO9S0w=; b=WdMhlQoc2aR8SWLKQAMBqD8R7d6IBdSDA4ffFcwu4KT3KWHTrmeLOuvFGPy4T1YvVOHKDYK1tyibMxaZNrqOzB5hRgWuC4cusmiFvjNQCgcahbXCgJFa8sqg4Iogvjr7C2cOhP1s3p/iZmBPwomLPsEjSZlYVtoiPJVp7E4FVsg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 16010495449041013.8273604217475; Fri, 25 Sep 2020 08:59:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-585-DxYRK4rjOOiHmOMlNt-U-Q-1; Fri, 25 Sep 2020 11:59:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7AB39AE82A; Fri, 25 Sep 2020 15:59:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 729A19CBA; Fri, 25 Sep 2020 15:59:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6B6C71826D2B; Fri, 25 Sep 2020 15:59:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFwwT7025827 for ; Fri, 25 Sep 2020 11:58:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id BD34311E5AC; Fri, 25 Sep 2020 15:58:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8A1511E5AB for ; Fri, 25 Sep 2020 15:58:58 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0BD980351B for ; Fri, 25 Sep 2020 15:58:58 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-266-eRY9B9TaO1OGJTLmQxzZ7Q-1; Fri, 25 Sep 2020 11:58:54 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048608758942.44521579511; Fri, 25 Sep 2020 23:43:28 +0800 (CST) X-MC-Unique: DxYRK4rjOOiHmOMlNt-U-Q-1 X-MC-Unique: eRY9B9TaO1OGJTLmQxzZ7Q-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-3-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:34 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFwwT7025827 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 02/11] models: Add on_delete to foreign fields X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng This is mandatory in newer djangos. --- api/models.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/models.py b/api/models.py index fdc4fc0..69b6817 100644 --- a/api/models.py +++ b/api/models.py @@ -333,7 +333,8 @@ class Project(models.Model): =20 =20 class ProjectResult(Result): - project =3D models.ForeignKey(Project, related_name=3D"results") + project =3D models.ForeignKey(Project, related_name=3D"results", + on_delete=3Dmodels.CASCADE) =20 @property def obj(self): @@ -527,8 +528,8 @@ def HeaderFieldModel(**args): =20 =20 class QueuedSeries(models.Model): - user =3D models.ForeignKey(User) - message =3D models.ForeignKey("Message") + user =3D models.ForeignKey(User, on_delete=3Dmodels.CASCADE) + message =3D models.ForeignKey("Message", on_delete=3Dmodels.CASCADE) # Special purposed queues: # accept: When user marked series as "accepted" # reject: When user marked series as "rejected" @@ -948,7 +949,8 @@ class Message(models.Model): =20 =20 class MessageResult(Result): - message =3D models.ForeignKey(Message, related_name=3D"results") + message =3D models.ForeignKey(Message, related_name=3D"results", + on_delete=3Dmodels.CASCADE) =20 @property def obj(self): --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601049570; cv=none; d=zohomail.com; s=zohoarc; b=OCsyPiBCcrB9DsOniNtxtJlyO9JOTHm8cEBBy0WeQkyE6Fj3wR9OpH/E+HByarONoQIWdYeeXCb5uxIe/FQKJnFkbOEALgoiaGOE2AjDMmTqtW+YHcIXEQYvUXtKiwEY5kqP5lmv8a8Igru79Gbq2MzVRQCl9J9wFIEdTIovL50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601049570; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jjMrF0xeoLU3foKkrYLo/IDnLvG7QWMqXO1oIiUrRLs=; b=IMYbAcqVj38OOm3rC1lQsUOsr6EiGgJD2Qtui5/0aUPOeGVjGXtdp3j3IxqzDuhY85DGUJaj86y6PqdDcfN1WPAAZFEAIzm9V3XR+Jgx+C4YvQIEvJLVIAVOGDBL7t80w587ZvnFLxtVp7cMyPnIuJZXXCopxrrrA5jSCvX2La4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601049570207251.85281795034064; Fri, 25 Sep 2020 08:59:30 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-538-F-O-qGUMPqyDfKcU3d3b0A-1; Fri, 25 Sep 2020 11:59:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22BAA10219E1; Fri, 25 Sep 2020 15:59:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AEF460C15; Fri, 25 Sep 2020 15:59:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 13F651826D2B; Fri, 25 Sep 2020 15:59:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFxKRT025865 for ; Fri, 25 Sep 2020 11:59:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id A28482156A23; Fri, 25 Sep 2020 15:59:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9DA0D2166B27 for ; Fri, 25 Sep 2020 15:59:17 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87600186E146 for ; Fri, 25 Sep 2020 15:59:17 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-stV_0foqMqi76cJx_PmYIg-1; Fri, 25 Sep 2020 11:59:15 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 160104862122558.064174972857245; Fri, 25 Sep 2020 23:43:41 +0800 (CST) X-MC-Unique: F-O-qGUMPqyDfKcU3d3b0A-1 X-MC-Unique: stV_0foqMqi76cJx_PmYIg-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-4-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:35 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFxKRT025865 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 03/11] settings: Remove SessionAuthenticationMiddleware X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng The django doc said this is unused (unconditional), and the object is not present in newer djangos: https://docs.djangoproject.com/en/3.1/releases/2.0/ --- patchew/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/patchew/settings.py b/patchew/settings.py index e851a4c..ce21eee 100644 --- a/patchew/settings.py +++ b/patchew/settings.py @@ -58,7 +58,6 @@ MIDDLEWARE =3D [ "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.auth.middleware.SessionAuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", ] --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048672; cv=none; d=zohomail.com; s=zohoarc; b=J6VHDbFuw9YeCxfCPOIpxhLWZ86y9H+D2BBxZazyOlUCKMuFFPBUE4M5PPL2ajeYySLkibJNNzI1OPffZkK2TV/jyYCaXKuIQG6bZy/EUYyaW6rbQr9isPfSrwGrkj5likKT6NS+9Wox6s3WcgAuJDH5+a+6FV4HeRi3cq3MzS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048672; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y2kFr2LAO+HRArbNPCwEGMaHoiOZx91C9mrtY630pZM=; b=ZY27YM6nEtAdlunJoQItw24efuNn4lFRDZPpcp0IMMVD7CSsdPI3XodtzCGkxI0AY5w2M8YZMM5Ajx5+bSpJC7d1zqzXtQteQBRwUblsjyOgWps6sZLGXZYOwXK6S3vvYWNgUWVeukJtPJ89xMo/RlifP9No6bXaetbBzwXASfs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601048672471997.4437245627261; Fri, 25 Sep 2020 08:44:32 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-_mcV2SGtMz2RBDfOOs3MRQ-1; Fri, 25 Sep 2020 11:44:27 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BBC38D6443; Fri, 25 Sep 2020 15:44:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B2B7C19C78; Fri, 25 Sep 2020 15:44:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AAA071826D2B; Fri, 25 Sep 2020 15:44:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFiPoL024404 for ; Fri, 25 Sep 2020 11:44:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id AA3E920244F7; Fri, 25 Sep 2020 15:44:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1FCB2022792 for ; Fri, 25 Sep 2020 15:44:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28CBD811E81 for ; Fri, 25 Sep 2020 15:44:23 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-122-0VVhlBp7M6ybwtF2kYOxTQ-1; Fri, 25 Sep 2020 11:44:18 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048650435774.5233421068343; Fri, 25 Sep 2020 23:44:10 +0800 (CST) X-MC-Unique: _mcV2SGtMz2RBDfOOs3MRQ-1 X-MC-Unique: 0VVhlBp7M6ybwtF2kYOxTQ-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-5-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:36 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFiPoL024404 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 04/11] tests: Fix age tests X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng The DB fields are in UTC time, so use the right parsing method. --- tests/test_message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_message.py b/tests/test_message.py index 3999948..e6b1e90 100755 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -30,14 +30,14 @@ class MessageTest(PatchewTestCase): =20 def test_now(self): message =3D Message() - dt =3D datetime.datetime.fromtimestamp(time.time() + 100) + dt =3D datetime.datetime.utcfromtimestamp(time.time() + 100) message.date =3D dt age =3D message.get_age() self.assertEqual(age, "now") =20 def test_1_day(self): message =3D Message() - dt =3D datetime.datetime.fromtimestamp(time.time() - 3600 * 25) + dt =3D datetime.datetime.utcfromtimestamp(time.time() - 3600 * 25) message.date =3D dt age =3D message.get_age() self.assertEqual(age, "1 day") --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048696; cv=none; d=zohomail.com; s=zohoarc; b=OfRpjd+S5WsoK9dGHKWgtlEmduRBZD/bhkMLUNi91/trPVoLUisXw+EHGdSPkA6Z89msAazX/id+5tMzoLeTZJTcxYy4EtZ029jpSXyZwQqS5nBDNuTFhPas0spJf1VWpxnwbpzavY+p9K6ZGoGHXmqe8FoWP4HgBCBy8sTQZPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048696; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kA1r8+bHk95+7fAPacoRjLp8pCxHbzwdD/cqJT4q8m8=; b=mKhLRv1R6HWHtBOrNh8ndFb80X6JePSFgRuAaKzzbBdxS6LQaoAy0q2yzHioZRmgWhy5ySFllSweRplDb7kbGeP4NAH3R364uH9xtWnw6Rs0UX8sOEwzqTAGTKeOtQVkftR6Dvygmn+RFN1eTQUP1k616a5IJFMHdhf5j6EpH40= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601048696525724.9988963724455; Fri, 25 Sep 2020 08:44:56 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-fwJQTNB3N7ed1F4SbqY-gw-1; Fri, 25 Sep 2020 11:44:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44891802EA3; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C0FB5C1BB; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 355A08C7A2; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFioMD024451 for ; Fri, 25 Sep 2020 11:44:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 252712166B27; Fri, 25 Sep 2020 15:44:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 209E62157F24 for ; Fri, 25 Sep 2020 15:44:47 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15CF0101A56E for ; Fri, 25 Sep 2020 15:44:47 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-SWw2ZITsOAG7CECX_qsj1w-1; Fri, 25 Sep 2020 11:44:40 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048667470703.1533862758714; Fri, 25 Sep 2020 23:44:27 +0800 (CST) X-MC-Unique: fwJQTNB3N7ed1F4SbqY-gw-1 X-MC-Unique: SWw2ZITsOAG7CECX_qsj1w-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-6-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:37 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFioMD024451 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 05/11] topic: Fix for_stripped_subject X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng We are looking for a topic here, so including any message that happends to have the same stripped_subject but doesn't have topic is moot and will lead to an exception. --- api/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models.py b/api/models.py index 69b6817..fd6990f 100644 --- a/api/models.py +++ b/api/models.py @@ -544,7 +544,7 @@ class QueuedSeries(models.Model): class TopicManager(models.Manager): def for_stripped_subject(self, stripped_subject): q =3D ( - Message.objects.filter(stripped_subject=3Dstripped_subject) + Message.objects.filter(stripped_subject=3Dstripped_subject, to= pic__isnull=3DFalse) .order_by("date") .reverse()[:1] .values("topic") --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048916; cv=none; d=zohomail.com; s=zohoarc; b=la2W389BaM2ImxIK/SLX6NIPnWGh1ZK6qxTL0T7bFxxeftP1zWDHPH2w/3yfalaP/b4lYr7utipWivMkCzxyV/SbNV+rIOm+8YHKJglUMoXmtceVkghvKN5od+mJ9puNRlKJvbLGyMLgKgKELe9v2s7S7YUgNJcc+4Bk2qBZNaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048916; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZawyAEV2mw79hdgOb2b7g5Glvmmowm1USPGSxwZ6HT4=; b=gprzWt6F6/IJouw+2bU4LOYsJw+tNVkpNBVmoLCWRJNBQq3ckcWNIAi9pWmxB0nXMrbYgDxgGLVtWylF5/5K0gUOihdWkwj+qbdpOkVV4gwgrprBPpNHq0H7m8cN5zM38Ucre/Bmsor56MmWMqQhmKNAdwP/MqxA+aJRfLUNxYA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601048916969399.64769367554663; Fri, 25 Sep 2020 08:48:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-4KizAo8WMliBWNt2dJuFCg-1; Fri, 25 Sep 2020 11:48:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1996F1007B01; Fri, 25 Sep 2020 15:48:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1005919C78; Fri, 25 Sep 2020 15:48:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 04FDF1826D2B; Fri, 25 Sep 2020 15:48:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFj2JU024493 for ; Fri, 25 Sep 2020 11:45:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id F2F4C2022792; Fri, 25 Sep 2020 15:45:01 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE1E52022794 for ; Fri, 25 Sep 2020 15:44:59 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C7E4811E78 for ; Fri, 25 Sep 2020 15:44:59 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406-W8wOnLwZNpuRusFXSANOZQ-1; Fri, 25 Sep 2020 11:44:50 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048682020824.6165593448337; Fri, 25 Sep 2020 23:44:42 +0800 (CST) X-MC-Unique: 4KizAo8WMliBWNt2dJuFCg-1 X-MC-Unique: W8wOnLwZNpuRusFXSANOZQ-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-7-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:38 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFj2JU024493 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 06/11] rest: Allow schema generation code to invoke serializer X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng Returning Http404 for real request is intended, but we also get called from schema generators which doesn't pass any projects_pk. So only reject if a key is provided. --- api/rest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/rest.py b/api/rest.py index 3a9def5..2e9297a 100644 --- a/api/rest.py +++ b/api/rest.py @@ -406,8 +406,8 @@ class ProjectMessagesViewSetMixin(mixins.RetrieveModelM= ixin, mixins.UpdateModelM return self.__project =20 def get_serializer_context(self): - if self.project is None: - raise Http404 + if "projects_pk" in self.kwargs and not self.project: + raise Http404("Project not found") context =3D super(ProjectMessagesViewSetMixin, self).get_serialize= r_context() context["project"] =3D self.project return context --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048890; cv=none; d=zohomail.com; s=zohoarc; b=J1fz6OO3RtmkKivDxWfENYxveHDwgbjpFK6RF4yPoXMBrli3Aqm6/rXyrc2BK4LpJYh0SrUGJiCSHaJoKYKKsuTI1sNFJF168NY2rPOVHWphbN6MSOfoKrlfaq0yIXJcQr+f7kyRJkeOTo5Z+Z4Cd3Zru+m6fbHzjy1ECxLeW2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048890; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AkswSD024WxPnJT7rUYyqhAqQJJ5QG2x7NhZy2BL/5s=; b=W1JBjcCupOXzHVHDK8NS/yqXQUJ9tiB38n5QZubVBpDDiiwhwHvpKBpfHiT4zxgewSXQ4PSpeMPw681oDXzb6nswyrhXn5PFNpWbSfp5agWnK4w/O6FQJq3Fs4IMjL80JRDwabbBA8SvP3vPMEwDU/Fgs3zInkvo3bTrCDq5j6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601048890122384.92262770617003; Fri, 25 Sep 2020 08:48:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-iS6ZSqEDPIOG2r7mhs9MhQ-1; Fri, 25 Sep 2020 11:48:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24498802B46; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1BDF310013DB; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1093F8C7A2; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjMvZ024523 for ; Fri, 25 Sep 2020 11:45:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDEEB2157F24; Fri, 25 Sep 2020 15:45:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8AAF2166B27 for ; Fri, 25 Sep 2020 15:45:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6386811E78 for ; Fri, 25 Sep 2020 15:45:19 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-516-qQnZdbxvOCWDTwxljlPJMw-1; Fri, 25 Sep 2020 11:45:08 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048695939473.1762849522803; Fri, 25 Sep 2020 23:44:55 +0800 (CST) X-MC-Unique: iS6ZSqEDPIOG2r7mhs9MhQ-1 X-MC-Unique: qQnZdbxvOCWDTwxljlPJMw-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-8-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:39 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjMvZ024523 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 07/11] testing: Provide a serializer class to GetTestView X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng It is required by the framework. An empty one will do. --- mods/testing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/testing.py b/mods/testing.py index 2605dc0..5a708cb 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -648,10 +648,13 @@ class TestingGetView(APILoginRequiredView, GetTestVie= wMixin): po =3D Project.objects.get(name=3Dproject) return self._do_testing_get(request, po, tester, capabilities) =20 +class TestSerializer(serializers.BaseSerializer): + pass =20 class GetTestView(generics.GenericAPIView, GetTestViewMixin): queryset =3D Project.objects.all() permission_classes =3D (TestPermission,) + serializer_class =3D TestSerializer =20 def _generate_test_data( self, project, repo, head, base, identity, result_uri, test --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048891; cv=none; d=zohomail.com; s=zohoarc; b=TVN0M5QpAxkRiXYZzznU4uDrNPelM7kL35fqLGwLFDWzvX1FZMgA5/+kiYeImPoQlQIRe2MbAUdwXoSeoUrrfZR0Xp0kWtjsj/s3m5sOSbgrHClt7D1i623pS32qDikcxlodGwcH0TuggBorhct2Yrb3RQCoigS+ZXNiX4WwFrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048891; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6NT5HaXWyTV6bf6Q7wJfPDlmBrvfSjqlPM87xbDhJrg=; b=gttKkX9XyBxU4lOnrCRdQ9x2vK9c8Q+H2lT57f+ugtod/j9DEE6d5E53njvi+WDAHonrLzouKvyA5RWNZYnVJ09fztgb4zDcVwFuPbKiExmuMy3I3wQ3XCzvzSMTqXyDLHW3joNdbdt7OpRIonOtbkpBkiWEzfIeueK3rixUqbg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601048891409468.9859701805085; Fri, 25 Sep 2020 08:48:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-528-o5kgIyM4OI2tEvmY--9-LA-1; Fri, 25 Sep 2020 11:48:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C00B2802EA3; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6E2A19C78; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AAF3C1826D2C; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjPU7024542 for ; Fri, 25 Sep 2020 11:45:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id A8EC22157F26; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A380C2166B27 for ; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8E5A2185A78B for ; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-QWPxJmIgMryhmVgJS_0Jzw-1; Fri, 25 Sep 2020 11:45:17 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 160104870479559.76423607157062; Fri, 25 Sep 2020 23:45:04 +0800 (CST) X-MC-Unique: o5kgIyM4OI2tEvmY--9-LA-1 X-MC-Unique: QWPxJmIgMryhmVgJS_0Jzw-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-9-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:40 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjPU7024542 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 08/11] tests: Assign to N-to-N fields with .set method X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng This is going to be required in newer Django. --- tests/patchewtest.py | 2 +- tests/test_rest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/patchewtest.py b/tests/patchewtest.py index b8b795a..d0bb568 100644 --- a/tests/patchewtest.py +++ b/tests/patchewtest.py @@ -65,7 +65,7 @@ class PatchewTestCase(dj_test.LiveServerTestCase): username or self.user, self.email, password or self.password ) if groups: - user.groups =3D [Group.objects.get_or_create(name=3Dg)[0] for = g in groups] + user.groups.set([Group.objects.get_or_create(name=3Dg)[0] for = g in groups]) user.save() return user =20 diff --git a/tests/test_rest.py b/tests/test_rest.py index 5baf2ab..e82d8fa 100755 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -638,7 +638,7 @@ class RestTest(PatchewTestCase): def test_maintainer_create_message(self): test =3D self.create_user(username=3D"test", password=3D"userpass") self.api_client.login(username=3D"test", password=3D"userpass") - self.p.maintainers =3D (test,) + self.p.maintainers.set([test]) dp =3D self.get_data_path("0023-multiple-project-patch.mbox.gz") with open(dp, "r") as f: data =3D f.read() --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601049004; cv=none; d=zohomail.com; s=zohoarc; b=Z84xEU909zuHqgCzB2xg8XNfmz05YbFfwsYl05j/ncZtc5w1XESYkOUGb6Al2/mZotCDDvraWjLE08RcsUe2qfOkiJxkyhiOx3Sw5AZL71F3enOG5jjn3PMNmlwyjtVTlNe+TZISfYpT/tMFxc0saWCsKU2w0MNb7TRALv7nb+w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601049004; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Zho65ZRrnhVW/Ip3YZmsozQYbNjR/SKn8cZzLiB0qLo=; b=e0yJUFAE+BXHek3sCh9Gfp9s8WdcTZz0Trj6gn/RanEqkA/A53LHzZcgJiQ/JDrPY6yh59JzTV+QbyARKFyb9FeYlGbNH3jb98StenxUCYFfwdr1btr2fFjRu3NgBkOuYrCpUa13BnI7muNPpAjmNAGjAS+rMG+rAwu4FJ6Z0ck= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601049004743336.14678926841236; Fri, 25 Sep 2020 08:50:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-dKfh3i1gPLSR5I0Mc8sg7Q-1; Fri, 25 Sep 2020 11:50:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2103F1882FC4; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 195309CBA; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0E0978C7A2; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFja7e024601 for ; Fri, 25 Sep 2020 11:45:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5509F2157F25; Fri, 25 Sep 2020 15:45:36 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FDD82157F24 for ; Fri, 25 Sep 2020 15:45:36 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 36072803524 for ; Fri, 25 Sep 2020 15:45:36 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-y-SmimKSMFqxHIn0QSI0gQ-1; Fri, 25 Sep 2020 11:45:30 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048715147389.99162339139036; Fri, 25 Sep 2020 23:45:15 +0800 (CST) X-MC-Unique: dKfh3i1gPLSR5I0Mc8sg7Q-1 X-MC-Unique: y-SmimKSMFqxHIn0QSI0gQ-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-10-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:41 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFja7e024601 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 09/11] urls: Provide a permission class to schema_view X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng We don't have a permission limitation about visibilities to API schema. --- api/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/urls.py b/api/urls.py index 04372fe..95bbafb 100644 --- a/api/urls.py +++ b/api/urls.py @@ -14,6 +14,7 @@ from django.conf.urls import url, include from rest_framework.routers import DefaultRouter from rest_framework_nested.routers import NestedDefaultRouter from rest_framework.schemas import get_schema_view +from rest_framework import permissions =20 from . import views from . import rest @@ -52,7 +53,8 @@ results_router =3D NestedDefaultRouter( results_router.include_format_suffixes =3D False results_router.register("results", rest.SeriesResultsViewSet, basename=3D"= results") =20 -schema_view =3D get_schema_view(title=3D"API schema") +schema_view =3D get_schema_view(title=3D"API schema", + permission_classes=3D[permissions.AllowAny]) =20 urlpatterns =3D _build_urls() dispatch_module_hook("api_url_hook", urlpatterns=3Durlpatterns) --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048891; cv=none; d=zohomail.com; s=zohoarc; b=VMhgpwNKk4ImZSkpLIhkvQNDJ6XOq2hLlZoYzVRno46a0HKfjrWK+3hjdbcBC2aD6jIoHuU70us3BqbsYPj3VRebtXRMlSxM3odRo2dg70L88ZNIrZssWm2cx1pdYjaBpUkjC0eUHEL7z8H4tVPApMQbKqBwPewfiL54yGqPwbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048891; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EU0Lc/pi8GlIV857XWlQ4wbWJ0qOpFj2pYFkLtt65Is=; b=gbA5eKZa5P1UhULHqqwrY7u/3/WZokl8seJaHP3NTFl3hGdP2EFrhq44QTv5Qwgjn5+rcN3NmPY2GgzCqCbvaw37FUhpQcZ2a4RwKTh343k6qBJkiGEOLWeAU8ZVh+TsIptvylasVkMi53W8CbVKQa2mgwqkk6cGvvKMp9L6Zh0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601048891958627.8642480520488; Fri, 25 Sep 2020 08:48:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-49YZC8PEPjC4PeLVu4eQpA-1; Fri, 25 Sep 2020 11:48:07 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81F151006708; Fri, 25 Sep 2020 15:48:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78BC655772; Fri, 25 Sep 2020 15:48:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6E24B8C7A2; Fri, 25 Sep 2020 15:48:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjhZZ024642 for ; Fri, 25 Sep 2020 11:45:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F7542157F24; Fri, 25 Sep 2020 15:45:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98E432157F26 for ; Fri, 25 Sep 2020 15:45:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F77718AE948 for ; Fri, 25 Sep 2020 15:45:40 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-DpUEJuurPVa-k4L8rRgnmA-1; Fri, 25 Sep 2020 11:45:34 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048725521660.8020526976037; Fri, 25 Sep 2020 23:45:25 +0800 (CST) X-MC-Unique: 49YZC8PEPjC4PeLVu4eQpA-1 X-MC-Unique: DpUEJuurPVa-k4L8rRgnmA-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-11-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:42 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjhZZ024642 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 10/11] url: Use class based views for auth pages X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng To prepare to upgrade to django 3. --- www/urls.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/www/urls.py b/www/urls.py index c3de7ce..e90fd90 100644 --- a/www/urls.py +++ b/www/urls.py @@ -17,10 +17,17 @@ urlpatterns =3D [] dispatch_module_hook("www_url_hook", urlpatterns=3Durlpatterns) =20 urlpatterns +=3D [ - url("^login/$", auth_views.login, {"template_name": "login.html"}, nam= e=3D"login"), - url("^logout/$", auth_views.logout, name=3D"logout"), - url("^change-password/$", auth_views.password_change, {"template_name"= : "password-change.html"}, name=3D"password_change"), - url("^change-password/done/$", auth_views.password_change_done, {"temp= late_name": "password-change-done.html"}, name=3D"password_change_done"), + url("^login/$", + auth_views.LoginView.as_view(template_name=3D"login.html"), + name=3D"login"), + url("^logout/$", + auth_views.LogoutView.as_view(), name=3D"logout"), + url("^change-password/$", + auth_views.PasswordChangeView.as_view(template_name=3D"password-ch= ange.html"), + name=3D"password_change"), + url("^change-password/done/$", + auth_views.PasswordChangeDoneView.as_view(template_name=3D"passwor= d-change-done.html"), + name=3D"password_change_done"), url(r"^search$", views.view_search, name=3D"search"), url(r"^search-help$", views.view_search_help, name=3D"search_help"), url(r"^(?P[^/]*)/$", views.view_series_list, name=3D"series_l= ist"), --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 21:39:01 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601049005; cv=none; d=zohomail.com; s=zohoarc; b=eZR2DdSgmG/eoei1sZtUYze5fybVB+AgWKZu+O6oZpUn/qLGH50sGP/t/nqAXp//Svb7IHh+DyjkznTps2WKdYsNXbqf2CqUWKT7nZ/482KjyxE2jRKP0cuUY/jc73Chw3KiLex6TQPM/7wISpHI2I0Ft7cG9kDitYItzNYASYk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601049005; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dbBZMkTVf3PPYfI25Yw5lJx+WrH6WJIYLAEST9s4iX8=; b=ntOPKQMVtOkirfq89oPM6U4A93wOsZrOu13AJ1xxNmiiRC0BbSZNcrALun3oJQw6HJwr/iSUcjH5LmEWVmTXQzNbdMsLUJQgkAYq3RVBgexo9x9dt2zWloOxCbva0BjdzJz5O59B7EkExplk5dTmsn6QNo6WE4EhtZZhuhx5MN0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601049005259475.5279911736276; Fri, 25 Sep 2020 08:50:05 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-SxjuOlo9NLmOm7ous8rOmw-1; Fri, 25 Sep 2020 11:50:01 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BF2511084C96; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6B6D7368D; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AF32A1826D2C; Fri, 25 Sep 2020 15:50:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjtAb024698 for ; Fri, 25 Sep 2020 11:45:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id F17BD11E1C4; Fri, 25 Sep 2020 15:45:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC46B11D2A8 for ; Fri, 25 Sep 2020 15:45:52 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FAA28007DF for ; Fri, 25 Sep 2020 15:45:52 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36-xCVxeyneMXu53_cfaVyYhQ-1; Fri, 25 Sep 2020 11:45:46 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048738740104.65876608292649; Fri, 25 Sep 2020 23:45:38 +0800 (CST) X-MC-Unique: SxjuOlo9NLmOm7ous8rOmw-1 X-MC-Unique: xCVxeyneMXu53_cfaVyYhQ-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-12-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:43 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjtAb024698 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 11/11] requirements: Upgrade to recent Django X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng The debug toolbar must be upgraded to work with new django too because of django.utils changes. --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6129558..9ddc444 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -Django>=3D1.11, <2.0 +Django>=3D3.1.*, < 3.2 Pillow>=3D3.2.0, <6.0 Markdown>=3D2.6.6, < 3.0 -django-debug-toolbar=3D=3D1.8 +django-debug-toolbar gunicorn>=3D19 djangorestframework>=3D3.0.0 jsonfield2 >=3D 3.0, < 4.0 --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel