From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EIOiGr06l2Pv8QAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 15:29:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ULqkGb06l2OKCwAAG6o9tA (envelope-from ) for ; Mon, 12 Dec 2022 15:29:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 80DE038FDA for ; Mon, 12 Dec 2022 15:29:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4jmx-0005kM-9b; Mon, 12 Dec 2022 09:28:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4jmr-0005Xh-5Z for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4jmq-0006Db-SF for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4jmq-0007W3-NG for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60009] [PATCH 12/18] gnu: python-flask-restful: Update to 0.3.9. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Dec 2022 14:28:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60009 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 60009@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 60009-submit@debbugs.gnu.org id=B60009.167085528328809 (code B ref 60009); Mon, 12 Dec 2022 14:28:08 +0000 Received: (at 60009) by debbugs.gnu.org; 12 Dec 2022 14:28:03 +0000 Received: from localhost ([127.0.0.1]:53294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4jmk-0007UQ-Ei for submit@debbugs.gnu.org; Mon, 12 Dec 2022 09:28:03 -0500 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4jmi-0007U4-Nr for 60009@debbugs.gnu.org; Mon, 12 Dec 2022 09:28:01 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1670855279; cv=none; d=zohomail.com; s=zohoarc; b=fiY0MAZQV9HDzxviw4kYnFk9jt7vAISvfaaVFCBP+795G55zmRAStEA5ECSdJBLFncMMPQfqttTCeuU1nqOt8l4YREevhRnApq7kTifrPxXP/jTb8QbBld1pxoW0EGNebUeX9ArpeiCegwNXlrftVroh28+x9EjcVCmEZdzHBKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670855279; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Isso4PT/bf1mBzmav1+EXkrhAbYZinCRo4d6VjfA4yE=; b=W6t1fnrRiHCL1C5P+iCQqDJhWc95Txb4UKiqqPO0jDbcb/vFQ2H9ob7ydKTigTr/LSKwOycboh6Jw/yDaYMBVa0OzHHLswvhxsf8Oo5/gIJkGm8xRNRR6HJ0vyUf7CpqTlcjnr3sbmDj81J1Zvu5xGjvuWEqNTnvoi4qKZ81Dx0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670855279; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Isso4PT/bf1mBzmav1+EXkrhAbYZinCRo4d6VjfA4yE=; b=aqB1WKDQ3yYQpzJnMC4im8uPU15EAFS+E7p/PHNcN9f3sKE+pJHzoY9mMWppfj+T pOcF97zMH3twTgDpX035zcsqRclqO9tJwnLMQ4CyCMb0/2e23nJNm29iUzsMFdooNVC Bur21jajT6B05ZUn3g4/R6RKrpz6M1WPNs2MxvX8= Received: from localhost (48-111-142-46.pool.kielnet.net [46.142.111.48]) by mx.zohomail.com with SMTPS id 1670855276036211.12856040822328; Mon, 12 Dec 2022 06:27:56 -0800 (PST) From: Ricardo Wurmus Date: Mon, 12 Dec 2022 15:27:10 +0100 Message-Id: <20221212142716.9460-12-rekado@elephly.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221212142716.9460-1-rekado@elephly.net> References: <87h6y03dkr.fsf@elephly.net> <20221212142716.9460-1-rekado@elephly.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670855356; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Isso4PT/bf1mBzmav1+EXkrhAbYZinCRo4d6VjfA4yE=; b=eQA0/uVxQeiMIHpW935q5r4TW6foufHmHduMFQCFY6x8JiMma29oHtgPeSLgi0YSRyTZER OiozE8ZOpLgyCMnKon6fWtb9HLzrsPOQ2FXxMDwipM0FxmxgGjP+H75s8m5RSf3nFJPQL8 i2CzV5MFloFuh4lrZDFHe7mleBBeHXKFUWuv43tQb4q+2sak0fpkWOKuwk2B5uQiySpcWM 7ahbMU/N4/W3EhEESvdYNSOkOOcERF5I/F3DIGhTQTYB2vHpC+LeNkkqdq2Jk/ejL3u1SY aepdSTxYleqMZoKvZe/Ruoef2G8vOEANrqWY31/KZ0IL3RV+8AgFXXMpauhrwA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=aqB1WKDQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none ARC-Seal: i=2; s=key1; d=yhetil.org; t=1670855356; a=rsa-sha256; cv=fail; b=lKfjwDbCw5gJsMQBCvjnDbTZffhJ5i4OlCMMufqN5E9+AeLrnQsWtZJhcSaNbw8Mdu5lLB +IxwMhHD3MbYiEAG6xJdbX6f/E1QcB1ZlYW5KyDBq9wdd7yctfkvMAAXi9LpuE3+0jPEjg uBLWNP+8vf2w0Em//u3XaztQDRCDBQsOsCzWef0QjHE81Z0oXdtadxjUX97mJRgRxf3qIq ZTJA44QW5xNHjWbTF6rKg0KmeaiowiP0peSJyPj7U+hGn7fS2qkVPbPZZnyK/kZWDXyPKn wVNMYtnozmxmPROCh6ozw1lntMg4TdWklUU5qJWvAg5aKV3e9HyZCQ7W6gxvvg== X-Migadu-Spam-Score: 3.24 X-Spam-Score: 3.24 X-Migadu-Queue-Id: 80DE038FDA X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=aqB1WKDQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none X-TUID: 8gYO5/+Hgv1/ * gnu/packages/python-web.scm (python-flask-restful): Update to 0.3.9. [source]: Remove patch. [build-system]: Use pyproject-build-system. [arguments]: Disable "test_redirect" test; remove 'fix-imports phase. [native-inputs]: Replace python-nose with python-pytest. * gnu/local.mk (dist_patch_DATA): Remove patch. * gnu/packages/patches/python-flask-restful-werkzeug-compat.patch: Remove file. --- gnu/local.mk | 1 - ...python-flask-restful-werkzeug-compat.patch | 36 ------------------- gnu/packages/python-web.scm | 31 +++++++--------- 3 files changed, 12 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/python-flask-restful-werkzeug-compat.patch diff --git a/gnu/local.mk b/gnu/local.mk index 295be3c67c..60a422fd7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1728,7 +1728,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-docopt-pytest6-compat.patch \ %D%/packages/patches/python-execnet-read-only-fix.patch \ %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \ - %D%/packages/patches/python-flask-restful-werkzeug-compat.patch \ %D%/packages/patches/python-ipython-documentation-chars.patch \ %D%/packages/patches/python-ipython-documentation-repro.patch \ %D%/packages/patches/python-keras-integration-test.patch \ diff --git a/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch b/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch deleted file mode 100644 index 0e928ef455..0000000000 --- a/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch +++ /dev/null @@ -1,36 +0,0 @@ -We need one patch on top of 0.3.8 for compatibility with Werkzeug 1.0. - -Taken from upstream: -https://github.com/flask-restful/flask-restful/commit/73376a488907af3042b52678ac4c23f8a8911e5b - -diff --git a/tests/test_api.py b/tests/test_api.py -index f7f8e661..6795d362 100644 ---- a/tests/test_api.py -+++ b/tests/test_api.py -@@ -445,7 +445,9 @@ def test_handle_non_api_error(self): - - resp = app.get("/foo") - self.assertEquals(resp.status_code, 404) -- self.assertEquals('text/html', resp.headers['Content-Type']) -+ # in newer versions of werkzeug this is `text/html; charset=utf8` -+ content_type, _, _ = resp.headers['Content-Type'].partition(';') -+ self.assertEquals('text/html', content_type) - - def test_non_api_error_404_catchall(self): - app = Flask(__name__) -diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py -index 2f1fbedf..9776f17c 100644 ---- a/tests/test_reqparse.py -+++ b/tests/test_reqparse.py -@@ -2,9 +2,9 @@ - import unittest - from mock import Mock, patch - from flask import Flask --from werkzeug import exceptions, MultiDict -+from werkzeug import exceptions - from werkzeug.wrappers import Request --from werkzeug.datastructures import FileStorage -+from werkzeug.datastructures import FileStorage, MultiDict - from flask_restful.reqparse import Argument, RequestParser, Namespace - import six - import decimal diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 7543e05f47..18c0b47b67 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3924,35 +3924,28 @@ (define-public python-flask-jwt (define-public python-flask-restful (package (name "python-flask-restful") - (version "0.3.8") + (version "0.3.9") (source (origin (method url-fetch) (uri (pypi-uri "Flask-RESTful" version)) - (patches (search-patches "python-flask-restful-werkzeug-compat.patch")) (sha256 (base32 - "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay")))) - (build-system python-build-system) + "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-imports - (lambda _ - (substitute* "flask_restful/__init__.py" - (("flask\\.helpers") "flask.scaffold"))))))) + ;; This test fails because '/' is not 'http://localhost/'. + (list #:test-flags '(list "-k" "not test_redirect"))) (propagated-inputs - (list python-aniso8601 python-flask python-pytz)) + (list python-aniso8601 python-flask python-pytz)) (native-inputs - (list ;; Optional dependency of Flask. Tests need it. - python-blinker python-mock ; For tests - python-nose)) ;for tests - (home-page - "https://www.github.com/flask-restful/flask-restful/") - (synopsis - "Flask module for creating REST APIs") + (list python-blinker + python-mock + python-pytest)) + (home-page "https://www.github.com/flask-restful/flask-restful/") + (synopsis "Flask module for creating REST APIs") (description - "This package contains a Flask module for creating REST APIs.") + "This package contains a Flask module for creating REST APIs.") (license license:bsd-3))) (define-public python-flask-basicauth -- 2.36.1