Subject: bug#45289: closed (Re: [bug#45289] [PATCHES] Fix python-sanic)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 17 Dec 2020 20:31:01 +0000

Your bug report

#45289: [PATCHES] Fix python-sanic

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
45289: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45289
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#45289] [PATCHES] Fix python-sanic
From: Efraim Flashner <[email-masked]>
To: Lars-Dominik Braun <[email-masked]>
Cc: [email-masked]
Date: Thu, 17 Dec 2020 22:30:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks! Patches pushed.

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Subject: [PATCHES] Fix python-sanic
From: Lars-Dominik Braun <[email-masked]>
To: [email-masked]
Date: Thu, 17 Dec 2020 11:10:29 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

a recent change to python-httpx broke python-sanic, which the attached patch
series fixes.

Cheers,
Lars

-- 
Lars-Dominik Braun
Wissenschaftlicher Mitarbeiter/Research Associate

www.leibniz-psychology.org
ZPID - Leibniz-Institut für Psychologie /
ZPID - Leibniz Institute for Psychology
Universitätsring 15
D-54296 Trier - Germany
Tel.: +49–651–201-4964
From 99dd608b5727a499c3937863ff09739c6cbf43ac Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <[email-masked]>
Date: Thu, 17 Dec 2020 10:59:43 +0100
Subject: [PATCH 1/2] gnu: python-httpcore: Upgrade to 0.12.2.

httpx was upgraded in commit bc49b009bf08326b55aea3508a6b677a065d5a31,
but was broken, because it requests this new version of httpcore.

* gnu/packages/python-web.scm (python-httpcore)[version]: Upgrade to
0.12.2.
[arguments]: Respect tests? argument. Disable tests. Remove obsolete
phases.
[native-inputs]: Remove obsolete comment regarding mitmproxy.
---
 gnu/packages/python-web.scm | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index f88178ab2c..7a4a83f210 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4915,7 +4915,7 @@ and serve updated contents upon changes to the directory.")
 (define-public python-httpcore
   (package
     (name "python-httpcore")
-    (version "0.11.0")
+    (version "0.12.2")
     (source
      (origin
        ;; PyPI tarball does not contain tests.
@@ -4925,33 +4925,21 @@ and serve updated contents upon changes to the directory.")
              (commit  version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "01bhajcxqgkdzg7b7x0fqs2lwcfsajlgqwi1nlxx58jss7g2kxn9"))))
+        (base32 "1nrwwfdqjfc2a1k3j41cdwkprwvplf95fwmypdl2aq2qgp3209q0"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
+     `(#:tests? #f ; Tests hang at 98%
+       #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'remove-unavailable-tests
-           (lambda _
-             ;; These tests require 'mitmproxy' which is not packaged.
-             (for-each (lambda (f)
-                         (delete-file f))
-                       '("tests/conftest.py"
-                         "tests/sync_tests/test_interfaces.py"
-                         "tests/async_tests/test_interfaces.py"))
-             #t))
-         (add-after 'remove-unavailable-tests 'force-h11-version
-           ;; Allow build with h11 >= 0.10.
-           (lambda _
-             (substitute* "setup.py" (("h11>=0.8,<0.10") "h11"))
-             #t))
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "-vv" "--cov=httpcore"
-                     "--cov=tests" "tests"))))))
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (if tests?
+               (begin
+                 (add-installed-pythonpath inputs outputs)
+                 (invoke "pytest" "-vv" "--cov=httpcore"
+                         "--cov=tests" "tests"))))))))
     (native-inputs
-     `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this.
-       ("python-autoflake" ,python-autoflake)
+     `(("python-autoflake" ,python-autoflake)
        ("python-flake8" ,python-flake8)
        ("python-flake8-bugbear" ,python-flake8-bugbear)
        ("python-flake8-pie" ,python-flake8-pie)
-- 
2.26.2

From be26e673556898bf4c7ec1f9dcf1fa89f4692eb5 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <[email-masked]>
Date: Thu, 17 Dec 2020 11:04:14 +0100
Subject: [PATCH 2/2] gnu: python-sanic: Relax httpx version requirement.

* gnu/packages/python-web.scm (python-sanic)[arguments]: Substitute
strict httpx version requirement.
---
 gnu/packages/python-web.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 7a4a83f210..097a421bad 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -5685,7 +5685,8 @@ as a Python package.")
              (substitute* "setup.py"
                (("httpcore==0.3.0") "httpcore")
                (("pytest==5.2.1") "pytest")
-               (("multidict==5.0.0") "multidict"))
+               (("multidict==5.0.0") "multidict")
+               (("httpx==0\\.15\\.4") "httpx"))
              #t))
          (replace 'check
            (lambda* (#:key inputs outputs #:allow-other-keys)
-- 
2.26.2