all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
To: 45289@debbugs.gnu.org
Subject: [bug#45289] [PATCHES] Fix python-sanic
Date: Thu, 17 Dec 2020 11:10:29 +0100	[thread overview]
Message-ID: <20201217101029.GB2856@zpidnp36> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 385 bytes --]

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

[-- Attachment #1.2: 0001-gnu-python-httpcore-Upgrade-to-0.12.2.patch --]
[-- Type: text/x-diff, Size: 3242 bytes --]

From 99dd608b5727a499c3937863ff09739c6cbf43ac Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
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


[-- Attachment #1.3: 0002-gnu-python-sanic-Relax-httpx-version-requirement.patch --]
[-- Type: text/x-diff, Size: 1067 bytes --]

From be26e673556898bf4c7ec1f9dcf1fa89f4692eb5 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

             reply	other threads:[~2020-12-17 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 10:10 Lars-Dominik Braun [this message]
2020-12-17 20:30 ` bug#45289: [PATCHES] Fix python-sanic Efraim Flashner

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

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

  git send-email \
    --in-reply-to=20201217101029.GB2856@zpidnp36 \
    --to=ldb@leibniz-psychology.org \
    --cc=45289@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.