diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 396 |
1 files changed, 199 insertions, 197 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d4a785b2fc..f9af939781 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 <[email protected]> -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <[email protected]> +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <[email protected]> ;;; Copyright © 2017 Christopher Baines <[email protected]> ;;; Copyright © 2016, 2017 Danny Milosavljevic <[email protected]> ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <[email protected]> @@ -68,6 +68,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) @@ -102,13 +103,13 @@ (define-public python-prawcore (package (name "python-prawcore") - (version "2.0.0") + (version "2.3.0") (source (origin (method url-fetch) (uri (pypi-uri "prawcore" version)) (sha256 - (base32 "1l9nrn4s03xl8fvkyybdk86bm9cyyk43alkxf9g014a9ynvdk65l")))) + (base32 "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs")))) (build-system python-build-system) (native-inputs `(("python-betamax" ,python-betamax) @@ -127,13 +128,13 @@ (define-public python-praw (package (name "python-praw") - (version "7.2.0") + (version "7.5.0") (source (origin (method url-fetch) (uri (pypi-uri "praw" version)) (sha256 - (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3")))) + (base32 "1nqcwz8r8xp4rfpy2i11x2fjga8fmmf6zw94xjk1h1yxgn1gq6zr")))) (build-system python-build-system) (arguments `(#:phases @@ -141,24 +142,25 @@ (add-after 'unpack 'disable-failing-tests (lambda _ (with-directory-excursion "tests" - ;; Require networking. + ;; Integration tests depend on files that are not included. (for-each delete-file-recursively '("integration/models" "unit/models")) - ;; https://github.com/praw-dev/praw/issues/1699 - ;; #issuecomment-795336704 - (delete-file "unit/test_config.py")) - #t)) + ;; The configuration file does not seem to exist. + (delete-file "unit/test_config.py")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "pytest")) - #t))))) + (invoke "pytest" "-k" + ;; These tests depend on test files that don't exist. + (string-append "not test_bad_request_without_json_text_plain_response" + " and not test_bad_request_without_json_text_html_response")))))))) (native-inputs `(("python-betamax" ,python-betamax) ("python-betamax-matchers" ,python-betamax-matchers) ("python-pytest" ,python-pytest))) (propagated-inputs `(("python-prawcore" ,python-prawcore) + ("python-update-checker" ,python-update-checker) ("python-websocket-client" ,python-websocket-client))) (synopsis "Python Reddit API Wrapper") (description "PRAW is a Python package that allows for simple access to @@ -207,8 +209,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. @@ -216,18 +217,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) @@ -239,13 +238,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 @@ -345,22 +344,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))) @@ -471,9 +468,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. @@ -525,11 +519,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 @@ -812,9 +801,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 @@ -1215,7 +1201,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 @@ -1505,9 +1492,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..). @@ -1964,8 +1948,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 @@ -1976,14 +1962,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)) @@ -2021,7 +2020,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 @@ -2036,8 +2043,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))) @@ -2135,11 +2141,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)) @@ -2202,11 +2204,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)) @@ -2263,11 +2261,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)) @@ -2306,15 +2300,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)) @@ -2335,9 +2326,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) @@ -2361,11 +2353,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)) @@ -2540,17 +2528,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 @@ -2561,26 +2550,17 @@ APIs.") (description "Requests is a Python HTTP client library. It aims to be easier to use 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))))) + (license license:asl2.0) + (properties `((python2-variant . ,(delay python2-requests)))))) (define-public python2-requests - (package-with-python2 python-requests)) + (let ((base (package-with-python2 (strip-python2-variant python-requests)))) + (package + (inherit base) + ;; The python-charset-normalizer dependency is necessary on Python 3 + ;; only. + (propagated-inputs (modify-inputs (package-propagated-inputs base) + (delete "python-charset-normalizer")))))) (define-public python-requests-unixsocket (package @@ -2602,9 +2582,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) @@ -2815,15 +2799,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 @@ -2842,29 +2825,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 @@ -2877,14 +2837,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. @@ -2897,13 +2857,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 @@ -3001,22 +2960,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 @@ -3048,8 +3006,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) @@ -3415,32 +3371,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) @@ -3819,17 +3765,17 @@ for Flask.") (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-some-tests + (add-before 'check 'adjust-tests (lambda _ + ;; Fix for Python 3.9 compatibility. + (substitute* "tests/test_script.py" + (("self\\.t\\.isAlive") + "self.t.is_alive")) ;; 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) @@ -4123,28 +4069,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 @@ -4154,6 +4103,31 @@ uploads, a powerful URL routing system and a bunch of community-contributed addon modules.") (license license:x11))) +(define-public python-werkzeug-1.0 + (package + (inherit python-werkzeug) + (version "1.0.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "Werkzeug" version)) + (sha256 + (base32 + "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c")) + (patches (search-patches "python-werkzeug-tests.patch")))) + (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")))))) + (propagated-inputs + `(("python-requests" ,python-requests))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-timeout" ,python-pytest-timeout))))) + (define-public python-bottle (package (name "python-bottle") @@ -4333,17 +4307,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) @@ -4386,7 +4379,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) @@ -4596,7 +4597,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 @@ -4825,14 +4827,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 @@ -4949,7 +4948,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. @@ -4959,7 +4958,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 @@ -4969,15 +4968,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) @@ -4985,8 +4980,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 @@ -5463,7 +5457,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)") |