unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 60009@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#60009] [PATCH 12/18] gnu: python-flask-restful: Update to 0.3.9.
Date: Mon, 12 Dec 2022 15:27:10 +0100	[thread overview]
Message-ID: <20221212142716.9460-12-rekado@elephly.net> (raw)
In-Reply-To: <20221212142716.9460-1-rekado@elephly.net>

* 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





  parent reply	other threads:[~2022-12-12 14:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 14:22 [bug#60009] Update python-graphviz and other Python updates Ricardo Wurmus
2022-12-12 14:26 ` [bug#60009] [PATCH 01/18] gnu: python-graphviz: Update to 0.20.1 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 02/18] gnu: python-hyperopt: Update to 0.2.7 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 03/18] gnu: python-biopython: Update to 1.80 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 04/18] gnu: python-hicmatrix: Update to 16 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 05/18] gnu: python-pygenometracks: Update to 3.5 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 06/18] gnu: python-hicexplorer: Update to 3.7.2 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 07/18] gnu: python-dna-features-viewer: Update to 3.1.1 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 08/18] gnu: python-bokeh: Skip failing PIL test Ricardo Wurmus
2022-12-12 19:10     ` zimoun
2022-12-12 20:09       ` Ricardo Wurmus
2022-12-12 20:37         ` Simon Tournier
2022-12-12 23:06           ` Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 09/18] gnu: sqlite-next: Update to 3.40.0 Ricardo Wurmus
2022-12-12 19:08     ` zimoun
2022-12-12 20:11       ` Ricardo Wurmus
2022-12-12 20:56         ` Simon Tournier
2022-12-12 23:02           ` Ricardo Wurmus
2022-12-12 23:21             ` Simon Tournier
2022-12-12 23:26               ` bug#60009: " Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 10/18] gnu: python-apsw: Update to 3.40.0.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 11/18] gnu: python-cgatcore: Update to 0.6.14 Ricardo Wurmus
2022-12-12 14:27   ` Ricardo Wurmus [this message]
2022-12-12 14:27   ` [bug#60009] [PATCH 13/18] gnu: python-marshmallow: Update to 3.19.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 14/18] gnu: python-apispec: Update to 6.0.2 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 15/18] gnu: python-pyjwt: Update to 2.6.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 16/18] gnu: python-flasgger: Update to 0.9.5 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 17/18] gnu: seqmagick: Update to 0.8.4 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 18/18] gnu: cnvkit: Update to 0.9.9 Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221212142716.9460-12-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=60009@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).