summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2024-03-22 10:46:45 +0100
committerJosselin Poiret <dev@jpoiret.xyz>2024-03-22 10:46:45 +0100
commit54219dc3a440aaf86ece4a65fec1a97c0952f6f2 (patch)
tree6a60af28d1423be8fe15842261ee95748eede69b /gnu/packages/python-web.scm
parent92e1ea709dbd6c8eb27c4b002e9768958c147475 (diff)
parent3d2966e0b7dbf15a5cb497037ace73d1be92febf (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Change-Id: Id398a49a83cfe6f3a5ba0aee811d09ca12f897de
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm248
1 files changed, 224 insertions, 24 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 4a92b3e22e..5474232847 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -44,7 +44,7 @@
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
-;;; Copyright © 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021, 2022, 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021, 2022 jgart <jgart@dismail.de>
;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
@@ -58,9 +58,11 @@
;;; Copyright © 2022 msimonin <matthieu.simonin@inria.fr>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr>
+;;; Copyright © 2023 dan <i@dan.games>
;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
+;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -78,15 +80,15 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages python-web)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system copy)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
+ #:use-module (guix download)
#:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
#:use-module (guix utils)
- #:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
@@ -106,8 +108,8 @@
#:use-module (gnu packages node)
#:use-module (gnu packages openstack)
#:use-module (gnu packages pcre)
- #:use-module (gnu packages protobuf)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
@@ -121,12 +123,12 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages tls)
#:use-module (gnu packages time)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
- #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages)
#:use-module (srfi srfi-1))
(define-public python-huggingface-hub
@@ -1278,6 +1280,62 @@ over a different origin than that of the web application.")
other HTTP libraries.")
(license license:expat)))
+(define-public python-cheroot
+ (package
+ (name "python-cheroot")
+ (version "10.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cheroot" version))
+ (sha256
+ (base32
+ "1w0ind0dza9j1py56y23344piqkpyfmcm060qfrnk6gggy3s3i2r"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ #~(list "--cov=cheroot"
+ ;; Tests are flaky in parallel invocation.
+ ;; "--numprocesses=auto"
+ "--doctest-modules"
+ "--showlocals"
+ ;; Disable test requiring networking.
+ "-k" "not test_tls_client_auth")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "/tmp"
+ (apply invoke "pytest" "-v"
+ (append test-flags (list #$output))))))))))
+ (propagated-inputs
+ (list python-jaraco-functools
+ python-more-itertools
+ python-six))
+ (native-inputs
+ (list python-cryptography
+ python-jaraco-text
+ python-portend
+ python-pyopenssl
+ python-pypytools
+ python-pytest
+ python-pytest-cov
+ python-pytest-mock
+ python-pytest-xdist
+ python-requests
+ python-requests-toolbelt
+ python-requests-unixsocket
+ python-setuptools-scm
+ python-setuptools-scm-git-archive
+ python-trustme))
+ (home-page "https://cheroot.cherrypy.dev")
+ (synopsis "Highly-optimized, pure-python HTTP server")
+ (description
+ "Cheroot is a high-performance, pure-Python HTTP server.")
+ (license license:bsd-3)))
+
(define-public httpie
(package
(name "httpie")
@@ -1917,21 +1975,47 @@ Amazon S3 compatible object storage server.")
(uri (pypi-uri "pycurl" version))
(sha256
(base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- ;; The tests attempt to access external web servers, so we cannot run
- ;; them. Furthermore, they are skipped altogether when using Python 2.
- '(#:tests? #f
+ '(#:test-flags
+ (list "-n" "auto"
+ "-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"
+ " 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"
+ ;; OSError: tests/fake-curl/libcurl/with_nss.so: cannot
+ ;; open shared object file: No such file or directory
+ " and not test_libcurl_ssl_nss"
+ ;; 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"))
#:phases (modify-phases %standard-phases
- (add-before 'build 'configure-tls-backend
- (lambda _
- ;; XXX: PycURL fails to automatically determine which TLS
- ;; backend to use when cURL is built with --disable-static.
- ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
- (setenv "PYCURL_SSL_LIBRARY" "gnutls")
- #t)))))
- (native-inputs
- (list python-nose python-bottle))
+ (add-before 'build 'configure-tls-backend
+ (lambda _
+ ;; XXX: PycURL fails to automatically determine which
+ ;; TLS backend to use when cURL is built with
+ ;; --disable-static. See setup.py and
+ ;; <https://github.com/pycurl/pycurl/pull/147>.
+ (setenv "PYCURL_SSL_LIBRARY" "gnutls"))))))
+ (native-inputs
+ (list python-bottle
+ python-flaky
+ python-nose
+ python-pytest
+ python-pytest-xdist))
(inputs
(list curl gnutls))
(home-page "http://pycurl.io/")
@@ -2722,6 +2806,123 @@ object to help create WSGI responses.")
files. These locks can also be used to mediate access to other files.")
(license license:zpl2.1)))
+(define-public python-zconfig
+ (package
+ (name "python-zconfig")
+ (version "4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ZConfig" version))
+ (sha256
+ (base32 "0mh13p38vq7ip4zkvaplzr8w0mqrmmqiyb5y663d165slvxl5mpq"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ ;; This test assumes we still have setup.py in the
+ ;; directory from which we import zconfig, which
+ ;; does not work after installing the package.
+ (delete-file-recursively
+ "src/ZConfig/tests/test_readme.py")
+ (invoke "zope-testrunner" "-vv" "--test-path=src"
+ "--all"))
+ (format #t "test suite not run~%")))))))
+ (native-inputs (list python-docutils python-manuel python-zope-exceptions
+ python-zope-testrunner))
+ (home-page "https://github.com/zopefoundation/ZConfig/")
+ (synopsis "Structured configuration library intended for general use")
+ (description
+ "@code{zconfig} is a configuration library intended for general
+use. It supports a hierarchical schema-driven configuration model that allows
+a schema to specify data conversion routines written in Python. Its model is
+very different from the model supported by the @code{configparser} module
+found in Python's standard library, and is more suitable to
+configuration-intensive applications.")
+ (license license:zpl2.1)))
+
+(define-public python-zodb
+ (package
+ (name "python-zodb")
+ (version "5.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ZODB" version))
+ (sha256
+ (base32 "1pv4w8mnx6j4xvkcjbkh99pv8ljby7g9f7zjq7zhdmk06sykmiy6"))))
+ (build-system pyproject-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ ;; This test does not work after installing the
+ ;; package, since it expects the ZODB source code
+ ;; to reside in the src/ directory.
+ (delete-file-recursively
+ "src/ZODB/tests/testdocumentation.py")
+ (invoke "zope-testrunner" "-vv" "--test-path=src"
+ "--all"))
+ (format #t "test suite not run~%")))))))
+ (propagated-inputs (list python-btrees
+ python-persistent
+ python-zconfig
+ python-six
+ python-transaction
+ python-zc-lockfile
+ python-zodbpickle
+ python-zope-interface))
+ (native-inputs (list python-manuel python-zope-testing
+ python-zope-testrunner))
+ (home-page "http://zodb-docs.readthedocs.io")
+ (synopsis "Object-oriented database for Python")
+ (description
+ "@code{ZODB} provides an object-oriented and @acronym{ACID,
+Atomicity Consistency Isolation Durability} compliant database for Python with
+a high degree of transparency. @code{ZODB} is an object-oriented database,
+not an object-relational mapping. This comes with several advantaged:
+
+@itemize
+@item no separate language for database operations
+@item very little impact on your code to make objects persistent
+@item no database mapper that partially hides the database.
+@item almost no seam between code and database.
+@end itemize")
+ (license license:zpl2.1)))
+
+(define-public python-zodbpickle
+ (package
+ (name "python-zodbpickle")
+ (version "3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "zodbpickle" version))
+ (sha256
+ (base32 "035bjrksl4h92mvjkx6id4gjcpc1k4mbci8ryjl6l9mki7ihx77b"))))
+ (build-system pyproject-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "zope-testrunner" "-vv" "--test-path=src"
+ "--all")
+ (format #t "test suite not run~%")))))))
+ (native-inputs (list python-zope-testrunner))
+ (home-page "https://github.com/zopefoundation/zodbpickle")
+ (synopsis "Uniform pickling interface for @code{zodb}")
+ (description
+ "This package is a fork of the @code{pickle} module (and the
+supporting C extension) from both Python 3.2 and Python 3.3. The fork adds
+support for the @code{noload} operations used by @code{zodb}.")
+ (license (list license:psfl license:zpl2.1))))
+
(define-public python-zope-event
(package
(name "python-zope-event")
@@ -8411,7 +8612,7 @@ compatibility with Microformats1 (mf1).")
(define-public python-extruct
(package
(name "python-extruct")
- (version "0.13.0")
+ (version "0.16.0")
(source (origin
(method git-fetch) ;for tests
(uri (git-reference
@@ -8420,7 +8621,7 @@ compatibility with Microformats1 (mf1).")
(file-name (git-file-name name version))
(sha256
(base32
- "075zldf3dqcc429z1vk2ngbmv034bnlyk6arh3rh30jbsvz9pzl5"))))
+ "1s05sz6nghrap1gjkg3vsqz6djld6lczd6w3r1542ir8n7binl7a"))))
(build-system python-build-system)
(arguments
(list
@@ -8438,7 +8639,6 @@ compatibility with Microformats1 (mf1).")
python-mf2py
python-pyrdfa3
python-rdflib
- python-rdflib-jsonld
python-w3lib))
(home-page "https://github.com/scrapinghub/extruct")
(synopsis "Extract embedded metadata from HTML markup")