summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm253
1 files changed, 157 insertions, 96 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e24cd2288f..e7b3b98c96 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -885,6 +885,24 @@ comparison operators, as defined in the original
processes, in parallel, in the console, with an interactive TUI.")
(license license:expat)))
+(define-public python-orderly-set
+ (package
+ (name "python-orderly-set")
+ (version "5.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "orderly_set" version))
+ (sha256
+ (base32 "1kp64m0nabhhb0zxr4f8idrmniraahnfwq41gx7adbyqwk48awg8"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-flit-core python-pytest))
+ (home-page "https://github.com/seperman/orderly-set")
+ (synopsis "Multiple implementations of Ordered Set")
+ (description "Orderly Set is a package containing multiple implementations
+of Ordered Set.")
+ (license license:expat)))
+
(define-public python-pastel
(package
(name "python-pastel")
@@ -931,6 +949,42 @@ your terminal.")
edit distance algorithm for Python in Cython for high performance.")
(license license:bsd-3)))
+(define-public python-safety-schemas
+ (package
+ (name "python-safety-schemas")
+ (version "0.0.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "safety_schemas" version))
+ (sha256
+ (base32 "0smgszbd3nb7jh61cgpycqhcvfwwdyaai5amw8mmf6g9b5x3z5a9"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ #~(list "-k" (string-join
+ ;; These tests are failing for unknown reasons.
+ ;; (AssertionError).
+ (list "not test_model[ConfigModel-ConfigModel]"
+ "test_model[MetadataModel-MetadataModel]"
+ "test_model[PolicyFileModel-PolicyFileModel]"
+ "test_model[ProjectModel-ProjectModel]"
+ "test_model[ReportModel-ReportModel]")
+ " and not "))))
+ (propagated-inputs (list python-dparse
+ python-packaging
+ python-pydantic-2
+ python-ruamel.yaml
+ python-typing-extensions))
+ (native-inputs (list python-deepdiff python-hatchling python-pytest))
+ ;; Source code is not yet published outside of PyPI:
+ ;; https://github.com/pyupio/safety/issues/494
+ (home-page "https://pypi.org/project/safety-schemas/")
+ (synopsis "Schemas for Safety tools")
+ (description "This package contains models and schemas used by Safety.")
+ (license license:expat)))
+
(define-public python-senf
(package
(name "python-senf")
@@ -23131,23 +23185,16 @@ implementation has been adapted, improved, and fixed from Molten.")
(define-public python-shellingham
(package
(name "python-shellingham")
- (version "1.5.1")
+ (version "1.5.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "shellingham" version))
(sha256
- (base32 "0iawv24xx6vhwbhqlxyyg901f8pf6abqyfg0711v1bvlipx83g21"))))
- (build-system python-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "python" "-m" "pytest" "-v")))))))
+ (base32 "1ph46hv920ha9clwxgrllbrphh0ww4v4pjmkbb9mnzj8kmrs1g4d"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest python-pytest-mock))
+ (list python-pytest python-pytest-mock python-setuptools python-wheel))
(home-page "https://github.com/sarugaku/shellingham")
(synopsis "Tool to detect surrounding shell")
(description
@@ -24695,28 +24742,28 @@ JSON) codec.")
(define-public python-nltk
(package
(name "python-nltk")
- (version "3.6.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "nltk" version ".zip"))
- (sha256
- (base32
- "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
- (build-system python-build-system)
+ (version "3.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "nltk" version))
+ (sha256
+ (base32 "0s78gayd45vl1wvpa0a44ydij6ybb7xfar8jz2j8kgg47nyjglc7"))))
+ (build-system pyproject-build-system)
(arguments
- '(;; The tests require some extra resources to be downloaded.
- ;; TODO Try packaging these resources.
- #:tests? #f))
- (propagated-inputs
- (list python-click python-joblib python-regex python-tqdm))
- (native-inputs
- (list unzip))
- (home-page "http://nltk.org/")
+ ;; Tests require some extra resources to be downloaded.
+ ;; TODO Try packaging these resources.
+ '(#:tests? #f))
+ (propagated-inputs (list python-click python-joblib python-regex
+ python-tqdm))
+ (native-inputs (list python-setuptools python-wheel))
+ (home-page "https://www.nltk.org/")
(synopsis "Natural Language Toolkit")
- (description "It provides interfaces to over 50 corpora and lexical
- resources such as WordNet, along with a suite of text processing libraries
- for classification, tokenization, stemming, tagging, parsing, and semantic
- reasoning, wrappers for natural language processing libraries.")
+ (description
+ "NLTK provides interfaces to over 50 corpora and lexical resources such as
+WordNet, along with a suite of text processing libraries for classification,
+tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for
+natural language processing libraries.")
(license license:asl2.0)))
(define-public python-pymongo
@@ -28647,35 +28694,21 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
(define-public python-typer
(package
(name "python-typer")
- (version "0.6.1")
+ (version "0.16.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/tiangolo/typer")
+ (url "https://github.com/fastapi/typer")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1knv353qhkl2imav3jfp6bgq47m8wkkqhq1dzmqg2sv8rsy7zgl7"))))
+ (base32 "1axd3840b2vipfp9l36cnh5ipbsladizmjadgsnpnk502qily7sq"))))
(build-system pyproject-build-system)
(arguments
(list
- #:test-flags
- '(let ((disabled-tests (list "test_show_completion"
- "test_install_completion")))
- (list "-k" (string-append "not "
- (string-join disabled-tests
- " and not "))))
#:phases
#~(modify-phases %standard-phases
- ;; Unfortunately, this doesn't seem to be enough to fix these two
- ;; tests, but we'll patch this anyway.
- (add-after 'unpack 'patch-shell-reference
- (lambda _
- (substitute* "tests/test_completion/test_completion.py"
- (("\"bash\"") (string-append "\"" (which "bash") "\""))
- (("\"/bin/bash\"")
- (string-append "\"" (which "bash") "\"")))))
(add-before 'check 'pre-check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -28683,12 +28716,14 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
;; This is for completion tests
(with-output-to-file "/tmp/.bashrc"
(lambda _ (display "# dummy")))))))))
- (propagated-inputs
- (list python-click))
- (native-inputs
- (list python-coverage python-flit python-pytest python-rich
- python-shellingham))
- (home-page "https://github.com/tiangolo/typer")
+ (propagated-inputs (list python-click
+ python-rich
+ python-shellingham
+ python-typing-extensions))
+ (native-inputs (list python-coverage ; this is required in tests
+ python-pdm-backend
+ python-pytest))
+ (home-page "https://github.com/fastapi/typer")
(synopsis "Typer builds CLI based on Python type hints")
(description
"Typer is a library for building CLI applications. It's based on Python
@@ -34286,19 +34321,16 @@ dates in almost any string formats commonly found on web pages.")
(define-public python-dparse
(package
(name "python-dparse")
- (version "0.5.1")
+ (version "0.6.4")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "dparse" version))
- (sha256
- (base32
- "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
- (build-system python-build-system)
- (native-inputs
- (list python-pytest))
- (propagated-inputs
- (list python-packaging python-pyyaml python-toml))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dparse" version))
+ (sha256
+ (base32 "06i069hij4i53hikrsv332h2ibwfchr42b68hii6rhzdwcwrrclh"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-hatchling python-pytest))
+ (propagated-inputs (list python-packaging python-toml))
(home-page "https://github.com/pyupio/dparse")
(synopsis "Parser for Python dependency files")
(description "This package provides a parser for Python dependency files.")
@@ -34333,31 +34365,55 @@ facility for filtering those results.")
(define-public python-safety
(package
(name "python-safety")
- (version "1.9.0")
+ (version "3.6.0")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "safety" version))
- (sha256
- (base32
- "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
- (build-system python-build-system)
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "safety" version))
+ (sha256
+ (base32 "1qzplv044yfr8w41h0qmjc8lj2admk029azsqbax70wzd4kzh858"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-tests
- (lambda _
- (substitute* "tests/test_safety.py"
- ;; requires network
- (("def test_check_live") "def _test_check_live"))
- #t)))))
- (propagated-inputs
- (list python-click python-dparse python-packaging python-requests))
+ (list
+ #:test-flags
+ #~(list "-k" (string-join
+ ;; test_announcements fails with AssertionError.
+ (list "not test_announcements_if_is_not_tty"
+ ;; Tests below need a network connection.
+ "test_check_live"
+ "test_check_live_cached"
+ "test_get_packages_licenses_without_api_key")
+ " and not "))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'set-home ; some tests run mkdir
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
+ (native-inputs (list nss-certs-for-test python-hatchling python-pytest))
+ (propagated-inputs (list python-authlib
+ python-click
+ python-dparse
+ python-filelock
+ python-httpx
+ python-jinja2
+ python-marshmallow
+ python-nltk
+ python-packaging
+ python-psutil
+ python-pydantic-2
+ python-requests
+ python-ruamel.yaml
+ python-safety-schemas
+ python-tenacity
+ python-tomli
+ python-tomlkit
+ python-typer
+ python-typing-extensions))
(home-page "https://github.com/pyupio/safety")
(synopsis "Check installed dependencies for known vulnerabilities")
- (description "Safety checks installed dependencies for known vulnerabilities.
+ (description
+ "Safety checks installed dependencies for known vulnerabilities.
By default it uses the open Python vulnerability database Safety DB.")
- (license license:expat)))
+ (license license:expat)))
(define-public python-pypandoc
(package
@@ -38807,26 +38863,31 @@ object, which can be useful if you want to force your objects into a table.")
(define-public python-deepdiff
(package
(name "python-deepdiff")
- (version "6.3.0")
+ (version "8.5.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "deepdiff" version))
(sha256
(base32
- "0i5nnb3nppi2vgbhiakpxiagyhx7l1f50hzcl8fcgica4bkz2fva"))))
+ "1l8wvirgif61cqwsqzd3kf8slzlrjnffmqxnrfwxak4dz8lkbpd4"))))
(build-system pyproject-build-system)
- (propagated-inputs (list python-ordered-set))
+ (arguments
+ ;; Ignore Polars test (not packaged).
+ (list #:test-flags #~(list "-k" "not test_polars")))
+ (propagated-inputs (list python-click ; for CLI
+ python-pyyaml ; for CLI
+ python-orderly-set
+ python-orjson)) ; for optimization
(native-inputs
- (list python-click
- python-dateutil
+ (list python-flit-core
python-jsonpickle
- python-mock
python-numpy
+ python-pandas
+ python-pydantic-2
python-pytest
- python-pyyaml
- python-setuptools
- python-wheel
- python-toml))
+ python-pytest-benchmark
+ python-pytz
+ python-tomli-w))
(home-page "https://github.com/seperman/deepdiff")
(synopsis "Deep difference and search of any Python object/data")
(description