summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm317
1 files changed, 252 insertions, 65 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index a92c6440fe..bf9c8ae336 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -316,6 +316,60 @@ and JSON.
@end itemize")
(license license:expat)))
+(define-public python-cloudpathlib
+ (package
+ (name "python-cloudpathlib")
+ (version "0.23.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/drivendataorg/cloudpathlib")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1dqwml269lpz51drgg3s27sqmvwa1vldw2rj34ssnqppcmc5h5lm"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; tests: 977 passed, 15 skipped, 8642 warnings
+ #:test-flags
+ #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+ ;; TODO: Package azure-identity (required for this file)
+ "--ignore=tests/test_azure_specific.py"
+ ;; TypeError: Retry.__init__() got an unexpected keyword
+ ;; argument 'timeout'
+ "--deselect=tests/test_gs_specific.py::test_timeout_and_retry")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-pytest-config
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("addopts =.*") "")))))))
+ (native-inputs
+ (list ;; python-azure-identity
+ python-dotenv
+ python-flit-core
+ python-pydantic-2
+ python-pytest
+ python-pytest-cases
+ python-pytest-xdist
+ python-shortuuid
+ python-tenacity))
+ (propagated-inputs
+ (list python-azure-storage-blob
+ python-azure-storage-file-datalake
+ python-boto3
+ python-google-cloud-storage
+ python-typing-extensions))
+ (home-page "https://github.com/drivendataorg/cloudpathlib")
+ (synopsis "Pathlib-style classes for cloud storage services")
+ (description
+ "This package provides a Python library with classes that mimic
+@code{pathlib.Path}'s interface for URIs from different cloud storage
+services.")
+ (license license:expat)))
+
(define-public python-devpi-common
(package
(name "python-devpi-common")
@@ -1478,7 +1532,7 @@ in Python 3.13 by PEP-594.")
python-pytest
python-setuptools))
(propagated-inputs
- (list python-pathlib-abc
+ (list python-pathlib-abc-for-python-pathy
python-smart-open-6
python-typer))
(home-page "https://github.com/justindujardin/pathy")
@@ -1617,30 +1671,18 @@ by calling @code{FrozenList.freeze}.")
(define-public python-aiobotocore
(package
(name "python-aiobotocore")
- (version "2.17.0")
+ (version "2.25.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "aiobotocore" version))
(sha256
- (base32 "1hlwgy1z6ln6bh7b2i9syv7q2bagjkjbws247gbgkgv5qlri6153"))))
+ (base32 "1g7dv81bw7vq55gv3c5jxdw7wp7dp6dwjbh79y3fiv6ppwwyg6za"))))
(build-system pyproject-build-system)
(arguments
(list
- ;; Too many tests fail seemingly because they need Internet access.
- #:tests? #false
- #:test-flags
- '(list
- ;; No module named 'tests'
- "--ignore=tests/test_config.py"
- ;; function uses no argument 's3_verify'
- "--ignore=tests/test_basic_s3.py"
- ;; function uses no argument 'signature_version'
- "--ignore=tests/test_dynamodb.py"
- ;; attempted relative import with no known parent package
- "--ignore=tests/test_stubber.py"
- ;; No module named 'pip'
- "--ignore=tests/test_version.py")))
+ ;; TODO: Too many tests fail seemingly because they need Internet access.
+ #:tests? #false))
(propagated-inputs (list python-aiohttp
python-aioitertools
python-botocore
@@ -1650,15 +1692,7 @@ by calling @code{FrozenList.freeze}.")
python-urllib3
python-wrapt))
(native-inputs
- (list python-dill
- python-docutils
- python-moto
- python-pytest
- python-pytest-asyncio
- python-requests
- python-setuptools
- python-werkzeug
- python-wheel))
+ (list python-setuptools))
(home-page "https://pypi.org/project/aiobotocore/")
(synopsis "Async client for AWS services using botocore and aiohttp")
(description "This package provides an async client for Amazon services
@@ -1944,6 +1978,41 @@ to the absence of the @samp{motor} and @samp{aioboto3} package dependencies.")
support for aiohttp asyncio-powered asynchronous HTTP server.")
(license license:asl2.0)))
+(define-public python-aiohttp-retry
+ (package
+ (name "python-aiohttp-retry")
+ (version "2.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/inyutin/aiohttp_retry")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0r5lxnxc4s8js7l86pfmdxl455v9lg3m41nz6m1xg4kwwf6j0bpi"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest
+ python-pytest-aiohttp
+ python-setuptools))
+ (propagated-inputs
+ (list python-aiohttp))
+ (home-page "https://github.com/inyutin/aiohttp_retry")
+ (synopsis "Simple retry client for aiohttp")
+ (description
+ "This package implements @code{RetryClient} for @code{aiohttp} to retry
+connection to provided endpoint with timeouts logic or use:
+
+@itemize
+@item @code{ExponentialRetry} with exponential backoff
+@item @code{RandomRetry} for random backoff
+@item @code{ListRetry} with backoff you predefine by list
+@item @code{FibonacciRetry} with backoff that looks like fibonacci sequence
+@item @code{JitterRetry} exponential retry with a bit of randomness
+@end itemize")
+ (license license:expat)))
+
(define-public python-aiohttp-socks
(package
(name "python-aiohttp-socks")
@@ -3942,6 +4011,15 @@ high-speed transfers via libcurl and frequently outperforms alternatives.")
(sha256
(base32 "02c6cyh8f3dagcw786m9nl5y0n3xa98p5mb7d7xfr84l2l5bglmk"))))
(build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("\"requests-file.*\",")
+ "\"requests-file\",")))))))
(native-inputs
(list nss-certs-for-test
python-pytest
@@ -4257,6 +4335,47 @@ desired
with very acceptable performance.")
(license license:zpl2.1)))
+(define-public python-weasel
+ (package
+ (name "python-weasel")
+ (version "0.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "weasel" version))
+ (sha256
+ (base32 "1aas113r29y6yxrmdlsw80rj8w4kgw1jhfjw9rsgc4rf0w7j3g5a"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ ;; Network access is required.
+ #~(list #$@(map (lambda (test) (string-append "--deselect="
+ "weasel/tests/cli/"
+ test))
+ (list "test_cli.py::test_project_git_dir_asset"
+ "test_cli.py::test_project_git_file_asset"
+ "test_cli_app.py::test_project_assets")))))
+ (native-inputs
+ (list python-pytest
+ python-setuptools))
+ (propagated-inputs
+ (list python-cloudpathlib
+ python-confection
+ python-packaging
+ python-pydantic-2
+ python-requests
+ python-smart-open
+ python-srsly
+ python-typer
+ python-wasabi))
+ (home-page "https://github.com/explosion/weasel/")
+ (synopsis "Small and easy workflow system")
+ (description
+ "This package provides a minimalistic workflow system to manage and
+share end-to-end workflows for different use cases and domains.")
+ (license license:expat)))
+
(define-public python-webencodings
(package
(name "python-webencodings")
@@ -6718,32 +6837,29 @@ opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if
(package
;; Note: updating awscli typically requires updating botocore as well.
(name "awscli")
- (version "1.36.32")
+ (version "1.42.61")
(source
(origin
- (method git-fetch) ; no tests in PyPI release
+ (method git-fetch)
(uri (git-reference
(url "https://github.com/aws/aws-cli")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1b4bfv7mgrxw7nfbv9ag97qcsqch2p7raip6111rqg5vdhvsck19"))))
+ (base32 "1fbqh4w7jj5abn87nbhyir25hdviirj0lblcdsqqkadcjh67877h"))))
(build-system pyproject-build-system)
(arguments
(list
+ ;; tests: 2692 passed, 40 warnings
#:test-flags
- #~(list "--numprocesses" (number->string (parallel-job-count))
- ;; Tests require networking.
- "--ignore" "tests/integration"
- ;; It struggles to set PYTHONPATH.
- ;;
- ;; AssertionError: 'argument operation: Invalid choice, valid
- ;; choices are:' not found in '
- "-k"
- (string-append "not test_subscribe_to_shard_removed"
- " and not test_start_conversation_removed"
- ;; Tests fail during mocking.
- " and not test_no_groff_or_mandoc_exists"))
+ #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+ ;; Compete test suite is huge and compute hungry, run just unit
+ ;; tests.
+ "--ignore=tests/dependencies"
+ "--ignore=tests/functional"
+ "--ignore=tests/integration"
+ ;; TypeError: 'Mock' object is not subscriptable.
+ "-k" "not test_no_groff_or_mandoc_exists")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-reference-to-groff
@@ -6770,9 +6886,9 @@ opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if
(list groff-minimal
python-botocore
python-colorama
- python-docutils-0.16
+ python-docutils-0.19
python-pyyaml
- python-rsa
+ python-rsa-for-awscli-1
python-s3transfer))
(home-page "https://aws.amazon.com/cli/")
(synopsis "Command line client for AWS")
@@ -7456,13 +7572,13 @@ S3.")
(define-public python-s3transfer
(package
(name "python-s3transfer")
- (version "0.10.3")
+ (version "0.14.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "s3transfer" version))
(sha256
- (base32 "032bjky1q8r5x80mvb0ah60g0zq4snwf0xa4c7779m44mdsfsl2g"))))
+ (base32 "09a17scf96zfdw2chb22yyvmnj4anfijgkncfi89id68wxj25wgg"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -8720,37 +8836,33 @@ such as IoT applications or multi-user database-driven business applications.")
(define-public python-ws4py
(package
(name "python-ws4py")
- (version "0.5.1")
+ (version "0.6.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "ws4py" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Lawouach/WebSocket-for-Python")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
- (build-system python-build-system)
+ "00y6s8gk20936njqbxr8vjliviiz7r7pqrlwg7xi8zzs6903xvv6"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'python3.7-compatibility
- (lambda _
- (substitute* '("ws4py/server/tulipserver.py"
- "ws4py/async_websocket.py")
- (("asyncio.async")
- "asyncio.ensure_future"))
- #t))
- ;; We don't have a package for cherrypy.
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'remove-cherrypy-support
(lambda _
(delete-file "ws4py/server/cherrypyserver.py")
- #t)))))
+ (delete-file "test/test_cherrypy.py"))))))
+ (native-inputs (list python-setuptools python-pytest))
(propagated-inputs
(list python-gevent python-tornado))
(home-page "https://github.com/Lawouach/WebSocket-for-Python")
(synopsis "WebSocket client and server library")
(description
- "This package provides a WebSocket client and server library for
-Python.")
+ "This package provides a WebSocket client and server library for Python.")
(license license:bsd-3)))
(define-public python-slowapi
@@ -11121,13 +11233,13 @@ Python.")
(define-public python-azure-storage-blob
(package
(name "python-azure-storage-blob")
- (version "12.26.0")
+ (version "12.27.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "azure_storage_blob" version))
(sha256
- (base32 "07ypg1ny5rivy51f4q9h2xajd60wc19jf0zbpw0dxxr48a1dgmsx"))))
+ (base32 "16nb17f6bi0k53qlxybwqxdld3nj742hmsk4qcq3jwka5b6y5s4r"))))
(build-system pyproject-build-system)
(arguments
;; XXX: devtools_testutils is not provided as a proper package on PyPI,
@@ -11149,6 +11261,38 @@ Python.")
Client Library for Python.")
(license license:expat)))
+(define-public python-azure-storage-file-datalake
+ (package
+ (name "python-azure-storage-file-datalake")
+ (version "12.22.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "azure_storage_file_datalake" version))
+ (sha256
+ (base32 "0xxg94684b630p8jrz38sg7mdcwp1wa0p5di27mswyrjycshvvcs"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; XXX: devtools_testutils is not provided as a proper package on PyPI,
+ ;; Git does not contains setup.py, setup.cfg or pyproject.toml which makes
+ ;; it hard to package in Guix.
+ ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/
+ ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md>.
+ (list #:tests? #f))
+ (native-inputs
+ (list python-setuptools))
+ (propagated-inputs
+ (list python-azure-core
+ python-azure-storage-blob
+ python-isodate
+ python-typing-extensions))
+ (home-page "https://github.com/Azure/azure-sdk-for-python")
+ (synopsis "Microsoft Azure File DataLake Storage Client Library for Python")
+ (description
+ "This package provides the Microsoft Azure File @code{DataLake} Storage
+Client Library for Python.")
+ (license license:expat)))
+
(define-public python-google-auth
(package
(name "python-google-auth")
@@ -12080,6 +12224,10 @@ resources using Web Application Description Language (WADL) files as guides.")
'(modify-phases %standard-phases
(add-after 'unpack 'compatibility
(lambda _
+ ;; Relax requests-file requirement.
+ (substitute* "pyproject.toml"
+ (("\"requests-file.*\",")
+ "\"requests-file\","))
;; httpx removed the "proxies" keyword. It's now either "mounts"
;; or "proxy". See https://github.com/encode/httpx/pull/2879.
(substitute* "src/zeep/transports.py"
@@ -12834,3 +12982,42 @@ you download the entire Wayback Machine archive for a given URL.")
repository of available XYZ services offering raster basemap tiles. The
repository is provided via Python API and as a compressed JSON file.")
(license license:bsd-3)))
+
+(define-public s3cmd
+ (package
+ (name "s3cmd")
+ (version "2.4.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/s3tools/s3cmd")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "168c49d1v8r7azv66zz0w07jalf434c2jpg2xzads5jnxzmiy73k"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:tests? #f ; XXX: Tests require network access.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'hide-wrapping
+ (lambda _
+ (substitute* "S3/MultiPart.py"
+ (("sys\\.argv\\[0\\]")
+ "\"s3cmd\""))
+ (substitute* "s3cmd"
+ (("optparser\\.get_prog_name\\(\\)")
+ "\"s3cmd\"")))))))
+ (native-inputs (list python-setuptools))
+ (inputs (list python-dateutil python-magic))
+ (home-page "https://s3tools.org/s3cmd")
+ (synopsis "Command line tool for S3-compatible storage services")
+ (description
+ "S3cmd is a command line tool for uploading, retrieving and managing data
+in storage services that are compatible with the Amazon Simple Storage
+Service (S3) protocol, including S3 itself. It supports rsync-like backup,
+GnuPG encryption, and more. It also supports management of Amazon's
+CloudFront content delivery network.")
+ (license license:gpl2+)))