From 0386f3a69e6c7c2e0e31cf7a61bcecd6c9dcab50 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Tue, 20 Oct 2020 12:37:54 +0200 Subject: gnu: Add python-hstspreload. * gnu/packages/python-web.scm (python-hstspreload): New variable. Signed-off-by: Leo Famulari --- gnu/packages/python-web.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9195b8328c6..b409edc551a 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5653,3 +5653,24 @@ over IMAP: @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status) @end itemize") (license license:asl2.0))) + +(define-public python-hstspreload + (package + (name "python-hstspreload") + (version "2020.10.20") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hstspreload" version)) + (sha256 + (base32 + "1qah80p2xlib1rhivvdj9v5y3girxrj7dwp1mnh8mwaj5wy32y8a")))) + (build-system python-build-system) + (home-page + "https://github.com/sethmlarson/hstspreload") + (synopsis + "Chromium HSTS Preload list as a Python package") + (description + "@code{python-hstspreload} contains Chromium HSTS Preload list +as a Python package.") + (license license:bsd-3))) -- cgit v1.3 From e779dc8be048a85fa0e51013b1aed46082284937 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Fri, 13 Nov 2020 09:55:19 +0100 Subject: gnu: Add python-sanic. * gnu/packages/python-web.scm (python-sanic): New variable. Signed-off-by: Leo Famulari --- gnu/packages/python-web.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index b409edc551a..f88178ab2c4 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -39,6 +39,7 @@ ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Konrad Hinsen +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -5674,3 +5675,62 @@ over IMAP: "@code{python-hstspreload} contains Chromium HSTS Preload list as a Python package.") (license license:bsd-3))) + +(define-public python-sanic + (package + (name "python-sanic") + (version "20.9.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sanic" version)) + (sha256 + (base32 + "06p0lsxqbfbka2yaqlpp0bg5pf7ma44zi6kq7qbb6hhry48dp1w6")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-recent-pytest + ;; Allow using recent dependencies. + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("httpcore==0.3.0") "httpcore") + (("pytest==5.2.1") "pytest") + (("multidict==5.0.0") "multidict")) + #t)) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "./tests" "-k" + "not test_zero_downtime and not test_gunicorn_worker")))))) + (propagated-inputs + `(("python-aiofiles" ,python-aiofiles) + ("python-httptools" ,python-httptools) + ("python-httpx" ,python-httpx) + ("python-multidict" ,python-multidict) + ("python-ujson" ,python-ujson) + ("python-uvloop" ,python-uvloop) + ("python-websockets" ,python-websockets))) + (native-inputs + `(("gunicorn" ,gunicorn) + ("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-hstspreload" ,python-hstspreload) + ("python-httpcore" ,python-httpcore) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-benchmark" ,python-pytest-benchmark) + ("python-pytest-sanic" ,python-pytest-sanic) + ("python-pytest-sugar" ,python-pytest-sugar) + ("python-urllib3" ,python-urllib3) + ("python-uvicorn" ,python-uvicorn))) + (home-page + "https://github.com/huge-success/sanic/") + (synopsis + "Async Python 3.6+ web server/framework") + (description + "Sanic is a Python 3.6+ web server and web framework +that's written to go fast. It allows the usage of the +@code{async/await} syntax added in Python 3.5, which makes +your code non-blocking and speedy.") + (license license:expat))) -- cgit v1.3 From 22e06297b1982f75aaadddba616b1052e506e4a0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 17 Dec 2020 10:59:43 +0100 Subject: 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. Signed-off-by: Efraim Flashner --- gnu/packages/python-web.scm | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index f88178ab2c4..b0c0c0ae363 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) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "--cov=httpcore" + "--cov=tests" "tests")) + #t))))) (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) -- cgit v1.3 From 5fbc1498ccd66337d094390c680f2e2c2abe4815 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 17 Dec 2020 11:04:14 +0100 Subject: gnu: python-sanic: Relax httpx version requirement. * gnu/packages/python-web.scm (python-sanic)[arguments]: Substitute strict httpx version requirement. Signed-off-by: Efraim Flashner --- gnu/packages/python-web.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index b0c0c0ae363..d4f59be83fc 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) -- cgit v1.3 From f8b6d18171211aee0a471bb5df6c05f5163fe5e6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 00:08:59 -0500 Subject: gnu: Add python-dpkt. * gnu/packages/python-web.scm (python-dpkt): New variable. --- gnu/packages/python-web.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d4f59be83fc..96262211cf7 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3016,6 +3016,24 @@ library.") @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily") (license license:bsd-2))) +(define-public python-dpkt + (package + (name "python-dpkt") + (version "1.9.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dpkt" version)) + (sha256 + (base32 + "1d28r8pmhzjjd6hrn1xcddinfhwv8lcl1s59ygmqa8kfmz5pkrgl")))) + (build-system python-build-system) + (home-page "https://github.com/kbandla/dpkt") + (synopsis "Packet generator and parser for TCP/IP protocols") + (description "The dpkt module is a fast, simple packet generator and parser +for the basic TCP/IP protocols.") + (license license:bsd-3))) + (define-public python-geventhttpclient (package (name "python-geventhttpclient") -- cgit v1.3 From 67166aae73a42f6fbb3d90fcc8ddf71c8d36a647 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 14:11:46 -0500 Subject: gnu: python2-werkzeug: Remove package. * gnu/packages/python-web.scm (python2-werkzeug): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 96262211cf7..fd0001e2702 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3990,9 +3990,6 @@ uploads, a powerful URL routing system and a bunch of community-contributed addon modules.") (license license:x11))) -(define-public python2-werkzeug - (package-with-python2 python-werkzeug)) - (define-public python-bottle (package (name "python-bottle") -- cgit v1.3 From 3e205aea17d0590a5c3da039df2a94277505bb5e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 14:13:01 -0500 Subject: gnu: python2-flask-httpauth: Remove package. * gnu/packages/python-web.scm (python2-flask-httpauth): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index fd0001e2702..b1ad5f05e7c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3878,9 +3878,6 @@ thread-local variable.") authentication for Flask routes.") (license license:expat))) -(define-public python2-flask-httpauth - (package-with-python2 python-flask-httpauth)) - (define-public python-uritemplate (package (name "python-uritemplate") -- cgit v1.3 From f597352c68701cbf35b12a45b0d07f7f8e5dca80 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 14:13:26 -0500 Subject: gnu: python2-flask-principal: Remove package. * gnu/packages/python-web.scm (python2-flask-principal): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index b1ad5f05e7c..966e1bfcea6 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3855,9 +3855,6 @@ Flask. It supports managing both authentication and authorization data in a thread-local variable.") (license license:expat))) -(define-public python2-flask-principal - (package-with-python2 python-flask-principal)) - (define-public python-flask-httpauth (package (name "python-flask-httpauth") -- cgit v1.3 From 8ea0bbb19de6df6875c534e91bbe31ff78972a29 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 14:13:50 -0500 Subject: gnu: python2-flask-script: Remove package. * gnu/packages/python-web.scm (python2-flask-script): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 966e1bfcea6..a6f1af1bf56 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3779,9 +3779,6 @@ and other command-line tasks that belong outside the web application itself.") (license license:bsd-3))) -(define-public python2-flask-script - (package-with-python2 python-flask-script)) - (define-public python-flask-migrate (package (name "python-flask-migrate") -- cgit v1.3 From e765fc96776df743d32002b1530ba693dcd44ec9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 14:14:04 -0500 Subject: gnu: python2-flask-restful-swagger: Remove package. * gnu/packages/python-web.scm (python2-flask-restful-swagger): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index a6f1af1bf56..1af9d257a16 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3492,9 +3492,6 @@ documentation builder.") specs from your Flask-Restful projects.") (license license:expat))) -(define-public python2-flask-restful-swagger - (package-with-python2 python-flask-restful-swagger)) - (define-public python-htmlmin (package (name "python-htmlmin") -- cgit v1.3 From fed863bbc5c35f73ab49955dbe10b099dbe450fb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 00:33:44 -0500 Subject: gnu: python-werkzeug: Update to 1.0.1. * gnu/packages/python-web.scm (python-werkzeug): Update to 1.0.1. [home-page]: Update. --- gnu/packages/python-web.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 1af9d257a16..ae249e8f242 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3947,14 +3947,14 @@ List. Forked from and using the same API as the publicsuffix package.") (define-public python-werkzeug (package (name "python-werkzeug") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) (uri (pypi-uri "Werkzeug" version)) (sha256 (base32 - "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn")))) + "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c")))) (build-system python-build-system) (arguments '(#:phases @@ -3969,7 +3969,7 @@ List. Forked from and using the same API as the publicsuffix package.") (native-inputs `(("python-pytest" ,python-pytest) ("python-pytest-timeout" ,python-pytest-timeout))) - (home-page "https://www.palletsprojects.org/p/werkzeug/") + (home-page "https://palletsprojects.com/p/werkzeug/") (synopsis "Utilities for WSGI applications") (description "One of the most advanced WSGI utility modules. It includes a powerful debugger, full-featured request and response objects, HTTP utilities to -- cgit v1.3 From 5684d6566a22eb3c49c167e7ee6a353d0f5cced5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 15:32:16 -0500 Subject: gnu: python2-geventhttpclient: Remove package. * gnu/packages/python-web.scm (python2-geventhttpclient): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index ae249e8f242..9765c96fd16 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3082,9 +3082,6 @@ for the basic TCP/IP protocols.") concurrent HTTP client library for python using @code{gevent}.") (license license:expat))) -(define-public python2-geventhttpclient - (package-with-python2 python-geventhttpclient)) - (define-public python-requests-oauthlib (package (name "python-requests-oauthlib") -- cgit v1.3 From a5c8aff18937f6739b3b1b9e851c352ac27606a7 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 19 Dec 2020 00:09:17 -0500 Subject: gnu: python-geventhttpclient: Update to 1.4.4. * gnu/packages/python-web.scm (python-geventhttpclient): Update to 1.4.4. --- gnu/packages/python-web.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9765c96fd16..4ec5a3e882c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3037,13 +3037,13 @@ for the basic TCP/IP protocols.") (define-public python-geventhttpclient (package (name "python-geventhttpclient") - (version "1.3.1") + (version "1.4.4") (source (origin (method url-fetch) (uri (pypi-uri "geventhttpclient" version)) (sha256 (base32 - "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx")) + "1hy4qm9d3r69n5199i7qjji1v7718n7cxbj8ggi0njify99m37pm")) (modules '((guix build utils))) (snippet '(begin @@ -3071,7 +3071,8 @@ for the basic TCP/IP protocols.") "-k" (string-append "not test_cookielib_compatibility")) #t))))) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-dpkt" ,python-dpkt) + ("python-pytest" ,python-pytest))) (propagated-inputs `(("python-certifi" ,python-certifi) ("python-gevent" ,python-gevent) -- cgit v1.3