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.scm167
1 files changed, 124 insertions, 43 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 4489347130..4590f81d44 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
-;;; Copyright © 2015-2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
@@ -64,6 +64,7 @@
;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2024 normally_js <normally_js@posteo.net>
+;;; Copyright © 2024 Markku Korkeala <markku.korkeala@iki.fi>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1378,13 +1379,13 @@ HTTP servers, RESTful APIs, and web services.")
(define-public parfive
(package
(name "parfive")
- (version "2.0.2")
+ (version "2.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "parfive" version))
(sha256
(base32
- "0pf8rzfwxpkn84xzb4v8m1fy3k7kjlh8f9ln4y5xqlnbqpwi30lh"))))
+ "13nw2y7wjzj6w049av6ff4d0zxgbhkrgck0xyh676c114hcv8v6d"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -1523,30 +1524,44 @@ CSS3 that adds programming capabilities and some other syntactic sugar.")
(define-public python-jsonpickle
(package
(name "python-jsonpickle")
- (version "1.5.2")
+ (version "3.0.4")
(source (origin
(method url-fetch)
(uri (pypi-uri "jsonpickle" version))
(sha256
(base32
- "0n93h9b9ad58lxdfbvgsh4b25mkg146qikzcgghyc75vjk7rp2cy"))))
- (build-system python-build-system)
+ "0ay6r1bhcw7qy8k5n4xxgy9dqzhxx8syg5ra9wwqzk91ca6lrcd1"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest" "-vv"
- ;; Prevent running the flake8 and black
- ;; pytest plugins, which only tests style
- ;; and frequently causes harmless failures.
- "-o" "addopts=''"))))))
- (native-inputs
- (list python-setuptools-scm
- python-toml ;XXX: for setuptools_scm[toml]
- ;; For tests.
- python-numpy
- python-pandas
- python-pytest))
+ (list
+ #:test-flags
+ ;; Prevent running the flake8 and black pytest plugins, which only tests
+ ;; style and frequently causes harmless failures.
+ '(list "-o" "addopts=''" "tests")
+ #:phases
+ '(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZ" "UTC")
+ (setenv "TZDIR"
+ (search-input-directory inputs "share/zoneinfo")))))))
+ (propagated-inputs
+ (list python-importlib-metadata))
+ (native-inputs
+ (list python-bson
+ python-ecdsa
+ python-feedparser
+ python-pymongo
+ python-pytest
+ python-pytest-benchmark
+ python-pytest-cov
+ python-pytest-enabler
+ python-setuptools
+ python-setuptools-scm
+ python-simplejson
+ python-sqlalchemy
+ python-ujson
+ tzdata-for-tests))
(home-page "https://jsonpickle.github.io/")
(synopsis "Serialize object graphs into JSON")
(description
@@ -2069,16 +2084,19 @@ is Python’s.")
(define-public python-omnipath
(package
(name "python-omnipath")
- (version "1.0.6")
+ (version "1.0.8")
(source (origin
(method url-fetch)
(uri (pypi-uri "omnipath" version))
(sha256
(base32
- "01hmcp1202g5drs8dkxnyyb5v14g503dj4zfiqypghmigi9ipw86"))))
+ "0krr4wzfwa6fs550cs0lcqwjj90p1inyncj9kvzi4x4m26xbj89q"))))
(build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ ;; These require internet access
+ '(list "-k" "not test_download_homologene and not test_complex_genes")
#:phases
'(modify-phases %standard-phases
(add-after 'unpack 'relax
@@ -2105,6 +2123,7 @@ is Python’s.")
python-pre-commit
python-pytest
python-pytest-mock
+ python-pytest-socket
python-requests-mock
python-setuptools-scm
python-tox))
@@ -5804,22 +5823,37 @@ library to create slugs from unicode strings while keeping it DRY.")
(define-public python-branca
(package
(name "python-branca")
- (version "0.3.1")
+ (version "0.7.2")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "branca" version))
+ (method git-fetch) ; no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/python-visualization/branca")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-jinja2 python-six))
- (native-inputs
- (list python-pytest))
+ (base32 "1vs94nqa7r6iwm8mj3m29hg090gmgz4ywnayxh8qiz9ij8jv96wa"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; This file requires Selenium.
+ (list #:test-flags #~(list "--ignore" "tests/test_iframe.py"
+ ;; This test passes but is very slow.
+ "-k" "not test_color_brewer_extendability")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'pretend-version
+ ;; The version string is usually derived via setuptools-scm,
+ ;; but without the git metadata available, the version string
+ ;; is set to '0.0.0'.
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+ #$(package-version this-package)))))))
+ (propagated-inputs (list python-jinja2))
+ (native-inputs (list python-numpy python-pytest python-setuptools-scm))
(home-page "https://github.com/python-visualization/branca")
(synopsis "Generate complex HTML+JS pages with Python")
- (description "Generate complex HTML+JS pages with Python")
+ (description "This library is a spinoff from @code{folium} that would host
+the non-map-specific features. It can be used to generate HTML + JS.")
(license license:expat)))
(define-public python-tinycss
@@ -7178,6 +7212,32 @@ Agent is a web crawler. It uses the list of registered robots from
@url{http://www.robotstxt.org}.")
(license license:gpl3+)))
+(define-public python-robotframework-requests
+ (package
+ (name "python-robotframework-requests")
+ (version "0.9.7")
+ (source
+ (origin
+ (method git-fetch) ; no tests in PyPI release
+ (uri (git-reference
+ (url "https://github.com/MarketSquare/robotframework-requests")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "077j8p5k41v53slyv8h32fcmqfi7m6z3r4gmyqqaawm5szfmy61m"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs
+ (list python-requests python-robotframework))
+ (native-inputs
+ (list python-pytest))
+ (home-page "https://github.com/MarketSquare/robotframework-requests")
+ (synopsis "Robot Framework keyword library wrapper around requests")
+ (description
+ "@code{RequestsLibrary} is a @url{https://robotframework.org/, Robot
+Framework} library aimed to provide HTTP API testing functionalities by
+wrapping the @code{requests} Python library.")
+ (license license:expat)))
+
(define-public python-pysolr
(package
(name "python-pysolr")
@@ -7402,16 +7462,29 @@ challenges.")
(define-public python-imap-tools
(package
(name "python-imap-tools")
- (version "0.29.0")
+ (version "1.6.0")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "imap_tools" version))
- (sha256
- (base32
- "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
- (build-system python-build-system)
- (arguments '(#:tests? #f)) ; tests require internet access
+ (origin
+ (method git-fetch) ; no tests in PyPI release
+ (uri (git-reference
+ (url "https://github.com/ikvk/imap_tools")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0w4x5l5w7rz1mrmbbjbfqbf3f5p89wi2fw245yvg8k98zgy012sg"))))
+ (arguments
+ (list
+ #:test-flags
+ ;; Tests require a network connection
+ #~(list "-k" (string-append "not test_action"
+ " and not test_attributes"
+ " and not test_connection"
+ " and not test_folders"
+ " and not test_idle"
+ " and not test_live"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest))
(home-page "https://github.com/ikvk/imap_tools")
(synopsis "Work with email and mailbox by IMAP")
(description
@@ -8787,6 +8860,14 @@ possible, supporting most common functionality.")
(use-modules (guix build utils))
(delete-file "tests/profile.py")))))
(build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ ;; The test expects the copyright to be updated each year.
+ (substitute* "tests/test_daterange.py"
+ (("time\\.strftime\\(\"%Y\"\\)") "2022")))))))
(synopsis "HTTP REST client for Python")
(description
"This package provides access to any RESTful or RESTful-like API.")