diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 275 |
1 files changed, 232 insertions, 43 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 0beff7d6e0..a92c6440fe 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -23,6 +23,7 @@ ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org> +;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> ;;; Copyright © 2018, 2019, 2021, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> @@ -1828,7 +1829,7 @@ for adding, removing and dropping callbacks.") python-yarl)) (native-inputs (list gunicorn-bootstrap - python-cython-3 + python-cython python-freezegun python-pytest python-pytest-cov @@ -2717,9 +2718,7 @@ files.") (list python-greenlet python-pytest python-pytest-httpbin - python-readme-renderer python-setuptools - python-twine python-werkzeug)) (propagated-inputs (list python-requests)) (home-page "https://github.com/ross/requests-futures") @@ -2792,7 +2791,7 @@ AWS S3 Service using boto3 S3 resource as a driver.") (native-inputs (list python-aiofiles python-cbor2 - python-cython-3 ;for faster binaries + python-cython ;for faster binaries python-fakeredis python-httpx python-mujson @@ -2977,6 +2976,63 @@ other HTTP libraries.") "Cheroot is a high-performance, pure-Python HTTP server.") (license license:bsd-3))) +(define-public python-cherrypy + (package + (name "python-cherrypy") + (version "18.10.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cherrypy/cherrypy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1mhs64z75mj3rk4rgxc3xm1yksaj253rj9czhk4632blz5yi0kbn")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(map + (lambda (test) + (string-append "--deselect=cherrypy/test/" test)) + (list + ;; XXX: Unraisable exceptions. + "test_config_server.py::ServerConfigTests::testMaxRequestSize" + "test_core.py::CoreRequestHandlingTest::testRanges" + "test_core.py::CoreRequestHandlingTest::testRedirect" + "test_encoding.py::EncodingTests::\ +test_multipart_decoding_bigger_maxrambytes" + "test_encoding.py::EncodingTests::\ +test_test_http.py::HTTPTests::test_post_filename_with_special_characters" + "test_http.py::HTTPTests::test_post_multipart" + "test_http.py::HTTPTests::test_post_filename_with_special_characters" + "test_mime.py::SafeMultipartHandlingTest::test_Flash_Upload" + "test_tutorials.py::TutorialTest::test09Files")))) + (propagated-inputs + (list python-cheroot + python-jaraco-collections + python-more-itertools + python-portend + python-zc-lockfile)) + (native-inputs + (list python-objgraph + python-path + python-pytest + python-pytest-cov + python-pytest-forked + python-pytest-services + python-pytest-sugar + python-requests-toolbelt + python-setuptools)) + (home-page "https://www.cherrypy.dev") + (synopsis "Object-Oriented HTTP framework") + (description + "CherryPy is a pythonic, object-oriented web framework. It helps in +building web applications in the same way any other object-oriented Python +program would be built.") + (license license:bsd-3))) + (define-public httpie (package (name "httpie") @@ -3875,6 +3931,100 @@ high-speed transfers via libcurl and frequently outperforms alternatives.") ;; under the terms of LGPLv2.1+ or Expat. (license (list license:lgpl2.1+ license:expat)))) +(define-public python-tldextract + (package + (name "python-tldextract") + (version "5.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tldextract" version)) + (sha256 + (base32 "02c6cyh8f3dagcw786m9nl5y0n3xa98p5mb7d7xfr84l2l5bglmk")))) + (build-system pyproject-build-system) + (native-inputs + (list nss-certs-for-test + python-pytest + python-pytest-mock + python-responses + python-setuptools + python-setuptools-scm + python-syrupy)) + (propagated-inputs + (list python-filelock + python-idna + python-requests + python-requests-file)) + (home-page "https://github.com/john-kurkowski/tldextract") + (synopsis + "Separate the TLD from the registered domain and subdomains of a URL") + (description + "TLDExtract accurately separates the TLD from the registered domain and +subdomains of a URL, using the Public Suffix List. By default, this includes +the public ICANN TLDs and their exceptions. It can optionally support the +Public Suffix List's private domains as well.") + (license license:bsd-3))) + +(define-public python-tracerite + (package + (name "python-tracerite") + (version "1.1.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tracerite" version)) + (sha256 + (base32 "07mkg0sl0h335kj6yjvxki2c19gxhb7rkks1zgzh7aj0y83c17qi")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests in PyPI or Git + (native-inputs + (list python-setuptools + python-setuptools-scm)) + (propagated-inputs + (list python-html5tagger)) + (home-page "https://github.com/sanic-org/tracerite") + (synopsis "Human-readable HTML tracebacks") + (description + "@code{tracerite} converts Python tracebacks into useful error messages +in human-readable HTML format.") + (license license:unlicense))) + +(define-public python-trio-websocket + (package + (name "python-trio-websocket") + (version "0.12.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/HyperionGray/trio-websocket") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lm712gakpskcn3adna22kj8m1hspz9l68pmlziklr0ycphmyqac")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-pytest-trio + python-setuptools + python-trustme)) + (propagated-inputs + (list python-outcome + python-trio + python-wsproto)) + (home-page "https://github.com/HyperionGray/trio-websocket") + (synopsis "WebSocket library for Trio") + (description "This library implements both server and client aspects of +the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol}, +striving for safety, correctness, and ergonomics. It is based on the +@url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a +@url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements +the majority of the WebSocket protocol, including framing, codecs, and events. +This library handles I/O using @url{https://trio.readthedocs.io/en/latest/, +the Trio framework}.") + (license license:expat))) + (define-public python-txacme ;; 0.9.3 tag was placed in 2020 and there a lot of changes providing ;; compatibility wit twisted, use the latest commit from trunk branch. @@ -4756,8 +4906,8 @@ WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can utilise asyncio, uvloop, or trio worker types.") (license license:expat))) -(define-public python-hypercorn - (deprecated-package "python-hypercorn" hypercorn)) +(define-deprecated-package python-hypercorn + hypercorn) (define-public python-querystring-parser (package @@ -6075,26 +6225,45 @@ python-requests.") HTTP via a UNIX domain socket.") (license license:asl2.0))) -(define-public python-requests-unixsocket - (deprecated-package "python-requests-unixsocket" python-requests-unixsocket2)) +(define-deprecated-package python-requests-unixsocket + python-requests-unixsocket2) -(define-public python-requests_ntlm +(define-public python-requests-ntlm (package - (name "python-requests_ntlm") - (version "1.2.0") + (name "python-requests-ntlm") + (version "1.3.0") (source (origin - (method url-fetch) - (uri (pypi-uri "requests_ntlm" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/requests/requests-ntlm") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1a0np7lk8ma1plv1s4aw5q9h2z3aljprkl9qsfypqcaf0zsqbhik")))) - (build-system python-build-system) + (base32 "0snsk66zdihdlyfjz2zgpyfgdyjg814m3cc4g3my09hdnb5xvagv")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; XXX: Connection refused. + #~(list "-k" (string-join + (list "not test_ntlm_http_with_cbt" + "test_ntlm_http_without_cbt" + "test_ntlm_https_with_cbt" + "test_ntlm_https_without_cbt") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'spawn-test-server + (lambda _ + ;; Taken from .github/workflows/ci.yml. + (spawn "python" + (list "python" "-m" "tests.test_server"))))))) (propagated-inputs (list python-cryptography python-pyspnego python-requests)) + (native-inputs (list python-flask python-pytest python-setuptools)) (home-page "https://github.com/requests/requests-ntlm") - (synopsis - "NTLM authentication support for Requests") + (synopsis "NTLM authentication support for Requests") (description "This package allows for HTTP NTLM authentication using the requests library.") @@ -8188,7 +8357,7 @@ name resolutions asynchronously.") (("build_inplace=False") "build_inplace=True"))))))) (native-inputs (list python-covdefaults - python-cython-3 + python-cython python-expandvars python-pytest python-pytest-cov @@ -8827,7 +8996,7 @@ hard or impossible to fix in cssselect.") (delete-file-recursively "uvloop"))))))) (native-inputs (list python-aiohttp - python-cython-3 + python-cython python-psutil python-pyopenssl python-pytest @@ -9927,8 +10096,8 @@ decorators and tools to describe your API and expose its documentation properly Swagger.") (license license:bsd-3))) -(define-public python-flask-restplus - (deprecated-package "python-flask-restplus" python-flask-restx)) +(define-deprecated-package python-flask-restplus + python-flask-restx) (define-public python-flask-socketio (package @@ -10107,6 +10276,30 @@ conflicts detected by that mechanism.") for Python. It is mainly used by the ZODB.") (license license:zpl2.1))) +(define-public python-truststore + (package + (name "python-truststore") + (version "0.10.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "truststore" version)) + (sha256 + (base32 "00f3xc7720rkddsn291yrw871kfnimi6d9xbwi75xbb3ci1vv4cx")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;all tests require Internet access + (native-inputs + (list python-flit-core)) + (home-page "https://github.com/sethmlarson/truststore") + (synopsis "Verify certificates using native system trust stores") + (description + "Truststore is a library which exposes native system certificate stores (ie +\"trust stores\") through an @code{ssl.SSLContext-like} API. This means that +Python applications no longer need to rely on certifi as a root certificate +store.") + (license license:expat))) + (define-public python-robot-detection (package (name "python-robot-detection") @@ -11558,8 +11751,8 @@ as Flask.") python-pytest-sugar python-pytest-trio)) (propagated-inputs - (list python-exceptiongroup - python-hypercorn + (list hypercorn + python-exceptiongroup python-quart python-trio)) (home-page "https://github.com/pgjones/quart-trio") @@ -11654,30 +11847,28 @@ regular expressions.") (define-public python-scrapy (package (name "python-scrapy") - (version "2.13.1") + (version "2.13.3") (source (origin (method url-fetch) (uri (pypi-uri "scrapy" version)) (sha256 - (base32 "18anr8jjjqyv6pfzdm4fr5hx4vddb8qclyja0y874f5slcnsfsrx")))) + (base32 "0k90pni6vkj7axx3cji0b2x7yg4yfh5kh1csqiq9ssp42265h5xz")))) (build-system pyproject-build-system) (arguments (list #:test-flags #~(list "--numprocesses" (number->string (parallel-job-count)) - ;; Tests requiring a display. - "-k" (string-append - "not " (string-join - (list "test_pformat" - "test_pformat_old_windows" - "test_pformat_windows" - ;; AssertionError. - "test_start_deprecated_super" - ;; Connection refused. - "test_persist") - " and not ")) - ;; Connection refused to some local FTP server. - "--ignore=tests/test_feedexport.py" + "-k" (string-join + ;; ConnectionRefusedError: [Errno 111] Connection + ;; refused + (list "not test_append" + "test_append_active_mode" + "test_overwrite" + "test_overwrite_active_mode" + "test_persist" + ;; AssertionError + "test_start_deprecated_super") + " and not ") ;; Skip documentation testing. "--ignore=docs") #:phases @@ -11697,24 +11888,22 @@ regular expressions.") python-protego python-pydispatcher python-pyopenssl + python-pypydispatcher python-queuelib python-service-identity python-tldextract - python-typing-extensions python-twisted python-w3lib python-zope-interface)) (native-inputs (list nss-certs-for-test python-hatchling - python-mypy python-pexpect python-pytest python-pytest-xdist python-setuptools python-sybil - python-testfixtures - python-wheel)) + python-testfixtures)) (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 |
