From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CGiXAtWBVF8wFAAA0tVLHw (envelope-from ) for ; Sun, 06 Sep 2020 06:29:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wLL4OdSBVF+fYwAAbx9fmQ (envelope-from ) for ; Sun, 06 Sep 2020 06:29:40 +0000 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 9DB13940390 for ; Sun, 6 Sep 2020 06:29:40 +0000 (UTC) Received: from localhost ([::1]:54746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEnXM-0003dF-9U for larch@yhetil.org; Sun, 06 Sep 2020 01:48:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEnX2-00031f-Sz for guix-patches@gnu.org; Sun, 06 Sep 2020 01:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEnX2-0006rV-JN for guix-patches@gnu.org; Sun, 06 Sep 2020 01:48:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEnX2-0004eD-IF for guix-patches@gnu.org; Sun, 06 Sep 2020 01:48:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43233] [PATCH 09/10] gnu: Add python-httpcore. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Sep 2020 05:48:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43233 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43233@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 43233-submit@debbugs.gnu.org id=B43233.159937128317837 (code B ref 43233); Sun, 06 Sep 2020 05:48:04 +0000 Received: (at 43233) by debbugs.gnu.org; 6 Sep 2020 05:48:03 +0000 Received: from localhost ([127.0.0.1]:44558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEnX0-0004dV-Gj for submit@debbugs.gnu.org; Sun, 06 Sep 2020 01:48:02 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEnWy-0004ck-PZ for 43233@debbugs.gnu.org; Sun, 06 Sep 2020 01:48:01 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 22B1816005F for <43233@debbugs.gnu.org>; Sun, 6 Sep 2020 07:47:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1599371275; bh=Wwpj9YxRbMCiUtwLfb6Gt2tF327WE124GzqVw+SFGmY=; h=From:To:Cc:Subject:Date:From; b=ow18NZeupkDbQyINBsVsT4Ht4zb2a0+gLx35sBeyy2rSIWX0y6QKyxhw4uCbrylYo kCz4alzl7DLnf5spnLZwG/s6evG9PCB1H54tHeVzy3KESdqOHz/xHrnMHFhMPBLEIv VpLm8asIQB2/pVEqMLoT+768MIKxSi7e0ULiKi9MhNif3hVVpj7rb/WAo5ox9iYoKQ KL5lHtmG6iyxJSxyZWZGvvm0FZI9okGf82VgviC2v/aE4NC7Bf2TeaxUf52lxayKes sk3lqU2pxx80PsvQxGMydwb4vvZ/HtYNnm36ZjTdjheI53RbzgNgPaFa9sIUbQlaA4 l9P8I3x92lT5w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BkgRs6zxfz9rxM; Sun, 6 Sep 2020 07:47:53 +0200 (CEST) From: Vinicius Monego Date: Sun, 6 Sep 2020 02:46:52 -0300 Message-Id: <20200906054653.467-8-monego@posteo.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200906054653.467-1-monego@posteo.net> References: <20200906054653.467-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=posteo.net header.s=2017 header.b=ow18NZeu; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 5.09 X-TUID: zEPYiDZoi9bk * gnu/packages/python-web.scm (python-httpcore): New variable. --- mitmproxy requires python-kaitaistruct which requires kaitai-struct-compiler which is written in Scala. We don't have a Scala compiler in Guix. gnu/packages/python-web.scm | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d772506607..4fe637a5c6 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4306,6 +4306,80 @@ and serve updated contents upon changes to the directory.") @acronym{TLS, Transport Layer Security} support.") (license license:bsd-2))) +(define-public python-httpcore + (package + (name "python-httpcore") + (version "0.10.2") + (source + (origin + ;; PyPI tarball does not contain tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/encode/httpcore") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00gn8nfv814rg6fj7xv97mrra3fvx6fzjcgx9y051ihm6hxljdsi")))) + (build-system python-build-system) + (arguments + `(#: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")))))) + (native-inputs + `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this. + ("python-autoflake" ,python-autoflake) + ("python-flake8" ,python-flake8) + ("python-flake8-bugbear" ,python-flake8-bugbear) + ("python-flake8-pie" ,python-flake8-pie) + ("python-isort" ,python-isort) + ("python-mypy" ,python-mypy) + ("python-pytest" ,python-pytest) + ("python-pytest-asyncio" ,python-pytest-asyncio) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-trio" ,python-pytest-trio) + ("python-uvicorn" ,python-uvicorn) + ("python-trustme" ,python-trustme))) + (propagated-inputs + `(("python-h11" ,python-h11) + ("python-h2" ,python-h2) + ("python-sniffio" ,python-sniffio) + ("python-trio" ,python-trio) + ("python-trio-typing" ,python-trio-typing))) + (home-page "https://github.com/encode/httpcore") + (synopsis "Minimal, low-level HTTP client") + (description + "HTTP Core provides a minimal and low-level HTTP client, which does one +thing only: send HTTP requests. + +Some things HTTP Core does do: + +@itemize +@item Sending HTTP requests. +@item Provides both sync and async interfaces. +@item Supports HTTP/1.1 and HTTP/2. +@item Async backend support for asyncio and trio. +@item Automatic connection pooling. +@item HTTP(S) proxy support. +@end itemize") + (license license:bsd-3))) + (define-public python-websockets (package (name "python-websockets") -- 2.20.1