diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d84b5efdf9..070aee99b9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -58,6 +58,7 @@ ;;; Copyright © 2022 msimonin <matthieu.simonin@inria.fr> ;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr> +;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,23 +290,17 @@ by calling @code{FrozenList.freeze}.") (define-public python-aiosignal (package (name "python-aiosignal") - (version "1.2.0") + (version "1.3.1") (source (origin (method url-fetch) (uri (pypi-uri "aiosignal" version)) (sha256 - (base32 "1wkxbdgw07ay8yzx3pg1jcm46p3d21rfb5g4k17ysz3vdkdngvbq")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "tests"))))))) + (base32 "1z4cnqww6j0xl6f3vx2r6kfv1hdny1pnlll7difvfj8nbvhrdkal")))) + (build-system pyproject-build-system) + (arguments (list #:test-flags #~(list "tests"))) (propagated-inputs (list python-frozenlist)) - (native-inputs (list python-pytest python-pytest-asyncio)) + (native-inputs (list python-pytest python-pytest-asyncio python-pytest-cov)) (home-page "https://github.com/aio-libs/aiosignal") (synopsis "Callback manager for Python @code{asyncio} projects") (description "This Python module provides @code{Signal}, an abstraction to @@ -316,13 +311,13 @@ for adding, removing and dropping callbacks.") (define-public python-aiohttp (package (name "python-aiohttp") - (version "3.8.1") + (version "3.8.4") (source (origin (method url-fetch) (uri (pypi-uri "aiohttp" version)) (sha256 - (base32 "0y3m1dzl4h6frg8vys0fc3m83ijd1plfpihv3kvmxqadlphp2m7w")) + (base32 "0p5bj6g7ca19gvwk8fz00k579ma9w9kd27ssh2zl3r61ca8ilbmz")) (snippet #~(begin (use-modules ((guix build utils))) @@ -338,12 +333,14 @@ for adding, removing and dropping callbacks.") (modify-phases %standard-phases (add-after 'unpack 'fix-tests (lambda _ - ;; disable brotli tests, because we’re not providing that optional library + ;; Disable brotli tests, because we’re not providing that + ;; optional library. (substitute* "tests/test_http_parser.py" ((" async def test_feed_eof_no_err_brotli") " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli")) - ;; make sure the timestamp of this file is > 1990, because a few - ;; tests like test_static_file_if_modified_since_past_date depend on it + ;; Make sure the timestamp of this file is > 1990, because a few + ;; tests like test_static_file_if_modified_since_past_date depend + ;; on it. (let ((late-90s (* 60 60 24 365 30))) (utime "tests/data.unknown_mime_type" late-90s late-90s)) @@ -383,33 +380,35 @@ for adding, removing and dropping callbacks.") "not test_client_session_timeout_zero and " "not test_empty_body and " "not test_mark_formdata_as_processed[pyloop] and " - "not test_receive_runtime_err[pyloop]"))) + "not test_receive_runtime_err[pyloop] " + ;; These tests fail for unknown reasons (see: + ;; https://github.com/aio-libs/aiohttp/issues/7130) + "and not test_no_warnings " + "and not test_default_loop " + "and not test_ctor_global_loop " + "and not test_set_loop_default_loop "))) (when tests? ;; This tests requires the 'proxy.py' module, not yet ;; packaged. (delete-file "tests/test_proxy_functional.py") ;; Sometimes tests fail when run in parallel. - (or - (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=''" "--ignore=aiohttp" - "-n" (number->string (parallel-job-count)) - "-k" skipped-tests) - (invoke "pytest" "-vv" - "-o" "addopts=''" "--ignore=aiohttp" - "-k" skipped-tests))))))))) + (invoke "pytest" "-vv" + "-o" "addopts=''" "--ignore=aiohttp" + ;; These tests cause errors (see: + ;; https://github.com/aio-libs/aiohttp/issues/7130). + "--ignore" "tests/test_web_sendfile_functional.py" + "--ignore" "tests/test_web_urldispatcher.py" + "-k" skipped-tests)))))))) (propagated-inputs (list python-aiodns python-aiosignal python-attrs + python-asynctest python-async-timeout python-charset-normalizer python-frozenlist python-idna-ssl python-multidict - python-typing-extensions python-yarl)) (native-inputs (list gunicorn-bootstrap @@ -457,17 +456,16 @@ aiohttp. It supports SOCKS4(a) and SOCKS5.") (define-public python-aiodns (package (name "python-aiodns") - (version "1.1.1") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "aiodns" version)) (sha256 (base32 - "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq")))) + "1mlcw14hxyzd2yg89gj1l84gfi8nbl7h32iw17myxz23wymxyswl")))) (build-system python-build-system) - (propagated-inputs - (list python-pycares)) + (propagated-inputs (list python-pycares)) (arguments `(#:tests? #f)) ;tests require internet access (home-page "https://github.com/saghul/aiodns") @@ -1045,7 +1043,7 @@ over a different origin than that of the web application.") (define-public python-httplib2 (package (name "python-httplib2") - (version "0.15.0") + (version "0.22.0") (source (origin ;; Tests not included in the release tarball. @@ -1056,8 +1054,8 @@ over a different origin than that of the web application.") (file-name (git-file-name name version)) (sha256 (base32 - "11bis23xqbl6aa5m5yswwcf6zn4j24lyi7bfskd31h4zb368ggsj")))) - (build-system python-build-system) + "1zkp3glv0iha7p68p5m0sb8mrrammkdc0mx32517xry52s4iva7g")))) + (build-system pyproject-build-system) (arguments (list #:phases @@ -1067,7 +1065,8 @@ over a different origin than that of the web application.") (substitute* "requirements-test.txt" (("==") ">="))))))) (native-inputs - (list python-flake8 + (list python-cryptography + python-flake8 python-future python-mock python-pytest @@ -1431,7 +1430,7 @@ and that could be anything you want.") (add-installed-pythonpath inputs outputs) (invoke "python" "-m" "pytest" "-vv" "test"))))))) (native-inputs - (list python-hypothesis-next python-pytest)) + (list python-hypothesis python-pytest)) (propagated-inputs (list python-hpack python-hyperframe)) (home-page "https://github.com/python-hyper/h2") @@ -2273,14 +2272,14 @@ connection to each user.") (define-public python-tornado-6 (package (name "python-tornado") - (version "6.1") + (version "6.2") (source (origin (method url-fetch) (uri (pypi-uri "tornado" version)) (sha256 (base32 - "14cpzdv6p6qvk6vn02krdh5rcfdi174ifdbr5s6lcnymgcfyiiik")))) + "04rwzjfqa31ajz8vvkfcsp1539m8n960msnppxkcckp8plch8qwv")))) (build-system python-build-system) (arguments '(#:phases @@ -3250,7 +3249,7 @@ protocol, both client and server for Python asyncio module. (define-public python-msal (package (name "python-msal") - (version "1.18.0") + (version "1.22.0") (home-page "https://github.com/AzureAD/microsoft-authentication-library-for-python") (source (origin @@ -3260,7 +3259,7 @@ protocol, both client and server for Python asyncio module. (file-name (git-file-name name version)) (sha256 (base32 - "02d9vlvp08q1yffgn7a0y19451py1jly67q5ld6m2d9xidbrvac1")))) + "1pgpf8fa0mdga69hr6i66mq2a2vyn8dlcf4fdzqmbgw2il9b37q6")))) (build-system python-build-system) (arguments ;; Tests (all?) rely on network access and only some can be disabled by @@ -3401,14 +3400,14 @@ addon for removing tracking fields from URLs.") (define-public python-urllib3 (package (name "python-urllib3") - (version "1.26.9") + (version "1.26.15") (source (origin (method url-fetch) (uri (pypi-uri "urllib3" version)) (sha256 (base32 - "13j4mkk6vgix4bixfqk3fhydsl3r5f61z94ss4fmwsl0fxjg3fma")))) + "01dkqv0rsjqyw4wrp6yj8h3bcnl7c678qkj845596vs7p4bqff4a")))) (build-system python-build-system) (arguments `(#:tests? #f)) (propagated-inputs @@ -3687,15 +3686,15 @@ Python.") (when tests? (invoke "pytest" "-v"))))))) (native-inputs - (list python-mock - python-pytest + (list python-pytest python-pytest-asyncio python-pytest-httpserver)) (propagated-inputs (list python-requests - python-cookies - python-six - python-types-toml)) + python-toml + python-types-toml + python-typing-extensions + python-urllib3)) (home-page "https://github.com/getsentry/responses") (synopsis "Utility for mocking out the `requests` Python library") (description "A utility library for mocking out the `requests` Python @@ -4283,7 +4282,11 @@ users' sessions over extended periods of time.") (arguments `(#:tests? #f)) (propagated-inputs - (list python-httplib2 python-pyasn1 python-pyasn1-modules python-rsa + (list python-httplib2 + python-pyasn1 + python-pyasn1-modules + python-pyparsing + python-rsa python-six)) (home-page "https://github.com/google/oauth2client/") (synopsis "OAuth 2.0 client library") @@ -4443,7 +4446,7 @@ for Flask programs that are using @code{python-alembic}.") (define-public python-genshi (package (name "python-genshi") - (version "0.7.5") + (version "0.7.7") (source (origin (method git-fetch) @@ -4452,7 +4455,7 @@ for Flask programs that are using @code{python-alembic}.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "04i0caywiwrgw09grz988n15qr9lr31d9n6a529p8v80cy1fv23c")))) + (base32 "06q14mn5n56rdnqvsbbjixygilblgg85fzw029n96qf6f1rvldiq")))) (propagated-inputs (list python-six)) (build-system python-build-system) @@ -4806,17 +4809,17 @@ supports features like HTTP keep-alive, reget, throttling and more.") (define-public python-pycares (package (name "python-pycares") - (version "2.3.0") + (version "4.3.0") (source (origin (method url-fetch) (uri (pypi-uri "pycares" version)) (sha256 (base32 - "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n")))) + "0i8d0433wmm7wi8i2l2hjiyhmy35b9s888qrk6fqx5xcdmpnjhn5")))) (build-system python-build-system) - (arguments - `(#:tests? #f)) ;tests require internet access + (arguments `(#:tests? #f)) ;tests require internet access + (propagated-inputs (list python-cffi)) (home-page "https://github.com/saghul/pycares") (synopsis "Python interface for @code{c-ares}") (description "@code{pycares} is a Python module which provides an @@ -7292,13 +7295,13 @@ of the CRC32C hashing algorithm.") (define-public python-google-auth (package (name "python-google-auth") - (version "2.6.6") + (version "2.17.3") (source (origin (method url-fetch) (uri (pypi-uri "google-auth" version)) (sha256 - (base32 "04ikassansqkkw4pa98in7q9r4z001m6bi2r3ssxwwrb0f79790v")))) + (base32 "1z2f0vj374rscvlivhvf9xxjlg4lng4mgpqnygfhy4wbqlmiwcff")))) (build-system python-build-system) (arguments `(#:phases @@ -7316,6 +7319,7 @@ of the CRC32C hashing algorithm.") (native-inputs (list python-flask python-freezegun + python-mock python-oauth2client python-pyopenssl python-pytest |