diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 1978 |
1 files changed, 1269 insertions, 709 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index c00e38a120..3137fb5ac9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -24,7 +24,7 @@ ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org> ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> -;;; Copyright © 2018, 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> +;;; Copyright © 2018, 2019, 2021, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org> @@ -45,7 +45,7 @@ ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev> ;;; Copyright © 2021, 2022, 2024 Arun Isaac <arunisaac@systemreboot.net> -;;; Copyright © 2021, 2022 jgart <jgart@dismail.de> +;;; Copyright © 2021, 2022, 2024 jgart <jgart@dismail.de> ;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr> ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> @@ -65,6 +65,10 @@ ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; Copyright © 2024 normally_js <normally_js@posteo.net> ;;; Copyright © 2024 Markku Korkeala <markku.korkeala@iki.fi> +;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org> +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com> +;;; Copyright © 2024 Attila Lendvai <attila@lendvai.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,6 +87,7 @@ (define-module (gnu packages python-web) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cargo) #:use-module (guix build-system copy) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) @@ -94,8 +99,12 @@ #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages certs) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-web) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages django) @@ -122,6 +131,7 @@ #:use-module (gnu packages qt) #:use-module (gnu packages rdf) #:use-module (gnu packages rpc) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) #:use-module (gnu packages texinfo) @@ -136,7 +146,7 @@ (define-public python-huggingface-hub (package (name "python-huggingface-hub") - (version "0.20.3") + (version "0.23.2") (source (origin (method git-fetch) @@ -145,7 +155,7 @@ (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "00indl9labvqvm4m0y5jbzl68cgj8i60a6qy498gpnjj2pqk4l6v")))) + (base32 "0hygxqcixkc1d9sr47j2km6z0p17aj4k1dzm4cvpddrvhrgqayq5")))) (build-system pyproject-build-system) (arguments (list @@ -168,6 +178,7 @@ "--ignore=tests/test_inference_api.py" "--ignore=tests/test_inference_async_client.py" "--ignore=tests/test_inference_client.py" + "--ignore=tests/test_inference_text_generation.py" "--ignore=tests/test_login_utils.py" "--ignore=tests/test_offline_utils.py" "--ignore=tests/test_repocard.py" @@ -177,7 +188,11 @@ "--ignore=tests/test_utils_git_credentials.py" "--ignore=tests/test_utils_http.py" "--ignore=tests/test_utils_pagination.py" - "--ignore=tests/test_webhooks_server.py") + "--ignore=tests/test_webhooks_server.py" + "-k" (string-append + "not test_push_to_hub" + " and not test_from_pretrained_model_id_only" + " and not test_from_pretrained_model_id_and_revision")) #:phases '(modify-phases %standard-phases (add-before 'check 'pre-check @@ -207,11 +222,13 @@ python-pytest-rerunfailures python-pytest-vcr python-pytest-xdist + python-setuptools python-types-requests python-types-toml python-types-urllib3 python-typing-extensions - python-urllib3)) + python-urllib3 + python-wheel)) (home-page "https://github.com/huggingface/huggingface_hub") (synopsis "Client library for accessing the huggingface.co hub") (description @@ -315,7 +332,9 @@ reusable library for parsing, manipulating, and generating URIs.") python-pytest-checkdocs python-pytest-cov python-pytest-enabler - python-pytest-mypy)) + python-pytest-mypy + python-setuptools + python-wheel)) (home-page "https://github.com/jaraco/portend") (synopsis "Monitor TCP ports for bound or unbound states") (description @@ -328,18 +347,31 @@ the command line.") (define-public python-prawcore (package (name "python-prawcore") - (version "2.3.0") + (version "2.4.0") (source (origin - (method url-fetch) - (uri (pypi-uri "prawcore" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/praw-dev/prawcore") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs")))) - (build-system python-build-system) + (base32 "1y7gh7kk002b2h1ppkr1llb2gjfnby28zvx11j4ji0wm3r3rjh5l")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: These tests fail with an incomplete request response. + (list #:test-flags + #~'("-k" #$(string-append + "not test_revoke__access_token_with_refresh_set" + " and not test_revoke__access_token_without_refresh_set" + " and not test_revoke__refresh_token_with_access_set" + " and not test_refresh__with_scopes" + " and not test_request__patch")))) (native-inputs (list python-betamax python-betamax-matchers python-betamax-serializers + python-flit-core python-mock python-pytest python-testfixtures)) @@ -353,34 +385,28 @@ the command line.") (define-public python-praw (package (name "python-praw") - (version "7.6.1") + (version "7.8.1") (source (origin - (method url-fetch) - (uri (pypi-uri "praw" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/praw-dev/praw") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "17pvdlcasr08p5hb1x7shjh8yvn621lzm0bvnwd3b1r1qpzrbz07")))) - (build-system python-build-system) + (base32 "05qq43l4334cq8r8k731qnb45nq12vvfdxwbr6q84a1hafp7n4cg")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-failing-tests - (lambda _ - (with-directory-excursion "tests" - ;; Integration tests depend on files that are not included. - (for-each delete-file-recursively - '("integration/models" "unit/models")) - ;; 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" "-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")))))))) + (list #:test-flags + #~(list "--ignore=tests/units/models" + "--ignore=tests/integration/models" + "--ignore=tests/unit/test_config.py" + "--ignore=tests/integration/test_reddit.py"))) (native-inputs - (list python-betamax python-betamax-matchers python-pytest)) + (list python-betamax + python-betamax-matchers + python-flit-core + python-pytest)) (propagated-inputs (list python-prawcore python-update-checker python-websocket-client)) (synopsis "Python Reddit API Wrapper") @@ -429,7 +455,12 @@ by calling @code{FrozenList.freeze}.") (build-system pyproject-build-system) (arguments (list #:test-flags #~(list "tests"))) (propagated-inputs (list python-frozenlist)) - (native-inputs (list python-pytest python-pytest-asyncio python-pytest-cov)) + (native-inputs + (list python-pytest + python-pytest-asyncio + python-pytest-cov + python-setuptools + python-wheel)) (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 @@ -607,18 +638,41 @@ using @url{https://github.com/saghul/pycares,pycares}.") (define-public python-aioquic (package (name "python-aioquic") - (version "0.9.21") - (source (origin - (method url-fetch) - (uri (pypi-uri "aioquic" version)) - (sha256 - (base32 - "1xbfa4gmlmyj6bihdl5p4mr7nd6z79rfi92wcqkmcy4f643frivr")))) + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "aioquic" version)) + (sha256 + (base32 "16bigrn5b46c7nmpzxhnlhh4y03hwc7dbd0mi5f8r53i7yxn64pr")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) - (inputs (list openssl)) + (arguments + (list + #:test-flags + #~(list "-k" (string-join + ;; AssertionError: AlertBadCertificate not raised + (list "not test_verify_subject_no_subjaltname" + ;; AttributeError: module + ;; 'service_identity.cryptography' has no attribute + ;; 'extract_patterns' + "test_verify_subject_with_subjaltname" + ;; AttributeError: module + ;; 'service_identity.cryptography' has no attribute + ;; 'extract_patterns' + "test_verify_subject_with_subjaltname_ipaddress") + " and not ")))) + (native-inputs + (list nss-certs-for-test + python-pytest + python-setuptools + python-wheel)) + (inputs + (list openssl)) (propagated-inputs - (list python-certifi python-pylsqpack python-pyopenssl)) + (list python-certifi + python-pylsqpack + python-pyopenssl + python-service-identity)) (home-page "https://github.com/aiortc/aioquic") (synopsis "QUIC and HTTP3 implementation in Python") (description @@ -682,7 +736,9 @@ comes with a SOCKS proxy client.") (list python-pytest python-pytest-asyncio python-pytest-cov - python-pytest-runner)) + python-pytest-runner + python-setuptools + python-wheel)) (home-page "https://github.com/vxgmichel/aiostream") (synopsis "Generator-based operators for asynchronous iteration") (description "@code{aiostream} provides a collection of stream operators that can @@ -750,7 +806,9 @@ WSGI. This package includes libraries for implementing ASGI servers.") python-httpx python-pytest python-pytest-asyncio - python-starlette)) + python-starlette + python-setuptools + python-wheel)) (home-page "https://github.com/simonw/asgi-csrf") (synopsis "ASGI middleware for protecting against CSRF attacks") (description "This Asynchronous Server Gateway Interface (ASGI) @@ -791,7 +849,9 @@ that is then compared to a @code{csrftoken} hidden form field or a (native-inputs (list python-pytest python-pytest-asyncio python-pytest-trio - python-starlette)) + python-starlette + python-setuptools + python-wheel)) (propagated-inputs (list python-sniffio)) (home-page "https://github.com/florimondmanca/asgi-lifespan") (synopsis "Programmatic startup/shutdown of ASGI apps") @@ -805,20 +865,32 @@ ASGI server.") (define-public python-a2wsgi (package (name "python-a2wsgi") - (version "1.7.0") + (version "1.10.7") (source (origin (method url-fetch) (uri (pypi-uri "a2wsgi" version)) (sha256 (base32 - "1cmsbgfg0vp8pwqz8nmkbmdi0axis1yl34qb280h5ssh08ngc1m9")))) + "13ikyfmkx7hlrbg5rpcdm6kw4wcsy00giil3f72hpb6sw7vjyinf")))) (build-system pyproject-build-system) (arguments - (list #:build-backend "pdm.backend" - ;; Tests have a circular dependency on uvicorn. - #:tests? #f)) - (native-inputs - (list python-pdm-backend)) + (list + #:test-flags + #~(list "-k" (string-join + (list "not test_starlette_stream_response" + "test_starlette_base_http_middleware" + "test_baize_stream_response") + " and not ")) + #:build-backend "pdm.backend")) + (native-inputs + (list python-pdm-backend + python-pytest + ;; python-baize ; not packed yet + python-httpx-bootstrap + ;; Cycle: python-a2wsgi->python-uvicorn-> + ;; python-httpx->python-starlette->python-a2wsgi + ;; python-starlette + python-pytest-asyncio)) (home-page "https://github.com/abersheeran/a2wsgi") (synopsis "Convert WSGI to ASGI or vice versa") (description @@ -826,6 +898,24 @@ ASGI server.") way around. It depends only on the Python standard library.") (license license:asl2.0))) +(define-public python-httpauth + (package + (name "python-httpauth") + (version "0.4.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "httpauth" version)) + (sha256 + (base32 + "1m6rwvivg61l3h34hf6p6gkqmr69sb1c4k5ha379nxq0p8bfgahb")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest)) + (home-page "https://github.com/jonashaag/httpauth") + (synopsis "WSGI HTTP Digest Authentication middleware") + (description "@code{python-httpauth} is WSGI middleware that secures some/all +routes using HTTP Digest Authentication.") + (license license:bsd-2))) + (define-public python-css-html-js-minify (package (name "python-css-html-js-minify") @@ -853,28 +943,55 @@ way around. It depends only on the Python standard library.") (define-public python-aws-sam-translator (package (name "python-aws-sam-translator") - (version "1.51.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "aws-sam-translator" version)) - (sha256 - (base32 - "1ywzchc3nk13xh593j7b14qp3y0fdx7cfbdhnm34p39av66xffac")))) - (build-system python-build-system) + (version "1.94.0") + (source + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/aws/serverless-application-model") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0rrmp2a2lr1bb909x34j7dqkdynx48hfwxg9m488s0mws68f78m3")))) + (build-system pyproject-build-system) (arguments - `(;; XXX: Tests are not distributed with the PyPI archive, and would - ;; introduce a circular dependency on python-cfn-lint. - #:tests? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - ;; The package needlessly specifies exact versions - ;; of dependencies, when it works fine with others. - (substitute* "requirements/base.txt" - (("(.*)(~=[0-9\\.]+)" all package version) - package))))))) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + "--ignore=tests/bin/test_public_interface.py" + "-k" + (string-join + ;; AttributeError: module 'pydantic.v1' has no attribute + ;; 'error_wrappers' + (list "not test_connector_with_empty_properties" + "test_connector_with_invalid_permission" + "test_connector_with_invalid_permission_type" + "test_connector_without_source" + "test_transform_invalid_document") + " and not ") + "tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "pytest.ini" + ((".*addopts.*") "")))) + (add-before 'check 'pre-check + (lambda _ + (setenv "AWS_DEFAULT_REGION" "eu-west-3")))))) + (native-inputs + (list python-pytest + python-setuptools + python-pytest-xdist + python-parameterized + python-pyyaml + python-wheel)) (propagated-inputs - (list python-boto3 python-jsonschema python-six)) + (list python-boto3 + python-jsonschema + python-pydantic + python-typing-extensions)) (home-page "https://github.com/aws/serverless-application-model") (synopsis "Transform AWS SAM templates into AWS CloudFormation templates") (description @@ -937,7 +1054,9 @@ Model} (SAM) templates into AWS CloudFormation templates.") python-pytest-benchmark python-requests python-sqlalchemy - python-webtest)) + python-webtest + python-setuptools + python-wheel)) (propagated-inputs (list python-aiohttp python-botocore @@ -989,16 +1108,13 @@ to the OVHcloud APIs.") (uri (pypi-uri "cbor2" version)) (sha256 (base32 "15y78xcc3zkmvj1mdzz8gyhf3apbl91073kwhzbjk5abc1civwlw")))) - (build-system python-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) - (native-inputs (list python-pytest python-pytest-cov python-setuptools-scm)) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-pytest-cov + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/agronholm/cbor2") (synopsis "Concise Binary Object Representation (CBOR) (de)serializer") (description "This Python library provides encoding and decoding for the @@ -1022,54 +1138,50 @@ decode and default on encode. (define-public python-cfn-lint (package (name "python-cfn-lint") - (version "0.65.0") - (home-page "https://github.com/aws-cloudformation/cfn-lint") + (version "1.22.1") (source (origin (method git-fetch) (uri (git-reference - (url home-page) + (url "https://github.com/aws-cloudformation/cfn-lint") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1rfacp39jssrbchrzb49vwrqyzhx5v7jfcgngqnb9r7qfs4bwi3w")))) - (build-system python-build-system) + "1zz121r9yv1irwdbk07s7958fh43h3r3q39qcj0gv4kpgb0vdf32")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'skip-network-test - (lambda _ - ;; This test requires networking. - (substitute* "test/unit/module/formatters/test_formatters.py" - (("def test_sarif_formatter") "def _test_sarif_formatter")))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (let ((out (assoc-ref outputs "out"))) - ;; Remove test for the documentation update scripts - ;; to avoid a dependency on 'git'. - (delete-file - "test/unit/module/maintenance/test_update_documentation.py") - (delete-file - "test/unit/module/maintenance/test_update_resource_specs.py") - (add-installed-pythonpath inputs outputs) - (setenv "PATH" (string-append out "/bin:" - (getenv "PATH"))) - (invoke "python" "-m" "unittest" "discover" - "-s" "test")))))))) - (native-inputs - (list python-pydot python-mock)) + (list + #:test-flags + #~(list "-k" (string-join + (list + ;; Skip documentation tests. + "not test_update_docs" + ;; Tests fail with error: AssertinError ... + "test_parameter_for_autopublish_code_sha256" + "test_sam_with_language_extension" + ;; Test fails with error: diff error while comparing + ;; graphs. + "test_build_graph") + " and not ")))) + (native-inputs + (list python-defusedxml + python-pydot + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-aws-sam-translator python-importlib-resources python-jschema-to-python python-jsonpatch - python-jsonschema python-junit-xml python-networkx python-pyyaml + python-regex python-sarif-om - python-six)) + python-sympy + python-typing-extensions)) + (home-page "https://github.com/aws-cloudformation/cfn-lint") (synopsis "Validate CloudFormation templates") (description "This package lets you validate CloudFormation YAML/JSON templates against @@ -1143,17 +1255,19 @@ Interchange Format (SARIF)} file format.") (sha256 (base32 "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests") + #:phases + '(modify-phases %standard-phases + (add-before 'check 'set-HOME + (lambda _ (setenv "HOME" "/tmp"))) (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Skip orjson, which requires rust to build. - (substitute* "tests/test_media_handlers.py" - (("== 'CPython") "!= 'CPython")) - (setenv "HOME" "/tmp") - (invoke "pytest" "-vv" "tests")))))) + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "pytest" "-vv" test-flags))))))) (propagated-inputs (list python-mimeparse)) (native-inputs @@ -1164,6 +1278,7 @@ Interchange Format (SARIF)} file format.") python-httpx python-mujson python-msgpack + python-orjson python-pecan python-pillow python-pytest @@ -1274,7 +1389,9 @@ over a different origin than that of the web application.") python-pytest-randomly python-pytest-timeout python-pytest-xdist - python-six)) + python-six + python-setuptools + python-wheel)) (home-page "https://github.com/httplib2/httplib2") (synopsis "Comprehensive HTTP client library") (description @@ -1402,7 +1519,9 @@ HTTP servers, RESTful APIs, and web services.") python-pytest-cov python-pytest-localserver python-pytest-socket - python-setuptools-scm)) + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://parfive.readthedocs.io/") (synopsis "HTTP and FTP parallel file downloader") (description @@ -1490,6 +1609,7 @@ content using a variety of algorithms.") "138bh6x1yy0qpk63bxa7mxnd97gfdm1fkpwm8wrdz3g3z0fca79c")))) (build-system pyproject-build-system) (propagated-inputs (list python-cryptography python-deprecated)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/latchset/jwcrypto") (synopsis "Implementation of JOSE Web standards") (description @@ -1512,7 +1632,7 @@ Encryption} (JOSE) Web Standards.") (base32 "1vinddg8sbh3v9n1r1wmvjx6ydk8xp7scbvhb3csl4y9xz7vhk6g")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-cov)) + (list python-pytest python-pytest-cov python-setuptools python-wheel)) (inputs (list pcre)) (home-page "https://github.com/Kronuz/pyScss") @@ -1524,13 +1644,13 @@ CSS3 that adds programming capabilities and some other syntactic sugar.") (define-public python-jsonpickle (package (name "python-jsonpickle") - (version "3.0.4") + (version "4.0.0") (source (origin (method url-fetch) (uri (pypi-uri "jsonpickle" version)) (sha256 (base32 - "0ay6r1bhcw7qy8k5n4xxgy9dqzhxx8syg5ra9wwqzk91ca6lrcd1")))) + "0dipys8p4hkqnp9nwkpysfv7mhws2hrr73wgn00pdmq4n990hrzw")))) (build-system pyproject-build-system) (arguments (list @@ -1561,6 +1681,7 @@ CSS3 that adds programming capabilities and some other syntactic sugar.") python-simplejson python-sqlalchemy python-ujson + python-wheel tzdata-for-tests)) (home-page "https://jsonpickle.github.io/") (synopsis "Serialize object graphs into JSON") @@ -1588,7 +1709,9 @@ object graph to and from JSON.") python-pytest-httpbin python-pytest-mock python-pytest-runner - python-requests-mock)) + python-requests-mock + python-setuptools + python-wheel)) (home-page "https://mechanicalsoup.readthedocs.io/") (synopsis "Python library for automating website interaction") (description @@ -1670,7 +1793,7 @@ for use in Python programs that implement HTTP/2.") (base32 "17b97c56y31hi0n0x0cb5a87x4xr9jijf2y06pzj0977k6zgn6cg")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/python-hyper/h11") (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1") (description @@ -1945,7 +2068,7 @@ C, yielding parse times that can be a thirtieth of the html5lib parse times.") "1acd1a4f66gi4plqnsml7cf33qp83mxsnmnqpdwkpj7597xkvyl4")))) (build-system pyproject-build-system) (native-inputs - (list python-setuptools-scm)) + (list python-setuptools python-setuptools-scm python-wheel)) (home-page "https://github.com/sanic-org/html5tagger") (synopsis "Create HTML documents from Python") (description @@ -1984,28 +2107,31 @@ Amazon S3 compatible object storage server.") (define-public python-pycurl (package (name "python-pycurl") - (version "7.45.2") + (version "7.45.4") (source (origin - (method url-fetch) - (uri (pypi-uri "pycurl" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/pycurl/pycurl") + (commit (string-append + "REL_" (string-replace-substring version "." "_"))))) + (file-name (git-file-name name version)) (sha256 - (base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p")))) + (base32 "00cd1l0lsml0708hpv5k4qyhqfv0qphb0p317j9aci2wdspn1mpl")))) (build-system pyproject-build-system) (arguments '(#:test-flags - (list "-n" "auto" - "-k" (string-append + ;; The test suite is not thread safe: + ;; - some tests want to use the same port: address already in use + ;; - some tests use signal.Signal, i.e. main-thread only + (list "-k" (string-append ;; Disable hanginging tests "not test_multi_socket_select" ;; E assert None is not None ;; E+ where None = ;; <tests.multi_callback_test.MultiCallbackTest - ;; testMethod=test_easy_pause_unpause>.socket_result - " and not test_easy_pause_unpause" + ;; testMethod=test_multi_socket_action>.timer_result " and not test_multi_socket_action" - ;; E pycurl.error: (1, '') - " and not test_http_version_3" ;; OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot ;; open shared object file: No such file or directory " and not test_libcurl_ssl_gnutls" @@ -2015,9 +2141,10 @@ Amazon S3 compatible object storage server.") ;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot ;; open shared object file: No such file or directory " and not test_libcurl_ssl_openssl" - ;; pycurl.error: (56, 'Recv failure: Connection reset by - ;; peer') - " and not test_post_with_read_callback")) + ;; Probably due to an expired CA + " and not test_request_without_certinfo" + ;; "A libcurl function was given a bad argument" + " and not test_proxy_tlsauth")) #:phases (modify-phases %standard-phases (add-before 'build 'configure-tls-backend (lambda _ @@ -2029,9 +2156,10 @@ Amazon S3 compatible object storage server.") (native-inputs (list python-bottle python-flaky - python-nose + python-flask python-pytest - python-pytest-xdist)) + python-setuptools + python-wheel)) (inputs (list curl gnutls)) (home-page "http://pycurl.io/") @@ -2120,13 +2248,14 @@ is Python’s.") python-wrapt)) (native-inputs (list python-bump2version - python-pre-commit python-pytest python-pytest-mock python-pytest-socket python-requests-mock python-setuptools-scm - python-tox)) + python-tox + python-setuptools + python-wheel)) (home-page "https://omnipathdb.org/") (synopsis "Python client for the OmniPath web service") (description "This package provides a Python client for the OmniPath web @@ -2156,7 +2285,7 @@ service.") (propagated-inputs (list python-aiohttp python-requests python-tqdm python-typing-extensions)) (native-inputs (list python-black python-pytest python-pytest-asyncio - python-pytest-mock)) + python-pytest-mock python-setuptools python-wheel)) (home-page "https://github.com/openai/openai-python") (synopsis "Python client library for the OpenAI API") (description "This package provides a Python client library for the @@ -2166,7 +2295,7 @@ OpenAI API.") (define-public python-openapi-schema-validator (package (name "python-openapi-schema-validator") - (version "0.2.3") + (version "0.6.2") (source (origin (method git-fetch) ;no tests in pypi release @@ -2176,10 +2305,13 @@ OpenAI API.") (file-name (git-file-name name version)) (sha256 (base32 - "1swm8h74nhg63nxk347blwq9f1qn6iiq3zisndcvm7axkq3pc2df")))) + "0pgsm1x7lhc5ryj4l45ik8m5x9gqyi50dkflaiqqr4fnl0bsbx09")))) (build-system pyproject-build-system) (arguments (list + #:test-flags + ;; This one returns 5 instead of 4 elements + '(list "-k" "not test_array_prefixitems_invalid") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-coverage-pytest-options @@ -2207,7 +2339,7 @@ JSON Schema Specification Draft 2020-12. (define-public python-openapi-spec-validator (package (name "python-openapi-spec-validator") - (version "0.4.0") + (version "0.7.1") (source (origin (method git-fetch) ;no tests in pypi release @@ -2217,22 +2349,29 @@ JSON Schema Specification Draft 2020-12. (file-name (git-file-name name version)) (sha256 (base32 - "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q")))) + "0s5yd4dbr6knwd2g1g4v2931k14n1lm80l11n2ija18yfis8yisz")))) (build-system pyproject-build-system) (arguments (list - ;; The example tests attempt to fetch resources from the Internet - ;; (see: https://github.com/p1c2u/openapi-spec-validator/issues/151). - #:test-flags #~'("-k" "not Example and not Exampe") + ;; These tests attempt to fetch resources from the Internet + #:test-flags '(list "--ignore-glob=tests/integration/validation/**" + "-k" "not example") #:phases #~(modify-phases %standard-phases + ;; Requirement.parse('jsonschema-specifications<2024.0.0,>=2023.5.2'), + ;; {'openapi-schema-validator'}) + (delete 'sanity-check) (add-after 'unpack 'remove-coverage-pytest-options (lambda _ (substitute* "pyproject.toml" (("^--cov.*") ""))))))) - (native-inputs (list python-poetry-core python-pytest)) + (native-inputs + (list python-poetry-core + python-pytest)) (propagated-inputs (list python-jsonschema + python-jsonschema-path + python-lazy-object-proxy python-openapi-schema-validator python-pyyaml python-requests @@ -2248,7 +2387,7 @@ compliance with the specification.") (define-public python-openapi-core (package (name "python-openapi-core") - (version "0.14.2") + (version "0.19.1") (source (origin (method git-fetch) @@ -2258,7 +2397,7 @@ compliance with the specification.") (file-name (git-file-name name version)) (sha256 (base32 - "1npsibyf8zx6z230yl19kyap8g25kqvgm7z1w6rm6jxv58yqsp7r")))) + "1fdz01wssgqh9dzc7qddl0fms2zivhalghzk63ynblss2r91yc8s")))) (build-system pyproject-build-system) (arguments (list @@ -2267,10 +2406,10 @@ compliance with the specification.") ;; Ignore Pytest configuration in setup.cfg that adds ;; unwanted flake8 and coverage options. "-c" "/dev/null" - ;; This tests fails due to changes in Pytest; fixed - ;; but not yet released upstream - ;; (https://github.com/p1c2u/openapi-core/issues/158). - "-k" "not test_string_format_invalid_value"))) + "-k" (string-append + ;; Type mismatches + "not TestFlaskOpenAPIRequest" + " and not TestFlaskOpenAPIResponse")))) (native-inputs (list python-django python-falcon python-flask @@ -2281,6 +2420,7 @@ compliance with the specification.") python-responses)) (propagated-inputs (list python-attrs + python-aiohttp python-dictpath python-isodate python-jsonschema @@ -2361,7 +2501,7 @@ for clients and servers.") "and not encutils " "and not website.logging"))))))) (native-inputs - (list python-pytest python-jaraco-test)) + (list python-pytest python-jaraco-test python-setuptools python-wheel)) (home-page "https://github.com/jaraco/cssutils") (synopsis "CSS Cascading Style Sheets library for Python") @@ -2409,7 +2549,7 @@ cssutils not receiving updates as of 1.0.2.") "1x4nrvb1p1byi1whmspik7lbh303akdlh762dayfxam3hycsh5kk")))) (build-system pyproject-build-system) (native-inputs - (list python-lxml python-pytest)) + (list python-lxml python-pytest python-setuptools python-wheel)) (home-page "https://github.com/scrapy/cssselect") (synopsis "CSS3 selector parser and translator to XPath 1.0") (description @@ -2539,7 +2679,7 @@ set out in RFC 7540 Section 5.3 (Stream Priority).") (base32 "0rahm1j9danv1l6i6as80acwv16ycihxkhrvwjiqh9drxhk5ymmd")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-h11)) (home-page "https://github.com/python-hyper/wsproto/") @@ -2554,7 +2694,7 @@ RFC6455, regardless of your programming paradigm.") (define-public hypercorn (package (name "hypercorn") - (version "0.14.4") + (version "0.17.3") (source (origin (method git-fetch) ;PyPI does not have tests @@ -2563,16 +2703,18 @@ RFC6455, regardless of your programming paradigm.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0zyf5b8959sd12ycmqzvsb8746i3gn76rz55gxvix5cwj672m7yx")))) + (base32 "13v6cy4frvnddv9zak06a4lmwxp121hjyfrlapxfmb7m3i8qrm02")))) (build-system pyproject-build-system) ;; Propagate because Hypercorn also exposes functionality over a module. (propagated-inputs (list python-exceptiongroup python-h11 + python-taskgroup python-h2 python-priority python-tomli python-wsproto)) - (native-inputs (list python-hypothesis + (native-inputs (list python-httpx + python-hypothesis python-poetry-core python-pytest python-pytest-asyncio @@ -2677,25 +2819,24 @@ connection to each user.") (define-public python-tornado-6 (package (name "python-tornado") - (version "6.2") + (version "6.4.2") (source (origin (method url-fetch) (uri (pypi-uri "tornado" version)) (sha256 - (base32 - "04rwzjfqa31ajz8vvkfcsp1539m8n960msnppxkcckp8plch8qwv")))) - (build-system python-build-system) + (base32 "02v2mlvr58xg0l0gh08nswl53z73wkf23sziggypk63ffjsdbflj")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "ASYNC_TEST_TIMEOUT" "25") ; Like in tox.ini. - (invoke "python" "-m" "tornado.test.runtests"))))))) + (list + #:test-flags + ;; AttributeError: 'TestIOStreamWebMixin' object has no attribute 'io_loop' + #~(list "--ignore=tornado/test/iostream_test.py"))) (native-inputs - (list python-certifi)) + (list python-certifi + python-pytest + python-setuptools + python-wheel)) (home-page "https://www.tornadoweb.org/") (synopsis "Python web framework and asynchronous networking library") (description @@ -3099,17 +3240,17 @@ tests.") (define-public python-zope-i18nmessageid (package (name "python-zope-i18nmessageid") - (version "5.0.1") + (version "5.1.1") (source (origin (method url-fetch) (uri (pypi-uri "zope.i18nmessageid" version)) (sha256 - (base32 - "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m")))) - (build-system python-build-system) + (base32 "14mx62khys82p2gmmf3m40x4jmvcz3rndvl6qik2n2qfp13n7ds7")))) + (build-system pyproject-build-system) (native-inputs - (list python-coverage python-zope-testrunner)) + (list python-coverage python-setuptools + python-wheel python-zope-testrunner)) (propagated-inputs (list python-six)) (home-page "https://pypi.org/project/zope.i18nmessageid/") @@ -3442,6 +3583,46 @@ verification of the SSL peer.") (home-page "https://github.com/cedadev/ndg_httpsclient/") (license license:bsd-3))) +(define-public python-nh3 + (package + (name "python-nh3") + (version "0.2.17") + (source + (origin + (method url-fetch) + (uri (pypi-uri "nh3" version)) + (sha256 + (base32 "0a7hrca5bbbrz20cbqy16n8vaxf4v2q1r9zv9vjlbmn334d79l20")))) + (build-system cargo-build-system) + (arguments + (list + #:imported-modules `(,@%cargo-build-system-modules + ,@%pyproject-build-system-modules) + #:modules '((guix build cargo-build-system) + ((guix build pyproject-build-system) #:prefix py:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'build (assoc-ref py:%standard-phases 'build)) + (replace 'install (assoc-ref py:%standard-phases 'install)) + ;; cargo-build-system's %standard-phases has 'check before 'install. + (delete 'check) + (add-after 'install 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (py:add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "tests"))))) + #:cargo-inputs + `(("rust-ammonia" ,rust-ammonia-4) + ("rust-pyo3" ,rust-pyo3-0.21)) + #:install-source? #false)) + (native-inputs (list maturin python-pytest python-wrapper)) + (home-page "https://nh3.readthedocs.io") + (synopsis "Python bindings to Ammonia HTML sanitization library") + (description "This package provides Python bindings to Ammonia HTML +sanitizer Rust crate.") + (license license:expat))) + (define-public python-noiseprotocol (package (name "python-noiseprotocol") @@ -3454,6 +3635,7 @@ verification of the SSL peer.") (base32 "0ifnj0mpbqsfqba9n12vf5yzxj4qf2gxql3ry43qyshgnrqsi4mh")))) (build-system pyproject-build-system) (propagated-inputs (list python-cryptography)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/plizonczyk/noiseprotocol") (synopsis "Implementation of Noise Protocol Framework") (description @@ -3463,28 +3645,25 @@ verification of the SSL peer.") (define-public python-websocket-client (package (name "python-websocket-client") - (version "1.2.3") + (version "1.8.0") (source (origin (method url-fetch) - (uri (pypi-uri "websocket-client" version)) + (uri (pypi-uri "websocket_client" version)) (sha256 - (base32 "1xba9z6b211pandrlk2l5p8wj6gn7yfkpq1sxfbqjl6c19n8258k")))) - (build-system python-build-system) + (base32 "1nn3qi5g59j55wfy2z02j6lq2cm281fq0wi406b2yqys8jgxyf9j")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'skip-network-test - (lambda _ - ;; This test requires networking. - (substitute* "websocket/tests/test_http.py" - (("def testConnect") "def _testConnect")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "websocket/tests"))))))) + (list + #:test-flags + ;; This test requires networking. + '(list "-k" "not testConnect"))) (native-inputs - (list python-pysocks python-pytest python-websockets)) + (list python-pysocks + python-pytest + python-setuptools + python-websockets + python-wheel)) (home-page "https://github.com/websocket-client/websocket-client") (synopsis "WebSocket client for Python") (description "The Websocket-client module provides the low level APIs for @@ -3533,16 +3712,9 @@ WebSocket usage in Python programs.") (uri (pypi-uri "apiron" version)) (sha256 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "--cov" "-k" - ;; This test tries to connect to the internet. - "not test_call")))))) + (list #:test-flags '(list "-k" "not test_call"))) (propagated-inputs (list python-requests)) (native-inputs @@ -3580,14 +3752,54 @@ APIs.") (define-public python-requests (package (name "python-requests") - (version "2.28.1") + (version "2.31.0") (source (origin (method url-fetch) (uri (pypi-uri "requests" version)) (sha256 (base32 - "10vrr7bijzrypvms3g2sgz8vya7f9ymmcv423ikampgy0aqrjmbw")))) + "1qfidaynsrci4wymrw3srz8v1zy7xxpcna8sxpm91mwqixsmlb4l")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + ;; These require internet access + '(list "--ignore=tests/test_requests.py" + "-k" (string-append "not test_use_proxy_from_environment" + " and not requests.sessions.Session" + " and not requests.models.PreparedRequest" + " and not requests.api.request") + "tests/"))) + (propagated-inputs + (list python-certifi + python-charset-normalizer + python-idna + python-urllib3)) + (native-inputs + (list python-pip + python-pytest + python-pytest-mock + python-setuptools + python-wheel)) + (home-page "https://requests.readthedocs.io/") + (synopsis "Python HTTP library") + (description + "Requests is a Python HTTP client library. It aims to be easier to use +than Python’s urllib2 library.") + (license license:asl2.0))) + +(define-public python-requests-next + (package + (name "python-requests") + (version "2.32.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "requests" version)) + (sha256 + (base32 + "0q5742pnibwy74169kacin3dmqg9jzmzk7qab5aq5caffcbm8djm")))) (build-system python-build-system) + (native-inputs + (list nss-certs-for-test)) (propagated-inputs (list python-certifi python-charset-normalizer @@ -3621,7 +3833,8 @@ than Python’s urllib2 library.") (propagated-inputs (list python-cryptography python-pyspnego python-requests)) - (native-inputs (list python-pytest python-pytest-mock)) + (native-inputs (list python-pytest python-pytest-mock python-setuptools + python-wheel)) (home-page "https://github.com/requests/requests-kerberos") (synopsis "Kerberos authentication handler for python-requests") (description "This package provides a Kerberos authentication handler for @@ -3637,26 +3850,23 @@ python-requests.") (method url-fetch) (uri (pypi-uri "requests-unixsocket" version)) (sha256 - (base32 - "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y")))) - (build-system python-build-system) + (base32 "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "test-requirements.txt" - (("(.*)==(.*)" _ name) (string-append name "\n"))))) - (replace 'check - (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 - (list python-pbr python-requests python-urllib3)) + (list + #:test-flags + ;; TypeError: HTTPConnection.request() got an unexpected keyword + ;; argument 'chunked' + #~(list "-k" (string-append "not test_unix_domain_adapter_ok" + " and not test_unix_domain_adapter_url_with_query_params" + " and not test_unix_domain_adapter_connection_error" + " and not test_unix_domain_adapter_monkeypatch")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'skip-pep8 + (lambda _ + (substitute* "pytest.ini" + (("--pep8") ""))))))) (native-inputs (list python-apipkg python-appdirs @@ -3668,8 +3878,14 @@ python-requests.") python-pytest python-pytest-cache python-pytest-pep8 + python-setuptools python-six - python-waitress)) + python-waitress + python-wheel)) + (propagated-inputs + (list python-pbr + python-requests + python-urllib3)) (home-page "https://github.com/msabramo/requests-unixsocket") (synopsis "Talk HTTP via a UNIX domain socket") (description @@ -3733,25 +3949,33 @@ portions of your testing code.") (define-public python-requests-toolbelt (package (name "python-requests-toolbelt") - (version "0.9.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "requests-toolbelt" version)) - (sha256 - (base32 - "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n")))) - (build-system python-build-system) + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "requests-toolbelt" version)) + (sha256 + (base32 "1ijvip427ki177ycrblcn1mfgsq7ixzpvqqfvidjn0a7s2is10bn")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'delete-problematic-tests - (lambda _ - ;; Fails because of expired certificate. - (delete-file "tests/test_x509_adapter.py") - ;; Fails due to networking (socket.gaierror: [Errno -2] - ;; Name or service not known). - (delete-file "tests/test_multipart_encoder.py")))))) + (list + #:test-flags + ;; Requiring networking or fail due not valid certs: AttributeError: + ;; 'MockHTTPResponse' object has no attribute 'close' + #~(list "-k" (string-append "not test_dump_all" + " and not test_dump_response" + " and not test_prepared_request_override_base" + " and not test_prepared_request_with_base" + " and not test_request_override_base" + " and not test_request_with_base")))) (native-inputs - (list python-betamax python-mock python-pytest)) + (list python-betamax + python-mock + python-pyopenssl + python-pytest + python-setuptools + python-trustme + python-wheel)) (propagated-inputs (list python-requests)) (synopsis "Extensions to python-requests") @@ -3793,9 +4017,14 @@ adapter for use with the Requests library.") (base32 "0w621mg956m9rn7v39jpwi4gpnpl90pprwl29cp640dahqqv38ms")))) (build-system pyproject-build-system) - (native-inputs (list python-async-timeout python-pytest - python-pytest-asyncio python-pytest-cov - python-trustme)) + (native-inputs + (list python-async-timeout + python-pytest + python-pytest-asyncio + python-pytest-cov + python-setuptools + python-trustme + python-wheel)) (propagated-inputs (list python-siosocks)) (home-page "https://aioftp.readthedocs.io/") (synopsis "FTP client/server for asyncio in Python") @@ -3966,14 +4195,50 @@ addon for removing tracking fields from URLs.") (define-public python-urllib3 (package (name "python-urllib3") - (version "1.26.15") + (version "2.2.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "urllib3" version)) + (sha256 + (base32 + "06fg8jj64lgxr2jrizzrsdvaf1avpg5qmhvnswhfbf8sqrv0hmyh")))) + (build-system pyproject-build-system) + (arguments `(#:tests? #f)) + (native-inputs (list python-hatchling)) + (propagated-inputs + (append + ;; These 5 inputs are used to build urrlib3[secure] + (list python-certifi) + (if (member (%current-system) + (package-transitive-supported-systems python-cryptography)) + (list python-cryptography) + '()) + (list python-idna) + (if (member (%current-system) + (package-transitive-supported-systems python-pyopenssl)) + (list python-pyopenssl) + '()) + (list python-pysocks))) + (home-page "https://urllib3.readthedocs.io/") + (synopsis "HTTP library with thread-safe connection pooling") + (description + "Urllib3 supports features left out of urllib and urllib2 libraries. It +can reuse the same socket connection for multiple requests, it can POST files, +supports url redirection and retries, and also gzip and deflate decoding.") + (license license:expat))) + +(define-public python-urllib3-next + (package + (name "python-urllib3") + (version "1.26.17") (source (origin (method url-fetch) (uri (pypi-uri "urllib3" version)) (sha256 (base32 - "01dkqv0rsjqyw4wrp6yj8h3bcnl7c678qkj845596vs7p4bqff4a")))) + "08fzhaf77kbjj5abpl9xag6fpfxkdp1k5s7sqd3ayacdq91a5mi4")))) (build-system python-build-system) (arguments `(#:tests? #f)) (propagated-inputs @@ -3998,71 +4263,252 @@ can reuse the same socket connection for multiple requests, it can POST files, supports url redirection and retries, and also gzip and deflate decoding.") (license license:expat))) +(define-public python-awscrt + (package + (name "python-awscrt") + (version "0.23.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "awscrt" version)) + (sha256 + (base32 "0a669xxfmgw3g6xpcnm64pbmlrbxw5wf3jcrivixscl2glapdxgx")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + (lambda _ + ;; Disable broken tests. These tests fail because the + ;; certificate bundle at the default location does not exist. + (substitute* "test/test_auth.py" + (("def test_default_provider") + "def _test_default_provider")) + (substitute* "test/test_http_client.py" + (("def test_h2_client") + "def _test_h2_client")) + (substitute* "test/test_s3.py" + (("def test_sanity") + "def _test_sanity") + (("def test_sanity_secure") + "def _test_sanity_secure") + (("def test_wait_shutdown") + "def _test_wait_shutdown")))) + (add-after 'unpack 'override-cert-bundle-location + (lambda* (#:key inputs #:allow-other-keys) + (let ((bundle (search-input-file inputs + "/etc/ssl/certs/ca-certificates.crt"))) + (setenv "SSL_CERT_FILE" bundle) + (substitute* "awscrt/io.py" + (("( +)opt = TlsContextOptions\\(\\)" m indent) + (string-append m "\n" + indent "import os\n" + indent "\ +opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if os.getenv('SSL_CERT_FILE') else None\n"))) + (substitute* "test/appexit_http.py" + (("( +)tls_ctx_opt = awscrt.io.TlsContextOptions.*" m indent) + (string-append m indent + "tls_ctx_opt.override_default_trust_store_from_path(None, '" + bundle "')\n"))) + (substitute* "test/test_io.py" + (("( +)opt = TlsContextOptions\\(\\).*" m indent) + (string-append m indent + "opt.override_default_trust_store_from_path(None, '" + bundle "')\n")))))) + (add-after 'unpack 'use-system-libraries + (lambda _ + (setenv "AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO" "1"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "-m" "unittest" + "discover" "--verbose"))))))) + (inputs (list openssl)) + (native-inputs (list cmake-minimal + python-setuptools + python-wheel + ;; For tests only + nss-certs-for-test + python-boto3 + python-websockets)) + (home-page "https://github.com/awslabs/aws-crt-python") + (synopsis "Common runtime for AWS Python projects") + (description + "This package provides a common runtime for AWS Python projects.") + (license license:asl2.0))) + +(define-public python-awscrt-for-awscli + (package + (inherit python-awscrt) + (version "0.22.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "awscrt" version)) + (sha256 + (base32 "0w6pw42jbznrxh92cd97p96dg2nz698mcbfy7md3zw18jfsb18jc")))))) + (define-public awscli (package ;; Note: updating awscli typically requires updating botocore as well. (name "awscli") - (version "1.22.90") + (version "1.36.0") (source (origin - (method url-fetch) - (uri (pypi-uri name version)) + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/aws/aws-cli") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0ky4ax4xh7s8w1l0hwc7w9ii8afvh9nib3kz09qhiqdinxzrlv54")))) - (build-system python-build-system) + (base32 "1iwivc5kj2h5619rvbncrh4649lalxj7bxndzvrjw398vv7cixp5")))) + (build-system pyproject-build-system) (arguments - ;; FIXME: The 'pypi' release does not contain tests. - '(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'use-recent-pyyaml - (lambda _ - (substitute* '("awscli.egg-info/requires.txt" - "setup.cfg" - "setup.py") - (("<5.5") "<=6")))) - (add-after 'unpack 'fix-reference-to-groff - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "awscli/help.py" - (("if not self._exists_on_path\\('groff'\\):") "") - (("raise ExecutableNotFoundError\\('groff'\\)") "") - (("cmdline = \\['groff'") - (string-append "cmdline = ['" - (search-input-file inputs "bin/groff") - "'")))))))) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Tests require networking. + "--ignore" "tests/integration" + ;; It strugles to set PYTHONPATH. + ;; + ;; AssertionError: 'argument operation: Invalid choice, valid + ;; choices are:' not found in ' + "-k" (string-append "not test_subscribe_to_shard_removed" + ;; Tests fail during mocking. + " and not test_expected_runtime_dependencies" + " and not test_expected_unbounded_runtime_dependencies" + " and not test_no_groff_or_mandoc_exists" + " and not test_start_conversation_removed")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-reference-to-groff + (lambda _ + ;; XXX: Consider to use wrap-program instead, it tries to parse + ;; the PATH. + (substitute* "awscli/help.py" + (("if self._exists_on_path\\('groff'\\):") "if 'groff':") + (("raise ExecutableNotFoundError\\('groff'\\)") "") + (("cmdline = \\['groff'") + (format #f "cmdline = ['~a/bin/groff'" + #$(this-package-input "groff-minimal")))))) + (add-before 'check 'set-environment + (lambda _ + ;; PermissionError: [Errno 13] Permission denied: + ;; '/homeless-shelter' + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-pytest + python-pytest-xdist + python-setuptools + python-wheel)) (inputs - (list groff - python-colorama-for-awscli + (list groff-minimal python-botocore - python-s3transfer + python-colorama python-docutils-0.15 python-pyyaml - python-rsa)) + python-rsa + python-s3transfer)) (home-page "https://aws.amazon.com/cli/") (synopsis "Command line client for AWS") - (description "AWS CLI provides a unified command line interface to the -Amazon Web Services (AWS) API.") + (description + "AWS CLI provides a unified command line interface to the Amazon Web +Services (AWS) API.") (license license:asl2.0))) (define-public awscli-2 (package (inherit awscli) (name "awscli") - (version "2.2.0") + (version "2.20.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aws/aws-cli") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0hyr9gmcfk7nzkgs0v6wgkh8k15dyhknqzfymbc9a9sa2dblc40q")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'ignore-deprecations + (lambda _ + (substitute* "pyproject.toml" + (("\"error::") "\"ignore::")))) + (add-after 'unpack 'remove-pep517 + (lambda _ + (rename-file "backends/pep517.py" "backends/dummypep517.py") + (substitute* "pyproject.toml" + (("pep517") "dummypep517")) + (setenv "PYTHONPATH" + (string-append (getcwd) ":" + (getcwd) "/backends:" + (getenv "GUIX_PYTHONPATH"))))) + (add-after 'unpack 'fix-reference-to-groff + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "awscli/help.py" + (("if self._exists_on_path\\('groff'\\):") "if True:") + (("cmdline = \\['groff'") + (string-append "cmdline = ['" + (search-input-file inputs "bin/groff") + "'"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (substitute* "scripts/ci/run-tests" + (("--numprocesses=auto --dist=loadfile --maxprocesses=4") "")) + ;; For an unknown reason pytest receives SIGTERM and no tests + ;; are run.. + #; + (invoke "python" "scripts/ci/run-tests"))))))) + (inputs + (list groff + python-awscrt-for-awscli + python-colorama + python-botocore + python-cryptography + python-dateutil + python-docutils + python-jmespath + python-prompt-toolkit + python-ruamel.yaml-0.16 + python-ruamel.yaml.clib + python-urllib3)) + (native-inputs + (list python-distro + python-flit + python-pytest + python-wheel)))) + +;; This is not an official release of awscli version 2, so it should not be +;; named awscli. +(define-public awscliv2 + (package + (inherit awscli) + (name "awscliv2") + (version "2.3.1") (source (origin (method url-fetch) - (uri (pypi-uri (string-append name "v2") version)) + (uri (pypi-uri name version)) (sha256 (base32 - "0g1icsy2l4n540gnhliypy830dfp08hpfc3rk12dlxgc9v3ra4wl")))) + "1bpp6kmb75qdhgzsx69ki04345bfkzwnmg84y5x6nyfpph2g3fsz")))) (arguments ;; FIXME: The 'pypi' release does not contain tests. '(#:tests? #f)) (inputs (list python-importlib-resources - python-executor)))) + python-executor)) + (native-inputs + (list python-poetry-core + python-pytest)))) (define-public python-wsgiproxy2 @@ -4139,26 +4585,21 @@ minimum of WSGI.") (define-public python-flask (package (name "python-flask") - (version "2.1.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "Flask" version)) - (sha256 - (base32 - "1j0rjly2yhbm566lq2s8543fs7fz86f77abps539djcfalzbvjd8")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "tests"))))))) + (version "3.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "flask" version)) + (sha256 + (base32 "1b1nb250jxrjplbs21wnwq69250vs3iz2pdhs7cwi5y8hi8kr1sz")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-flit-core + python-pytest)) (propagated-inputs (list python-asgiref ;async extra python-click + python-blinker python-importlib-metadata python-itsdangerous python-jinja2 @@ -4182,7 +4623,7 @@ presume or force a developer to use a particular tool or library.") "178jzz6jxlxllcjqamzh5q7ahfh90m5cl1il9vmjs3xhz65z35pf")))) (build-system pyproject-build-system) (propagated-inputs (list python-brotli python-flask)) - (native-inputs (list python-setuptools-scm)) + (native-inputs (list python-setuptools-scm python-setuptools python-wheel)) (home-page "https://github.com/colour-science/flask-compress") (synopsis "Compress responses in a Flask app") (description @@ -4205,6 +4646,7 @@ headers required for a compressed response and compresses the response data.") (arguments (list #:tests? #false)) ;there are none (propagated-inputs (list python-flask)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/maxcountryman/flask-seasurf/") (synopsis "CSRF extension for Flask") (description "SeaSurf is a Flask extension for preventing cross-site @@ -4287,30 +4729,25 @@ Python.") (define-public python-responses (package (name "python-responses") - (version "0.22.0") + (version "0.25.3") (source (origin (method url-fetch) (uri (pypi-uri "responses" version)) (sha256 (base32 - "0bhhffwl0zqin4xc89nc97ynzr7l3j4b8rjqk9w9flnj2cmcnsir")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v"))))))) + "1fld6lsa143md4lxccwxq9iyqm9d8a05i9sp7lqjibnrmd3r4yv1")))) + (build-system pyproject-build-system) (native-inputs (list python-pytest python-pytest-asyncio - python-pytest-httpserver)) + python-pytest-httpserver + python-setuptools + python-tomli + python-tomli-w + python-wheel)) (propagated-inputs (list python-requests - python-toml - python-types-toml - python-typing-extensions + python-pyyaml python-urllib3)) (home-page "https://github.com/getsentry/responses") (synopsis "Utility for mocking out the `requests` Python library") @@ -4414,7 +4851,7 @@ for the basic TCP/IP protocols.") ;; Append the test modules to sys.path to avoid ;; namespace conflict which breaks SSL tests. "--import-mode=append"))))))) - (native-inputs (list python-dpkt python-pytest)) + (native-inputs (list nss-certs-for-test python-dpkt python-pytest)) (propagated-inputs (list python-brotli python-certifi python-gevent python-six python-urllib3)) (home-page "https://github.com/geventhttpclient/geventhttpclient") @@ -4522,14 +4959,14 @@ provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients." (define-public python-betamax (package (name "python-betamax") - (version "0.8.1") + (version "0.9.0") (source (origin (method url-fetch) (uri (pypi-uri "betamax" version)) (sha256 (base32 - "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v")))) + "152zil1j4gl1whnldi08zwjr4z2bnlbd061kr3ipjs5wg4b6wcc2")))) (build-system python-build-system) (arguments '(;; Many tests fail because they require networking. @@ -4584,86 +5021,60 @@ Betamax that may possibly end up in the main package.") (define-public python-s3transfer (package (name "python-s3transfer") - (version "0.5.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "s3transfer" version)) - (sha256 - (base32 - "0k6sc956yrrv9b4laa0r79jhxajpyxr21jcd1ka8m1n53lz85vah")))) - (build-system python-build-system) + (version "0.10.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "s3transfer" version)) + (sha256 + (base32 "032bjky1q8r5x80mvb0ah60g0zq4snwf0xa4c7779m44mdsfsl2g")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Some of the 'integration' tests require network access or - ;; login credentials. - (invoke "nosetests" "--exclude=integration"))))))) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Tests require networking. + "--ignore" "tests/integration"))) (native-inputs - (list python-docutils python-mock python-nose)) + (list python-docutils + python-mock + python-nose + python-pytest + python-pytest-xdist + python-setuptools + python-wheel)) (propagated-inputs - (list python-botocore python-urllib3)) - (synopsis "Amazon S3 Transfer Manager") - (description "S3transfer is a Python library for managing Amazon S3 -transfers.") + (list python-botocore + python-urllib3)) (home-page "https://github.com/boto/s3transfer") + (synopsis "Amazon S3 Transfer Manager") + (description + "S3transfer is a Python library for managing Amazon S3 transfers.") (license license:asl2.0))) -(define-public python-flask-jwt - (package - (name "python-flask-jwt") - (version "0.3.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "Flask-JWT" version)) - (sha256 - (base32 - "1bfh7cr0sf65rn4h1q67472y6ml9s8c4k0xxfhrwvwg0plpngh29")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'compatibility - (lambda _ - (substitute* "setup.cfg" - (("\\[pytest\\]") "[tool:pytest]")) - (substitute* "requirements.txt" - (("PyJWT>=1.4.0,<1.5.0") "PyJWT>=2.0.0")) - (substitute* '("tests/test_jwt.py" - "flask_jwt/__init__.py") - (("access_token.decode\\('utf-8'\\)") "access_token"))))))) - (propagated-inputs (list python-flask python-pyjwt)) - (native-inputs (list python-pytest)) - (home-page "https://github.com/mattupstate/flask-jwt") - (synopsis "JWT token authentication for Flask apps") - (description "This package implements JWT token authentication for Flask -apps.") - (license license:expat))) - (define-public python-flask-restful (package (name "python-flask-restful") - (version "0.3.9") + (version "0.3.10") (source (origin (method url-fetch) (uri (pypi-uri "Flask-RESTful" version)) (sha256 (base32 - "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c")))) + "0dzckjjz3aw8nmisr5g9mnv02s2nqlhblykr9ydqzpr703pz4jpy")))) (build-system pyproject-build-system) (arguments - ;; This test fails because '/' is not 'http://localhost/'. - (list #:test-flags '(list "-k" "not test_redirect"))) + ;; See <https://github.com/flask-restful/flask-restful/issues/980>. + (list #:tests? #f)) (propagated-inputs (list python-aniso8601 python-flask python-pytz)) (native-inputs (list python-blinker python-mock - python-pytest)) + python-pytest + python-setuptools + python-wheel)) (home-page "https://www.github.com/flask-restful/flask-restful/") (synopsis "Flask module for creating REST APIs") (description @@ -4725,16 +5136,25 @@ applications.") (define-public python-flask-sqlalchemy (package (name "python-flask-sqlalchemy") - (version "2.5.1") + (version "3.1.1") (source (origin (method url-fetch) - (uri (pypi-uri "Flask-SQLAlchemy" version)) + (uri (pypi-uri "flask_sqlalchemy" version)) (sha256 (base32 - "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib")))) - (build-system python-build-system) + "04l3dfivznlpvk9p9f20zdbyxl869k42z2w7glddlbc0h6w8pdp4")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" (string-append "not test_explicit_table[db2]" + " and not test_explicit_table[db4]")))) + (native-inputs + (list python-flit-core + python-pytest)) (propagated-inputs - (list python-flask python-sqlalchemy)) + (list python-flask + python-sqlalchemy-2)) (home-page "https://github.com/mitsuhiko/flask-sqlalchemy") (synopsis "Module adding SQLAlchemy support to your Flask application") (description @@ -4834,14 +5254,7 @@ on the command line.") (file-name (git-file-name name version)) (sha256 (base32 "12yw01ccgjn9c88cbkrd6k1ykjxd8fxip2b1isvxjirphnlqhn9g")))) - (build-system python-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-c" "/dev/null"))))))) + (build-system pyproject-build-system) (propagated-inputs (list python-flask)) (native-inputs @@ -4971,26 +5384,45 @@ CSS tidy. Also supports URL rewriting in CSS files.") (define-public python-elasticsearch (package (name "python-elasticsearch") - (version "7.13.4") + (version "7.17.12") (source - (origin - (method url-fetch) - (uri (pypi-uri "elasticsearch" version)) - (sha256 - (base32 - "1q38w9nh2j2yi82d8rhzb57597l4lq5zx7xzfg45xf7ffrgsipaj")))) - (build-system python-build-system) - (propagated-inputs - (list python-certifi python-urllib3)) + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/elastic/elasticsearch-py") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0v3azgxh1nd0jyqhnb1w28ky3nfx8sjq5vlx2gp33v6vxmvqy1qr")))) + (build-system pyproject-build-system) (arguments - ;; tests require the test_elasticsearch module but it is not distributed. - `(#:tests? #f)) + (list + #:test-flags + ;; Requiring network config. + #~(list "--ignore=test_elasticsearch/test_connection.py" + ;; All tests failed. + "--ignore=test_elasticsearch/test_async"))) + (native-inputs + (list python-aiohttp + python-dateutil + python-mock + python-pytest + python-pytest-asyncio + python-pytest-cov + python-pyyaml + python-requests + python-setuptools + python-wheel)) + (propagated-inputs + (list python-certifi + python-urllib3-next)) (home-page "https://github.com/elastic/elasticsearch-py") (synopsis "Low-level client for Elasticsearch") (description "Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in Python; because of this it tries to be opinion-free and very extendable.") - (license license:expat))) + ;; Apache-2.0 in setup.py and LICENSE file for 11 years. + (license license:asl2.0))) (define-public python-engineio (package @@ -5013,6 +5445,27 @@ this it tries to be opinion-free and very extendable.") server.") (license license:expat))) +(define-public python-ephemeral-port-reserve + (package + (name "python-ephemeral-port-reserve") + (version "1.1.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ephemeral_port_reserve" version)) + (sha256 + (base32 "1chl9hil7ggz6l4sfhmp0l2j55qcskbc3pj9360b0309jwndmxxq")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools + python-wheel)) + (home-page "https://github.com/Yelp/ephemeral-port-reserve/") + (synopsis "Find an unused port, reliably") + (description + "Bind to an ephemeral port, force it into the TIME_WAIT state, and unbind +it.") + (license license:expat))) + (define-public python-flask-migrate (package (name "python-flask-migrate") @@ -5184,29 +5637,33 @@ List. Forked from and using the same API as the publicsuffix package.") (define-public python-werkzeug (package (name "python-werkzeug") - (version "2.0.2") + (version "3.1.3") (source (origin (method url-fetch) - (uri (pypi-uri "Werkzeug" version)) + (uri (pypi-uri "werkzeug" version)) (sha256 (base32 - "16nvv9dh37ssf5pkny9yj2li0n6wyzsygh8a9i86r3gfipybcaxa")))) - (build-system python-build-system) + "0ij7si3aa3ykac7k7fz481h4majqqwn2iqwhjxkji4y18plkqwk0")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (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 - (list python-requests)) + (list + #:test-flags + ;; Test requiring networking setup. + #~(list "--ignore=tests/test_serving.py" + "--deselect=tests/test_debug.py::test_basic" + "--deselect=tests/test_exceptions.py::test_response_body" + "--deselect=tests/middleware/test_http_proxy.py::test_http_proxy"))) (native-inputs - (list python-pytest python-pytest-timeout python-pytest-xprocess)) + (list python-flit-core + python-pytest + python-watchdog + python-ephemeral-port-reserve + python-pytest-timeout + python-pytest-xprocess)) + (propagated-inputs + (list python-markupsafe + python-requests)) (home-page "https://palletsprojects.com/p/werkzeug/") (synopsis "Utilities for WSGI applications") (description "One of the most advanced WSGI utility modules. It includes a @@ -5268,35 +5725,18 @@ addon modules.") (define-public python-wtforms (package (name "python-wtforms") - (version "2.3.3") + (version "3.1.2") (source (origin (method url-fetch) - (uri (pypi-uri "WTForms" version)) + (uri (pypi-uri "wtforms" version)) (sha256 - (base32 - "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-bundled-test - (lambda _ - ;; Delete test copied from a third party package that fails - ;; with newer SQLAlchemy. This can be removed for 3.0. - ;; See <https://github.com/wtforms/wtforms/issues/696>. - (delete-file "tests/ext_sqlalchemy.py"))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "python" "setup.py" "compile_catalog") - (invoke "python" "tests/runtests.py"))))))) - (native-inputs - (list python-dateutil python-sqlalchemy)) - (propagated-inputs - (list python-babel python-email-validator python-markupsafe)) - (home-page "http://wtforms.simplecodes.com/") + (base32 "1fblnkzvs6339glwx8bskdjy7nhn2ap90y9g6b399713sy063mzq")))) + (build-system pyproject-build-system) + (native-inputs (list python-hatchling python-pytest)) + (propagated-inputs (list python-babel python-email-validator + python-markupsafe)) + (home-page "https://wtforms.readthedocs.io/") (synopsis "Form validation and rendering library for Python web development") (description @@ -5305,6 +5745,28 @@ for Python web development. It is very similar to the web form API available in Django, but is a standalone package.") (license license:bsd-3))) +(define-public python-wtforms-sqlalchemy + (package + (name "python-wtforms-sqlalchemy") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "WTForms-SQLAlchemy" version)) + (sha256 + (base32 "1nx4x0ifanlbrzh3f9ns8ihnchlkzf54ilvqmgcgcz2j72vm43rp")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest)) + (propagated-inputs (list python-sqlalchemy python-wtforms)) + (home-page "https://github.com/wtforms/wtforms-sqlalchemy/") + (synopsis "SQLAlchemy tools for WTForms") + (description + "WTForms-SQLAlchemy is a fork of the @code{wtforms.ext.sqlalchemy} +package from WTForms. The package has been renamed to +@code{wtforms_sqlalchemy} but otherwise should function the same as +@code{wtforms.ext.sqlalchemy} did.") + (license license:bsd-3))) + (define-public python-paste (package (name "python-paste") @@ -5324,9 +5786,9 @@ available in Django, but is a standalone package.") (delete-file "tests/test_proxy.py") #t)))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-nose)) + (list python-pytest python-wheel)) (propagated-inputs - (list python-six)) + (list python-six python-setuptools)) (home-page "https://pythonpaste.readthedocs.io/") (synopsis "Python web development tools, focusing on WSGI") @@ -5474,7 +5936,7 @@ for URL parsing and changing.") "1vbd3ndhmxi8scxgxs6sc7r0rdaliqd80384n06nyb3haqz25inm")))) (build-system pyproject-build-system) (propagated-inputs (list python-arrow python-pytz python-requests)) - (native-inputs (list python-requests-mock)) + (native-inputs (list python-requests-mock python-setuptools python-wheel)) (home-page "https://github.com/ucfopen/canvasapi") (synopsis "API wrapper for the Canvas LMS") (description @@ -5599,6 +6061,7 @@ with oauthlib.") python-stem python-validators python-waitress)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/benbusby/whoogle-search") (synopsis "Self-hosted, ad-free, privacy-respecting metasearch engine") (description @@ -5696,7 +6159,7 @@ ecosystem.") ;; Pretend to be a CI system to skip flaky tests. (setenv "CI" "true")))))) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-idna)) (home-page "https://github.com/python-hyper/hyperlink") @@ -5727,7 +6190,7 @@ correct URLs for Python according to RFCs 3986 and 3987.") (home-page "https://github.com/twisted/treq") (synopsis "Requests-like API built on top of twisted.web's Agent") (description "This package provides an HTTP library inspired by -@code{requests}} but written on top of Twisted's @code{Agents}. It offers a +@code{requests} but written on top of Twisted's @code{Agents}. It offers a high level API for making HTTP requests when using Twisted.") (license license:expat))) @@ -5866,23 +6329,17 @@ the non-map-specific features. It can be used to generate HTML + JS.") (uri (pypi-uri "tinycss" version)) (sha256 (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-flake8-isort - ;; Flake8 and isort tests fail. - (lambda _ - (substitute* "setup.cfg" ((" --flake8 --isort") "")) - #t)) - (replace 'check - (lambda _ - ;; Disable failing test. - (invoke "python" "-m" "pytest" "-k" - "not test_speedups")))))) + (list #:test-flags + '(list "-k" "not test_speedups"))) (native-inputs - (list python-pytest-cov python-pytest-flake8 python-pytest-isort - python-pytest-runner)) + (list python-pytest-cov + python-pytest-flake8 + python-pytest-isort + python-pytest-runner + python-setuptools + python-wheel)) (home-page "https://tinycss.readthedocs.io/") (synopsis "Complete yet simple CSS parser for Python") (description @@ -5900,7 +6357,7 @@ modules: (define-public python-tinycss2 (package (name "python-tinycss2") - (version "1.1.0") + (version "1.4.0") (source (origin (method git-fetch) @@ -5910,13 +6367,14 @@ modules: (recursive? #true))) (file-name (git-file-name name version)) (sha256 - (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq")))) + (base32 "11m5vhpdz6zlzq2lqqklkhd0h4jxblpvcrdf9cc4s06nhr9acp0r")))) (build-system pyproject-build-system) + (native-inputs + (list python-flit + python-pytest + python-pytest-cov)) (propagated-inputs (list python-webencodings)) - (native-inputs - (list python-flit python-pytest python-pytest-cov - python-pytest-flake8 python-pytest-isort)) (home-page "https://tinycss2.readthedocs.io/") (synopsis "Low-level CSS parser for Python") (description "@code{tinycss2} can parse strings, return Python objects @@ -5938,7 +6396,7 @@ in various CSS modules.") (uri (pypi-uri "cssselect2" version)) (sha256 (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -5949,11 +6407,7 @@ in various CSS modules.") (("'pytest-flake8',") "") (("'pytest-isort',") "") (("--flake8") "") - (("--isort") "")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (lambda _ (invoke "pytest")))))))) + (("--isort") ""))))))) (propagated-inputs (list python-tinycss2)) (native-inputs @@ -5972,18 +6426,18 @@ hard or impossible to fix in cssselect.") (define-public python-uvloop (package (name "python-uvloop") - (version "0.16.0") + (version "0.21.0") (source (origin (method url-fetch) (uri (pypi-uri "uvloop" version)) (sha256 - (base32 "0a0jzwrhkszknh14alflrp1db6dyjp7ph730f9yc5lb7gc6c4jzp")) + (base32 "1qq46ym3ymzfn4j6fnykfmr1f4qnb7x7p15dlw37hi38v87jpw9v")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "vendor") (delete-file "uvloop/loop.c"))))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -6019,14 +6473,19 @@ hard or impossible to fix in cssselect.") ;; It looks like pytest is preventing ;; custom stdout/stderr redirection, ;; even with -s. - "and not test_process_streams_redirect ")))))))) + "and not test_process_streams_redirect " + ;; FileNotFoundError: [Errno 2] No such file or + ;; directory + "and not test_process_env_2")))))))) (native-inputs (list python-aiohttp - python-cython + python-cython-3 python-psutil python-pyopenssl python-pytest - python-pytest-timeout)) + python-pytest-timeout + python-setuptools + python-wheel)) (inputs (list libuv)) (home-page "https://github.com/MagicStack/uvloop") @@ -6039,16 +6498,15 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (define-public gunicorn (package (name "gunicorn") - (version "20.1.0") + (version "21.2.0") (source (origin (method url-fetch) (uri (pypi-uri "gunicorn" version)) (sha256 - (base32 - "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0")))) + (base32 "0cqhr2g880snpi45qvvch288m4fdyd5vqrcz3gk9hkv33pzqpv48")))) (outputs '("out" "doc")) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -6098,6 +6556,7 @@ event loop. It is implemented in Cython and uses libuv under the hood.") ,(map (lambda (output) (string-append output sitedir)) (list python out)))))))))) + (inputs (list bash-minimal)) (native-inputs (list binutils ;; for ctypes.util.find_library() python-aiohttp @@ -6106,6 +6565,7 @@ event loop. It is implemented in Cython and uses libuv under the hood.") python-pytest-cov python-sphinx texinfo)) + (propagated-inputs (list python-packaging python-setuptools python-wheel)) (home-page "https://gunicorn.org/") (synopsis "Python WSGI HTTP Server for UNIX") (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP @@ -6115,6 +6575,21 @@ various web frameworks, simply implemented, light on server resources, and fairly speedy.") (license license:expat))) +(define-public gunicorn-next + (package + (inherit gunicorn) + (name "gunicorn") + (version "22.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "gunicorn" version)) + (sha256 + (base32 + "0qzc3ghayc137hlwrqqwkkhaf8f5h9ja21qwy4rznxpz75i462sa")))) + ;; CVE-2024-1135 is fixed in version 22.0.0. + (properties `((lint-hidden-cve . ("CVE-2024-1135")))))) + ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for ;; its tests (define-public gunicorn-bootstrap @@ -6176,7 +6651,7 @@ and fairly speedy.") (define-public python-uvicorn (package (name "python-uvicorn") - (version "0.23.2") + (version "0.32.1") (source (origin ;; PyPI tarball has no tests. @@ -6186,17 +6661,18 @@ and fairly speedy.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1qa4cwifss9cnasfr0ffn76rvh7wcfjkl6nw99yz43rjmdpj3h7p")))) + (base32 "0mrp87l2d5k2dcz07wj2vysjsa99lw5xp12a1a2xiciahg04w7ib")))) (build-system pyproject-build-system) (arguments - (list #:test-flags - #~(list "-o" "asyncio_mode=auto" - "-k" - (string-join - ;; These error or fail due to networking. - '("not test_keepalive" - "not test_bind_unix_socket_works_with_reload_or_workers") - " and ")))) + (list + #:test-flags + #~(list "-o" "asyncio_mode=auto" + ;; For some reason tests stacked in infinity re-invocation loop: + ;; AssertionError where is_alive = + ;; <uvicorn.supervisors.multiprocess.Process object at + ;; 0x7ffff39b6110>.is_alive. + ;; Maybe this <https://github.com/encode/uvicorn/issues/2466>. + "--ignore=tests/supervisors/test_multiprocess.py"))) (native-inputs (list python-a2wsgi python-hatchling @@ -6422,7 +6898,7 @@ and serve updated contents upon changes to the directory.") (define-public python-httpcore (package (name "python-httpcore") - (version "0.17.0") + (version "1.0.7") (source (origin ;; PyPI tarball does not contain tests. @@ -6432,30 +6908,13 @@ and serve updated contents upon changes to the directory.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0qf2w6sgn51jd41a4k230jincrk6rchgc0k1bclxhyyzv44q4q8c")))) + (base32 "1wz54snks59m1mz2mv0i4p37zz2rrzd99gpg8sh3qkpck5h8lhc4")))) (build-system pyproject-build-system) - (arguments - (list - #:test-flags - '(list "--override-ini=asyncio_mode=auto" - "-k" - (string-join '("not test_ssl_request" - ;; PytestUnraisableExceptionWarning - "test_authenticated_socks5_request" - "test_socks5_request" - "test_socks5_request_connect_failed" - "test_socks5_request_failed_to_provide_auth" - "test_socks5_request_incorrect_auth" - ;; marked with @pytest.mark.asyncio but it is not an async function - "test_connection_pool_concurrency" - "test_connection_pool_concurrency_same_domain_keepalive" - "test_response_async_read" - "test_response_async_streaming" - ;; SSL connection has been closed - "test_extra_info") - " and not ")))) (native-inputs - (list python-pytest + (list nss-certs-for-test + python-hatch-fancy-pypi-readme + python-hatchling + python-pytest python-pytest-asyncio python-pytest-cov python-pytest-httpbin @@ -6495,12 +6954,13 @@ Some things HTTP Core does do: (package/inherit python-httpcore (name "python-httpcore-bootstrap") (arguments (list #:tests? #f)) - (native-inputs '())))) + (native-inputs (list python-hatchling + python-hatch-fancy-pypi-readme))))) (define-public python-httpx (package (name "python-httpx") - (version "0.24.1") + (version "0.27.2") (source (origin ;; PyPI tarball does not contain tests. @@ -6510,7 +6970,7 @@ Some things HTTP Core does do: (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "121cnzp5jq638wrvfmxa9q0rwank7q6v5fi1lnih50fd5219yvm8")))) + (base32 "1jd5w3nhpvrbj66nk2njvfnk0g1mkxivwa52j2yyhcna1xafsk1p")))) (build-system pyproject-build-system) (arguments (list @@ -6530,7 +6990,8 @@ Some things HTTP Core does do: ;; 'function' object has no attribute 'name'". " and not test_main")))) (native-inputs - (list python-cryptography + (list nss-certs-for-test + python-cryptography python-hatchling python-hatch-fancy-pypi-readme python-pytest @@ -6539,7 +7000,10 @@ Some things HTTP Core does do: python-trio python-trio-typing python-trustme - python-uvicorn)) + python-uvicorn + python-setuptools + python-wheel + python-zstandard)) (propagated-inputs (list python-charset-normalizer python-brotli @@ -6655,24 +7119,18 @@ them to a designated prefix.") (sha256 (base32 "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - ;; These tests fail due to networking requirements. - "-k" (format #f "not ~a" - (string-join - '("test_post_chunked" - "test_remote" - "test_capture_http_proxy" - "test_capture_https_proxy" - "test_capture_https_proxy_same_session") - " and not "))))))))) + #:test-flags ; These tests fail due to networking requirements. + '(list "-k" (format #f "not ~a" + (string-join + '("test_post_chunked" + "test_remote" + "test_capture_http_proxy" + "test_capture_https_proxy" + "test_capture_https_proxy_same_session") + " and not "))))) (native-inputs ;; These inputs are required for the test suite. (list python-httpbin python-pytest-cov python-requests @@ -6688,7 +7146,7 @@ files.") (define-public python-websockets (package (name "python-websockets") - (version "11.0.3") + (version "13.1") (source (origin (method git-fetch) @@ -6698,14 +7156,17 @@ files.") (file-name (git-file-name name version)) (sha256 (base32 - "1hn1qzpk1fvhi5j5nz4xlvzwkj9y16c9gryrb4n4dza84qi1pna5")))) - (build-system python-build-system) + "1dx3rf6fmg4ir9cfcn1fil446qz879cwrjq2rcz5zvl71xkw6hb3")))) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'check 'extend-test-timeout (lambda _ (setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "10")))))) + (native-inputs + (list python-setuptools + python-wheel)) (home-page "https://github.com/aaugustin/websockets") (synopsis "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)") @@ -6771,7 +7232,7 @@ major web browsers.") "/include/rapidjson" "'")) (("if not os.path.isdir.*") "if False:"))))))) (native-inputs - (list rapidjson python-pytest python-pytz)) + (list rapidjson python-pytest python-pytz python-setuptools python-wheel)) (home-page "https://github.com/python-rapidjson/python-rapidjson") (synopsis "Python wrapper around rapidjson") (description "This package provides a python wrapper around rapidjson.") @@ -6900,8 +7361,13 @@ according to the standard set by PasteDeploy") (build-system python-build-system) (arguments '(#:test-target "pytest")) (native-inputs - (list python-pytest python-pytest-runner python-watchdog python-mock - python-pytest-cov)) + (list python-mock + python-pytest + python-pytest-cov + python-pytest-runner + python-setuptools + python-watchdog + python-wheel)) (propagated-inputs (list python-pytz)) (home-page "https://readthedocs.org/projects/hupper") @@ -6915,15 +7381,24 @@ changed the process is restarted.") (define-public python-pyowm (package (name "python-pyowm") - (version "3.2.0") + (version "3.3.0") (source (origin - (method url-fetch) - (uri (pypi-uri "pyowm" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/csparpa/pyowm") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1pm8w6phr4m3xayndfndid366vhf1fpvdgjsp2zicxarmgc0pm53")))) - (build-system python-build-system) - (propagated-inputs (list python-geojson python-pysocks python-requests)) + (base32 + "1ha4pp96y3jk33qnyir5851cnj4dc06q6wqn1b0w54l3fsds28vi")))) + (build-system pyproject-build-system) + (arguments (list #:test-flags #~(list "tests/unit"))) + (native-inputs (list python-pytest)) + (propagated-inputs + (list python-geojson-for-pyowm + python-pysocks + python-requests)) (home-page "https://github.com/csparpa/pyowm") (synopsis "Python wrapper around OpenWeatherMap web APIs") (description @@ -6979,6 +7454,28 @@ than 326,000 known user-agents. Users can pick a random one, or select one based on filters.") (license license:expat))) +(define-public python-rangehttpserver + (package + (name "python-rangehttpserver") + (version "1.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/danvk/RangeHTTPServer") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1dx533fsbq1mbz3by7qkm5bh2c253nwvm8214pqbwbfq07kqkwf2")))) + (build-system pyproject-build-system) + (native-inputs (list python-coverage python-coveralls python-pytest)) + (home-page "https://github.com/danvk/RangeHTTPServer") + (synopsis "SimpleHTTPServer with support for range requests") + (description + "This tool provides a simple HTTP server with support for Range +requests.") + (license license:asl2.0))) + (define-public python-flask-restx (package (name "python-flask-restx") @@ -7224,10 +7721,13 @@ Agent is a web crawler. It uses the list of registered robots from (sha256 (base32 "077j8p5k41v53slyv8h32fcmqfi7m6z3r4gmyqqaawm5szfmy61m")))) (build-system pyproject-build-system) - (propagated-inputs - (list python-requests python-robotframework)) (native-inputs - (list python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-requests + python-robotframework)) (home-page "https://github.com/MarketSquare/robotframework-requests") (synopsis "Robot Framework keyword library wrapper around requests") (description @@ -7239,21 +7739,22 @@ wrapping the @code{requests} Python library.") (define-public python-pysolr (package (name "python-pysolr") - (version "3.9.0") + (version "3.10.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "pysolr" version)) - (sha256 - (base32 - "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "pysolr" version)) + (sha256 + (base32 "02gl1sma5cnpd7srpri1g68lpsg3s5n3lr462p5ll8v9s4nllyqj")))) + (build-system pyproject-build-system) (arguments '(#:tests? #f)) ; Tests require network access. + (native-inputs + (list python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs (list python-requests)) - (native-inputs - (list python-setuptools-scm)) (home-page "https://github.com/django-haystack/pysolr/") (synopsis "Lightweight python wrapper for Apache Solr") (description @@ -7302,7 +7803,7 @@ interpreter written in pure Python.") (define-public python-http-ece (package (name "python-http-ece") - (version "1.1.0") + (version "1.2.0") (source (origin (method git-fetch) @@ -7312,7 +7813,7 @@ interpreter written in pure Python.") (file-name (git-file-name name version)) (sha256 (base32 - "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7")))) + "11v9cpmx4jc0nk25af96plzjz3mg1ysm1m001nx6jns06hil1gpy")))) (build-system python-build-system) (arguments `(#:phases @@ -7333,7 +7834,7 @@ Encoding for HTTP.") (define-public python-cloud-init (package (name "python-cloud-init") - (version "23.4.3") + (version "24.2") (source (origin (method git-fetch) @@ -7342,7 +7843,7 @@ Encoding for HTTP.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0przjj2j1ws6b7sbgqxnffsarbbwl00lhq3bn7yiksp8kg8np1m1")))) + (base32 "18872z2y9wkh558y1bx5r0rksb4i584jbc8z4g8marwawhwxq506")))) (build-system pyproject-build-system) (arguments (list @@ -7356,6 +7857,7 @@ Encoding for HTTP.") (string-append ;; This test messes with PATH, so it cannot find mkdir "not test_path_env_gets_set_from_main" + " and not test_apt_configure_sources_list_" ;; These all fail because /bin/sh doesn't exist. We cannot patch ;; this because the generated scripts must use /bin/sh as they are ;; supposed to be run on minimal systems. @@ -7364,11 +7866,19 @@ Encoding for HTTP.") " and not test_subp_combined_stderr_stdout" " and not test_handle_part")) #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'patch-references - (lambda _ - (substitute* "tests/unittests/cmd/test_clean.py" - (("#!/bin/sh") (string-append "#!" (which "sh"))))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-references + (lambda _ + (substitute* "tests/unittests/cmd/test_clean.py" + (("#!/bin/sh") (string-append "#!" (which "sh")))))) + (add-after 'install 'move-files + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each (lambda (dir) + (let ((source (string-append (site-packages inputs outputs) "/" dir)) + (target (string-append #$output "/" (basename dir)))) + (copy-recursively source target) + (delete-file-recursively source))) + (list "etc" "lib" "usr/lib" "usr/share"))))))) (propagated-inputs (list python-configobj python-jinja2 @@ -7550,6 +8060,7 @@ as a Python package.") ;; PyPi sources does not contain tests, recursive dependency on ;; python-sanic. (list #:tests? #f)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/sanic-org/sanic-routing/") (synopsis "Routing component for Sanic") (description "Internal package for @code{python-sanic}, which provides @@ -7572,6 +8083,7 @@ the @code{BasicRouter}.") ;; python-sanic. (list #:tests? #f)) (propagated-inputs (list python-httpx python-sanic-bootstrap)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/sanic-org/sanic-testing/") (synopsis "Test clients for Sanic") (description "Internal package for @code{python-sanic}, which is @@ -7650,11 +8162,13 @@ applications.") python-pytest-benchmark python-pytest-sanic python-sanic-testing + python-setuptools python-slotscheck python-towncrier python-tox python-types-ujson - python-uvicorn)) + python-uvicorn + python-wheel)) (home-page "https://github.com/sanic-org/sanic/") (synopsis "Async Python web server/framework") (description @@ -7668,7 +8182,7 @@ fast. It allows the usage of the @code{async/await} syntax added in Python (inherit python-sanic) (name "python-sanic-bootstrap") (arguments (list #:tests? #f)) - (native-inputs '()))) + (native-inputs (list python-setuptools python-wheel)))) (define-public python-socketio (package @@ -7786,53 +8300,6 @@ Features: @end itemize") (license license:expat))) -(define-public python-msrest - (package - (name "python-msrest") - (version "0.6.21") - (source - (origin - (method url-fetch) - (uri (pypi-uri "msrest" version)) - (sha256 - (base32 "1n389m3hcsyjskzimq4j71nyw9pjkrp0n5wg1q2c4bfwpv3inrkj")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" - "-k" - ;; These attempt to connect to bing.com. - (string-append - "not test_basic_aiohttp" - " and not test_basic_async_requests" - " and not test_conf_async_requests" - " and not test_conf_async_trio_requests" - " and not test_basic_aiohttp" - " and not test_basic_async_requests" - " and not test_conf_async_requests" - " and not test_conf_async_trio_requests")))))))) - (propagated-inputs - (list python-aiohttp - python-certifi - python-isodate - python-requests - python-requests-oauthlib)) - (native-inputs - (list python-httpretty - python-pytest - python-pytest-aiohttp - python-pytest-asyncio - python-pytest-trio)) - (home-page "https://github.com/Azure/msrest-for-python") - (synopsis "AutoRest swagger generator Python client runtime") - (description "This package provides the runtime library @code{msrest} for -AutoRest-generated Python clients.") - (license license:expat))) - (define-public python-azure-nspkg (package (name "python-azure-nspkg") @@ -7895,64 +8362,51 @@ Python.") (define-public python-azure-core (package (name "python-azure-core") - (version "1.24.0") + (version "1.32.0") (source (origin (method url-fetch) - (uri (pypi-uri "azure-core" version ".zip")) + (uri (pypi-uri "azure_core" version)) (sha256 - (base32 "1r8bpn3zz02mj00qbaks5qq49wqd3mznkm90bchd1mxa3w21nnrl")))) - (build-system python-build-system) + (base32 "1r9hqyqr5fxiiai0irr0n98gwgzj5f8y46vc1yci9bidddfw7cr2")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - ;; This fails because devtools_testutils doesn't exist. - (delete-file "tests/test_connection_string_parsing.py") - ;; Needs network. - (for-each delete-file - '("tests/async_tests/test_streaming_async.py" - "tests/test_streaming.py")) - (add-installed-pythonpath inputs outputs) - (setenv "PYTHONPATH" - (string-append (getcwd) "/tests/testserver_tests/coretestserver:" - (getenv "GUIX_PYTHONPATH"))) - (invoke "pytest" - ;; Most of these need network access. - "-m" "not asyncio and not live_test_only" - "-k" - ;; These need network access. - (string-append - "not test_example_raw_response_hook" - " and not test_example_headers_policy" - " and not test_example_request_id_policy" - " and not test_example_user_agent_policy" - " and not test_example_requests" - " and not test_example_pipeline" - " and not test_example_pipeline_client" - " and not test_example_redirect_policy" - " and not test_example_no_redirects" - " and not test_example_retry_policy" - " and not test_example_no_retries" - " and not test_decompress_plain_no_header" - " and not test_compress_plain_no_header" - " and not test_decompress_compressed_no_header")))))))) + (list + #:test-flags + `(list ;; This fails because devtools_testutils doesn't exist. + "--ignore=tests/test_connection_string_parsing.py" + ;; These all need network access. + "--ignore=samples" + "--ignore=tests/async_tests/test_streaming_async.py" + "--ignore=tests/test_streaming.py" + "-m" "not asyncio and not live_test_only" + "-k" ,(string-append + "not test_decompress_plain_no_header" + " and not test_compress_plain_no_header" + " and not test_decompress_compressed_no_header" + " and not test_requests_socket_timeout")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'add-test-pythonpath + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PYTHONPATH" + (string-append + (getcwd) "/tests/testserver_tests/coretestserver:" + (getenv "GUIX_PYTHONPATH"))))))))) (propagated-inputs (list python-aiohttp python-requests python-six - python-trio python-typing-extensions)) (native-inputs (list python-flask - python-msrest python-pytest python-pytest-aiohttp python-pytest-asyncio python-pytest-trio - unzip)) + python-setuptools + python-wheel)) (home-page "https://github.com/Azure/azure-sdk-for-python") (synopsis "Microsoft Azure Core library for Python") (description "This package provides the Microsoft Azure Core library for @@ -7962,17 +8416,25 @@ Python.") (define-public python-azure-storage-blob (package (name "python-azure-storage-blob") - (version "12.12.0") + (version "12.22.0") (source (origin (method url-fetch) - (uri (pypi-uri "azure-storage-blob" version ".zip")) + (uri (pypi-uri "azure-storage-blob" version)) (sha256 - (base32 "1xv23ph822qywjxs81say9xi5dzmvxcii6sww6d1hvd83iyz1npn")))) - (build-system python-build-system) + (base32 "0vkkngiybx5372j9vc9p4wn6hakpv99l0ipsf4kw7ccazss4p05k")))) + (build-system pyproject-build-system) + ;; To activate tests python-pytest is required and missing + ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/ + ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md> + (native-inputs + (list python-setuptools + python-wheel)) (propagated-inputs - (list python-azure-core python-cryptography python-msrest)) - (native-inputs (list unzip)) + (list python-azure-core + python-cryptography + python-isodate + python-typing-extensions)) (home-page "https://github.com/Azure/azure-sdk-for-python/") (synopsis "Microsoft Azure Blob Storage client library for Python") (description "This package provides the Microsoft Azure Blob Storage @@ -8001,13 +8463,13 @@ of the CRC32C hashing algorithm.") (define-public python-google-auth (package (name "python-google-auth") - (version "2.17.3") + (version "2.34.0") (source (origin (method url-fetch) - (uri (pypi-uri "google-auth" version)) + (uri (pypi-uri "google_auth" version)) (sha256 - (base32 "1z2f0vj374rscvlivhvf9xxjlg4lng4mgpqnygfhy4wbqlmiwcff")))) + (base32 "1k04kkg5n3pi4awjxxsa50ail68wwf2gklmb686v46aw8fb77f4f")))) (build-system python-build-system) (arguments `(#:phases @@ -8023,7 +8485,8 @@ of the CRC32C hashing algorithm.") python-rsa python-six)) (native-inputs - (list python-flask + (list nss-certs-for-test + python-flask python-freezegun python-mock python-oauth2client @@ -8262,7 +8725,7 @@ GCS, Azure Blob Storage, gzip, bz2, etc.)") "1cd4b3w5g3pfccsg79kjj27fwi216ip927rjq7isp8pfjzlp8nzd")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/scrapy/w3lib") (synopsis "Python library of web-related functions") (description @@ -8467,19 +8930,36 @@ library for accessing the Twitter API.") (define-public python-quart (package (name "python-quart") - (version "0.17.0") + (version "0.19.9") (source (origin - (method url-fetch) - (uri (pypi-uri "Quart" version)) + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/pallets/quart") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0h4n2dwzmqifya1razp9s7ppr4ra23ljac9v7sl039rzp3c17wic")))) - (build-system python-build-system) + (base32 "1h5ifv8g9dc9m07vj4v7dfalam83v38545d845vvgys1gan1pscd")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-coverage-pytest-options + (lambda _ + (substitute* "pyproject.toml" + (("--no-cov-on-fail") ""))))))) + (native-inputs + (list python-poetry-core + python-pytest + python-pytest-asyncio)) (propagated-inputs (list hypercorn python-aiofiles python-blinker python-click + python-dotenv + python-flask python-itsdangerous python-jinja2 python-markupsafe @@ -8559,7 +9039,7 @@ by asyncio.") python-typing-extensions python-w3lib)) (native-inputs - (list python-psutil python-pytest)) + (list python-psutil python-pytest python-setuptools python-wheel)) (home-page "https://github.com/scrapy/parsel") (synopsis "Extract data from HTML and XML using XPath and CSS selectors") (description "Parsel is a library to extract and remove data from @@ -8570,33 +9050,33 @@ regular expressions.") (define-public python-scrapy (package (name "python-scrapy") - (version "2.11.1") + (version "2.11.2") (source (origin (method url-fetch) - (uri (pypi-uri "Scrapy" version)) + (uri (pypi-uri "scrapy" version)) (sha256 - (base32 "1giyyzwcybmh0yf3aq44hhmf9m4k40rva418pxljpr93fjf06fkk")))) + (base32 "07a0nfzkz4vr1353456lavvw36l9s2ia7x91l7mzygzwhi9mdgfz")))) (build-system pyproject-build-system) (arguments (list #:test-flags - ;; Tests fail with DNS lookup or need a display. + ;; Tests requiring a display. #~(list "-k" (string-append "not " (string-join - (list "test_SCRAPY_CHECK_set" - "test_check_all_default_contracts" - "test_check_cb_kwargs_contract" - "test_check_returns_items_contract" - "test_check_returns_requests_contract" - "test_check_scrapes_contract" - "test_pformat" + (list "test_pformat" "test_pformat_old_windows" "test_pformat_windows") - " and not "))))) + " and not "))) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-test-environment + (lambda _ + (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-botocore ; Optional: For S3FeedStorage class. python-cryptography python-cssselect + python-defusedxml python-itemadapter python-itemloaders python-lxml @@ -8612,13 +9092,15 @@ regular expressions.") python-w3lib python-zope-interface)) (native-inputs - (list python-pexpect + (list nss-certs-for-test + python-pexpect + python-pyftpdlib python-pytest python-pytest-xdist - python-pyftpdlib python-sybil python-testfixtures - python-uvloop)) + python-uvloop + python-wheel)) (home-page "https://scrapy.org") (synopsis "High-level Web crawling and Web scraping framework") (description "Scrapy is a fast high-level web crawling and web @@ -8899,7 +9381,7 @@ SendGrid Web API v3 endpoints, including the new v3 /mail/send.") (define-public python-starlette (package (name "python-starlette") - (version "0.25.0") + (version "0.41.3") (source (origin (method git-fetch) (uri (git-reference @@ -8908,7 +9390,7 @@ SendGrid Web API v3 endpoints, including the new v3 /mail/send.") (file-name (git-file-name name version)) (sha256 (base32 - "1mkkj15lphgycnp51dnrfxbyrx3dicjdcpsqvwc7yw55zyih6h5k")))) + "18lk9rzj0qpzmm7llmk4mx3dc58ylq9rh5rfyccv0ws8a4ggvdy4")))) (build-system pyproject-build-system) (propagated-inputs (list python-anyio python-typing-extensions @@ -9002,6 +9484,27 @@ Interface) framework/toolkit for building async web services in Python.") and FastAPI.") (license license:expat))) +(define-public python-suds + (package + (name "python-suds") + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "suds" version)) + (sha256 + (base32 "1byyg7b2ixpr8hc849a6dd0qn5daxqawz6lb3php8lrmsb1n5cc3")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/suds-community/suds") + (synopsis "Lightweight SOAP python client for consuming Web Services") + (description + "Suds is a lightweight SOAP-based web service client for Python.") + (license license:lgpl3+))) + (define-public python-fastapi (package (name "python-fastapi") @@ -9224,6 +9727,39 @@ list, create, update, or delete resources (e.g. Order, Product, Collection).") "This package provides a library to parse and apply patches.") (license license:expat))) +(define-public python-pybadges + (package + (name "python-pybadges") + (version "3.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/pybadges") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + "1zgb9idz7m3mzf8wvik0gwmyrxp753axqjv2pab326cr5myj1s4b"))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~'("-k" + ;; Disable network dependent tests. + "not test_changes and not test_not_image_url and not test_http_url"))) + (propagated-inputs (list python-jinja2 python-requests)) + (native-inputs (list python-flask + python-fonttools + python-nox + python-pillow + python-pytest + python-xmldiff)) + (home-page "https://github.com/google/pybadges") + (synopsis "Generate Github-style badges on the command-line") + (description + "This package provides @code{python-pybadges}: a library and command-line +tool for generating Github-style badges as SVG images.") + (license license:asl2.0))) + (define-public python-grid5000 (package (name "python-grid5000") @@ -9323,9 +9859,33 @@ hardware on Grid'5000 or via OpenStack, to Vagrant, Chameleon, and more.") ;; Integration tests depend on docker. (delete-file-recursively "tests/integration")))))) (propagated-inputs (list python-requests)) - (native-inputs (list python-pytest python-pyyaml python-setuptools-scm)) + (native-inputs (list python-pytest python-pyyaml python-setuptools + python-setuptools-scm python-wheel)) (home-page "https://github.com/netbox-community/pynetbox") (synopsis "NetBox API client library") (description "Python module to query and edit data stored in a @url{https://netbox.dev,NetBox} instance.") (license license:asl2.0))) + +(define-public python-waybackpack + (package + (name "python-waybackpack") + (version "0.6.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "waybackpack" version)) + (sha256 + (base32 "16lcr2hv7gmp199fh3psrnv68j20pfxria8v6gchrpl1jqx9f923")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ; would require network (and SSL certificates) + (propagated-inputs (list python-requests)) + (native-inputs (list python-pytest)) + (home-page "https://github.com/jsvine/waybackpack") + (synopsis + "Download the entire Wayback Machine archive for a given URL") + (description + "This package provides a library and a command-line tool that lets +you download the entire Wayback Machine archive for a given URL.") + (license license:expat))) |