Subject: [bug#55831] [PATCH] gnu: python-httpcore and python-httpx: Update to 0.15.0 and 0.23.0

From: [email-masked]
Date: Tue, 7 Jun 2022 16:09:58 -0400

From: Peter Polidoro <[email-masked]>

These packages seem to have cyclic dependencies on each other so they may need
to be updated together.

* gnu/packages/python-web.scm (python-httpcore): Update to 0.15.0.
---
 gnu/packages/python-web.scm | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 58bdac622a..22c09af1ed 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -5317,7 +5317,7 @@ (define-public python-vf-1
 (define-public python-httpcore
   (package
     (name "python-httpcore")
-    (version "0.14.7")
+    (version "0.15.0")
     (source
      (origin
        ;; PyPI tarball does not contain tests.
@@ -5327,15 +5327,20 @@ (define-public python-httpcore
              (commit  version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0wdr28vf03l6yxhk8nrvhh7y7x18rqdcfzv1sb6jgzk9zmycrvc7"))))
+        (base32 "0skj8f85l52gl6x449wzaixcwsyayvn59iwn0df4b7ixlz6xhp8l"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-requirements
+           (lambda _
+             (substitute* "setup.py"
+               (("h11>=0\\.11,<0\\.13") "h11"))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "pytest" "-vv" "tests")))))))
+               (invoke "pytest" "-vv" "tests"
+                       "-o""asyncio_mode=auto")))))))
     (native-inputs
      (list python-pytest
            python-pytest-asyncio
@@ -5376,13 +5381,17 @@ (define-public python-httpcore-bootstrap
   (hidden-package
    (package/inherit python-httpcore
      (name "python-httpcore-bootstrap")
-     (arguments (list #:tests? #f))
+     (arguments
+      '(#:tests? #f
+        ;; sanity check fails when arguments overridden
+        #:phases (modify-phases %standard-phases
+                   (delete 'sanity-check))))
      (native-inputs '()))))
 
 (define-public python-httpx
   (package
     (name "python-httpx")
-    (version "0.22.0")
+    (version "0.23.0")
     (source
      (origin
        ;; PyPI tarball does not contain tests.
@@ -5392,7 +5401,7 @@ (define-public python-httpx
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1awr56488b66zyl3cx1f03lq2n07xdg5kb4l46vnsm59s6hr02c5"))))
+        (base32 "0bihm7ylq9ajxz8qyba0xp9qkwm7n06hk01ywkq2vpz65ix5hpdk"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -5478,7 +5487,11 @@ (define-public python-httpx-bootstrap
   (hidden-package
    (package/inherit python-httpx
      (name "python-httpx-bootstrap")
-     (arguments (list #:tests? #f))
+     (arguments
+      '(#:tests? #f
+        ;; sanity check fails when arguments overridden
+        #:phases (modify-phases %standard-phases
+                   (delete 'sanity-check))))
      (native-inputs '())
      (propagated-inputs
       (modify-inputs (package-propagated-inputs python-httpx)
-- 
2.36.1