diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 331 |
1 files changed, 148 insertions, 183 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4ddf89c207..f34e352612 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr> @@ -67,6 +67,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system python) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages base) @@ -204,8 +205,7 @@ API rules.") (string-append "@pytest.mark.xfail\n" all))) ;; Don't test the aiohttp pytest plugin to avoid a dependency loop. - (delete-file "tests/test_pytest_plugin.py") - #t)) + (delete-file "tests/test_pytest_plugin.py"))) (add-before 'build 'cythonize (lambda _ ;; Adapted from the Makefile. @@ -213,18 +213,16 @@ API rules.") (for-each (lambda (file) (invoke "cython" "-3" - file "-I" "aiohttp")) + file "-I" ".")) (find-files "." "_.*\\.pyx$"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) (if tests? (invoke "pytest" "-vv" ;; Disable loading the aiohttp coverage plugin ;; to avoid a circular dependency (code coverage ;; is not very interesting to us anyway). - "-o" "addopts=''") + "-o" "addopts=''" "--ignore=aiohttp") (format #t "test suite not run~%"))))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) @@ -236,13 +234,13 @@ API rules.") ("python-typing-extensions" ,python-typing-extensions) ("python-yarl" ,python-yarl))) (native-inputs - `(("python-cython" ,python-cython) - ("python-pytest" ,python-pytest) - ("python-pytest-mock" ,python-pytest-mock) - ("python-re-assert" ,python-re-assert) - ("gunicorn" ,gunicorn-bootstrap) + `(("gunicorn" ,gunicorn-bootstrap) + ("python-async-generator" ,python-async-generator) + ("python-cython" ,python-cython) ("python-freezegun" ,python-freezegun) - ("python-async-generator" ,python-async-generator))) + ("python-pytest" ,python-pytest-6.1) + ("python-pytest-mock" ,python-pytest-mock) + ("python-re-assert" ,python-re-assert))) (home-page "https://github.com/aio-libs/aiohttp/") (synopsis "Async HTTP client/server framework (asyncio)") (description "@code{aiohttp} is an asynchronous HTTP client/server @@ -342,22 +340,20 @@ comes with a SOCKS proxy client.") (define-public python-asgiref (package (name "python-asgiref") - (version "3.3.4") + (version "3.4.1") (source (origin (method url-fetch) (uri (pypi-uri "asgiref" version)) (sha256 - (base32 - "0y0vdzldjkbs4pxf10pi6jpxq9b2sfp1rlwm153jcf5nvzxns8fi")))) + (base32 "1saqgpgbdvb8awzm0f0640j0im55hkrfzvcw683cgqw4ni3apwaf")))) (build-system python-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv")))))) + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) (native-inputs `(("python-pytest" ,python-pytest) ("python-pytest-asyncio" ,python-pytest-asyncio))) @@ -468,9 +464,6 @@ Model} (SAM) templates into AWS CloudFormation templates.") "tests/ext/aiohttp/test_client.py")))) (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:.:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" "tests")))))) (native-inputs `(;; These are required for the test suite. @@ -522,11 +515,6 @@ emit information from within their applications to the AWS X-Ray service.") "test/unit/module/maintenance/test_update_documentation.py") (delete-file "test/unit/module/maintenance/test_update_resource_specs.py") - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (setenv "PATH" (string-append out "/bin:" - (getenv "PATH"))) (invoke "python" "-m" "unittest" "discover" "-v" "-s" "test"))))))) (native-inputs @@ -809,9 +797,6 @@ content using a variety of algorithms.") `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" ;; Prevent running the flake8 and black ;; pytest plugins, which only tests style @@ -1212,7 +1197,8 @@ and written in Python.") `(("libxml2" ,libxml2))) (propagated-inputs `(("python-lxml" ,python-lxml) - ("python-beautifulsoup4" ,python-beautifulsoup4))) + ("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-chardet" ,python-chardet))) (home-page "https://html5-parser.readthedocs.io") (synopsis "Fast C-based HTML5 parsing for Python") (description "This package provides a fast implementation of the HTML5 @@ -1502,9 +1488,6 @@ another XPath engine to find the matching elements in an XML or HTML document.") `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "tests" "-vv" ;; XXX: This fails with newer Pytest ;; (upstream uses Pytest 3..). @@ -1961,8 +1944,10 @@ conforming to a given API or contract.") '(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "zope-testrunner" "--test-path=src")))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "zope-testrunner" "--test-path=src") + (format #t "test suite not run~%"))))))) (native-inputs `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap))) (propagated-inputs @@ -1973,14 +1958,27 @@ conforming to a given API or contract.") that have uses outside of the Zope framework.") (license license:zpl2.1))) -(define-public python-zope-exceptions-bootstrap +(define (python-zope-bootstrap-package orig) (package - (inherit python-zope-exceptions) - (arguments `(#:tests? #f)) + (inherit orig) + (name (string-append (package-name orig) "-bootstrap")) + (arguments + (if (null? (package-arguments orig)) + `(#:tests? #f + #:phases (modify-phases %standard-phases + (delete 'sanity-check))) + (substitute-keyword-arguments (package-arguments orig) + ((#:tests? _ #f) #f) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (delete 'sanity-check)))))) (propagated-inputs `()) (native-inputs `()) (properties `((hidden? . #t))))) +(define-public python-zope-exceptions-bootstrap + (python-zope-bootstrap-package python-zope-exceptions)) + (define-public python2-zope-exceptions (package-with-python2 python-zope-exceptions)) @@ -2018,7 +2016,15 @@ forms, HTTP servers, regular expressions, and more.") "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7")))) (build-system python-build-system) (arguments - '(#:tests? #f)) ; FIXME: Tests can't find zope.interface. + '(#:tests? #f ;FIXME: Tests can't find zope.interface. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-problematic-test + (lambda _ + ;; This test contains invalid syntax, which breaks bytecode + ;; compilation. For simplicity just remove it. + (delete-file + "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py")))))) (native-inputs `(("python-zope-testing" ,python-zope-testing))) (propagated-inputs @@ -2033,8 +2039,7 @@ tests.") (define-public python-zope-testrunner-bootstrap (package - (inherit python-zope-testrunner) - (arguments `(#:tests? #f)) + (inherit (python-zope-bootstrap-package python-zope-testrunner)) (propagated-inputs `(("python-six" ,python-six) ("python-zope-exceptions" ,python-zope-exceptions-bootstrap))) @@ -2132,11 +2137,7 @@ Markup Language.") (license license:zpl2.1))) (define-public python-zope-configuration-bootstrap - (package - (inherit python-zope-configuration) - (arguments `(#:tests? #f)) - (native-inputs `()) - (properties `((hidden? . #t))))) + (python-zope-bootstrap-package python-zope-configuration)) (define-public python2-zope-configuration (package-with-python2 python-zope-configuration)) @@ -2199,11 +2200,7 @@ brokering, etc.) for which the proxy is responsible.") (license license:zpl2.1))) (define-public python-zope-proxy-bootstrap - (package - (inherit python-zope-proxy) - (arguments `(#:tests? #f)) - (native-inputs `()) - (properties `((hidden? . #t))))) + (python-zope-bootstrap-package python-zope-proxy)) (define-public python2-zope-proxy (package-with-python2 python-zope-proxy)) @@ -2260,11 +2257,7 @@ Zope3, which are are special objects that have a structural location.") (license license:zpl2.1))) (define-public python-zope-location-bootstrap - (package - (inherit python-zope-location) - (arguments `(#:tests? #f)) - (native-inputs `()) - (properties `((hidden? . #t))))) + (python-zope-bootstrap-package python-zope-location)) (define-public python2-zope-location (package-with-python2 python-zope-location)) @@ -2303,15 +2296,12 @@ security policies on Python objects.") (define-public python-zope-security-bootstrap (package - (inherit python-zope-security) - (arguments `(#:tests? #f)) + (inherit (python-zope-bootstrap-package python-zope-security)) (propagated-inputs `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid) ("python-zope-interface" ,python-zope-interface) ("python-zope-proxy" ,python-zope-proxy-bootstrap) - ("python-zope-schema" ,python-zope-schema))) - (native-inputs `()) - (properties `((hidden? . #t))))) + ("python-zope-schema" ,python-zope-schema))))) (define-public python2-zope-security (package-with-python2 python-zope-security)) @@ -2332,9 +2322,10 @@ security policies on Python objects.") '(#:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "python" "setup.py" "test")))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "python" "setup.py" "test") + (format #t "test suite not run~%"))))))) (native-inputs `(("python-persistent" ,python-persistent) ("python-zope-configuration" ,python-zope-configuration-bootstrap) @@ -2358,11 +2349,7 @@ facilities for defining, registering and looking up components.") (license license:zpl2.1))) (define-public python-zope-component-bootstrap - (package - (inherit python-zope-component) - (arguments `(#:tests? #f)) - (native-inputs `()) - (properties `((hidden? . #t))))) + (python-zope-bootstrap-package python-zope-component)) (define-public python2-zope-component (package-with-python2 python-zope-component)) @@ -2537,17 +2524,18 @@ APIs.") (define-public python-requests (package (name "python-requests") - (version "2.25.0") + (version "2.26.0") (source (origin (method url-fetch) (uri (pypi-uri "requests" version)) (sha256 (base32 - "1y6mb8c0ipd64d5axq2p368yxndp3f966hmabjka2q2a5y9hn6kz")))) + "19q73fq7hip7b74fwls3p9x6zwvfwqcwpn6kha3zsgvrrzw5iamq")))) (build-system python-build-system) (propagated-inputs `(("python-certifi" ,python-certifi) ("python-chardet" ,python-chardet) + ("python-charset-normalizer" ,python-charset-normalizer) ("python-idna" ,python-idna) ("python-urllib3" ,python-urllib3))) (arguments @@ -2560,22 +2548,6 @@ APIs.") than Python’s urllib2 library.") (license license:asl2.0))) -;; Some software requires an older version of Requests, notably Docker/Docker -;; Compose. -(define-public python-requests-2.20 - (package (inherit python-requests) - (version "2.20.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "requests" version)) - (sha256 - (base32 - "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a")))) - (propagated-inputs - `(("python-urllib3" ,python-urllib3-1.24) - ("python-idna" ,python-idna-2.7) - ,@(package-propagated-inputs python-requests))))) - (define-public python2-requests (package-with-python2 python-requests)) @@ -2599,9 +2571,13 @@ than Python’s urllib2 library.") (substitute* "test-requirements.txt" (("(.*)==(.*)" _ name) (string-append name "\n"))))) (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv")))))) + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + ;; Avoid a deprecation error. + (substitute* "pytest.ini" + (("--pep8") "")) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))))))) (propagated-inputs `(("python-pbr" ,python-pbr) ("python-requests" ,python-requests) @@ -2812,15 +2788,14 @@ authenticated session objects providing things like keep-alive.") (define-public python-urllib3 (package (name "python-urllib3") - (version "1.26.2") + (version "1.26.7") (source (origin (method url-fetch) (uri (pypi-uri "urllib3" version)) (sha256 (base32 - "024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r")))) - (replacement python-urllib3/fixed) + "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9")))) (build-system python-build-system) (arguments `(#:tests? #f)) (propagated-inputs @@ -2839,29 +2814,6 @@ supports url redirection and retries, and also gzip and deflate decoding.") (properties `((python2-variant . ,(delay python2-urllib3)))) (license license:expat))) -(define python-urllib3/fixed - (package - (inherit python-urllib3) - (version "1.26.7") - (source - (origin - (method url-fetch) - (uri (pypi-uri "urllib3" version)) - (sha256 - (base32 - "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9")))))) - -;; Some software requires an older version of urllib3, notably Docker. -(define-public python-urllib3-1.24 - (package (inherit python-urllib3) - (version "1.24.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "urllib3" version)) - (sha256 - (base32 - "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3")))))) - (define-public python2-urllib3 (let ((base (package-with-python2 (strip-python2-variant python-urllib3)))) (package/inherit @@ -2874,14 +2826,14 @@ supports url redirection and retries, and also gzip and deflate decoding.") (package ;; Note: updating awscli typically requires updating botocore as well. (name "awscli") - (version "1.18.203") + (version "1.20.64") (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 (base32 - "128zg24961j8nmnq2dxqg6a7zwh3qgv87cmvclsdqwwih9nigxv9")))) + "0pl88y70rgwfprgv5gqkc2fcbasc9d0qyffl98l82bsc24d4c8b9")))) (build-system python-build-system) (arguments ;; FIXME: The 'pypi' release does not contain tests. @@ -2894,13 +2846,12 @@ supports url redirection and retries, and also gzip and deflate decoding.") (("if not self._exists_on_path\\('groff'\\):") "") (("raise ExecutableNotFoundError\\('groff'\\)") "") (("cmdline = \\['groff'") - (string-append "cmdline = ['" (which "groff") "'"))) - #t))))) + (string-append "cmdline = ['" (which "groff") "'")))))))) (propagated-inputs - `(("python-colorama" ,python-colorama) + `(("python-colorama" ,python-colorama-for-awscli) ("python-botocore" ,python-botocore) ("python-s3transfer" ,python-s3transfer) - ("python-docutils" ,python-docutils) + ("python-docutils" ,python-docutils-0.15) ("python-pyyaml" ,python-pyyaml) ("python-rsa" ,python-rsa))) (native-inputs @@ -2998,22 +2949,21 @@ minimum of WSGI.") (define-public python-flask (package (name "python-flask") - (version "1.1.2") + (version "2.0.1") (source (origin (method url-fetch) (uri (pypi-uri "Flask" version)) (sha256 (base32 - "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf")))) + "0mcgwq7b4qd99mf5bsvs3wphchxarf8kgil4hwww3blj31xjak0w")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv" "tests")))))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "tests"))))))) (native-inputs `(("python-pytest" ,python-pytest))) (propagated-inputs @@ -3045,8 +2995,6 @@ presume or force a developer to use a particular tool or library.") (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv")))))) (propagated-inputs `(("python-flask-babel" ,python-flask-babel) @@ -3412,32 +3360,22 @@ Betamax that may possibly end up in the main package.") (define-public python-s3transfer (package (name "python-s3transfer") - (version "0.3.3") + (version "0.5.0") (source (origin (method url-fetch) (uri (pypi-uri "s3transfer" version)) (sha256 (base32 - "1nzp5kwmy9669334shcz9ipg89jgpdqhrmbkgdg18r7wmvi3f6lj")))) + "0k6sc956yrrv9b4laa0r79jhxajpyxr21jcd1ka8m1n53lz85vah")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch - (lambda _ - ;; There's a small issue with one test with Python 3.8, this - ;; change has been suggested upstream: - ;; https://github.com/boto/s3transfer/pull/164 - (substitute* "tests/unit/test_s3transfer.py" - (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)") - "futures.Future()")) - #t)) (replace 'check (lambda _ ;; Some of the 'integration' tests require network access or ;; login credentials. - (invoke "nosetests" "--exclude=integration") - #t))))) + (invoke "nosetests" "--exclude=integration")))))) (native-inputs `(("python-docutils" ,python-docutils) ("python-mock" ,python-mock) @@ -3820,13 +3758,9 @@ for Flask.") (lambda _ ;; This test requires 'postcss' and 'babel' which are ;; not yet available in Guix. - (delete-file "tests/test_filters.py") - #t)) + (delete-file "tests/test_filters.py"))) (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv")))))) (native-inputs `(("python-jinja2" ,python-jinja2) @@ -4120,28 +4054,31 @@ List. Forked from and using the same API as the publicsuffix package.") (define-public python-werkzeug (package (name "python-werkzeug") - (version "1.0.1") + (version "2.0.1") (source (origin (method url-fetch) (uri (pypi-uri "Werkzeug" version)) (sha256 (base32 - "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c")))) + "0hlwawnn8c41f254qify5jnjj8xb97n294h09bqimzqhs0qdpq8x")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases - (delete 'check) - (add-after 'install 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "python" "-m" "pytest")))))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "-m" "pytest" + ;; Test tries to use the network. + "-k not test_reloader_sys_path"))))))) (propagated-inputs `(("python-requests" ,python-requests))) (native-inputs `(("python-pytest" ,python-pytest) - ("python-pytest-timeout" ,python-pytest-timeout))) + ("python-pytest-timeout" ,python-pytest-timeout) + ("python-pytest-xprocess" ,python-pytest-xprocess))) (home-page "https://palletsprojects.com/p/werkzeug/") (synopsis "Utilities for WSGI applications") (description "One of the most advanced WSGI utility modules. It includes a @@ -4330,17 +4267,36 @@ name resolutions asynchronously.") (define-public python-yarl (package (name "python-yarl") - (version "1.1.1") + (version "1.6.3") (source (origin (method url-fetch) (uri (pypi-uri "yarl" version)) (sha256 (base32 - "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6")))) + "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a")) + (modules '((guix build utils))) + (snippet + #~(begin + (delete-file "yarl/_quoting_c.c"))))) (build-system python-build-system) + (arguments + (list #:tests? #f ; test suite can't find yarl._quoting_c + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'cythonize-code + (lambda _ + (invoke "cython" "yarl/_quoting_c.pyx"))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (substitute* "setup.cfg" + (("--cov=yarl") "")) + (add-installed-pythonpath inputs outputs) + (invoke "python" "-m" "pytest"))))))) (native-inputs - `(("python-pytest" ,python-pytest) + `(("python-cython" ,python-cython) + ("python-pytest" ,python-pytest) ("python-pytest-runner" ,python-pytest-runner))) (propagated-inputs `(("python-idna" ,python-idna) @@ -4383,7 +4339,15 @@ Google search engine. Its module is called @code{googlesearch}.") "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05")))) (build-system python-build-system) (arguments - '(#:tests? #f)) ; tests require internet access + `(#:tests? #f ; tests require internet access + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-setup-py + (lambda _ + (substitute* "setup.py" + (("googleapiclient/discovery_cache") + "googleapiclient.discovery_cache")) + #t))))) (native-inputs `(("python-httplib2" ,python-httplib2) ("python-six" ,python-six) @@ -4593,7 +4557,8 @@ Python.") (sha256 (base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi")))) (propagated-inputs - `(("python-unidecode" ,python-unidecode))) + `(("python-unidecode" ,python-unidecode) + ("python-text-unidecode" ,python-text-unidecode))) (arguments `(#:phases (modify-phases %standard-phases @@ -4822,14 +4787,11 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (lambda _ (invoke "make" "-C" "docs" "PAPER=a4" "html" "info") (delete-file "docs/build/texinfo/Makefile") - (delete-file "docs/build/texinfo/Gunicorn.texi") - #t)) + (delete-file "docs/build/texinfo/Gunicorn.texi"))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? (begin - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" ;; Disable the geventlet tests because eventlet uses ;; dnspython, which does not work in the build @@ -4946,7 +4908,7 @@ and fairly speedy.") (define-public python-uvicorn (package (name "python-uvicorn") - (version "0.11.8") + (version "0.13.2") (source (origin ;; PyPI tarball has no tests. @@ -4956,7 +4918,7 @@ and fairly speedy.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy")))) + (base32 "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9")))) (build-system python-build-system) (arguments `(#:phases @@ -4966,15 +4928,11 @@ and fairly speedy.") (add-installed-pythonpath inputs outputs) (invoke "pytest" "-vv")))))) (native-inputs - `(("python-black" ,python-black) - ("python-codecov" ,python-codecov) - ("python-flake8" ,python-flake8) - ("python-isort" ,python-isort) - ("python-mypy" ,python-mypy) - ("python-pytest" ,python-pytest) - ("python-pytest-cov" ,python-pytest-cov) + `(("python-pytest" ,python-pytest) ("python-pytest-mock" ,python-pytest-mock) - ("python-requests" ,python-requests))) + ("python-requests" ,python-requests) + ("python-trustme" ,python-trustme) + ("python-wsproto" ,python-wsproto))) (propagated-inputs `(("python-click" ,python-click) ("python-h11" ,python-h11) @@ -4982,8 +4940,7 @@ and fairly speedy.") ("python-pyyaml" ,python-pyyaml) ("python-uvloop" ,python-uvloop) ("python-watchgod" ,python-watchgod) - ("python-websockets" ,python-websockets) - ("python-wsproto" ,python-wsproto))) + ("python-websockets" ,python-websockets))) (home-page "https://github.com/encode/uvicorn") (synopsis "Fast ASGI server implementation") (description @@ -5460,7 +5417,15 @@ files.") (base32 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw")))) (build-system python-build-system) - (arguments '(#:tests? #f)) ; Tests not included in release tarball. + (arguments + '(#:tests? #f ; Tests not included in release tarball. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-websockets-package-name-requirement + (lambda* (#:key inputs #:allow-other-keys) + ;; Python package names use dot as separator. + (substitute* "setup.py" + (("websockets/extensions") "websockets.extensions"))))))) (home-page "https://github.com/aaugustin/websockets") (synopsis "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)") |