diff options
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 8866 |
1 files changed, 5885 insertions, 2981 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index bac90b1e07..41b135586b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1,9 +1,9 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2023 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014, 2017, 2021, 2022 Eric Bavier <bavier@posteo.net> +;;; Copyright © 2014, 2017, 2021, 2022, 2024 Eric Bavier <bavier@posteo.net> ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> @@ -91,7 +91,7 @@ ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de> ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com> ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no> -;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2020, 2021, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2020 EuAndreh <eu@euandre.org> ;;; Copyright © 2021, 2022 Morgan Smith <Morgan.J.Smith@outlook.com> ;;; Copyright © 2021-2024 Sharlatan Hellseher <sharlatanus@gmail.com> @@ -99,7 +99,7 @@ ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name> -;;; Copyright © 2021, 2023 jgart <jgart@dismail.de> +;;; Copyright © 2021, 2023-2024 jgart <jgart@dismail.de> ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr> @@ -116,12 +116,12 @@ ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> ;;; Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org> -;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com> +;;; Copyright © 2022 Evgeny Pisemsky <mail@pisemsky.site> ;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech> ;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io> ;;; Copyright © 2022, 2023 Wamm K. D. <jaft.r@outlook.com> ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> -;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com> ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech> ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com> @@ -144,14 +144,21 @@ ;;; Copyright © 2023 Parnikkapore <poomklao@yahoo.com> ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; Copyright © c4droid <c4droid@foxmail.com> -;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name> ;;; Copyright © 2023, 2024 Troy Figiel <troy@troyfigiel.com> +;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org> ;;; Copyright © 2024 Timothee Mathieu <timothee.mathieu@inria.fr> ;;; Copyright © 2024 Ian Eure <ian@retrospec.tv> ;;; Copyright © 2024 Adriel Dumas--Jondeau <leirda@disroot.org> ;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de> ;;; Copyright © 2024 TakeV <takev@disroot.org> +;;; Copyright © 2024 David Elsing <david.elsing@posteo.net> +;;; Copyright © 2024 Rick Huijzer <ikbenrickhuyzer@gmail.com> +;;; Copyright © 2024 Peter Kannewitz <petre-vps@posteo.net> +;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us@ieee.org> +;;; Copyright © 2024 Evgeny Pisemsky <mail@pisemsky.site> +;;; Copyright © 2024 Markku Korkeala <markku.korkeala@iki.fi> ;;; ;;; This file is part of GNU Guix. ;;; @@ -176,11 +183,14 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages astronomy) #:use-module (gnu packages attr) + #:use-module (gnu packages audio) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages bioinformatics) #:use-module (gnu packages build-tools) + #:use-module (gnu packages certs) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -196,6 +206,7 @@ #:use-module (gnu packages docker) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) + #:use-module (gnu packages emulators) #:use-module (gnu packages enchant) #:use-module (gnu packages file) #:use-module (gnu packages fonts) @@ -247,6 +258,7 @@ #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) @@ -275,6 +287,7 @@ #:use-module (gnu packages textutils) #:use-module (gnu packages time) #:use-module (gnu packages tls) + #:use-module (gnu packages tree-sitter) #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages web) @@ -308,6 +321,13 @@ (sha256 (base32 "0wvs1k71fipn617y9wsdcvwcgg2pd0nvriarlwl4438la4086ppg")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + "--ignore=test/test_plugin_macosx.py" + "-k" (string-append "not test_plugin_mqtt_tls_connect_success" + " and not test_plugin_mqtt_tls_no_verify_success")))) (propagated-inputs (list python-certifi python-click python-dataclasses @@ -318,21 +338,13 @@ (native-inputs (list python-babel python-coverage python-cryptography - python-flake8 python-paho-mqtt python-pytest python-pytest-cov python-pytest-mock python-pytest-xdist + python-setuptools python-wheel)) - (arguments - (list - #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (delete-file "test/test_plugin_macosx.py") - (invoke "pytest"))))))) (home-page "https://github.com/caronc/apprise") (synopsis "Push notification Python library that works with many platforms") @@ -342,18 +354,172 @@ range of notification services, such as Telegram, Discord, Slack, Amazon SNS, Gotify, etc.") (license license:bsd-2))) +(define-public python-archspec + (package + (name "python-archspec") + (version "0.2.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/archspec/archspec") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03yfn4b9xg41pd7vls2cils77wkkb9si1h2qqvnkds661fdankqj")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + ;; Numba needs a writable dir to cache functions. + (add-before 'build 'set-numba-cache-dir + (lambda _ + (setenv "NUMBA_CACHE_DIR" "/tmp")))))) + (propagated-inputs (list python-boltons + python-cooler + python-ctxcore + python-interlap + python-intervaltree + python-jsonschema + python-networkx + python-numba + python-poetry-core + pyscenic + python-scikit-learn + python-tables + python-typing-extensions)) + (native-inputs (list python-black + python-flake8 + python-isort + python-poetry-core + python-pylint + python-pytest + python-pytest-cov)) + (home-page "https://github.com/archspec/archspec") + (synopsis "Library to query system architecture") + (description + "Archspec offers human-readable labels for system architecture aspects. +These aspects include CPU, network fabrics, etc. In addition, it offers +APIs to detect, query, and compare them.") + (license license:expat))) + +(define-public python-asyncstdlib + (package + (name "python-asyncstdlib") + (version "3.13.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "asyncstdlib" version)) + (sha256 + (base32 "0cxms50gygrvp4n4rk5xxhnl6k7nsrhhixdyk6xk70hi9ysgz9pj")))) + (build-system pyproject-build-system) + (native-inputs (list python-flit-core python-pytest)) + (home-page "https://asyncstdlib.readthedocs.io") + (synopsis "Compatibility layer between the Python stdlib and @code{async} +callables") + (description + "The @code{asyncstdlib} library re-implements functions and classes of +the Python standard library to make them compatible with @code{async} +callables, iterables and context managers. It is fully agnostic to +@code{async} event loops and seamlessly works with @code{asyncio}, third-party +libraries such as @code{trio}, as well as any custom @code{async} event +loop.") + (license license:expat))) + +(define-public python-awkward-cpp + (package + (name "python-awkward-cpp") + (version "32") + (source + (origin + (method url-fetch) + (uri (pypi-uri "awkward-cpp" version)) + (sha256 + (base32 "1w11fjkwrian3vll7jhnisl1b6m6rk2rqx0n9d1hzyq6cbw5m35d")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-importlib-resources python-numpy)) + (native-inputs + (list cmake pybind11 python-pytest python-scikit-build-core)) + (home-page "https://github.com/scikit-hep/awkward-1.0") + (synopsis "CPU kernels and compiled extensions for Awkward Array") + (description "Awkward CPP provides precompiled routines for the awkward +package. It is not useful on its own, only as a dependency for awkward.") + (license license:bsd-3))) + +(define-public python-awkward + (package + (name "python-awkward") + (version "2.6.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "awkward" version)) + (sha256 + (base32 "1s280ndr4r2q9qn9c0slan5zw37p41cx8q5z6k6p988afr01c6j8")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; CUDA is and requires proprietary software. + '(list "--ignore-glob=tests-cuda**"))) + (propagated-inputs (list python-awkward-cpp + python-fsspec + python-importlib-metadata + python-numpy + python-packaging + python-typing-extensions)) + (native-inputs + (list python-hatch-fancy-pypi-readme + python-hatchling + python-pytest)) + (home-page "https://github.com/scikit-hep/awkward-1.0") + (synopsis "Manipulate JSON-like data with NumPy-like idioms") + (description "Awkward Array is a library for nested, variable-sized data, +including arbitrary-length lists, records, mixed types, and missing data, +using NumPy-like idioms.") + (license license:bsd-3))) + +(define-public python-jsonpath-ng + (package + (name "python-jsonpath-ng") + (version "1.7.0" ) + (source + (origin + (method url-fetch) + (uri (pypi-uri "jsonpath-ng" version)) + (sha256 + (base32 "0g5bpq02pl9mv7mbqixvnagq8f9v0jab6wqmbxw9rxsz9vyzgxgn")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-ply)) + (home-page "https://github.com/h2non/jsonpath-ng") + (synopsis "JSONPath Next-Generation") + (description + "This package provides a final implementation of @code{JSONPath} for +Python that aims to be standard compliant, including arithmetic and binary +comparison operators, as defined in the original +@url{http://goessner.net/articles/JsonPath/, JSONPath} proposal.") + (license license:asl2.0))) + (define-public python-xmldiff (package (name "python-xmldiff") - (version "2.4") + (version "2.7.0") (source (origin (method url-fetch) (uri (pypi-uri "xmldiff" version)) (sha256 - (base32 "0qygxi3z1jwb0471k7bh5gcqf7wqm4xhrkmwhf36gjgjw46a5gh5")))) + (base32 "18k8kiml9wpl4wf9lmi0j6ys21lbdv8fa8r9qrzdsrh3h0ghp4f0")))) (build-system python-build-system) - (propagated-inputs (list python-lxml python-six)) + (propagated-inputs (list python-lxml)) (home-page "https://github.com/Shoobx/xmldiff") (synopsis "Creates diffs of XML files") (description "This Python tool figures out the differences between two @@ -372,7 +538,8 @@ similar XML files, in the same way the @command{diff} utility does it.") (base32 "04hnrdcf03g1s0x3sr72sh9gnszz6kyfsl9dg8a4n0zvvhn6z5yz")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-cov python-pytest-asyncio)) + (list python-pytest python-pytest-cov python-pytest-asyncio + python-setuptools python-wheel)) (propagated-inputs (list python-typing-extensions)) (home-page "https://github.com/aio-libs/janus/") (synopsis @@ -393,7 +560,7 @@ design}.") (define-public python-jupytext (package (name "python-jupytext") - (version "1.14.4") + (version "1.15.0") (source (origin (method git-fetch) @@ -402,39 +569,35 @@ design}.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "19d443vx597zzxna09qpync9iic3mris80bwm3kd8xaxaq0zq9w4")))) - (build-system python-build-system) + (base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k")))) + (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "--ignore-glob=tests/test_pre_commit_*.py" + "-k" (string-join + (list "not test_create_header_with_set_formats" + "test_pre_commit_hook" + "test_sync_with_pre_commit_hook") + " and not ")) #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (add-before 'check 'pre-check + (lambda _ ;; some tests fail when HOME=/homeless-shelter. (setenv "HOME" "/tmp") ;; OSError: [Errno 18] Invalid cross-device link - (setenv "TMPDIR" "/tmp") - (when tests? - (let ((disabled-tests - (list "test_create_header_with_set_formats" - "test_pre_commit_hook" - "test_sync_with_pre_commit_hook"))) - (invoke "pytest" "-vv" "-k" - (string-append "not " - (string-join disabled-tests - " and not ")))))))))) + (setenv "TMPDIR" "/tmp")))))) (native-inputs - (list git-minimal - pre-commit - python-autopep8 - python-black - python-flake8 + (list git-minimal/pinned python-gitpython - python-isort python-ipython-genutils python-jupyter-server + python-pyaml + python-toml python-pytest - python-pyaml)) + python-setuptools + python-wheel)) (propagated-inputs (list python-markdown-it-py python-mdit-py-plugins @@ -757,16 +920,8 @@ documentation of programming languages.") (base32 "0n8m52vxmlvkj7p5jmd4rfdks65rrp4q4vzak44y6kbg9l5qa6y4")))) (build-system pyproject-build-system) (arguments - (list - #:tests? #false ;there are none - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - ;; We don't have black 23. - (substitute* "pyproject.toml" - (("23.1.0") "22.3.0"))))))) - (propagated-inputs (list python-black python-docspec python-nr-util)) + (list #:tests? #false)) ;there are none + (propagated-inputs (list python-docspec python-nr-util)) (native-inputs (list python-poetry-core)) (home-page "https://github.com/NiklasRosenstein/docspec/") (synopsis "Produce docspec data from Python source code") @@ -775,17 +930,38 @@ documentation of programming languages.") @code{docspec} data from Python source code.") (license license:expat))) +(define-public python-fqdn + (package + (name "python-fqdn") + (version "1.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "fqdn" version)) + (sha256 + (base32 "17yqckhymnamszhg06751c83rg3fnr5iy33a135bazvngrkx6phh")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #false)) ;there are none + (propagated-inputs (list python-cached-property)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/ypcrts/fqdn") + (synopsis "Validate domain names against RFC 1123") + (description + "This package validates fully-qualified domain names against RFC 1123, so +that they are acceptable to modern bowsers") + (license license:mpl2.0))) + (define-public python-fire (package (name "python-fire") - (version "0.5.0") + (version "0.6.0") (source (origin (method url-fetch) (uri (pypi-uri "fire" version)) (sha256 (base32 - "1imc9ais15dz3gmphawql86l9av5dykbp4hz0883k5n8k2gd9c56")))) + "0rmaw26xjndr7makpiqv4h9aav9xf2h280w0khqc1lyddscmpv2l")))) (build-system python-build-system) (arguments '(#:phases @@ -835,6 +1011,7 @@ and variables you'll need already imported and created. (substitute* "setup.py" ((".\\*\"") "\""))))))) (propagated-inputs (list python-numpy python-scipy)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/joachimwolff/fit_nbinom") (synopsis "Negative binomial maximum likelihood estimator") (description "This package provides an implementation in Python using @@ -853,7 +1030,8 @@ scipy and numpy of negative binomial maximum likelihood estimation.") "0523jrzjj29kxpdllmfhrfj9kysi9mphp2m7ippjkn5b07i1g2pd")))) (build-system pyproject-build-system) (propagated-inputs (list python-six)) - (native-inputs (list python-pytest python-pytest-runner)) + (native-inputs (list python-pytest python-pytest-runner + python-setuptools python-wheel)) (home-page "https://github.com/Chilipp/docrep") (synopsis "Python package for docstring repetition") (description "Docrep is the documentation repetition module. This module @@ -891,7 +1069,7 @@ dictionary, can be convert to a dictionary, and is ordered by insertion.") (base32 "058sah2nyg44xq5wxywlzc3abzcv9fifnlvsflwma9mfp01nw0ab")))) (build-system pyproject-build-system) - (native-inputs (list python-poetry-core)) + (native-inputs (list python-poetry-core python-setuptools)) (home-page "https://github.com/pawelzny/dotty_dict") (synopsis "Python library for accessing dictionaries using a dot syntax") (description "This package provides a library that wraps the traditional @@ -931,6 +1109,7 @@ features of the Python's built-in dict.") (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none (propagated-inputs (list python-matplotlib python-numpy)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/Phlya/adjustText") (synopsis "Adjust text position in matplotlib plots to minimize overlaps") (description @@ -984,6 +1163,29 @@ transformation of the plane.") from a docstring rather than the other way around.") (license license:mpl2.0))) +(define-public python-array-api-compat + (package + (name "python-array-api-compat") + (version "1.9.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "array_api_compat" version)) + (sha256 + (base32 "1a4y6ph3gx5fc2q74mkwc239d26b3yvlawc6ifxsay9wr4lbifhp")))) + (build-system pyproject-build-system) + ;; Tests would require all supported array libraries, including pytorch + (arguments (list #:tests? #false)) + (native-inputs + (list python-setuptools python-wheel)) + (propagated-inputs (list python-numpy)) + (home-page "https://data-apis.org/array-api-compat/") + (synopsis "Array API compatibility wrapper for NumPy et al") + (description + "This package provides a wrapper around @code{NumPy} and other array +libraries to make them compatible with the Array API standard") + (license license:expat))) + (define-public python-cachetools (package (name "python-cachetools") @@ -1033,6 +1235,29 @@ It uses a plain-text database, a location-independent library, and features git integration, command-line support, and a curses-based TUI.") (license license:expat))) +(define-public python-colorcet + (package + (name "python-colorcet") + (version "3.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "colorcet" version)) + (sha256 + (base32 "1sx4m5xbz1k8bm8cr2f3x21dip167k7c1nv35npqla52h76v6899")))) + (build-system pyproject-build-system) + (native-inputs (list python-nbval + python-packaging + python-pytest + python-pytest-cov + python-pytest-mpl)) + (home-page "https://colorcet.holoviz.org/") + (synopsis "Collection of perceptually uniform colormaps") + (description "Colorcet is a collection of perceptually accurate 256-color +colormaps for use with Python plotting programs like Bokeh, Matplotlib, +HoloViews, and Datashader.") + (license license:cc-by4.0))) + (define-public python-colored (package (name "python-colored") @@ -1048,6 +1273,7 @@ git integration, command-line support, and a curses-based TUI.") "196ins0m7f90xz5dw764dlx060ziqbcydqzzq40b4ir5858baf3r")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;the tests are not run automatically + (native-inputs (list python-setuptools python-wheel)) (home-page "https://gitlab.com/dslackw/colored") (synopsis "Simple library for color and formatting to terminal") (description "This is a very simple Python library for color and @@ -1070,7 +1296,8 @@ names for 256 color terminal setups.") (base32 "0kyy9qhvrb5m9h8xmri7c88i0k1g5qc7017anw39gx44an7mn33y")))) (build-system pyproject-build-system) (native-inputs - (list python-coverage python-flake8 python-pytest)) + (list python-coverage python-flake8 python-pytest python-setuptools + python-wheel)) (propagated-inputs (list python-colorama)) (home-page "http://github.com/timofurrer/colorful") @@ -1090,6 +1317,7 @@ as functions or string constants to form colored terminal output.") (sha256 (base32 "08bjsmmkihyksms2vgndslln02rvw56lkxz28d39qrnxbg4v1707")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (propagated-inputs (list python-pillow)) (home-page "https://github.com/fengsp/color-thief-py") (synopsis "Grab the color palette of an image") @@ -1126,35 +1354,28 @@ into dataclasses.") (define-public python-contourpy (package (name "python-contourpy") - (version "1.1.0") + (version "1.1.1") (source (origin (method url-fetch) (uri (pypi-uri "contourpy" version)) (sha256 - (base32 "088bhyh6m6q0h637wiq2paqhwn76hqvvbhqwacfx4a1qhv1lcc75")))) + (base32 "1az80zv067rcybm5x93j7rfiakbwiv1h8l58gnki4wjbwb13gfln")))) (build-system pyproject-build-system) (arguments - (list - #:test-flags - ;; All these tests require matplotlib, but matplotlib requires contourpy - ;; now. - '(list "-k" "not test_mypy" - "--ignore=tests/test_config.py" - "--ignore=tests/test_filled.py" - "--ignore=tests/test_lines.py" - "--ignore=tests/test_renderer.py"))) - (propagated-inputs (list python-mypy - python-numpy - python-pillow - python-pytest - python-pytest-cov - python-pytest-xdist - python-selenium - python-sphinx - python-sphinx-copybutton - python-wurlitzer)) - (native-inputs (list meson-python pybind11-2.10 pkg-config)) + ;; Image tests require matplotlib and create a circular dependency. + (list #:test-flags + #~(list "-m" "not image"))) + (propagated-inputs + (list python-numpy)) + (native-inputs + (list cmake-minimal + meson-python + pkg-config + pybind11 + python-pytest + python-pytest-cov + python-wurlitzer)) (home-page "https://contourpy.readthedocs.io/") (synopsis "Python library for calculating contours of 2D quadrilateral grids") @@ -1220,7 +1441,7 @@ that best match text queries.") (define-public python-mdit-py-plugins (package (name "python-mdit-py-plugins") - (version "0.3.1") + (version "0.4.0") (source (origin (method git-fetch) ;for tests (uri (git-reference @@ -1229,7 +1450,7 @@ that best match text queries.") (file-name (git-file-name name version)) (sha256 (base32 - "00ybbfb6dzn9q5qnvnm8bmhd84s215ik7pcdb4r35zhwiv2ikizz")))) + "1790fcf3nd9c5j37fx87x3ivfyihk6l74jxj1qxvw3qfyb96w4k0")))) (build-system pyproject-build-system) (propagated-inputs (list python-markdown-it-py @@ -1278,26 +1499,6 @@ that best match text queries.") "This package implements a Python port of the JavaScript @code{mdurl}.") (license license:expat))) -(define-public python-mrkd - (package - (name "python-mrkd") - (version "0.2.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "mrkd" version)) - (sha256 - (base32 "1bvaqbna1ihb4y2mv9pmvqcq3r9j6lwbbii99dani8lxx4dqqvs5")))) - (build-system python-build-system) - (propagated-inputs - (list python-jinja2 python-mistune python-pygments)) - (home-page "https://pypi.org/project/mrkd/") - (synopsis "Python Markdown implementation") - (description - "@code{mrkd} writes man pages using Markdown, and convert them to Roff or -HTML") - (license license:bsd-3))) - (define-public python-mkdocs (package (name "python-mkdocs") @@ -1376,6 +1577,39 @@ template") variables into the markdown template") (license license:expat))) +(define-public python-docstring-to-markdown + (package + (name "python-docstring-to-markdown") + (version "0.15") + (source + (origin + (method url-fetch) + (uri (pypi-uri "docstring-to-markdown" version)) + (sha256 + (base32 "0gdpabnyl1kyy0cjrnph6xl4fyhgim50a1amsaqq3hahki6i2ip1")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'reduce-test-coverage-since-failing + (lambda _ + (substitute* "setup.cfg" + (("(^.*cov.*$|^.*flake8.*$)") ""))))))) + (native-inputs + (list python-pytest + python-pytest-cov + python-pytest-flake8 + python-setuptools + python-wheel)) + (home-page "https://github.com/python-lsp/docstring-to-markdown") + (synopsis "On the fly conversion of Python docstrings to markdown") + (description + "This module can convert Python docstrings to Markdown. It can recognise +reStructuredText inside docstrings and convert multiple of its features to +Markdown. It also includes initial support for Google-formatted docstrings.") + (license license:lgpl2.1+))) + (define-public python-mysql-connector-python (package (name "python-mysql-connector-python") @@ -1487,7 +1721,8 @@ Specification v2.0 (PEP 249).") (base32 "0gxkw607nrd67ck4w8jri9vfrm5g60qvp8b134m8zkiphbxjnx0l")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-jinja2 python-pygments)) + (native-inputs (list python-pytest python-jinja2 python-pygments + python-setuptools python-wheel)) (arguments (list ;; Some tests fail, presumably because of slight version mismatches of @@ -1560,7 +1795,8 @@ Markdown. All extensions are found under the module namespace of pymdownx.") (arguments (list #:test-flags - '(list "-k" (string-append + '(list "--ignore=pint/testsuite/benchmarks" + "-k" (string-append ;; This test tries to write to $HOME/.cache/pint. "not test_auto" ;; Fails with "Group USCSLengthInternational already @@ -1569,7 +1805,7 @@ Markdown. All extensions are found under the module namespace of pymdownx.") (native-inputs (list python-pytest python-pytest-benchmark python-pytest-cov python-pytest-mpl python-pytest-subtests - python-setuptools-scm)) + python-setuptools python-setuptools-scm python-wheel)) (propagated-inputs (list python-typing-extensions python-uncertainties)) @@ -1594,6 +1830,7 @@ different units.") "1gpy1z2i4vq1mcrhysxahz4339pbl9rzk58rf5m5gf5ym9xji6ii")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/piccolomo/plotext") (synopsis "Plots in the terminal") (description "Plotext lets you plot directly to the terminal.") @@ -1618,6 +1855,70 @@ different units.") scatter plots, histograms and heatmaps in the terminal using braille dots.") (license license:expat))) +(define-public python-poetry-dynamic-versioning + (package + (name "python-poetry-dynamic-versioning") + (version "1.4.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "poetry_dynamic_versioning" version)) + (sha256 + (base32 "19v9jrawbx1nwnwrd6giyzwfq50y2mjzkrsx0ga2sbx2a2yphlbj")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--ignore=tests/test_integration.py" + ;; E RuntimeError: Unable to detect version control system. Not + ;; installed: Git, Mercurial, Darcs, Subversion, Bazaar, Fossil, + ;; Pijul. + "-k" + (string-append + "not test__get_version__defaults" + " and not test__get_version__format_jinja" + " and not test__get_version__format_jinja_with_enforced_style" + " and not test__get_version__format_jinja_imports_with_module_only" + " and not test__get_version__format_jinja_imports_with_module_and_item")))) + (native-inputs + (list python-poetry-core + python-pytest)) + (propagated-inputs + (list poetry + python-dunamai + python-jinja2 + python-tomlkit)) + (home-page "https://github.com/mtkennerly/poetry-dynamic-versioning") + (synopsis "Poetry plugin enabling VCS tags dynamic versioning") + (description + "This package provides a build backend that patches Poetry Core to enable +the versioning system in PEP 517 build frontends.") + (license license:expat))) + +(define-public python-poetry-plugin-export + (package + (name "python-poetry-plugin-export") + (version "1.8.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "poetry_plugin_export" version)) + (sha256 + (base32 "0qgw6w4xaw7cz9ykw376c5hcg9v2k30lnmna6pc9b4ymhn51d9hz")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f)) ;tests cycle with poetry + (native-inputs + (list python-poetry-core)) + (propagated-inputs + (list python-pendulum)) + (home-page "https://python-poetry.org/") + (synopsis "Poetry plugin to export the dependencies to various formats") + (description + "Poetry plugin to export the dependencies to various formats.") + (license license:expat))) + (define-public python-portpicker (package (name "python-portpicker") @@ -1635,7 +1936,8 @@ scatter plots, histograms and heatmaps in the terminal using braille dots.") ;; This fails because portserver ends up in bin, not site-packages '(list "--ignore=src/tests/portserver_test.py"))) (propagated-inputs (list python-psutil)) - (native-inputs (list python-pytest net-tools)) + (native-inputs (list python-pytest python-setuptools python-wheel + net-tools)) (home-page "https://github.com/google/python_portpicker") (synopsis "Choose unique available network ports") (description @@ -1748,6 +2050,8 @@ generator MkDocs.") python-matplotlib python-pandas python-poetry-core + python-setuptools + python-wheel python-pytest)) (home-page "https://github.com/crflynn/skranger") (synopsis "Python bindings for C++ ranger random forests") @@ -1836,6 +2140,24 @@ class.") library.") (license license:expat))) +(define-public python-slicerator + (package + (name "python-slicerator") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "slicerator" version)) + (sha256 + (base32 "0ik0bmh18zgffd9kx53254jp3yyih6zcmd8kfb080xnqbizhl0a4")))) + (build-system pyproject-build-system) + (home-page "https://github.com/soft-matter/slicerator") + (synopsis "Lazy-loading, fancy-sliceable iterable") + (description + "This package provides a lazy-loading, fancy-sliceable iterable. Think +of it like a generator that is \"reusable\" and has a length.") + (license license:bsd-3))) + (define-public python-slixmpp (package (name "python-slixmpp") @@ -1887,27 +2209,32 @@ threads.") (define-public python-tenacity (package (name "python-tenacity") - (version "8.0.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "tenacity" version)) - (sha256 - (base32 - "0bwkvjpjfyi9dgszzad9aww2vc00w3bczjnbifi92cp7wch2l923")))) + (version "9.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tenacity" version)) + (sha256 + (base32 "0fyp421r038naskvyhj90hkq0az96477njad4rhs6annjz53fzw0")))) (build-system pyproject-build-system) (native-inputs - (list python-setuptools-scm python-tornado-6 python-typeguard - python-pytest)) + (list python-pytest + python-setuptools + python-setuptools-scm + python-tornado-6 + python-typeguard + python-wheel)) (home-page "https://github.com/jd/tenacity") (synopsis "Retrying library for python") - (description "Tenacity is a general-purpose python library to simplify the -task of adding retry behavior to just about anything.") + (description + "Tenacity is a general-purpose python library to simplify the task of +adding retry behavior to just about anything.") (license license:asl2.0))) (define-public python-pytelegrambotapi (package (name "python-pytelegrambotapi") - (version "3.7.4") + (version "4.22.0") (source (origin (method git-fetch) @@ -1916,27 +2243,54 @@ task of adding retry behavior to just about anything.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz")))) - (build-system python-build-system) + (base32 "0mic9wk6xg7p2ca7b03fc19l86yc9bkciq7kp8l9xvzzzmg4rzw4")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion "tests" - (invoke "py.test"))) - #t))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "py.test")))))))) (propagated-inputs (list python-requests)) (native-inputs - (list python-pytest)) + (list python-hatchling python-pytest)) (home-page "https://github.com/eternnoir/pyTelegramBotAPI") (synopsis "Python Telegram bot api") (description "This package provides a simple, but extensible Python implementation for the Telegram Bot API.") (license license:gpl2))) +(define-public python-pytoolconfig + (package + (name "python-pytoolconfig") + (version "1.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytoolconfig" version)) + (sha256 + (base32 "1bnvg9yiwp2fn0lvzhp1dd2mvrymxvjnasmbdap3i0hhdwdbvrji")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-packaging + python-platformdirs + python-pydantic + python-sphinx + python-sphinx-autodoc-typehints + python-sphinx-rtd-theme + python-tabulate + python-tomli)) + (native-inputs (list python-pdm-backend python-pytest)) + (home-page "https://pypi.org/project/pytoolconfig/") + (synopsis "Python tool configuration") + (description "The goal of this project is to manage configuration for +Python tools, such as rope and add support for a @file{pyproject.toml} +configuration file.") + (license license:lgpl3+))) + (define-public python-colorlog (package (name "python-colorlog") @@ -1949,13 +2303,14 @@ implementation for the Telegram Bot API.") (base32 "1s7x0v872h8aks8xp01wmv6hzisxqjrh1svbbcycir0980h76krl")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "python" "-m" "pytest"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "-m" "pytest"))))))) (native-inputs (list python-pytest)) (home-page "https://github.com/borntyping/python-colorlog") @@ -1998,11 +2353,12 @@ of a loop structure or other iterative computation.") (arguments (list #:tests? #false)) ;there are none (propagated-inputs (list python-beautifulsoup4 - python-emoji + python-emoji-for-gh-md-to-html python-pillow python-requests python-shellescape python-webcolors)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/phseiff/github-flavored-markdown-to-html/") (synopsis "Github-flavored Markdown") (description @@ -2013,7 +2369,7 @@ Python library and command line interface.") (define-public python-glymur (package (name "python-glymur") - (version "0.12.9") + (version "0.13.6") (source (origin (method git-fetch) ; no tests data in PyPi package @@ -2022,12 +2378,15 @@ Python library and command line interface.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0awyav7071nn9z2g4mmpg33y0y0nfandfr6nr3j5vyb8hnprcmns")))) + (base32 "06v6g0fwzmy2imhrvy0q4zrhrlrp24yhs098vi13r92ga63c72xl")))) (build-system pyproject-build-system) (arguments (list #:test-flags - #~(list "-n" "auto") + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Failing test due to inability of ctypes.util.find_library() + ;; to determine library path, which is patched above. + "--ignore=tests/test_config.py") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-library-locations @@ -2045,17 +2404,13 @@ Python library and command line interface.") (search-input-file inputs "/lib/libtiff.so") "\"\n" " elif libname == \"c\":\n" " path = \"" - (search-input-file inputs "/lib/libc.so.6") "\"\n"))))) - (add-before 'check 'disable-failing-tests - (lambda _ - ;; Failing test due to inability of - ;; ctypes.util.find_library() to determine library path, - ;; which is patched above. - (delete-file "tests/test_config.py")))))) + (search-input-file inputs "/lib/libc.so.6") "\"\n")))))))) (native-inputs (list python-pytest python-pytest-xdist - python-scikit-image)) + python-scikit-image + python-setuptools + python-wheel)) (inputs (list openjpeg ; glymur/lib/openjp2.py libtiff)) ; glymur/lib/tiff.py @@ -2073,13 +2428,13 @@ allows one to read and write JPEG 2000 files") (define-public python-gphoto2 (package (name "python-gphoto2") - (version "2.2.1") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "gphoto2" version)) (sha256 (base32 - "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r")))) + "104yb4g427rqjkaw3i0w30x3sssvmpna802nabjclzq688y7ml4p")))) (build-system python-build-system) (native-inputs (list pkg-config)) @@ -2090,7 +2445,7 @@ allows one to read and write JPEG 2000 files") (description "@code{python-gphoto2} is a comprehensive Python interface (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to automatically generate the interface code.") - (license license:gpl3+))) + (license license:lgpl3+))) (define-public python-colour (package @@ -2132,6 +2487,28 @@ using distutils2-like setup.cfg files for a package's metadata with a distribute/setuptools setup.py script.") (license license:bsd-2))) +(define-public python-rapidfuzz + (package + (name "python-rapidfuzz") + (version "3.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rapidfuzz" version)) + (sha256 + (base32 "1rrx043zqqql31pcp92k61digibymp3l382gaxr4h8717kp0nrim")))) + (build-system pyproject-build-system) + (native-inputs + (list python-packaging + python-pytest + python-scikit-build + python-setuptools)) + (home-page "https://github.com/rapidfuzz/RapidFuzz") + (synopsis "Rapid fuzzy string matching") + (description "RapidFuzz is a fast string matching library for Python and +C++, which is using the string similarity calculations from FuzzyWuzzy.") + (license license:expat))) + (define-public python-rawkit (package (name "python-rawkit") @@ -2176,6 +2553,42 @@ EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.") (license license:bsd-3))) +(define-public python-echo + (package + (name "python-echo") + (version "0.8.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "echo" version)) + (sha256 + (base32 "1hr2kgjmf5gcjbg1mry03ca1dayfwy8mi8as42jfg0apsa3bfvvj")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'start-xorg-server + (lambda _ + ;; The test suite requires a running X server. + (system "Xvfb :99 -screen 0 1024x768x24 &") + (setenv "DISPLAY" ":99.0")))))) + (propagated-inputs + (list python-numpy + python-qtpy + python-pyqt-6)) + (native-inputs + (list python-pytest + python-pytest-cov + python-setuptools-scm + xorg-server-for-tests)) + (home-page "https://github.com/glue-viz/echo") + (synopsis "Callback Properties in Python") + (description + "Echo is a small library for attaching callback functions to property +state changes.") + (license license:expat))) + (define-public python-pymd4c (package (name "python-pymd4c") @@ -2346,7 +2759,7 @@ utilities such as ping(1).") python-click-plugins python-cligj python-numpy - python-setuptools + python-setuptools ; For pkg_resources. python-snuggs)) (native-inputs (list gdal python-boto3 @@ -2355,23 +2768,57 @@ utilities such as ping(1).") python-packaging python-pytest python-pytest-cov - python-shapely)) + python-shapely + python-wheel)) (home-page "https://github.com/rasterio/rasterio") (synopsis "Fast and direct raster I/O for use with Numpy and SciPy") (description "This package implements fast and direct raster I/O for use with Numpy and SciPy.") (license license:bsd-3))) +(define-public python-rich-tables + (package + (name "python-rich-tables") + (version "0.6.1") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/snejus/rich-tables") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1wqr6sldf97ycs4gfvsqhbh1ki2kgsaicsy44g9lspvlda5nfcp1")))) + (build-system pyproject-build-system) + (native-inputs + (list python-freezegun + python-poetry-core + python-pytest + python-pytest-cov)) + (propagated-inputs + (list python-funcy + python-multimethod + python-platformdirs + python-rgbxy + python-rich + python-sqlparse)) + (home-page "https://github.com/snejus/rich-tables") + (synopsis "Ready-made rich tables for various purposes") + (description + "This package implements rich tables for various purposes, it's JSON +human-prettifier based on the @code{rich} Python library.") + (license license:expat))) + (define-public python-shapely (package (name "python-shapely") - (version "2.0.2") + (version "2.0.5") (source (origin (method url-fetch) (uri (pypi-uri "shapely" version)) (sha256 - (base32 "1rs90q4ys5cav0hz1dq72wq2mk4aqlqqbfjrnb2zzfkiq42cq4qp")))) + (base32 "0cpyziixzdj7xqkya4k6fwr0qmrw8k84fsrx6p5sdgw6qxmkdwmz")))) (build-system pyproject-build-system) (arguments (list @@ -2382,12 +2829,12 @@ with Numpy and SciPy.") ;; Cython extensions have to be built before running the tests. (invoke "python" "setup.py" "build_ext" "--inplace")))))) (native-inputs - (list python-cython python-matplotlib python-pytest)) + (list python-cython python-matplotlib python-pytest python-setuptools python-wheel)) (inputs (list geos)) (propagated-inputs (list python-numpy)) - (home-page "https://github.com/Toblerity/Shapely") + (home-page "https://github.com/shapely/shapely") (synopsis "Library for the manipulation and analysis of geometric objects") (description "Shapely is a Python package for manipulation and analysis of planar geometric objects. It is based on the @code{GEOS} library.") @@ -2668,7 +3115,9 @@ NetCDF files can also be read and modified. Python-HDF4 is a fork of (native-inputs (list python-netcdf4 python-pytest - python-setuptools-scm)) + python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs (list python-h5py python-packaging)) (home-page "https://h5netcdf.org") @@ -2723,7 +3172,7 @@ concepts.") (base32 "11pgxsqap9l7jsf52649q9mpj8a0w6p9im929lpr9s26ynnnn6ks")))) (build-system pyproject-build-system) (propagated-inputs (list python-h5py python-numpy)) - (native-inputs (list python-nose)) + (native-inputs (list python-nose python-setuptools python-wheel)) (home-page "https://github.com/frejanordsiek/hdf5storage") (synopsis "Read and write Python data types from and to HDF5 files") (description @@ -2753,6 +3202,7 @@ untrusted sources, pickling is avoided in this package.") (base32 "1qfqnhvfx5mm7bdajjnnagmvns1zxyksjzh3k5la2ag6a8bp5gki")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/hjson/hjson-py") (synopsis "Python package to parse HJSON documents") (description "This package provides a Python library and a command-line @@ -2842,10 +3292,10 @@ Unicode-to-LaTeX conversion.") #:test-flags '(list "-k" "not test_load_config_target_version"))) (propagated-inputs - (list python-black python-lsp-server python-tomli)) + (list python-black python-lsp-server python-toml python-tomli)) (native-inputs (list python-flake8 python-isort python-mypy python-pytest - python-pytest-runner)) + python-pytest-runner python-setuptools python-wheel)) (home-page "https://github.com/rupert/pyls-black") (synopsis "Black plugin for the Python Language Server") (description "Black plugin for the Python Language Server.") @@ -3010,7 +3460,7 @@ and lookups.") (base32 "0lvshl2fhwa568d3y3vmx45hdp8gk5w9yl3b2q5d66r5vqn1sfwl")))) (build-system pyproject-build-system) (native-inputs - (list python-setuptools-scm python-pytest)) + (list python-setuptools-scm python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-boolean.py)) (home-page "https://github.com/nexB/license-expression") @@ -3046,7 +3496,7 @@ conventions and aliases in the same expression.") (("os\\.environ\\.get\\('WAND_MAGICK_LIBRARY_SUFFIX'\\)") "\".Q16\""))))))) (native-inputs - (list python-pytest)) + (list python-setuptools python-pytest python-wheel)) (inputs (list imagemagick)) (home-page "https://docs.wand-py.org/") @@ -3104,35 +3554,26 @@ Python's built-in @code{re} module with compatible interfaces.") (define-public python-filelock (package (name "python-filelock") - (version "3.0.12") - (source - (origin - (method url-fetch) - (uri (pypi-uri "filelock" version)) - (sha256 - (base32 - "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q")))) - (build-system python-build-system) - (home-page "https://github.com/tox-dev/py-filelock") - (synopsis "Platform independent file lock") - (description "@code{filelock} contains a single module implementing -a platform independent file lock in Python, which provides a simple way of -inter-process communication.") - (license license:unlicense))) - -(define-public python-filelock-3.5 - (package - (name "python-filelock") - (version "3.5.0") + (version "3.16.1") (source (origin (method url-fetch) (uri (pypi-uri "filelock" version)) (sha256 (base32 - "058av1r760ws7z6qffsjpqa39fmdxw0s1wnyr7p50y3zclg6cyqk")))) + "0d8ljvmsfgriiqf5dqii91gfcpj7cpjrh8fnsvifaiyvspygnjf2")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-setuptools-scm)) + (arguments + (list + ;; Break cycle with virtualenv. + #:test-flags #~(list "--ignore=tests/test_virtualenv.py"))) + (native-inputs + (list python-hatch-vcs + python-hatchling + python-pytest + python-pytest-asyncio + python-pytest-mock + python-setuptools-scm)) (home-page "https://github.com/tox-dev/py-filelock") (synopsis "Platform independent file lock") (description "@code{filelock} contains a single module implementing @@ -3368,6 +3809,32 @@ metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant} class.") (license license:bsd-3))) +(define-public python-calver + (package + (name "python-calver") + (version "2022.06.26") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/di/calver") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14l9kv9igcmp5k6d2ahnx6z4dn6zy5kykz95hkh0rkqswn8x79b1")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pretend + python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/di/calver") + (synopsis "Setuptools extension for CalVer package versions") + (description + "The calver package is a setuptools extension for automatically defining +your Python package version as a calendar version.") + (license license:asl2.0))) + (define-public python-can (package (name "python-can") @@ -3393,7 +3860,8 @@ class.") ;; These tests fail with "OSError: [Errno 19] No such device". "-k" "not BasicTestUdpMulticastBusIPv"))) (propagated-inputs - (list python-msgpack python-typing-extensions python-wrapt)) + (list python-msgpack python-typing-extensions python-wrapt + python-setuptools)) (native-inputs (list ;; python-canalystii ; Not packed yet python-codecov @@ -3406,7 +3874,8 @@ class.") python-pytest python-pytest-cov python-pytest-runner - python-pytest-timeout)) + python-pytest-timeout + python-wheel)) (home-page "https://github.com/hardbyte/python-can") (synopsis "Controller Area Network (CAN) interface module for Python") (description "This package defines the @code{can} module, which provides @@ -3541,6 +4010,7 @@ a library.") (base32 "1920wbh2b7a8qn7zx2iiqbcdaax335l81a73x9pp8h11yzs2jdmh")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;There are none + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/gvalkov/optparse-pretty") (synopsis "Compact help formatter for optparse") (description @@ -3569,7 +4039,7 @@ help formatter.") (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'prepare-python-module 'build-python-module + (add-after 'build 'build-python-module (assoc-ref py:%standard-phases 'build)) (add-after 'build-python-module 'install-python-module (assoc-ref py:%standard-phases 'install))) @@ -3608,6 +4078,25 @@ dataclass, datetime, numpy, and UUID instances natively.") ;; Either of these licenses (license (list license:asl2.0 license:expat)))) +(define-public python-overrides + (package + (name "python-overrides") + (version "7.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "overrides" version)) + (sha256 + (base32 "02l2j5pnsxn0q5i63is5g6i3q06ri83nf7lv55swr61vv6iqy5am")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/mkorpela/overrides") + (synopsis "Decorator to detect mismatch when overriding a method") + (description + "This package provides a decorator to automatically detect mismatch when +overriding a method.") + (license license:asl2.0))) + (define-public python-argparse-addons (package (name "python-argparse-addons") @@ -3751,6 +4240,7 @@ for additional processing.") ;; XXX: Fails with: "In procedure utime: No such file ;; or directory". (delete 'ensure-no-mtimes-pre-1980)))) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/fastai/fastprogress") (synopsis "Progress bar for Jupyter Notebook and console") (description @@ -3984,6 +4474,8 @@ of @code{xmlfile}.") python-pytest python-pytest-rerunfailures python-pytest-xdist + python-setuptools + python-wheel unzip (origin (method url-fetch) @@ -4000,7 +4492,7 @@ server.") (define-public python-openpyxl (package (name "python-openpyxl") - (version "3.0.9") + (version "3.1.5") (source (origin ;; We use the upstream repository, as the tests are not included in the @@ -4011,14 +4503,13 @@ server.") (changeset version))) (file-name (string-append name "-" version "-checkout")) (sha256 - (base32 "1p8xvc2gjw6zyzbd7qdvc3x178sm00ymrbyh9539l4fpzgxh0j9c")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest")))))) - (native-inputs (list python-lxml python-pillow python-pytest)) + (base32 "17z6rrvv3q1axy9r13c2hln2pazfn9n5bhkzrbjcjakgbfjl6mss")))) + (build-system pyproject-build-system) + (native-inputs (list python-lxml + python-pillow + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-et-xmlfile python-jdcal)) (home-page "https://openpyxl.readthedocs.io") (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files") @@ -4031,44 +4522,44 @@ standard.") (define-public python-eventlet (package (name "python-eventlet") - (version "0.33.3") + (version "0.35.2") (source (origin (method url-fetch) (uri (pypi-uri "eventlet" version)) (sha256 (base32 - "1nngffz21afhfi266smf4s5mn5dfd0ykdnirfls9bwnzxbkh6a3j")))) - (build-system python-build-system) + "0zd59yqqb2lzg3f9lkd3yw1wanwy5wkis3n6d826m0bz1gi664ld")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-dnspython python-greenlet python-six)) + (list python-dnspython python-greenlet python-monotonic)) (native-inputs - (list python-nose)) + (list python-black + python-hatchling + python-hatch-vcs + python-pytest + python-isort + python-twine)) (arguments - '(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "-k" + (string-append + "not TestGetaddrinfo" + " and not TestProxyResolver" + " and not test_noraise_dns_tcp" + " and not test_raise_dns_tcp" + " and not test_hosts_no_network" + " and not test_patcher_existing_locks" + " and not test_dns_methods_are_green")) + #:phases + '(modify-phases %standard-phases (add-after 'unpack 'avoid-OSError (lambda _ ;; If eventlet tries to load greendns, an OSError is thrown when ;; getprotobyname is called. Thankfully there is an environment ;; variable to disable the greendns import, so use it: - (setenv "EVENTLET_NO_GREENDNS" "yes"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke - "nosetests" - "-v" "tests/" - "-I" "greendns_test.py" - "-I" "socket_test.py" - "-e" "test_018b_http_10_keepalive_framing" - ;; The following two tests fail with Python 3.10. See - ;; <https://github.com/eventlet/eventlet/issues/730>. - "-e" "test_patcher_existing_locks_locked" - ;; And see <https://github.com/eventlet/eventlet/issues/739>. - "-e" "test_017_ssl_zeroreturnerror" - ;; This test is failing on some architectures - "-e" "test_fork_after_monkey_patch"))))))) + (setenv "EVENTLET_NO_GREENDNS" "yes")))))) (home-page "https://eventlet.net") (synopsis "Concurrent networking library for Python") (description @@ -4264,6 +4755,36 @@ videos in a notebook.") audio playback capability for Python 3 on OSX, Windows, and Linux.") (license license:expat))) ; MIT license +(define-public python-wavefile + (package + (name "python-wavefile") + (version "1.6.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "wavefile" version)) + (sha256 + (base32 + "04mdcxq7n1vnwb9y65j0cwpy91ik5rh9vki1f45xqnh4ygz91n75")))) + (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-libsndfile-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "wavefile/libsndfile.py" + (("'libsndfile") + (string-append "'" (assoc-ref inputs "libsndfile") + "/lib/libsndfile")))))))) + (inputs + (list libsndfile portaudio)) + (propagated-inputs (list python-numpy python-pyaudio)) + (home-page "https://github.com/vokimon/python-wavefile") + (synopsis "Pythonic audio file reader and writer") + (description + "This package provides pythonic libsndfile wrapper to read and write audio +files.") + (license license:gpl3+))) + (define-public python-jsonalias (package (name "python-jsonalias") @@ -4314,14 +4835,15 @@ Python.") (native-inputs (list python-attrs python-coverage - python-pre-commit python-pycodestyle python-pydantic python-pytest python-pytest-subtests python-responses python-tox - python-types-requests)) + python-types-requests + python-setuptools + python-wheel)) (home-page "https://github.com/omni-us/jsonargparse/") (synopsis "Implement minimal boilerplate CLIs derived from type hints") (description @@ -4330,6 +4852,30 @@ type hints and parse from command line, config files and environment variables.") (license license:expat))) +(define-public python-pymarshal + (package + (name "python-pymarshal") + (version "2.2.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "pymarshal" version)) + (sha256 + (base32 + "1lhb7yim60pvclbd440zd4n50xs1d2rvmnrhhvib3hyv0dxil5j3")))) + (build-system pyproject-build-system) + (arguments + ;; Test fails with this error: + ;; "CovReportWarning: Failed to generate report: No data to report." + (list #:tests? #f)) + (native-inputs + (list python-pytest python-pytest-cov)) + (propagated-inputs (list python-bson python-pyyaml)) + (home-page "https://gitlab.com/d3v-t00lz/pymarshal") + (synopsis "Pythonic implementation of Golang struct (un)marshalling") + (description "PyMarshal replicates the feature of (un)marshalling structs +in Golang.") + (license license:bsd-2))) + (define-public python-simplejson (package (name "python-simplejson") @@ -4526,7 +5072,7 @@ commands.") (base32 "1a4h0jpsr3wjciqg9a5kslxv65d3qqgmqgkpai4cl77wlpcxfk89")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://jiffyclub.github.io/palettable/") (synopsis "Color palettes for Python") (description "Palettable (formerly brewer2mpl) is a library of color @@ -4546,16 +5092,13 @@ matplotlib plots or supply colors for a web application.") (sha256 (base32 "07smqnzc9km7sbvxfyx4gdm9njrx58x8grdw6gs4gva81rk3rd10")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-c" "/dev/null"))))))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-pytest-html + python-setuptools + python-wheel)) (propagated-inputs (list python-six python-parse)) - (native-inputs (list python-pytest)) (home-page "https://github.com/jenisys/parse_type") (synopsis "Extended parse module") (description "Parse_type extends the python parse module.") @@ -4607,7 +5150,8 @@ syntax.") (string-append "not test_sending_empty_netstring" " and not test_sending_one_netstring" " and not test_sending_two_netstrings")))) - (native-inputs (list python-pytest python-twisted)) + (native-inputs (list python-pytest python-twisted python-setuptools + python-wheel)) (home-page "https://launchpad.net/parsley") (synopsis "Parsing and pattern matching Python library") (description @@ -4730,8 +5274,11 @@ Cython for speed.") " and not test_thick_lines[png]" " and not test_weaklensing[png]" " and not test_wordy[png]")))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-matplotlib python-numpy)) - (native-inputs (list python-pytest)) (home-page "https://docs.daft-pgm.org/") (synopsis "PGM rendering library") (description "Daft is a Python package that uses matplotlib to @@ -4758,7 +5305,9 @@ PDF, PNG, EPS and SVG).") python-pytest-cov python-pytest-mypy python-pytest-timeout - python-redis)) + python-redis + python-setuptools + python-wheel)) (home-page "https://github.com/WoLpH/portalocker") (synopsis "Python library for file locking") (description "Portalocker is a library to provide an easy API to file @@ -4786,77 +5335,55 @@ user configuration files. It does not have support for serializing into YAML and is not compatible with JSON.") (license license:expat))) -(define-public python-exceptiongroup +(define-public python-extension-helpers (package - (name "python-exceptiongroup") + (name "python-extension-helpers") (version "1.1.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/agronholm/exceptiongroup") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0wcvzwgjs0xmggs6dh92jxdqi988gafzh10hrzvw10kasy0xakfj")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) ; no tests in the PyPI tarball + (uri (git-reference + (url "https://github.com/astropy/extension-helpers") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lkhypg21ydx03z03dppbf05zff40dyl0kn6nichzfdfpqnr5055")))) + (build-system pyproject-build-system) (arguments (list - #:tests? #f ;TODO: Circular dependency on pytest + ;; It tries to install it via pip: E ModuleNotFoundError: No module named + ;; 'helpers_test_package_fd9cc3a9_11fa_4a1a_b80e_c5b043949604' + #:test-flags #~(list "-k" "not test_only_pyproject[True]") #:phases #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build/install procedures copied from - ;; python-isort. - (replace 'build + ;; LookupError: setuptools-scm was unable to detect version for + ;; /tmp/guix-build-python-extension-helpers-1.1.1.drv-0/source. + (add-before 'build 'set-version (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version) - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (lambda* (#:key tests? test-flags #:allow-other-keys) (when tests? - (invoke "pytest" "-vv" "tests"))))))) - (native-inputs (list python-flit-scm python-pypa-build)) - (home-page "https://github.com/agronholm/exceptiongroup") - (synopsis "PEP 654 backport from Python 3.11") - (description "This is a backport of the @code{BaseExceptionGroup} and -@code{ExceptionGroup} classes from Python 3.11.") - (license license:expat))) - -(define-public python-extension-helpers -(package - (name "python-extension-helpers") - (version "1.0.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "extension-helpers" version)) - (sha256 - (base32 "1rjha07ds633fb81hn3i2yzk3v2flbi6qa091ix4mkvrgk3gl6ya")))) - (build-system pyproject-build-system) - ;; FIXME: pytest failed to load test suit, find out why. - ;; - _pytest.pathlib.ImportPathMismatchError: ('extension_helpers.conftes - (arguments (list #:tests? #f)) - (native-inputs - (list python-coverage - python-pytest - python-pytest-astropy - python-pytest-cov - python-setuptools-scm)) - (home-page "https://extension-helpers.readthedocs.io") - (synopsis "Astropy ecosystem utilities for building and installing packages") - (description - "The extension-helpers package includes convenience helpers to assist with -building Python packages with compiled C/Cython extensions. It is developed by -the Astropy project but is intended to be general and usable by any Python -package.") - (license license:bsd-3))) + (setenv "HOME" "/tmp") + (with-directory-excursion "/tmp" + (apply invoke "pytest" "-v" test-flags)))))))) + (native-inputs + (list python-pytest + python-pytest-astropy + python-pytest-cov + python-setuptools-scm + python-tomli + python-setuptools + python-wheel + python-pip)) + (home-page "https://extension-helpers.readthedocs.io") + (synopsis "Astropy ecosystem utilities for building and installing packages") + (description + "The extension-helpers package includes convenience helpers to assist +with building Python packages with compiled C/Cython extensions. It is +developed by the Astropy project but is intended to be general and usable by +any Python package.") + (license license:bsd-3))) (define-public python-extras (package @@ -4959,7 +5486,7 @@ server.") python-six)) (native-inputs (list python-matplotlib)) (home-page "https://github.com/craffel/mir_eval") - (synopsis "Common metrics for common audio/music processing tasks.") + (synopsis "Common metrics for common audio/music processing tasks") (description "This is a Python library for computing common heuristic accuracy scores for various music/audio information retrieval/signal processing tasks.") @@ -5058,6 +5585,8 @@ port forwards using @acronym{UPnP, Universal Plug and Play}.") (home-page "http://miniupnp.free.fr") (license license:bsd-3))) +;; NOTE: As taken from upstram: "this library is in maintenance mode and +;; should not be used in new code." (define-public python-py (package (name "python-py") @@ -5069,15 +5598,13 @@ port forwards using @acronym{UPnP, Universal Plug and Play}.") (sha256 (base32 "06c7m7sfcn7587xd4s2bng8m6q1gsfd3j93afhplfjq74r0mrisi")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - ;; FIXME: "ImportError: 'test' module incorrectly imported from - ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'. - ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'. - ;; Is this module globally installed?" - '(#:tests? #f)) + '(#:tests? #f)) ;cycle with python-pytest (native-inputs - (list python-setuptools-scm)) + (list python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/pytest-dev/py") (synopsis "Python library for parsing, I/O, instrospection, and logging") (description @@ -5181,13 +5708,13 @@ structure is left untouched.") (define-public python-exif-read (package (name "python-exif-read") - (version "2.1.2") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "ExifRead" version)) (sha256 (base32 - "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr")))) + "191c7sa0rca8wkspfq8nlfa6davh743mqkzrcayz5gcx2rja7i8a")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; no tests (home-page "https://github.com/ianare/exif-py") @@ -5200,18 +5727,19 @@ files.") (define-public python-pyld (package (name "python-pyld") - (version "1.0.5") - (source (origin - (method url-fetch) - (uri (pypi-uri "PyLD" version)) - (sha256 - (base32 - "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff")))) + (version "2.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "PyLD" version)) + (sha256 + (base32 "1k7ars8n6kramkvadxgy0qfsi5g1hipyha4wqw8l75mw1l7ka7ii")))) (build-system python-build-system) + (native-inputs (list python-lxml)) + (propagated-inputs (list python-cachetools python-frozendict)) (home-page "https://github.com/digitalbazaar/pyld") (synopsis "Python implementation of the JSON-LD specification") - (description - "PyLD is an implementation of the JSON-LD specification.") + (description "PyLD is an implementation of the JSON-LD specification.") (license license:bsd-3))) (define-public python-cli-helpers @@ -5342,12 +5870,14 @@ clickgen is using @code{anicursorgen} and @code{xcursorgen} under the hood.") python-orjson python-pandas python-pytz + python-setuptools ; For pkg_resources. python-sqlalchemy python-urllib3 python-zstandard)) (native-inputs (list python-cython - python-pytest)) + python-pytest + python-wheel)) (home-page "https://github.com/ClickHouse/clickhouse-connect") (synopsis "ClickHouse database core driver for Python, Pandas, and Superset") @@ -5392,7 +5922,7 @@ well-tested and interoperable CLIs for handling GeoJSON.") "05c6cjpnf9s72gyn5dckxbmd8rf2kgdzfsl7pqzrnc1lcdl13zmv")))) (build-system pyproject-build-system) (propagated-inputs (list python-click)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/janLuke/cloup") (synopsis "Extension library for python-click") (description @@ -5484,7 +6014,9 @@ compare, diff, and patch JSON and JSON-like structures in Python.") python-coveralls python-pytest python-pytest-cov - python-tox)) + python-setuptools + python-tox + python-wheel)) (propagated-inputs (list python-pyparsing)) (home-page "https://github.com/shinichi-takii/ddlparse") (synopsis "Parses and converts DDL to BigQuery JSON schema") @@ -5495,43 +6027,50 @@ and convert DDL to BigQuery JSON schema.") (define-public python-jsonschema (package (name "python-jsonschema") - ;; XXX: Update to the latest version requires new build system - Hatch - ;; https://hatch.pypa.io/ - (version "4.5.1") + (version "4.23.0") (source (origin (method url-fetch) (uri (pypi-uri "jsonschema" version)) (sha256 - (base32 "1z0x22691jva7lwfcfh377jdmlz68zhiawxzl53k631l34k8hvbw")))) + (base32 "1i3b4sckkc3v8vckqa11xbrj695qzrzsfzrkclra6lb3ybz9f56p")))) (build-system pyproject-build-system) (arguments (list #: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'. + (add-before 'check 'pre-check (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "JSON_SCHEMA_TEST_SUITE" "json") - (invoke "trial" "jsonschema"))))))) - (native-inputs (list python-setuptools-scm python-twisted)) + (setenv "JSON_SCHEMA_TEST_SUITE" "json")))))) + (native-inputs + (list python-hatchling + python-hatch-fancy-pypi-readme + python-hatch-vcs + ;; For <tests/test_cli.py::TestCLIIntegration::test_license>. + python-pip + python-pytest)) (propagated-inputs (list python-attrs - python-importlib-metadata - python-pyrsistent - python-typing-extensions)) + python-fqdn + python-idna + python-importlib-resources + python-isoduration + python-jsonpointer + python-jsonschema-specifications + python-rfc3339-validator + python-rfc3986-validator + python-referencing-bootstrap + python-rpds-py + python-uri-template + python-webcolors)) (home-page "https://github.com/Julian/jsonschema") (synopsis "Implementation of JSON Schema for Python") (description "Jsonschema is an implementation of JSON Schema for Python.") (license license:expat))) +;; For docker-compose 1.29.2, remove when its updated to the latest 2.x +;; version. (define-public python-jsonschema-3 (package (inherit python-jsonschema) @@ -5544,11 +6083,73 @@ and convert DDL to BigQuery JSON schema.") "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68")))) (arguments (substitute-keyword-arguments (package-arguments python-jsonschema) - ((#:phases phases) - #~(modify-phases #$phases - (replace 'pretend-version - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))))) + ((#:tests? _ #t) #f))) + (propagated-inputs + (list python-attrs + python-importlib-metadata + python-pyrsistent + python-typing-extensions)) + (native-inputs + (list python-setuptools-scm python-twisted + python-setuptools python-wheel)))) + +(define-public python-jsonschema-path + (package + (name "python-jsonschema-path") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jsonschema_path" version)) + (sha256 + (base32 "129rb8y2bj2wwps8vs3z1qav006k7wz2myx5j6dnxqs1yfmsn3ad")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #false ;there are none + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "pyproject.toml" + (("referencing = \">=0.28.0,<0.32.0\"") + "referencing = \">=0.28.0\""))))))) + (propagated-inputs (list python-pathable python-pyyaml python-referencing + python-requests)) + (native-inputs (list python-poetry-core)) + (home-page "https://github.com/p1c2u/jsonschema-path") + (synopsis "JSONSchema Spec with object-oriented paths") + (description "This package implements object-oriented JSONSchema. It lets +you traverse a schema like paths and access a schema on demand with separate +dereferencing accessor layer.") + (license license:asl2.0))) + +(define-public python-jsonschema-specifications + (package + (name "python-jsonschema-specifications") + (version "2024.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jsonschema_specifications" version)) + (sha256 + (base32 "0wp2g90jsaa48g1v0n6m43ywhh9cj1ig19q25lay334m74vbhf0g")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatch-vcs + python-hatchling + python-pytest)) + (propagated-inputs + (list python-importlib-resources + python-referencing-bootstrap)) + (home-page "https://github.com/python-jsonschema/jsonschema-specifications") + (synopsis + "JSON Schema meta-schemas and vocabularies, exposed as a Registry") + (description + "This package provides JSON support files from the JSON Schema +Specifications (metaschemas, vocabularies, etc.), packaged for runtime access +from Python as a referencing-based Schema Registry.") + (license license:expat))) (define-public python-schema (package @@ -5660,14 +6261,15 @@ Capabilities include: (define-public python-unidecode (package (name "python-unidecode") - (version "1.1.1") + (version "1.3.8") (source (origin (method url-fetch) (uri (pypi-uri "Unidecode" version)) (sha256 (base32 - "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib")))) - (build-system python-build-system) + "1x620s4dk4d501pivhlfzbi2d1r5fnm9cssqwkn76f7d8sfk9nyg")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://pypi.org/project/Unidecode/") (synopsis "ASCII transliterations of Unicode text") (description @@ -5723,7 +6325,9 @@ memory usage and transliteration quality.") python-cryptography python-pytest python-sphinx - python-sphinx-rtd-theme)) + python-sphinx-rtd-theme + python-setuptools + python-wheel)) (home-page "https://github.com/progrium/pyjwt") (synopsis "JSON Web Token implementation in Python") (description @@ -5805,15 +6409,18 @@ visualisation and class tracker statistics.") (define-public python-itsdangerous (package (name "python-itsdangerous") - (version "2.0.1") + (version "2.2.0") (source (origin (method url-fetch) (uri (pypi-uri "itsdangerous" version)) (sha256 - (base32 - "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly")))) - (build-system python-build-system) + (base32 "0wv1bwzbfvpsh4ng5gn4d4mjwvjwpg7w0jgiz8zsbvm1gl5hq1g0")))) + (build-system pyproject-build-system) + (native-inputs + (list python-flit-core + python-freezegun + python-pytest)) (home-page "https://palletsprojects.com/p/itsdangerous/") (synopsis "Python library for passing data to/from untrusted environments") (description @@ -5821,17 +6428,18 @@ visualisation and class tracker statistics.") environments and back.") (license license:bsd-3))) +;; WARNING: This package is a dependency of mesa. (define-public python-pyyaml (package (name "python-pyyaml") - (version "6.0") + (version "6.0.1") (source (origin (method url-fetch) (uri (pypi-uri "PyYAML" version)) (sha256 (base32 - "18imkjacvpxfgg1lbpraqywx3j7hr5dv99d242byqvrh2jf53yv8")))) + "0hsa7g6ddynifrwdgadqcx80khhblfy94slzpbr7birn2w5ldpxz")))) (build-system python-build-system) (inputs (list libyaml python-cython)) @@ -5868,7 +6476,7 @@ provides Python-specific tags that represent an arbitrary Python object.") (base32 "1q31krwxdvwawdn1kfqmpplix31d4jhs0qng26908hawsf0yjqlb")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-case)) + (list python-pytest python-case python-setuptools python-wheel)) (home-page "https://github.com/celery/vine") (synopsis "Promises for Python") (description @@ -5970,7 +6578,7 @@ work on your part.") (base32 "17f55gi55rg47nm88fn3f8851ph03dgykdp011lxr3j6hk18lyfv")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/tsutsu3/uc.micro-py") (synopsis "Unicode data files for linkify-it-py projects") (description "This package contains a micro subset of Unicode data files @@ -5992,7 +6600,7 @@ for linkify-it-py projects.") "0fg0a1lc8xbb62y9krxcp708ll58dxcwm8i7rrwpkd5sh2229f6x")))) (build-system pyproject-build-system) (propagated-inputs (list python-uc-micro-py)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/tsutsu3/linkify-it-py") (synopsis "Links recognition library with full Unicode support") (description "This is Python port of @@ -6017,7 +6625,7 @@ recognition library with full Unicode support. It has features like: "19a8dga8rnmjn5gy1cy1wdi28swbkdkypwbqikbxil6ynqcg3c20")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-setuptools-scm)) + (list python-pytest python-setuptools python-setuptools-scm python-wheel)) (home-page "https://github.com/smarie/python-makefun") (synopsis "Library to dynamically create python functions") (description "@code{makefun} helps create functions dynamically with a @@ -6028,19 +6636,26 @@ given signature. It was largely inspired by @code{python-decorator} and (define-public python-markdown-it-py (package (name "python-markdown-it-py") - (version "2.1.0") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "markdown-it-py" version)) (sha256 (base32 - "1nh75i72584r70alhqc479gys04s5m5g3vq601yf2njbs7z5jzng")))) + "1swgvyiavak0nmfb31lq5zck5chwhmyf6qb6qwpcav86zaa0mxp3")))) (build-system pyproject-build-system) (arguments (list #:tests? #f)) ;pypi source does not contains tests - (native-inputs (list python-flit)) + (native-inputs (list python-flit-core)) (propagated-inputs - (list python-mdurl - python-typing-extensions)) + (list python-commonmark + python-linkify-it-py + python-markdown + python-mdurl + python-mistletoe + python-mistune + python-panflute + python-psutil + python-pyyaml)) (home-page "https://github.com/executablebooks/markdown-it-py") (synopsis "Python port of markdown-it") (description @@ -6077,27 +6692,18 @@ possible.") for Python.") (license license:bsd-3))) - (define-public python-jinja2 (package (name "python-jinja2") - (version "3.1.1") + (version "3.1.2") (source (origin (method url-fetch) (uri (pypi-uri "Jinja2" version)) (sha256 - (base32 - "1saawzys14l1p4kafs7hkihmnvqjq8fwxjmkjiqx3jq1nm5ys2v4")))) - (build-system python-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-vv") - (format #t "test suite not run~%"))))))) - (native-inputs (list python-pytest)) + (base32 "0lp86yadzf8dph67f6g3yxmvnhrzzi863z58jmsrx2j059q1ld9i")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-markupsafe)) (home-page "https://jinja.palletsprojects.com/") (synopsis "Python template engine") @@ -6106,7 +6712,6 @@ for Python.") written in pure Python.") (license license:bsd-3))) - (define-public python-jinja2-time (package (name "python-jinja2-time") @@ -6146,18 +6751,13 @@ templates. A format string can be provided to control the output.") (build-system pyproject-build-system) (arguments (list + #:test-flags '(list "pypugjs/testsuite/") #:phases #~(modify-phases %standard-phases - ;; Our pyramid is outdated and pyramid-mako is not packaged. (add-after 'unpack 'disable-pyramid - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "setup.py" - (("'pyramid") - "#'pyramid")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "pytest" "-v" - "pypugjs/testsuite/"))))))) + (lambda _ + ;; pyramid is outdated and pyramid-mako is unpackaged. + (substitute* "setup.cfg" + (("'(pyramid|pyramid-mako)[^']*',") ""))))))) (native-inputs (list python-coverage python-django python-jinja2 @@ -6293,19 +6893,22 @@ bookmarks using a declarative input in the form of a markdown file.") (define-public python-joblib (package (name "python-joblib") - (version "1.3.2") + (version "1.4.2") (source (origin (method url-fetch) (uri (pypi-uri "joblib" version)) (sha256 (base32 - "1cbjjzsh9hzaqr2cqja95673p7j88b8bd02hjpkq8xz147k6by4j")))) + "03izdcvc3fa355cclzgvzmjnfwylvblz9q091b9gndi6df0wb0i3")))) (build-system pyproject-build-system) (arguments (list #:test-flags ; disabled to avoid having to depend on ipython/jupyter - #~(list "-k" "not test_parallel_call_cached_function_defined_in_jupyter"))) - (native-inputs (list python-pytest)) + #~(list + "--numprocesses" (number->string (parallel-job-count)) + "-k" "not test_parallel_call_cached_function_defined_in_jupyter"))) + (native-inputs + (list python-pytest python-pytest-xdist python-setuptools python-wheel)) (propagated-inputs (list python-psutil)) (home-page "https://joblib.readthedocs.io/") (synopsis "Using Python functions as pipeline jobs") @@ -6316,7 +6919,6 @@ and lazy re-evaluation (memoize pattern), easy simple parallel computing logging and tracing of the execution.") (license license:bsd-3))) - (define-public python-daemon (package (name "python-daemon") @@ -6397,20 +6999,31 @@ alternative representations which do not require this package.") (define-public python-anytree (package (name "python-anytree") - (version "2.8.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "anytree" version)) - (sha256 - (base32 - "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz")))) - (build-system python-build-system) + (version "2.12.0") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/c0fec0de/anytree") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0fagd6h6nixvzf3ps8pbfkxvp9xnpq8hpmzaaq1zab4dzqnpsrgj")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; Tests need to write to that direcroty. + (mkdir-p "tests/dotexport/")))))) + (native-inputs + (list graphviz ;for 'dot' + python-poetry-core + python-pytest)) (propagated-inputs (list python-six)) - (native-inputs - (list ;; For tests. - graphviz ;for 'dot' - python-nose)) (home-page "https://github.com/c0fec0de/anytree") (synopsis "Lightweight tree data library") (description @@ -6496,13 +7109,13 @@ flexibility and power of the Python language.") (define-public kalamine (package (name "kalamine") - (version "0.36") + (version "0.38") (source (origin (method url-fetch) (uri (pypi-uri "kalamine" version)) (sha256 - (base32 "1xxncavq5a0dydhzpfjdxmqsddl77275d9k9giw1032bdyb9d5is")))) + (base32 "0dj0v4in6jngh7f5ypvxyadjsilbiwxj3rx6yxxmh5zab6dxzyhz")))) (build-system pyproject-build-system) (arguments (list @@ -6693,22 +7306,22 @@ via commands such as @command{rst2man}, as well as supporting Python code.") (define-public python-docx (package (name "python-docx") - (version "0.8.11") + (version "1.1.2") (source (origin (method url-fetch) - (uri (pypi-uri "python-docx" version)) + (uri (pypi-uri "python_docx" version)) (sha256 (base32 - "1i7bxghb7knlyjain101qg1jmmz2b6qj03bi3vfxhvcml0rx418i")))) + "1z9ffsvksaaxr90ijzq4k3adzb6p5ipy2j3rrbfjl05rjlpg5w8c")))) (build-system pyproject-build-system) (native-inputs (list behave - python-flake8 - python-mock python-pyparsing - python-pytest)) + python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-lxml)) + (list python-lxml python-typing-extensions)) (home-page "https://github.com/python-openxml/python-docx/") (synopsis "Python library to create and modify Microsoft Word documents") (description "This Python library can be used to create and update @@ -6742,7 +7355,7 @@ Microsoft Word (.docx) documents.") (native-inputs (list python-nose)) (home-page "https://github.com/twolfson/restructuredtext-lint") - (synopsis "reStructuredText linter") + (synopsis "Linter") (description "This package provides a linter for the reStructuredText format.") (license license:unlicense))) @@ -6813,27 +7426,68 @@ format.") text styles of documentation.") (license license:asl2.0))) +(define-public python-pygdbmi + (package + (name "python-pygdbmi") + (version "0.11.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pygdbmi" version)) + (sha256 + (base32 "1c0z4snkjiyl1iq4m1k6liwg0b4pdv2as4bfyvcm0mpjzki6na3s")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/cs01/pygdbmi") + (synopsis "Parse gdb machine interface output with Python") + (description "This package provides a parse gdb machine interface output +with Python.") + (license license:expat))) + (define-public python-pygments (package (name "python-pygments") - (version "2.12.0") + (version "2.15.1") (source (origin (method url-fetch) (uri (pypi-uri "Pygments" version)) (sha256 (base32 - "1sr6iqh21xi6p8aba4wa9pqfhjbbpcvn9jcsx0ggy4lniw8idcay")))) - (build-system python-build-system) + "0p3p28fif7m2w5mkd0z99zk9xwgrs3m61x85415qk0fl3ly4vkla")))) + (build-system pyproject-build-system) (arguments - ;; FIXME: Tests require sphinx, which depends on this. - '(#:tests? #f)) + (list + #:test-flags + ;; Some tests require sphinx, which depends on this, so we only run + ;; basic tests. + '(list "--ignore-glob=tests/*/*"))) + (native-inputs + (list python-pytest python-setuptools python-wheel)) (home-page "https://pygments.org/") (synopsis "Syntax highlighting") (description "Pygments is a syntax highlighting package written in Python.") (license license:bsd-2))) +(define-public python-vdf + (package + (name "python-vdf") + (version "3.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "vdf" version)) + (sha256 + (base32 + "1bz2gn04pl6rj2mawlzlirz1ygg4rdypq0pxbyg018873vs1jm7x")))) + (build-system pyproject-build-system) + (home-page "https://github.com/ValvePython/vdf") + (synopsis "Work with Valve's VDF text format") + (description "This package provides @code{python-vdf}, a library for +working with Valve's VDF text format.") + (license license:expat))) + (define-public python-pygments-github-lexers (package (name "python-pygments-github-lexers") @@ -6864,6 +7518,7 @@ text styles of documentation.") (base32 "1qm4xdmzd4q5pc9h5gjdpr5m7lg06k8dvqnjn7d07d3fhani8d90")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/mina86/pygtrie") (synopsis "Pure Python trie data structure implementation") (description @@ -6929,7 +7584,7 @@ software version simply.") (propagated-inputs (list python-wrapt)) (native-inputs - (list python-bumpversion python-pytest)) + (list python-bumpversion python-pytest python-setuptools python-wheel)) (home-page "https://github.com/tantale/deprecated") (synopsis "Python decorator to deprecate classes, functions or methods") (description "The @code{deprecated} decorator provides a convenient way to deprecate @@ -6964,7 +7619,7 @@ to deprecate classes, functions or methods.") (list python-cryptography python-deprecated python-pyjwt python-pynacl python-requests)) (native-inputs - (list python-httpretty python-pytest)) + (list nss-certs-for-test python-httpretty python-pytest)) (home-page "https://pygithub.readthedocs.io/en/latest/") (synopsis "Python library for the GitHub API") (description "This library allows managing GitHub resources such as @@ -7086,34 +7741,48 @@ process automation (RPA).") (define-public python-robotframework-datadriver (package (name "python-robotframework-datadriver") - (version "1.6.1") + (version "1.11.2") (source (origin - (method url-fetch) - (uri (pypi-uri "robotframework-datadriver" version)) + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/Snooz82/robotframework-datadriver") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0mcyr3v98nvfnvffy096qp3jqslas7l8hh0j00lpi0mp12cd0qk9")))) - (build-system python-build-system) + (base32 "0fq6ykbnypirw1wrgigsfzg8lv8g7j9gs46v0n814ycw8906n43x")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'skip-problematic-tests - (lambda _ - ;; The test file 'tab-csv-file-name.tsv' contains special - ;; characters for which there is no locale in the build - ;; environment, causing one test to fail. - (delete-file-recursively "atest/TestCases/csv_reader_config"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion "atest" - (invoke "sh" "run_atest.sh")))))))) - (native-inputs (list python-docutils - python-robotframework-stacktrace)) - (propagated-inputs (list python-openpyxl - python-pandas - python-pygments - python-robotframework)) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'skip-problematic-tests + (lambda _ + (for-each delete-file-recursively + (list + ;; The test file 'tab-csv-file-name.tsv' contains + ;; special characters for which there is no locale + ;; in the build environment, causing one test to + ;; fail. + "atest/TestCases/csv_reader_config" + ;; Error in file on line 6: Non-existing setting + ;; 'Test Tags'. + "atest/TestCases/DataTypes/Types_in_dicts.robot")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "atest" + (invoke "sh" "run_atest.sh")))))))) + (native-inputs + (list python-docutils + python-robotframework-stacktrace + python-setuptools + python-wheel)) + (propagated-inputs + (list python-openpyxl + python-pandas + python-pygments + python-robotframework)) (home-page "https://github.com/Snooz82/robotframework-datadriver") (synopsis "Data-driven test extension for Robot Framework") (description "DataDriver is a data-driven extension for Robot Framework. @@ -7540,17 +8209,25 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python-lsp-jsonrpc (package (name "python-lsp-jsonrpc") - (version "1.0.0") + (version "1.1.2") (source (origin (method url-fetch) (uri (pypi-uri "python-lsp-jsonrpc" version)) (sha256 (base32 - "1gb0fsamxndhplx25v8m0b3k7aknzy454fpa0qsqsqnv6c3igv3v")))) - (build-system python-build-system) + "04n95h0cqnsrdyh1gv0abh2i5ynyrq2wfqpppx9djp7mxr9y9226")))) + (build-system pyproject-build-system) (native-inputs - (list python-mock python-pytest)) + (list python-coverage + python-pycodestyle + python-pyflakes + python-pylint + python-pytest + python-pytest-cov + python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs (list python-ujson)) (home-page "https://github.com/python-lsp/python-lsp-jsonrpc") @@ -7565,7 +8242,7 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python-pydantic (package (name "python-pydantic") - (version "1.9.1") + (version "1.10.19") (source (origin (method git-fetch) @@ -7574,15 +8251,18 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1406kgppqa7524mxllsipj7gb8fn7pwf51l11lqik59xjhsfv94f")))) - (build-system python-build-system) + (base32 "0swcpfq1y0h5dcj82idls8k5la4xh4c0vz47y7jci2qass8gjffc")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "pytest" "-vv")))))) + (list + #:test-flags + ;; One test fails with not equal assertion. + #~(list "--deselect=tests/test_validators.py::test_assert_raises_validation_error"))) (native-inputs - (list python-pytest python-pytest-mock)) + (list python-pytest + python-pytest-mock + python-setuptools + python-wheel)) (propagated-inputs (list python-typing-extensions)) (home-page "https://github.com/samuelcolvin/pydantic") @@ -7607,6 +8287,9 @@ errors when data is invalid.") (arguments (list #:test-flags #~(list "--ignore=tests/test_docs.py" ; no pytest_examples + ;; These tests include hashes that keep changing depending on + ;; package versions. + "--ignore=tests/benchmarks/test_north_star.py" ;; need python-email-validator >= 2.0.0 "-k not test_fastapi_startup_perf") #:phases @@ -7650,7 +8333,7 @@ errors when data is invalid.") (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'prepare-python-module 'build-python-module + (add-after 'build 'build-python-module (assoc-ref py:%standard-phases 'build)) (add-after 'build-python-module 'install-python-module (assoc-ref py:%standard-phases 'install))) @@ -7825,22 +8508,42 @@ in Markdown format. Instead of executing your Python code like so many other documentation tools, it parses it using docspec instead.") (license license:expat))) +;; XXX: The project is deprecated upstream, still in use by some packages, +;; consider to remove when nothing depends on it. (define-public python-pydocstyle (package (name "python-pydocstyle") - (version "3.0.0") + (version "6.3.0") (source (origin - (method url-fetch) - (uri (pypi-uri "pydocstyle" version)) + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/PyCQA/pydocstyle") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap")))) - (build-system python-build-system) + (base32 "1aabvnxmy939y5b7jpnygpnkgbi4id9j461v7bwzxwdmdffnnd1j")) + (patches (search-patches + "python-pydocstyle-add-support-for-pep701.patch")))) + (build-system pyproject-build-system) + (arguments + (list + ;; It tries to install with pip. + #:test-flags #~(list "--ignore=src/tests/test_integration.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-version + (lambda _ + (substitute* "pyproject.toml" + (("0.0.0-dev") #$version))))))) + (native-inputs + (list python-poetry-core + python-pytest + python-tomli)) (propagated-inputs - (list python-six python-snowballstemmer)) - (home-page - "https://github.com/PyCQA/pydocstyle/") + (list python-six + python-snowballstemmer)) + (home-page "https://github.com/PyCQA/pydocstyle/") (synopsis "Python docstring style checker") (description "This package provides a style checker for the Python Language @@ -7850,49 +8553,51 @@ Server (PLS).") (define-public python-lsp-server (package (name "python-lsp-server") - (version "1.3.3") + (version "1.11.0") (source (origin (method url-fetch) (uri (pypi-uri "python-lsp-server" version)) (sha256 (base32 - "0h6wxzmm6qjfwkkn3mnzn1fpmcp23fpbk74bi8p540q1nzccqj0v")))) - (build-system python-build-system) + "11lf7c9dpf8jzz5y7dllz8l1lka887m9a79xbazy8lkq7zxxdvc9")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "-k" "not test_pyqt_completion" + ;; This could be a real issue due to our old version of + ;; pydocstyle. + "--ignore=test/plugins/test_pydocstyle_lint.py") + #:phases + '(modify-phases %standard-phases (add-before 'check 'set-HOME - (lambda _ (setenv "HOME" "/tmp"))) - (replace 'check - (lambda _ - ;; Disable failing test. - (invoke "python" "-m" "pytest" "-k" - "not test_pyqt_completion")))))) + (lambda _ (setenv "HOME" "/tmp")))))) (propagated-inputs - (list python-autopep8 - python-pydocstyle - python-flake8 - python-future + (list python-docstring-to-markdown + python-importlib-metadata python-jedi python-lsp-jsonrpc python-pluggy python-pycodestyle - python-pyflakes - python-rope + python-pydocstyle python-ujson + python-whatthepatch python-yapf)) (native-inputs - (list python-coverage + (list python-autopep8 + python-flake8 + python-coverage python-flaky python-matplotlib - python-mock python-numpy python-pandas python-pylint python-pytest python-pytest-cov - python-versioneer)) + python-rope + python-setuptools + python-wheel)) (home-page "https://github.com/python-lsp/python-lsp-server") (synopsis "Python implementation of the Language Server Protocol") (description @@ -7916,22 +8621,16 @@ and integrated feature-set for programming Python effectively.") (sha256 (base32 "0yfahlqc7dsdp1js0cbv706apldnfnlbal9b53cww8n0hs40n0im")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'patch-source-shebangs 'use-absolute-file-names - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (let* ((inpts (or native-inputs inputs)) - (python3 (search-input-file inpts "/bin/python3"))) - (substitute* (find-files "tests" "\\.py$") - (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) - (string-append "#!" python3 (if (string? minor-version) - minor-version - ""))))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? (invoke "pytest" "-vv"))))))) + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "tests" "\\.py$") + (("#!/usr/bin/env python3") + (string-append + "#!" (search-input-file inputs "/bin/python3"))))))))) (propagated-inputs (list python-click python-attrs @@ -7944,7 +8643,11 @@ and integrated feature-set for programming Python effectively.") python-typed-ast python-typing-extensions)) (native-inputs - (list python-pytest python-pytest-aiohttp python-setuptools-scm)) + (list python-pytest + python-pytest-aiohttp + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/psf/black") (synopsis "The uncompromising code formatter") (description "Black is the uncompromising Python code formatter.") @@ -7974,15 +8677,19 @@ enable formatting of partial files.") (define-public python-blinker (package (name "python-blinker") - (version "1.4") + (version "1.9.0") (source (origin (method url-fetch) (uri (pypi-uri "blinker" version)) (sha256 (base32 - "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7")))) - (build-system python-build-system) + "1gs5aigi8v8k4cymm06gdgaylv5yps6yk5n8gigf9v5blxjj5kml")))) + (build-system pyproject-build-system) + (native-inputs + (list python-flit-core + python-pytest + python-pytest-asyncio)) (home-page "https://pythonhosted.org/blinker/") (synopsis "Fast, simple object-to-object and broadcast signaling") (description @@ -8058,6 +8765,33 @@ Mallard using the @command{ducktype} tool. The yelp-tools package provides additional functionality on the produced Mallard documents.") (license license:expat))) +(define-public python-cykhash + (package + (name "python-cykhash") + (version "2.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cykhash" version)) + (sha256 + (base32 "1xwpxff4whfvkwvcyhzhdcj5zzq89vvdjmnqy664s4a9yp4lnydl")))) + (build-system pyproject-build-system) + (native-inputs (list python-cython + python-setuptools + python-wheel)) + (home-page "https://github.com/realead/cykhash") + (synopsis "Khash-sets and maps") + (description + "This package is a Cython wrapper for khash-sets/maps. It brings +functionality of +@url{https://github.com/attractivechaos/klib/blob/master/khash.h, khash} to +Python and Cython and can be used seamlessly in numpy or pandas. Numpy's +world is lacking the concept of a (hash-)set. This shortcoming is fixed and +efficient (memory- and speedwise compared to pandas) @code{unique} and +@code{isin} are implemented. Python-set/dict have a big memory-footprint. +For some datatypes the overhead can be reduced by using khash by factor 4-8.") + (license license:expat))) + (define-public python-cython (package (name "python-cython") @@ -8073,6 +8807,9 @@ provides additional functionality on the produced Mallard documents.") ;; because we need libpython3.3m.so (inputs (list python)) + (native-inputs + ;; Needed for some tests that link against it. + (list libxcrypt)) (arguments `(#:phases (modify-phases %standard-phases @@ -8128,13 +8865,56 @@ writing C extensions for Python as easy as Python itself.") ;; Cython 3 is not officially released yet, so distinguish the name ;; for now. (name "python-cython-next") - (version "3.0.0b2") + (version "3.0.11") (source (origin (method url-fetch) - (uri (pypi-uri "Cython" version)) + (uri (pypi-uri "cython" version)) (sha256 (base32 - "0mb7gpavs87am29sbk6yqznsybxj9dk4fwj4370j9sbrcmjq0hkc")))) + "1zzsn60cl1qcz11h6c3miqayb7yfxdm1x19i2fk4qav8z0mdsiki")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-vv" + "-j" (number->string (parallel-job-count)) + "-x" (string-join + (list "annotate_html" + "Debugger" + ;; It introduces cycle. + "numpy_test" + ;; It fails with AssertionError: Failed doctest test + ;; for complex_numbers_cpp.double_abs. + "complex_numbers_cpp" + ;; This test fails when running on 24 cores. + "cpp_stl_conversion" + ;; XXX: On 32-bit architectures, running the + ;; parallel tests fails on many-core systems, see + ;; <https://github.com/cython/cython/issues/2807>. + #$@(if (not (target-64bit?)) + '("run.parallel") + '()) + #$@(if (system-hurd?) + '("test_class_ref" + "test_compiler_directives" + "test_lang_version") + '())) + "|")) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + ;; Disable compiler optimizations to greatly reduce the running + ;; time of the test suite. + (setenv "CFLAGS" "-O0") + ;; Some tests require access to "$HOME/.cython". + (setenv "HOME" "/tmp") + (when tests? + (apply invoke "python" "runtests.py" test-flags))))))) + (native-inputs + (list libxcrypt + python-setuptools + python-wheel)) (properties '()))) ;; NOTE: when upgrading numpy please make sure that python-numba, @@ -8143,7 +8923,11 @@ writing C extensions for Python as easy as Python itself.") (define-public python-numpy (package (name "python-numpy") - (version "1.23.2") + ;; XXX: Any other versions up to 1.26.4 failed to build with error similar + ;; to: 'fenv_t' has not been declared in '::' 58 | using ::fenv_t; + ;; See <https://github.com/numpy/numpy/issues/21075#issuecomment-1047976197>, + ;; <https://github.com/numpy/numpy/issues/24318>. + (version "1.24.4") (source (origin (method url-fetch) @@ -8152,12 +8936,12 @@ writing C extensions for Python as easy as Python itself.") version "/numpy-" version ".tar.gz")) (sha256 (base32 - "00bx3idjwhmzkdawg2dx1bp0316ig37jfx0dm82bvyv1hbj013dp")))) - (build-system python-build-system) + "0qwldmkq5bns561ppkz7psphc4jqfj5j1x4dhq0i8r4qwjjf7xc0")))) + (build-system pyproject-build-system) (arguments (list #:modules '((guix build utils) - (guix build python-build-system) + (guix build pyproject-build-system) (ice-9 format)) #:phases #~(modify-phases %standard-phases @@ -8197,6 +8981,11 @@ include_dirs = ~:*~a/include~%" ;; does *not* automatically provide -n when -j is used ;; (see: https://github.com/numpy/numpy/issues/21359). "--" "-n" (number->string (parallel-job-count)) + ;; Disable Pytest Warnings, they are resolved in the + ;; latest 1.x.x: pytest.PytestRemovedIn9Warning: Marks + ;; applied to fixtures have no effect, + ;; DeprecationWarning. + "-p" "no:warnings" "-k" (string-append ;; These tests may fail on 32-bit systems (see: ;; https://github.com/numpy/numpy/issues/18387). @@ -8206,6 +8995,14 @@ include_dirs = ~:*~a/include~%" ;; x86_64 CPUs such as the Core 2 Duo (see: ;; https://github.com/numpy/numpy/issues/22170). "and not test_rint_big_int " + ;; They fail to detect compiler. + "and not test_compile1 " + "and not test_compile2 " + ;; Due to disabled warnings + "and not test_getattr_warning " + "and not test_integer_signs " + "and not test_implicit_cast_float_to_int_fails " + "and not test_integer_signs " ;; The huge_array test is too large for 32-bit (see: ;; https://bugs.gentoo.org/843599 and ;; https://bugs.gentoo.org/846548). @@ -8227,12 +9024,17 @@ include_dirs = ~:*~a/include~%" " and not test_fpclass") '()))))))))) (native-inputs - (list python-cython + (list gfortran + meson-python + pkg-config + python-cython ;; overwrite Cython from meson-python python-hypothesis + python-mypy python-pytest python-pytest-xdist + python-setuptools python-typing-extensions - gfortran)) + python-wheel)) (inputs (list bash openblas)) (home-page "https://numpy.org") (synopsis "Fundamental package for scientific computing with Python") @@ -8413,19 +9215,16 @@ objects.") (sha256 (base32 "1600xad37mff46xg80cy6bi3l2n6jm69j7sl19rzdmkcgyijfn2z")))) - (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"))))))) + (build-system pyproject-build-system) (propagated-inputs (list python-numba python-numpy python-scipy)) (native-inputs - (list python-dask python-importlib-metadata python-pytest - python-pytest-black python-pytest-cov)) + (list python-dask + python-importlib-metadata + python-pytest + python-pytest-black + python-pytest-cov + python-setuptools)) (home-page "https://github.com/pydata/sparse/") (synopsis "Library for multi-dimensional sparse arrays") (description @@ -8443,6 +9242,47 @@ easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and depends on @code{scipy.sparse} for some computations.") (license license:bsd-3))) +(define-public python-multiscale-spatial-image + (package + (name "python-multiscale-spatial-image") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "multiscale_spatial_image" version)) + (sha256 + (base32 "01kcagjy797hbz5an9cp8wcl5krgp21yb7ibfimvpidb3jp5lfhb")))) + (build-system pyproject-build-system) + ;; All interesting tests require file downloads over IPFS. + (arguments (list #:tests? #false)) + (propagated-inputs + (list `(,insight-toolkit "python") + python-dask + python-dask-image + python-numpy + python-spatial-image + python-xarray + python-xarray-datatree)) + (native-inputs + (list python-fsspec + python-hatchling + python-ipfsspec + python-jsonschema + python-nbmake + python-pooch + python-pytest + python-pytest-mypy + python-urllib3 + python-zarr)) + (home-page "https://github.com/spatial-image/multiscale-spatial-image") + (synopsis "Multi-dimensional spatial image data structure") + (description + "This package lets you generate a multiscale, chunked, multi-dimensional +spatial image data structure that can serialized to OME-NGFF. Each scale is a +scientific Python Xarray spatial-image Dataset, organized into nodes of an +Xarray Datatree.") + (license license:asl2.0))) + (define-public python-spectra (package (name "python-spectra") @@ -8492,7 +9332,7 @@ color scales, and color space conversion easy. It has support for: "1ps34laa0kvvp33az173hp5l0hnk8cr0bfqmlgw64ry5cv09qjg0")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-mock)) + (list python-pytest python-pytest-mock python-setuptools python-wheel)) (propagated-inputs (list python-cryptography python-gssapi python-krb5 python-ruamel.yaml)) (home-page "https://github.com/jborean93/pyspnego") @@ -8515,7 +9355,7 @@ readable format.") (base32 "1v34xdvh6i5cn5srwicvp0i2kvv8fzsv0v9p72ng081nsczmhgvr")))) (build-system pyproject-build-system) (propagated-inputs (list python-cffi libgit2)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/libgit2/pygit2") (synopsis "Python bindings for libgit2") (description "Pygit2 is a set of Python bindings to the libgit2 shared library.") @@ -8626,58 +9466,33 @@ tracebacks and better introspection than Python's standard @command{pdb} debugger, with which it shares the same interface.") (license license:bsd-3))) -(define-public python-pdbpp - ;; The latest release lacks support for Python 3.10; use the latest commit - ;; of the master branch (see: https://github.com/pdbpp/pdbpp/issues/503). - (let ((commit "e1c2e347cc55a6dd89e058e56a1366ada68884bc") - (revision "0")) - (package - (name "python-pdbpp") - (version (git-version "0.10.3" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pdbpp/pdbpp") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1hql1ldwa9czml7zrnv6qdzgpywwav3a282dbvqypf108zvjsdiw")))) - (build-system python-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-before 'build 'pretend-version - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" - #$(package-version this-package)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" - "-k" - (string-append - ;; These tests seem to require a real TTY. - "not interaction_restores_previous_sigint_handler " - "and not python_m_pdb_uses_pdbpp")))))))) - (propagated-inputs - (list python-fancycompleter python-pygments python-wmctrl)) - (native-inputs - (list python-pytest python-setuptools-scm)) - (home-page "https://github.com/pdbpp/pdbpp") - (synopsis "Drop-in replacement for pdb") - (description "Pdb++ is a drop-in replacement for @code{pdb}. It -includes the following improvements compared to @code{pdb}: -@itemize -@item auto-completion -@item syntax highlighting of code listings -@item sticky mode -@item new commands to be used from the interactive (Pdb++) prompt -@item smart command parsing -@item additional convenience functions in the @code{pdb} module. -@end itemize") - (license license:bsd-3)))) +(define-public python-ipfsspec + (package + (name "python-ipfsspec") + (version "0.4.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ipfsspec" version)) + (sha256 + (base32 "1y4ad9schc76j2lynm7vpwi4q4jzi9vv843zfpisbp8zqgm0rr7l")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + '(list "-m not local_gw" + ;; Require local gateway + "--ignore=test/test_gateway.py" + ;; Require internet + "--ignore=test/test_async.py" + "--ignore=test/test_ipfs.py"))) + (propagated-inputs (list python-aiohttp python-fsspec python-requests)) + (native-inputs (list python-pytest python-pytest-asyncio)) + (home-page "https://github.com/fsspec/ipfsspec") + (synopsis "Read-only implementation of fsspec for IPFS") + (description "This package provides a read-only implementation of +@code{fsspec} for IPFS.") + (license license:expat))) (define-public python-pdftotext (package @@ -8753,7 +9568,9 @@ semantic version parser for Node.js.") (base32 "1r1lcq59v6l75wkbp7mypanr69a6fv6m58v6dw3v6b4vwz5nqg0z")))) (build-system pyproject-build-system) - (propagated-inputs (list python-appdirs python-nose python-pyyaml)) + (propagated-inputs (list python-appdirs python-nose python-pyyaml + python-setuptools)) + (native-inputs (list python-wheel)) (home-page "https://github.com/simonvh/norns") (synopsis "Simple YAML-based config module") (description "This package provides a simple YAML-based config module.") @@ -8802,18 +9619,19 @@ parse and apply unified diffs. It has features such as: (sha256 (base32 "0k2z3g4s3w39h1nd293542hl9qv55j29gcr3bkia0rr3ldsppnxh")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v" "numpydoc/tests" - ;; TODO: unclear why these fail. - "-k" "not test_MyClass and not test_my_function"))))))) + (list #:test-flags + '(list "numpydoc/tests" + ;; TODO: unclear why these fail. + "-k" "not test_MyClass and not test_my_function"))) (propagated-inputs (list python-jinja2 python-sphinx)) - (native-inputs (list python-matplotlib python-pytest python-pytest-cov)) + (native-inputs + (list python-matplotlib + python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://pypi.org/project/numpydoc/") (synopsis "Numpy's Sphinx extensions") (description "Sphinx extension to support docstrings in Numpy format.") @@ -8949,19 +9767,36 @@ comparison. (method url-fetch) (uri (pypi-uri "matplotlib" version)) (sha256 - (base32 "18amhxyxa6yzy1nwky4ggdgvvxnbl3qz2lki05vfx0dqf6w7ia81")))) + (base32 "18amhxyxa6yzy1nwky4ggdgvvxnbl3qz2lki05vfx0dqf6w7ia81")) + (patches (search-patches "python-matplotlib-fix-legend-loc-best-test.patch")))) (build-system pyproject-build-system) (arguments (list #:test-flags '(list "-m" "not network" - "-k" - (string-append - ;; This one fails with a small difference in the upper left. - "not test_figure_legend_outside" - ;; The 'test_lazy_auto_backend_selection' fails - ;; because it would require an X server; skip it. - " and not test_lazy_auto_backend_selection")) + "-k" (string-join + (list + ;; This one fails with a small difference in the upper left. + "not test_figure_legend_outside" + "test_warn_big_data_best_loc" + ;; The 'test_lazy_auto_backend_selection' fails because it + ;; would require an X server; skip it. + "test_lazy_auto_backend_selection" + ;; It fails with deprecation warning The register_cmap function + ;; was deprecated in Matplotlib 3.7 and will be removed two + ;; minor releases later. + "test_double_register_builtin_cmap" + ;; Failed: DID NOT WARN. No warnings of type (<class + ;; 'UserWarning'>,) were emitted. + "test_rcparams_update" + "test_rcparams_init" + ;; ResourceWarning: unclosed file <_io.BufferedWriter + ;; name='a.pdf'> + "test_multipage_keep_empty" + ;; UserWarning: Glyph 8722 (\N{MINUS SIGN}) missing from + ;; current font. + "test_mathtext_ticks") + " and not ")) #:phases #~(modify-phases %standard-phases (add-before 'build 'pretend-version @@ -9063,8 +9898,10 @@ tests = True~%" #$(this-package-input "tcl") #$(this-package-input "tk")))))) python-pytest python-pytest-timeout python-pytest-xdist + python-setuptools python-setuptools-scm - python-setuptools-scm-git-archive)) + python-setuptools-scm-git-archive + python-wheel)) (home-page "https://matplotlib.org/") (synopsis "2D plotting library for Python") (description @@ -9237,11 +10074,15 @@ clean plots with a minimalistic style.") (sha256 (base32 "0zk7hpq358sbympmkms7w2wjs7nw8mdfvkvdasblg2nhqayv42qz")))) (build-system pyproject-build-system) - (propagated-inputs (list python-matplotlib - python-matplotx - python-npx - python-numpy)) - (native-inputs (list python-pytest)) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-matplotlib + python-matplotx + python-npx + python-numpy)) (home-page "https://github.com/nschloe/cplot") (synopsis "Plot complex-valued functions") (description "@code{cplot} is a Python library for plotting @@ -9263,6 +10104,7 @@ complex-valued functions.") (list #:tests? #f)) ; no tests (propagated-inputs (list python-ply)) + (native-inputs (list python-setuptools python-wheel)) (home-page "http://senexcanis.com/open-source/cppheaderparser/") (synopsis "Parse C++ header files and generate a data structure representing the class") @@ -9282,6 +10124,7 @@ and generate a data structure representing the class.") (sha256 (base32 "06zysv86j7wqb1rl88ab4clbjf7iahhv9gfyqlasr18hggqkpd43")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/nucleic/cppy") (synopsis "C++ header library for Python extension modules") (description "This package is a small C++ header library which makes it @@ -9460,24 +10303,28 @@ a simple netcat replacement with chaining support.") (define-public python-pycodestyle (package (name "python-pycodestyle") - (version "2.8.0") + (version "2.12.1") (source (origin (method url-fetch) (uri (pypi-uri "pycodestyle" version)) (sha256 - (base32 - "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd")))) - (build-system python-build-system) + (base32 "089mszv65gwnz4nq8vryxqanlqk3bh3p4maxrnngdr5wighflf38")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (list + #:test-flags #~(list "-m" "pycodestyle" "--statistics" "pycodestyle.py") + #:phases + #~(modify-phases %standard-phases + ;; Taken from Tox config + ;; <https://github.com/PyCQA/pycodestyle/blob/2.11.0/tox.ini#L16>. + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "python" "-v" test-flags))))))) (native-inputs - (list python-pytest)) + (list python-setuptools + python-wheel)) (home-page "https://pycodestyle.readthedocs.io/") (synopsis "Python style guide checker") (description "@code{pycodestyle} (formerly pep8) is a tool to check @@ -9485,6 +10332,69 @@ Python code against some of the style conventions in @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.") (license license:expat))) +(define-public python-pycollada + (package + (name "python-pycollada") + (version "0.8") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/pycollada/pycollada") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0by8b46gji9npsgnx91cvzjrfcsm7r4d23gvn7h2h9ninaxlv7zw")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-numpy + python-dateutil)) + (home-page "https://pycollada.readthedocs.io") + (synopsis "Reading and writing collada documents library") + (description + "This package implements a functionality for creating, editing and +loading @url{https://www.khronos.org/collada/,COLLADA},which is a +COLLAborative Design Activity for establishing an interchange file format for +interactive 3D applications. + +The library allows you to load a COLLADA file and interact with it as a python +object. In addition, it supports creating a collada python object from +scratch, as well as in-place editing.") + (license license:bsd-3))) + +(define-public python-pyct + (package + (name "python-pyct") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyct" version)) + (sha256 + (base32 "1856dbrcpc0nxxhlfh3dqzz7xxn5sdi600q45hsprqyqrg2lm7yx")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; These tests want to download example data from the internet. + '(list "-k" (string-append + "not test_examples_with_use_test_data" + " and not test_examples_using_test_data_and_force_with_prexisting_content_in_target" + " and not test_fetch_data_using_test_data_with_no_file_in_data_copies_from_stubs" + " and not test_fetch_data_using_test_data_and_force_with_file_in_data_over_writes")))) + (propagated-inputs (list python-param python-pyyaml)) + (native-inputs (list python-flake8 python-pytest)) + (home-page "https://github.com/holoviz-dev/pyct") + (synopsis "Common packaging tasks") + (description + "This Python package provides utilities to run common packaging tasks, +e.g. copy examples, fetch data, etc.") + (license license:bsd-3))) + (define-public python-multidict (package (name "python-multidict") @@ -9496,16 +10406,9 @@ Python code against some of the style conventions in (sha256 (base32 "1kjrxav572j45xvr1iy60zb2g8zqvrinzdkl4ax36js4vczckl8d")))) - (build-system python-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-vv") - (format #t "test suite not run~%"))))))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-cov)) + (list python-pytest python-pytest-cov python-setuptools python-wheel)) (home-page "https://github.com/aio-libs/multidict/") (synopsis "Multidict implementation") (description "Multidict is dict-like collection of key-value pairs @@ -9521,13 +10424,12 @@ where key might be occurred more than once in the container.") (method url-fetch) (uri (pypi-uri "orderedmultidict" version)) (sha256 - (base32 - "1bc2v0yflsxjyyjx4q9wqx0j3bvzcw9z87d5pz4iqac7bsxhn1q4")))) - (build-system python-build-system) + (base32 "1bc2v0yflsxjyyjx4q9wqx0j3bvzcw9z87d5pz4iqac7bsxhn1q4")))) + (build-system pyproject-build-system) (propagated-inputs (list python-six)) (native-inputs - (list python-flake8 python-pycodestyle)) + (list python-flake8 python-pycodestyle python-setuptools python-wheel)) (home-page "https://github.com/gruns/orderedmultidict") (synopsis "Python Ordered Multivalue Dictionary - omdict") (description "This package contains a library for ordered multivalue @@ -9604,17 +10506,25 @@ from a program in a @dfn{pager} such as @command{less}.") (define-public python-autopep8 (package (name "python-autopep8") - (version "1.5.3") + (version "2.0.4") (source (origin (method url-fetch) (uri (pypi-uri "autopep8" version)) (sha256 (base32 - "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0")))) - (build-system python-build-system) + "037yhzmc9lssmn6cifa5gvw23f1c0hgsfgn83jfl3cwppm50c4r9")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-pycodestyle python-toml)) + (list python-pycodestyle python-tomli)) + (native-inputs + (list python-setuptools python-wheel)) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'prepare-check + (lambda _ + (setenv "HOME" "/tmp")))))) (home-page "https://github.com/hhatto/autopep8") (synopsis "Format Python code according to the PEP 8 style guide") (description @@ -9629,27 +10539,37 @@ by pycodestyle.") (define-public python-dirty-equals (package (name "python-dirty-equals") - (version "0.7.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/samuelcolvin/dirty-equals") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1hw044d6q0ij8hrrbp6wbdb49xbyjd22viansy817hpmd0yf85ja")))) + (version "0.8.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/samuelcolvin/dirty-equals") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jp9jbfs90m8jkpcvi798zxxx49a94rzn8gki9fraqhbqxkv76qd")))) (build-system pyproject-build-system) (arguments - ;; This test requires pytest-examples, which in turn requires - ;; python-ruff, which is difficult to package because it is - ;; written in Rust (TODO: Enable when Ruff is in Guix!). - (list #:test-flags #~'("--ignore" "tests/test_docs.py"))) + (list + #:test-flags + ;; This test requires pytest-examples, which in turn requires + ;; python-ruff, which is difficult to package because it is written in + ;; Rust (TODO: Enable when Ruff is in Guix!). + #~(list "--ignore=tests/test_docs.py" + ;; Optional typing check with Pydantic. + "--ignore=tests/test_other.py" + ;; TODO: Some timezones are missing in PyTZ, remove constrain + ;; when updated. + "-k" (string-append "not test_is_datetime_zoneinfo" + " and not test_is_now_tz" + " and not test_tz")))) (native-inputs (list python-hatchling - python-pydantic + ;; python-pydantic ; introduces cycle, optinoal python-pytest)) - (propagated-inputs (list python-pytz)) + (propagated-inputs + (list python-pytz)) (home-page "https://dirty-equals.helpmanual.io/") (synopsis "Do dirty (but useful) things with equals") (description @@ -9685,7 +10605,7 @@ and therefore easier to read and write.") ;; NOTE: Any value works, the variable just has to be present. (setenv "SKIP_ONLINE" "1")))))) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (inputs (list bash-minimal)) (home-page "https://github.com/pypa/distlib") @@ -9739,6 +10659,28 @@ Storage or Compound Document, Microsoft Office). It is an improved version of the OleFileIO module from PIL, the Python Image Library.") (license license:bsd-3))) +(define-public python-property-cached + (package + (name "python-property-cached") + (version "1.6.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "property-cached" version ".zip")) + (sha256 + (base32 "0wxv5sdx1p7ils36j6j6hfscz8v2vzbq212i8y8r0lrnxpqlx71y")))) + (build-system pyproject-build-system) + (arguments + (list + ;; AssertionError. + #:test-flags #~(list "-k" "not test_threads_ttl_expiry"))) + (native-inputs (list python-freezegun python-pytest unzip)) + (home-page "https://github.com/althonos/property-cached/") + (synopsis "Decorator for caching properties in classes") + (description "This package provides a decorator for caching properties in +classes. It is forked from @code{cached-property}.") + (license license:bsd-3))) + (define-public python-pypdf3 (package (name "python-pypdf3") @@ -9782,7 +10724,7 @@ retrieve text and metadata from PDFs as well as merge entire files together.") "--exclude=^test_use_poppler_path_with_trailing_slash$"))) (propagated-inputs (list python-pillow)) (inputs (list poppler)) - (native-inputs (list python-nose which)) + (native-inputs (list python-nose which python-setuptools python-wheel)) (home-page "https://github.com/Belval/pdf2image") (synopsis "Python wrapper around @command{pdftoppm} and @command{pdftocairo}") @@ -9844,7 +10786,9 @@ Python list with elements of type @code{PIL.Image} (from the (snippet '(begin (delete-file-recursively "src/thirdparty"))) (patches - (search-patches "python-pillow-CVE-2022-45199.patch")))) + (search-patches "python-pillow-CVE-2022-45199.patch" + ;; Included in 10.1.0. + "python-pillow-use-zlib-1.3.patch")))) (build-system python-build-system) (native-inputs (list python-pytest)) (inputs (list freetype @@ -9903,7 +10847,7 @@ a general image processing tool.") (package (inherit python-pillow) (name "python-pillow-simd") - (version "9.2.0") + (version "9.3.0") ;; The PyPI tarball does not include test files. (source (origin @@ -9913,7 +10857,19 @@ a general image processing tool.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "13wwq7slw2q9djh7n39qdmlrzd9k3x7hdr36wk8qbgp3b6bcgvj6")))) + (base32 "0qnvpwzlx4rfz17qmsipr5iwzmh8xgmzvc79spnrmqibk3s18vyi")))) + (build-system pyproject-build-system) + (arguments + (list + ;; This test fails because it cannot find the zlib version string + ;; "1.3.1". + #:test-flags '(list "-k not test_sanity") + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-ldconfig + (lambda _ + (substitute* "setup.py" + (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))))) (inputs (modify-inputs (package-inputs python-pillow) (prepend libraqm libimagequant))) @@ -9935,7 +10891,7 @@ parallelism."))) (build-system python-build-system) (native-inputs (list python-pillow)) (home-page "https://github.com/whtsky/pixelmatch-py") - (synopsis "A pixel-level image comparison library") + (synopsis "Pixel-level image comparison library") (description "This package provides a pixel-level image comparison library for Python, originally created to compare screenshots in tests. Its features include accurate anti-aliased pixels detection and perceptual color difference @@ -10054,18 +11010,26 @@ writable properties, cached properties, etc.") (define-public python-executing (package (name "python-executing") - (version "0.8.2") + (version "2.1.0") (source (origin (method url-fetch) (uri (pypi-uri "executing" version)) (sha256 - (base32 "08q0xh9fd8k41sqpp23q6fb9bf7yj4y2q6sv30pj36vvk8pg8fy2")))) - (build-system python-build-system) + (base32 "1axrwh7kr7nshzjw6vj9w9hn3rqh9af2c257ll7iba0d4vfpv8lf")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f)) ; TODO: tests require python-asttokens + (list + ;; AssertionError: assert 'test failure' in '' + #:test-flags #~(list "-k" "not test_two_statement_lookups"))) (native-inputs - (list python-setuptools-scm python-toml)) + (list python-asttokens + python-littleutils + python-pytest + python-setuptools + python-setuptools-scm + python-toml + python-wheel)) (home-page "https://github.com/alexmojaki/executing") (synopsis "Get information about what a Python frame is currently doing") (description "This package lets you get information about what a frame is @@ -10256,7 +11220,9 @@ experimental data and metadata at the Laboratory for Fluorescence Dynamics.") python-editorconfig python-numpy python-pillow - python-pytest)) + python-pytest + python-setuptools + python-wheel)) (inputs ;; XXX: Build is failing with FFmpeg 6.0, unresolved upstream. ;; See https://github.com/PyAV-Org/PyAV/issues/1106 @@ -10389,10 +11355,10 @@ from FFMPEG, reliably terminating the process when done.") (delete-file "tests/test_freeimage.py")))))) (inputs (list freeimage)) (propagated-inputs - (list python-imageio-ffmpeg python-numpy python-pillow python-tifffile)) + (list python-imageio-ffmpeg python-numpy python-pillow python-tifffile python-setuptools)) (native-inputs (list python-black python-flake8 python-fsspec python-pytest - python-pytest-cov)) + python-pytest-cov python-wheel)) (home-page "https://imageio.github.io/") (synopsis "Library for reading and writing a wide range of image data") (description @@ -10460,6 +11426,7 @@ data, and scientific formats.") a multithreaded image-processing system with low memory needs.") (license license:expat))) +;; WARNING: This package is a dependency of mesa. (define-public python-pycparser (package (name "python-pycparser") @@ -10504,7 +11471,7 @@ a front-end for C compilers or analysis tools.") (define-public python-xlsxwriter (package (name "python-xlsxwriter") - (version "3.0.3") + (version "3.2.0") (source (origin ;; There are no tests in the PyPI tarball. @@ -10514,8 +11481,11 @@ a front-end for C compilers or analysis tools.") (commit (string-append "RELEASE_" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1lr7mmik6r4zns069i4zfx1cnwhz6snmlh2zsiry0cwx8cv33wpm")))) - (build-system python-build-system) + (base32 "1g16xb4nsjd807qcm8756ixlxxvdjmbr2v7r6wxkajw1h4m8id0w")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools + python-wheel)) (home-page "https://github.com/jmcnamara/XlsxWriter") (synopsis "Python module for creating Excel XLSX files") (description @@ -10610,16 +11580,19 @@ your favourite programs.") (define-public python-click-didyoumean (package (name "python-click-didyoumean") - (version "0.3.0") + (version "0.3.1") (source (origin - (method url-fetch) - (uri (pypi-uri "click-didyoumean" version)) + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/click-contrib/click-didyoumean") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0dc0xrmqbw0idpx843ahzzvivmvx3fcfsm3k54lnssyra7cg117i")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ; no tests in PyPI and no setup.py in github + (base32 "1byfqs3m87zfpvssm1al9dvq94gjd0iddpwrzk6205n18wjsphqb")))) + (build-system pyproject-build-system) + (native-inputs + (list python-poetry-core python-pytest)) (propagated-inputs (list python-click)) (home-page "https://github.com/timofurrer/click-didyoumean") @@ -10679,7 +11652,9 @@ any machine that can run Python.") (list pkg-config python-cython python-pytest - python-pytest-cov)) + python-pytest-cov + python-setuptools + python-wheel)) (inputs (list pango)) (home-page "https://manimpango.manim.community/") @@ -10691,50 +11666,6 @@ using Cython. ManimPango is internally used in Manim to render (non-LaTeX) text.") (license license:expat))) -(define-public python-xcffib - (package - (name "python-xcffib") - (version "0.11.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "xcffib" version)) - (sha256 - (base32 - "0nkglsm9nbhv238iagmmsjcz6lf1yfdvp5kmspphdj385vz9r50j")))) - (build-system python-build-system) - (inputs - (list libxcb)) - (propagated-inputs - (list python-cffi ; used at run time - python-six)) - (arguments - `(;; FIXME: Tests need more work. See ".travis.yml" in the repository. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-libxcb-path - (lambda* (#:key inputs #:allow-other-keys) - (let ((libxcb (assoc-ref inputs "libxcb"))) - (substitute* '("xcffib/__init__.py") - (("soname = ctypes.util.find_library.*xcb.*") - (string-append "soname = \"" libxcb "/lib/libxcb.so\"\n"))) - #t))) - (add-after 'install 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "out") "/share" - "/doc/" ,name "-" ,version))) - (mkdir-p doc) - (copy-file "README.md" - (string-append doc "/README.md")) - #t)))))) - (home-page "https://github.com/tych0/xcffib") - (synopsis "XCB Python bindings") - (description - "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds -support for Python 3 and PyPy. It is based on cffi.") - (license license:expat))) - (define-public python-cairocffi (package (name "python-cairocffi") @@ -11016,6 +11947,26 @@ The output of all running processes is collected by honcho and displayed.") (license license:expat))) +(define-public python-hsluv + (package + (name "python-hsluv") + (version "5.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hsluv" version)) + (sha256 + (base32 "0bmpd7qxcvin8szblilxmw50v7mygf6a6i180h82123s893gk092")))) + (build-system pyproject-build-system) + (home-page "https://www.hsluv.org") + (synopsis "Human-friendly HSL colour space implemented in Python") + (description + "Human-friendly @acronym{Hue Saturation Lightness,HSL}. HSLuv extends +@url{http://en.wikipedia.org/wiki/CIELUV,CIELUV} with a new saturation +component that allows you to span all the available chroma as a neat +percentage.") + (license license:expat))) + (define-public python-pebble (package (name "python-pebble") @@ -11044,50 +11995,64 @@ wraps Python's standard library threading and multiprocessing objects.") (define-public python-pexpect (package (name "python-pexpect") - (version "4.8.0") + (version "4.9.0") (source (origin (method url-fetch) (uri (pypi-uri "pexpect" version)) (sha256 - (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw")))) - (build-system python-build-system) + (base32 "03ykxacc64ijldbpa31v5lxw93an0z0xmhm21q2i369w7w942zgf")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'prepare-tests - (lambda _ - (substitute* (find-files "tests") - (("/bin/ls") (which "ls")) - (("/bin/echo") (which "echo")) - (("/bin/which") (which "which")) - ;; Many tests try to use the /bin directory which - ;; is not present in the build environment. - ;; Use one that's non-empty and unlikely to change. - (("/bin'") "/dev'") - ;; Disable failing test. See upstream bug report - ;; https://github.com/pexpect/pexpect/issues/568 - (("def test_bash") "def _test_bash")) - ;; XXX: Socket connection test gets "Connection reset by peer". - ;; Why does it not work? Delete for now. - (delete-file "tests/test_socket.py") - #t)) - (replace 'check (lambda _ (invoke "nosetests" "-v")))))) - (native-inputs - `(("python-nose" ,python-nose) - ("python-pytest" ,python-pytest) - ("man-db" ,man-db) - ("which" ,which) - ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py' + (list + #:test-flags + #~(list "-k" (string-join + (list + ;; Disable failing test, see + ;; <https://github.com/pexpect/pexpect/issues/568>. + "not test_bash" + ;; Fails with attempt to find OpenSSL. + "test_large_stdout_stream" + ;; Tests fail while trying to find + ;; tmp-pexpect-xxxxxxxxxxxx directories. + "test_run_uses_env" + "test_run_uses_env_path" + "test_run_uses_env_path_over_path" + "test_spawn_uses_env" + ;; Fails with assertion error: assert 0 == 500 + "test_before_across_chunks" + ;; Bash is enough for tests. + "test_zsh") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-tests + (lambda _ + (substitute* (find-files "tests") + (("/bin/bash") (which "bash")) + (("/bin/echo") (which "echo")) + (("/bin/ls") (which "ls")) + (("/bin/which") (which "which")) + ;; Many tests try to use the /bin directory which is not + ;; present in the build environment. Use one that's non-empty + ;; and unlikely to change. + (("/bin'") "/dev'"))))))) + (native-inputs + (list bash ;full Bash for 'test_replwrap.py' + man-db + python-pytest + python-setuptools + python-wheel + which)) (propagated-inputs (list python-ptyprocess)) (home-page "https://pexpect.readthedocs.org/") (synopsis "Controlling interactive console applications") (description "Pexpect is a pure Python module for spawning child applications; -controlling them; and responding to expected patterns in their output. -Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a -child application and control it as if a human were typing commands.") +controlling them; and responding to expected patterns in their output. Pexpect +works like Don Libes’ Expect. Pexpect allows your script to spawn a child +application and control it as if a human were typing commands.") (license license:isc))) (define-public python-sexpdata @@ -11109,6 +12074,25 @@ child application and control it as if a human were typing commands.") functions like pickle, json or PyYAML module.") (license license:bsd-3))) +(define-public python-pathable + (package + (name "python-pathable") + (version "0.4.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pathable" version)) + (sha256 + (base32 "1ayw9jzlw0qrz51rcfbba00xqq0c7vs3lgwrib67c1z5bcqrv1jw")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #false)) ;there are none + (native-inputs (list python-poetry-core)) + (home-page "https://github.com/p1c2u/pathable") + (synopsis "Object-oriented paths") + (description "With this package you can traverse resources like paths and +access resources on demand with separate accessor layer.") + (license license:asl2.0))) + (define-public python-pathlib2 (package (name "python-pathlib2") @@ -11144,7 +12128,8 @@ older Python versions.") (build-system pyproject-build-system) (propagated-inputs (list python-dataclasses python-smart-open python-typer)) - (native-inputs (list python-mock python-pytest)) + (native-inputs (list python-mock python-pytest python-setuptools + python-wheel)) (home-page "https://github.com/justindujardin/pathy") (synopsis "Path interface for local and cloud bucket storage") (description "Pathy is a python package (with type annotations) for @@ -11308,6 +12293,26 @@ finding unresolved symbols in Python code and their corresponding imports.") "@code{inotify-simple} is a simple wrapper around inotify library.") (license license:bsd-3))) +(define-public python-interface-meta + (package + (name "python-interface-meta") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "interface_meta" version)) + (sha256 + (base32 "18brkmz2ssjikkrkb23cwccp683yi6y1alfdbmjvjgxpppw96i4a")))) + (build-system pyproject-build-system) + (native-inputs (list python-poetry-core python-pytest)) + (home-page "https://github.com/matthewwardrop/interface_meta") + (synopsis + "API for enforced method signatures and consistent documentation") + (description + "This package provides a convenient way to expose an extensible API with +enforced method signatures and consistent documentation.") + (license license:expat))) + (define-public python-jaraco-classes (package (name "python-jaraco-classes") @@ -11318,25 +12323,18 @@ finding unresolved symbols in Python code and their corresponding imports.") (uri (pypi-uri "jaraco.classes" version)) (sha256 (base32 "0d6g7qvfv1jlzbzh6asprqdblqd59grvlvr3nwbdqdqrmwlbfm7d")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not test the myproject.toml build as it tries to pull - ;; dependencies from the Internet. - (invoke "pytest" "-vv" "-k" "not project"))))))) + (list ; Do not test the myproject.toml build as it pulls dependencies. + #:test-flags '(list "-k" "not project"))) (native-inputs (list python-pytest python-pytest-black python-pytest-checkdocs python-pytest-cov - python-pytest-enabler-bootstrap ;OK since not propagated python-pytest-flake8 python-pytest-mypy + python-setuptools python-setuptools-scm python-wheel)) (propagated-inputs (list python-more-itertools)) @@ -11369,7 +12367,9 @@ class constructs.") python-pytest-checkdocs python-pytest-cov python-pytest-enabler - python-pytest-mypy)) + python-pytest-mypy + python-setuptools + python-wheel)) (home-page "https://github.com/jaraco/jaraco.collections") (synopsis "Provides various collection objects") (description @@ -11407,110 +12407,72 @@ WeightedLookup: A specialized RangeMap for selecting an item by weights. @end itemize") (license license:expat))) -;;; Variant used to break a cycle with python-pytest-enabler. -(define-public python-jaraco-context-bootstrap - (hidden-package - (package - (name "python-jaraco-context-bootstrap") - (version "4.1.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "jaraco.context" version)) - (sha256 - (base32 "0hbjm1rpxf4pzmbdp9rh3ali4zqnlcr8m97bhh1nizxvzcpxim7h")))) - (build-system python-build-system) - (arguments (list #:tests? #f)) - (native-inputs (list python-setuptools-scm)) - (home-page "https://github.com/jaraco/jaraco.context") - (synopsis "Context managers Python library") - (description "This Python library provides context managers-related -procedures.") - (license license:expat)))) - (define-public python-jaraco-context - (package/inherit python-jaraco-context-bootstrap + (package (name "python-jaraco-context") + (version "4.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco.context" version)) + (sha256 + (base32 "0hbjm1rpxf4pzmbdp9rh3ali4zqnlcr8m97bhh1nizxvzcpxim7h")))) + (build-system pyproject-build-system) (arguments - (substitute-keyword-arguments - (package-arguments python-jaraco-context-bootstrap) - ((#:tests? _ #f) - (not (%current-target-system))) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not test the myproject.toml build as it tries to pull - ;; dependencies from the Internet. - (invoke "pytest" "-vv" "-k" "not project")))))))) + (list #:tests? (not (%current-target-system)) + ;; Do not test the myproject.toml build as it pulls dependencies. + #:test-flags '(list "-k" "not project"))) (native-inputs - (modify-inputs - (package-native-inputs python-jaraco-context-bootstrap) - (append python-pytest - python-pytest-black - python-pytest-checkdocs - python-pytest-cov - python-pytest-enabler-bootstrap ;OK since not propagated - python-pytest-flake8 - python-pytest-mypy))) - (properties (alist-delete 'hidden? (package-properties - python-jaraco-context-bootstrap))))) - -;;; Variant used to break a cycle with python-pytest-enabler. -(define-public python-jaraco-functools-bootstrap - (hidden-package - (package - (name "python-jaraco-functools-bootstrap") - (version "3.5.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "jaraco.functools" version)) - (sha256 - (base32 "186xqzs3bqhjwajnprxy3sc3h0w5vdld8spc1dxjnn9720yykq1i")))) - (build-system python-build-system) - (arguments (list #:tests? #f)) - (native-inputs (list python-setuptools-scm)) - (propagated-inputs (list python-more-itertools)) - (home-page "https://github.com/jaraco/jaraco.functools") - (synopsis "Python library extending Python's @code{functools}") - (description "This library extends the standard @code{functools} Python -module with a few extra procedures.") - (license license:expat)))) + (list python-pytest + python-pytest-black + python-pytest-checkdocs + python-pytest-cov + python-pytest-flake8 + python-pytest-mypy + python-setuptools + python-setuptools-scm + python-wheel)) + (home-page "https://github.com/jaraco/jaraco.context") + (synopsis "Context managers Python library") + (description "This Python library provides context managers-related +procedures.") + (license license:expat))) (define-public python-jaraco-functools - (package/inherit python-jaraco-functools-bootstrap + (package (name "python-jaraco-functools") + (version "3.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco.functools" version)) + (sha256 + (base32 "186xqzs3bqhjwajnprxy3sc3h0w5vdld8spc1dxjnn9720yykq1i")))) + (build-system pyproject-build-system) (arguments - (substitute-keyword-arguments - (package-arguments python-jaraco-functools-bootstrap) - ((#:tests? _ #f) - (not (%current-target-system))) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not test the myproject.toml build as it tries to pull - ;; dependencies from the Internet. Do not run a test that - ;; tries to emulate a broken proprietary CI set-up, fails - ;; to do so correctly, and then throws an error about it. - (invoke "pytest" "-vv" "-k" - "not project and not test_function_throttled")))))))) - (native-inputs - (modify-inputs - (package-native-inputs python-jaraco-functools-bootstrap) - (append python-jaraco-classes - python-pytest - python-pytest-black - python-pytest-checkdocs - python-pytest-cov - python-pytest-enabler-bootstrap ;OK since not propagated - python-pytest-flake8 - python-pytest-mypy))) - (properties (alist-delete 'hidden? (package-properties - python-jaraco-functools-bootstrap))))) + (list #:tests? (not (%current-target-system)) + ;; Do not test the myproject.toml build as it pulls dependencies. + ;; Do not run a test that tries to emulate a broken proprietary + ;; CI set-up, fails to do so correctly, and then throws an error. + #:test-flags + '(list "-k" "not project and not test_function_throttled"))) + (native-inputs + (list python-jaraco-classes + python-pytest + python-pytest-black + python-pytest-checkdocs + python-pytest-cov + python-pytest-flake8 + python-pytest-mypy + python-setuptools + python-setuptools-scm + python-wheel)) + (propagated-inputs (list python-more-itertools)) + (home-page "https://github.com/jaraco/jaraco.functools") + (synopsis "Python library extending Python's @code{functools}") + (description "This library extends the standard @code{functools} Python +module with a few extra procedures.") + (license license:expat))) (define-public python-jaraco-packaging (package @@ -11523,7 +12485,10 @@ module with a few extra procedures.") (sha256 (base32 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + '(list "-k" "not project and not test_revived_distribution"))) (propagated-inputs (list python-pytest python-pytest-checkdocs @@ -11543,29 +12508,26 @@ releases.") (define-public python-jaraco-test (package (name "python-jaraco-test") - (version "5.3.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "jaraco.test" version)) - (sha256 - (base32 - "0h0x8qmvfkfqvwdx2m7kwhn53sg26k8gkaas7s1730ak772zqrvz")))) + (version "5.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco_test" version)) + (sha256 + (base32 "0xfkly5w4i4npi4pq1g32y8q8iijkq4pfcfs8wcjhfn4amj6212c")))) (build-system pyproject-build-system) (arguments - (list - #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest" "-vv" "-k" "http")))))) - (propagated-inputs (list python-jaraco-context python-jaraco-functools)) - (native-inputs (list python-flake8 - python-pytest - python-pytest-black - python-pytest-checkdocs - python-pytest-cov - python-pytest-enabler - python-pytest-flake8 - python-pytest-mypy)) + (list #:test-flags '(list "-k" "http"))) + (native-inputs + (list python-jaraco-collections + python-pytest + python-pytest-checkdocs + python-pytest-enabler + python-setuptools + python-wheel)) + (propagated-inputs + (list python-jaraco-context + python-jaraco-functools)) (home-page "https://github.com/jaraco/jaraco.test") (synopsis "Testing support by jaraco") (description "This package provides testing support by jaraco.") @@ -11596,7 +12558,9 @@ releases.") python-pytest-checkdocs python-pytest-cov python-pytest-enabler - python-pytest-mypy)) + python-pytest-mypy + python-setuptools + python-wheel)) (home-page "https://github.com/jaraco/jaraco.text") (synopsis "Provides various routines for text manipulation") (description @@ -11829,20 +12793,26 @@ connect strings, then issue SQL commands within IPython or IPython Notebook.") (define-public python-traitlets (package (name "python-traitlets") - (version "5.9.0") + (version "5.14.1") (source (origin (method url-fetch) (uri (pypi-uri "traitlets" version)) (sha256 (base32 - "1ndslgsan1g5xhrvxrv2x03zcfvjb8nzfd90y1m7bkv8khdf5kgn")))) + "0zjj8ha4z5lbhhmvcl3q8wp5qmwqq0lwxma3d8qvh10s6xdi11c5")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + '(list "-k" "not mypy_list_typing and not mypy_dict_typing"))) (native-inputs - (list python-hatchling - python-pre-commit + (list python-argcomplete + python-hatchling + python-mypy python-pytest - python-pytest-mock)) + python-pytest-mock + python-pytest-mypy-testing)) (home-page "https://ipython.org") (synopsis "Configuration system for Python applications") (description @@ -11857,57 +12827,90 @@ without using the configuration machinery.") (define-public python-treelib (package (name "python-treelib") - (version "1.6.1") + (version "1.7.0") (source (origin (method url-fetch) (uri (pypi-uri "treelib" version)) (sha256 (base32 - "1247rv9fbb8pw3xbkbz04q3vnvvva3hcw002gp1clp5psargzgqw")))) + "0qgv61g1p06kzf5fd2hcim5s49nzbv8k210frnk45rmr2vs1mzwv")))) (build-system python-build-system) - (propagated-inputs (list python-future)) + (propagated-inputs (list python-six)) (home-page "https://github.com/caesar0301/treelib") (synopsis "Implementation of a tree structure in Python") (description "This package provides a Python implementation of a tree structure.") (license license:asl2.0))) +(define-public python-optree + (package + (name "python-optree") + (version "0.11.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/metaopt/optree") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0sk5lm1xyxi7z0yjckip77qvbidyb7i1znmn9fz96q74hl9ffyan")) + (patches (search-patches "python-optree-fix-32-bit.patch")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; This test fails due to a circular import + ''("-k" "not test_treespec_pickle_missing_registration"))) + (propagated-inputs (list python-typing-extensions)) + (native-inputs + (list python-pytest + python-setuptools + python-wheel + cmake + pybind11)) + (home-page "https://github.com/metaopt/optree") + (synopsis "Optimized PyTree Utilities") + (description "This package contains operations on PyTrees (a tree made of +container data structures in Python).") + (license license:asl2.0))) + (define-public python-jupyter-core (package (name "python-jupyter-core") - (version "4.10.0") + (version "5.7.2") (source (origin (method url-fetch) (uri (string-append (pypi-uri "jupyter_core" version))) (sha256 (base32 - "1v0s31rmwppdmww135hif03hy164j9kimirh24kxfcbvdfql9pm6")))) - (build-system python-build-system) + "1n9nyp1skljbbkqp4j7mnihnyp83j9rxm5h4hfn33d7npcr8spxa")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Some tests write to $HOME. - (setenv "HOME" "/tmp") - (invoke "pytest" "-vv" - "-k" - (string-append - ;; XXX: These tests fail with "ModuleNotFoundError: No - ;; module named 'jupyter_core'". - "not test_argv0 and not test_path_priority " - "and not test_not_on_path"))))) - (add-after 'unpack 'patch-testsuite - (lambda _ - ;; test_not_on_path() and test_path_priority() try to run a test - ;; that loads jupyter_core, so we need GUIX_PYTHONPATH - (substitute* "jupyter_core/tests/test_command.py" - (("env = \\{'PATH': ''\\}") - "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}") - (("env = \\{'PATH': str\\(b\\)\\}") - "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")))) + (list + #:test-flags + '(list "-k" + (string-append + ;; XXX: These tests fail with "ModuleNotFoundError: No + ;; module named 'jupyter_core'". + "not test_argv0" + " and not test_path_priority " + " and not test_not_on_path" + + ;; These fail with: An incompatible sibling of 'AsyncTornadoApp' + ;; is already instantiated as singleton: SyncTornadoApp + " and not test_async_app" + " and not test_async_tornado_app" + + ;; Fails with a deprecation warning + " and not test_sync_tornado_run")) + #:phases + '(modify-phases %standard-phases + (add-before 'check 'pre-check + ;; Some tests write to $HOME. + (lambda _ (setenv "HOME" "/tmp"))) ;; Migration is running whenever etc/jupyter exists, but the ;; Guix-managed directory will never contain any migratable IPython ;; config files and cannot be written to anyway, so just pretend we @@ -11916,11 +12919,16 @@ without using the configuration machinery.") (lambda* (#:key outputs #:allow-other-keys) (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter")) (invoke "touch" - (string-append - (assoc-ref outputs "out") - "/etc/jupyter/migrated"))))))) - (propagated-inputs (list python-traitlets)) - (native-inputs (list python-pytest)) + (string-append + (assoc-ref outputs "out") + "/etc/jupyter/migrated"))))))) + (propagated-inputs (list python-platformdirs python-traitlets)) + (native-inputs (list python-hatchling + python-pip + python-pre-commit + python-pytest + python-pytest-cov + python-pytest-timeout)) ;; This package provides the `jupyter` binary and thus also exports the ;; search paths. (native-search-paths @@ -11943,14 +12951,14 @@ without using the configuration machinery.") (hidden-package (package (name "python-jupyter-client-bootstrap") - (version "7.2.2") + (version "7.4.4") (source (origin (method url-fetch) (uri (pypi-uri "jupyter_client" version)) (sha256 (base32 - "12pbp177bfb3710y1a5598mwn8ffhyzmpll67m0nmalb98savnwg")))) + "0ck8fb0d582r8izkcn7087zmbmmqf9jkv2abd8p44867k9hdn5jn")))) (build-system pyproject-build-system) (arguments (list @@ -11979,6 +12987,8 @@ without using the configuration machinery.") python-pyzmq python-tornado-6 python-traitlets)) + (native-inputs + (list python-hatchling)) (home-page "https://jupyter.org/") (synopsis "Jupyter protocol implementation and client libraries") (description @@ -12004,14 +13014,17 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (when tests? ;; Some tests try to write to $HOME. (setenv "HOME" "/tmp") - (invoke "pytest" "-vv" + ;; jupyter-core demands this be set. + (setenv "JUPYTER_PLATFORM_DIRS" "1") + (invoke "pytest" "-vv" "-Wignore::DeprecationWarning" "-k" ;; XXX "RuntimeError: Kernel died before replying ;; to kernel_info", but there's no more ;; information. "not test_start_parallel_process_kernels")))))))) (native-inputs - (list python-pytest + (list python-hatchling + python-pytest python-pytest-asyncio python-pytest-timeout python-async-generator @@ -12022,48 +13035,45 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (define-public python-ipykernel (package (name "python-ipykernel") - (version "6.13.0") + (version "6.29.4") (source (origin (method url-fetch) (uri (pypi-uri "ipykernel" version)) (sha256 - (base32 "0q5yni8h08nadsn53f957p0pjsjhwl2b2lp1hqz3jn0854z2fa0f")))) + (base32 "0p5g897pq6k9nr44ihlk4hp5s46zz8ih2xib1715lizrc000fi1x")))) (build-system pyproject-build-system) (arguments (list #:modules '((guix build pyproject-build-system) (guix build utils) (ice-9 match)) + #:test-flags + ;; XXX: probably not good that this fails + '(list "-k" "not test_copy_to_globals" "-Wignore::DeprecationWarning") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'relax-a-bit + (lambda _ + ;; I'm sure nobody will notice. + (substitute* "pyproject.toml" + (("debugpy>=1.6.5") "debugpy>=1.6.0")))) ;; The deprecation warnings break the tests. - (add-after 'unpack 'hide-zmq-deprecation-warnings - (lambda _ - (substitute* "pyproject.toml" - (("\"ignore:There is no current event loop:DeprecationWarning\"" m) - (string-append m ", + (add-after 'unpack 'hide-deprecation-warnings + (lambda _ + (substitute* "pyproject.toml" + (("\"ignore:There is no current event loop:DeprecationWarning\"" m) + (string-append m ", +\"ignore:the imp module is deprecated:DeprecationWarning\", +\"ignore:pytest-asyncio detected an unclosed event loop:DeprecationWarning\", \"ignore:make_current is deprecated.*:DeprecationWarning\", \"ignore:zmq.eventloop.ioloop.*:DeprecationWarning\", \"ignore:zmq.tests.BaseZMQTestCase.*:DeprecationWarning\""))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (match (primitive-fork) - (0 ;child process - (setenv "HOME" "/tmp") - (execlp "pytest" "pytest" "-vv")) - (pytest-pid - ;; Reap zombie processes, necessary for the - ;; 'test_shutdown_subprocesses' test to pass. - (let loop () - (match (waitpid WAIT_ANY) - ((pid . status) - (if (= pid pytest-pid) - (unless (zero? status) - (error "`pytest' exited with status" - status)) - (loop)))))))))) + (add-before 'check 'pre-check + (lambda _ + ;; jupyter-core demands this be set. + (setenv "JUPYTER_PLATFORM_DIRS" "1") + (setenv "HOME" "/tmp"))) (add-after 'install 'set-python-file-name (lambda* (#:key inputs #:allow-other-keys) ;; Record the absolute file name of the 'python' executable in @@ -12074,24 +13084,26 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (format #f "~s" (search-input-file inputs "/bin/python3"))))))))) (propagated-inputs - (list python-debugpy + (list python-comm + python-debugpy python-ipython - python-jupyter-client ;imported at runtime during connect + python-jupyter-client + python-jupyter-core python-matplotlib-inline - ;;python-nest-asyncio - ;;python-packaging + python-nest-asyncio + python-packaging python-psutil + python-pyzmq python-tornado-6 python-traitlets)) (inputs (list python)) ;for cross compilation (native-inputs (list python-flaky + python-hatchling python-ipyparallel-bootstrap - ;; XXX: Our Pytest package captures its native inputs in its - ;; wrapper script (such as python-nose), which is used in the code - ;; and causes deprecation warnings. Using the bootstrap variant - ;; avoids that. - python-pytest-bootstrap + python-pytest + python-pytest-asyncio + python-pytest-cov python-pytest-timeout)) (home-page "https://ipython.org") (synopsis "IPython Kernel for Jupyter") @@ -12111,11 +13123,10 @@ installing @code{kernelspec}s for use with Jupyter frontends.") ;; left out here to break the cycle. #:phases #~(modify-phases %standard-phases (delete 'sanity-check)))) - (native-inputs '()) + (native-inputs (list python-hatchling)) (propagated-inputs (modify-inputs (package-propagated-inputs parent) - (replace "python-jupyter-client" python-jupyter-client-bootstrap) - (append python-ipyparallel-bootstrap))))))) + (replace "python-jupyter-client" python-jupyter-client-bootstrap))))))) (define-public python-pari-jupyter (package @@ -12181,7 +13192,9 @@ callback signature using a prototype function.") python-unidecode)) (native-inputs (list python-pytest - python-pytest-cov)) + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://github.com/titipata/pubmed_parser") (synopsis "Parser for Pubmed Open-Access Subset and MEDLINE XML repository") (description @@ -12192,21 +13205,48 @@ MEDLINE XML repository.") (define-public python-pure-eval (package (name "python-pure-eval") - (version "0.2.2") + (version "0.2.3") (source (origin (method url-fetch) (uri (pypi-uri "pure_eval" version)) (sha256 - (base32 "1hwsm85cwqwh6d6x4vzcimla2865s6v19ms3ym81ganzyq534i9b")))) - (build-system python-build-system) - (native-inputs (list python-pytest python-setuptools-scm)) + (base32 "0hmg1qcv1h5k0dyj7sfp54ibnmjrvf4awdc6gin5fk2n80zrhkjz")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/alexmojaki/pure_eval") (synopsis "Python library to evaluate abstract syntax tree nodes") (description "The @code{pure_eval} Python library can safely evaluate abstract syntax tree (AST) nodes without side effects.") (license license:expat))) +(define-public python-puremagic + (package + (name "python-puremagic") + (version "1.28") + (source + (origin + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/cdgriffith/puremagic") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sffrjjqh37ijwnggyvs2rfm4iwaz2m395wqg0x727wv8i0x3f3b")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/cdgriffith/puremagic") + (synopsis "Pure Python implementation of magic file detection") + (description + "This package implements a functionality that will identify a file based +off it's magic numbers.") + (license license:expat))) + (define-public python-ast-decompiler (package (name "python-ast-decompiler") @@ -12238,16 +13278,22 @@ to Python code.") (define-public python-asttokens (package (name "python-asttokens") - (version "2.2.1") + (version "2.4.1") (source (origin (method url-fetch) (uri (pypi-uri "asttokens" version)) (sha256 - (base32 "1wwlpvnrh67z4228841zgpqc46vigslzmbvk2izbfc3g585i28j6")))) - (build-system python-build-system) - (propagated-inputs (list python-six)) - (native-inputs (list python-astroid python-pytest python-setuptools-scm)) + (base32 "182b4l8sys07a46icg68h7b3d8iqkzvgsjqkgq1fp9m9idqnjf5h")))) + (build-system pyproject-build-system) + (native-inputs + (list python-astroid + python-pytest + python-setuptools + python-setuptools-scm + python-wheel)) + (propagated-inputs + (list python-six)) (home-page "https://github.com/gristlabs/asttokens") (synopsis "Python library to annotate abstract syntax trees") (description "The @code{asttokens} module annotates Python abstract syntax @@ -12277,22 +13323,34 @@ functions, useful in the context of writing unit tests among other uses.") (define-public python-stack-data (package (name "python-stack-data") - (version "0.2.0") + (version "0.6.3") (source (origin (method url-fetch) (uri (pypi-uri "stack_data" version)) (sha256 - (base32 "04lfcj5qrn4qikjw89qbdzqwm0xm4bgm4m8rll1rafk3pm0jssa5")))) - (build-system python-build-system) - (propagated-inputs (list python-asttokens python-executing python-pure-eval)) + (base32 "1fgh900z6g1amb2f2ql461c1y8lazymxi7nqvk8xri7ywj6pfsl3")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-home-env + (lambda _ + (setenv "HOME" "/tmp")))))) (native-inputs (list python-cython python-littleutils python-pygments python-pytest + python-setuptools python-setuptools-scm - python-typeguard)) + python-typeguard + python-wheel)) + (propagated-inputs + (list python-asttokens + python-executing + python-pure-eval)) (home-page "https://github.com/alexmojaki/stack_data") (synopsis "Python stack frame and traceback manipulation library") (description "The @code{stack_data} Python library extracts data from @@ -12303,17 +13361,25 @@ than the default.") (define-public python-ipython (package (name "python-ipython") - (version "8.5.0") + (version "8.29.0") (source (origin - (method url-fetch) - (uri (pypi-uri "ipython" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ipython/ipython") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "114z175hnv1lgprj06zfcil7lkq013rggjbrc43gsxkmv1fdyyq9")))) - (build-system python-build-system) + (base32 "03yrq0wsi98y1v3rf7ai013xhv46i7167dccp1244sfvrsrs4962")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "-k" + ;; These need git. + "not test_json_getsysinfo and not IPython.utils.sysinfo.sys_info") + #:phases + '(modify-phases %standard-phases (add-after 'unpack 'make-docs-reproducible (lambda _ (substitute* "IPython/sphinxext/ipython_directive.py" @@ -12321,39 +13387,36 @@ than the default.") ((".*datetime.datetime.now\\(\\)") "") (("%timeit") "# %timeit")))) (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (lambda* (#:key tests? test-flags #:allow-other-keys) (when tests? (setenv "HOME" "/tmp/") ;required by some tests - (invoke "python" "-m" "pytest" "-vv"))))))) + (apply invoke "python" "-m" "pytest" "-vv" + test-flags))))))) (inputs (list readline which)) (propagated-inputs - (list python-backcall + (list python-colorama python-decorator + python-exceptiongroup python-jedi - python-jinja2 - python-jsonschema - python-matplotlib python-matplotlib-inline - python-mistune - python-nbformat - python-numpy - python-numpydoc python-pexpect - python-pickleshare python-prompt-toolkit python-pygments - python-pyzmq - python-simplegeneric python-stack-data - python-terminado - python-traitlets)) + python-traitlets + python-typing-extensions)) (native-inputs - (list graphviz - pkg-config - ;; For tests. + (list python-curio + python-matplotlib + python-nbformat + python-numpy + python-pandas + python-pickleshare python-pytest - python-requests - python-testpath)) + python-pytest-asyncio + python-setuptools + python-testpath + python-wheel)) (home-page "https://ipython.org") (synopsis "IPython is a tool for interactive computing in Python") (description @@ -12438,27 +13501,70 @@ computing.") texlive-xetex texlive-xindy)))))) +(define-public python-uri-template + (package + (name "python-uri-template") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "uri-template" version)) + (sha256 + (base32 "1ixczlgnsjv2850r6w0cb2npwcwzdqri8njr1pi7v371cpmzh00f")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "test.py"))))))) + (native-inputs + (list python-setuptools + python-setuptools-scm + python-wheel)) + (home-page "https://gitlab.linss.com/open-source/python/uri-template") + (synopsis "RFC 6570 URI Template Processor") + (description "This packages implements URI Template expansion in strict +adherence to RFC 6570, but adds a few extensions.") + (license license:expat))) + (define-public python-urwid (package (name "python-urwid") - (version "2.1.2") + (version "2.6.16") (source (origin (method url-fetch) (uri (pypi-uri "urwid" version)) (sha256 (base32 - "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq")))) - (build-system python-build-system) + "18ijvgf1l7jvmg45x1cysn3c9rdrg1w0405acig3hk7476cj7bck")))) + (build-system pyproject-build-system) (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'remove-vterm-tests + (list + #:test-flags + #~(list "tests" ;; According to Debian these tests are cursed. ;; https://salsa.debian.org/python-team/packages/urwid/-/blob/debian/2.1.2-2/debian/changelog#L141 - (lambda _ - (delete-file "urwid/tests/test_vterm.py")))))) + "--ignore=tests/test_vterm.py"))) + (native-inputs + (list python-pytest + python-pytest-cov + python-setuptools + python-setuptools-scm + python-wheel)) + (propagated-inputs + (list python-typing-extensions + python-wcwidth + + ;; Optional, but tests need them. + python-pygobject + python-tornado + python-trio + python-pyzmq + python-twisted)) (home-page "https://urwid.org") (synopsis "Console user interface library for Python") (description @@ -12500,15 +13606,16 @@ supports @code{readline} shortcuts.") (define-public python-urwidgets (package (name "python-urwidgets") - (version "0.2.0") + (version "0.2.1") (source (origin (method url-fetch) (uri (pypi-uri "urwidgets" version)) (sha256 - (base32 "123n9qfg6qwwh1911y71c3msxi89n8cjj15wh2snqmwdkyfwy6nl")))) + (base32 "1vrydw9h8c5gi89dnv12a9cdyyxaffvxl1kq51f118cxjk9brwpr")))) (build-system pyproject-build-system) (propagated-inputs (list python-urwid)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/AnonymouX47/urwidgets") (synopsis "Collection of widgets for urwid") (description @@ -12672,6 +13779,7 @@ implementation of D-Bus.") (package/inherit python-dbus (name "python2-dbus") (inputs `(("python" ,python-2) + ("libxcrypt" ,libxcrypt) ;required by Python.h ,@(alist-delete "python" (package-inputs python-dbus)))) (arguments @@ -12731,23 +13839,18 @@ the GObject Introspection bindings to libnotify for non-GTK applications.") (define-public python-beautifulsoup4 (package (name "python-beautifulsoup4") - (version "4.11.1") + (version "4.12.3") (source (origin (method url-fetch) (uri (pypi-uri "beautifulsoup4" version)) (sha256 (base32 - "14v68cpfzckfz63n9hnbsm271jvzvxscyijz83mhha7gcmdsb6md")))) - (build-system python-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + "0l8hg3vz9q5fx7gav8sj5zr90d5k7xpc91c1fhhhs1ywis9d3qvl")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-hatchling + python-pytest)) (propagated-inputs (list python-soupsieve python-html5lib python-lxml)) (home-page @@ -12817,31 +13920,44 @@ interfaces in an easy and portable manner.") (define-public python-networkx (package (name "python-networkx") - (version "2.8.6") + (version "3.4.2") (source (origin (method url-fetch) (uri (pypi-uri "networkx" version)) (sha256 - (base32 "19h18f5j79l7kmwm5cvm75fadjgmkzw5m3pyvb9cnq0860q7faxx")))) - (build-system python-build-system) + (base32 "1qaks3c3h5qlw25z949q3plw8iwgm9h152kwnam64lwc89lkcz1h")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-vv" "--pyargs" "networkx") - (format #t "test suite not run~%")) #t))))) - (propagated-inputs (list python-decorator)) - (native-inputs (list python-pytest)) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count))))) + (native-inputs + (list python-pytest + python-pytest-xdist + python-setuptools + python-wheel)) + (propagated-inputs + (list python-decorator)) (home-page "https://networkx.github.io/") - (synopsis - "Python module for creating and manipulating graphs and networks") + (synopsis "Python module for creating and manipulating graphs and networks") (description "NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.") (license license:bsd-3))) +(define-public python-networkx-next + (package + (inherit python-networkx) + (name "python-networkx") + (version "3.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "networkx" version)) + (sha256 + (base32 "1qaks3c3h5qlw25z949q3plw8iwgm9h152kwnam64lwc89lkcz1h")))) + (build-system pyproject-build-system))) (define-public python-datrie (package @@ -12910,6 +14026,30 @@ generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.") (license license:expat))) +(define-public python-py-partiql-parser + (package + (name "python-py-partiql-parser") + (version "0.5.6") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/getmoto/py-partiql-parser") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xa1plsi2nkd3fwvkjw9c8b3bzvr6ml83x5gd22sf1cvimqn0jmq")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pytest)) + (home-page "https://pypi.org/project/py-partiql-parser/") + (synopsis "Pure Python PartiQL Parser") + (description + "This package provides a tokenizer/parser/executor for the PartiQL +language, in Python.") + (license license:expat))) + (define-public python-py-tes (package (name "python-py-tes") @@ -12959,7 +14099,7 @@ algorithm.") (sha256 (base32 "01j48np3g50g6insjkszsz0vifwlm6gspria5vdwlkbciywznnhv")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://altgraph.readthedocs.io") (synopsis "Python graph network package") (description @@ -13005,17 +14145,41 @@ approach.") (version "5.32.2") (source (origin - (method url-fetch) - (uri (pypi-uri "snakemake" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/snakemake/snakemake") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz")))) - (build-system python-build-system) + (base32 "0nxp4z81vykv07kv2b6zrwk7ns8s10zqsb7vcignp8695yq3nlcm")))) + (build-system pyproject-build-system) (arguments - ;; TODO: Package missing test dependencies. (list - #:tests? #f + #:test-flags + '(list + ;; We have no TES support. + "--ignore=tests/test_tes.py" + ;; This test attempts to change S3 buckets on AWS and fails + ;; because there are no AWS credentials. + "--ignore=tests/test_tibanna.py" + ;; It's a similar story with this test, which requires access + ;; to the Google Storage service. + "--ignore=tests/test_google_lifesciences.py") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'tabulate-compatibility + (lambda _ + (substitute* "snakemake/dag.py" + (("\"job\": rule,") + "\"job\": rule.name,")))) + (add-after 'unpack 'patch-version + (lambda _ + (substitute* "setup.py" + (("version=versioneer.get_version\\(\\)") + (format #f "version=~s" #$version))) + (substitute* '("snakemake/_version.py" + "versioneer.py") + (("0\\+unknown") #$version)))) ;; For cluster execution Snakemake will call Python. Since there is ;; no suitable PYTHONPATH set, cluster execution will fail. We fix ;; this by calling the snakemake wrapper instead. @@ -13023,7 +14187,9 @@ approach.") (lambda _ (substitute* "snakemake/executors/__init__.py" (("\\{sys.executable\\} -m snakemake") - (string-append #$output "/bin/snakemake")))))))) + (string-append #$output "/bin/snakemake"))))) + (add-before 'check 'pre-check + (lambda _ (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-appdirs python-configargparse @@ -13041,6 +14207,14 @@ approach.") python-requests python-toposort python-wrapt)) + (native-inputs + (list git-minimal + python-wrapper + python-pytest + python-pandas + python-requests-mock + python-setuptools + python-wheel)) (home-page "https://snakemake.readthedocs.io") (synopsis "Python-based execution environment for make-like workflows") (description @@ -13079,6 +14253,11 @@ Python style, together with a fast and comfortable execution environment.") (substitute* "snakemake/executors/__init__.py" (("\\{sys.executable\\} -m snakemake") (string-append #$output "/bin/snakemake"))))) + (add-after 'unpack 'tabulate-compatibility + (lambda _ + (substitute* "snakemake/dag.py" + (("\"job\": rule,") + "\"job\": rule.name,")))) (add-after 'unpack 'patch-version (lambda _ (substitute* "setup.py" @@ -13123,7 +14302,9 @@ Python style, together with a fast and comfortable execution environment.") python-wrapper python-pytest python-pandas - python-requests-mock)))) + python-requests-mock + python-setuptools + python-wheel)))) (define-public snakemake-7 (package @@ -13170,6 +14351,12 @@ Python style, together with a fast and comfortable execution environment.") (string-append "tibanna_args.command = command.replace('" #$output "/bin/snakemake', 'python3 -m snakemake')"))))) + ;; No longer needed with 7.15.2+ + (add-after 'unpack 'tabulate-compatibility + (lambda _ + (substitute* "snakemake/dag.py" + (("\"job\": rule,") + "\"job\": rule.name,")))) (add-after 'unpack 'patch-version (lambda _ (substitute* "setup.py" @@ -13219,7 +14406,9 @@ Python style, together with a fast and comfortable execution environment.") python-wrapper python-pytest python-pandas - python-requests-mock)))) + python-requests-mock + python-setuptools + python-wheel)))) (define-public python-pyqrcode (package @@ -13253,23 +14442,22 @@ SVG, EPS, PNG and terminal output.") "0ycibcs6kvd3xi4zsxna81claqifyb9dn6z6jwc5x7lqqplnbbdz")))) (build-system pyproject-build-system) (propagated-inputs - (list python-ipykernel - python-matplotlib - python-mypy - python-nbconvert + (list python-matplotlib python-numpy - python-numpydoc python-pandas - python-pyyaml python-scipy python-statsmodels)) (native-inputs (list python-flake8 python-flit-core - python-pre-commit + python-ipykernel + python-nbconvert + python-numpydoc + python-mypy python-pytest python-pytest-cov - python-pytest-xdist)) + python-pytest-xdist + python-pyyaml)) (home-page "https://seaborn.pydata.org/") (synopsis "Statistical data visualization") (description @@ -13503,6 +14691,7 @@ falling into the Python interpreter.") "{ name = \"Maarten van der Sande\", email = \"maartenvandersande@hotmail.com\"}") (("license = \"MIT\"") "license = { file = \"LICENSE\"}"))))))) (propagated-inputs (list python-numba python-numpy python-pandas)) + (native-inputs (list python-setuptools python-wheel python-toml)) (home-page "https://github.com/Maarten-vd-Sande/qnorm") (synopsis "Quantile normalization") (description "This tool implements quantile normalization. It properly @@ -13563,7 +14752,9 @@ low-level X clients. It is written entirely in Python.") (build-system pyproject-build-system) (native-inputs (list python-pytest - python-six)) ; required for conversion, not at run-time + python-setuptools + python-six ; required for conversion, not at run-time + python-wheel)) (home-page "https://docs.python.org/3/library/functools.html#functools.singledispatch") (synopsis "Backport of singledispatch feature from Python 3.4") @@ -13705,7 +14896,7 @@ applications.") python-cython python-pytest python-pytest-asyncio - python-tornado)) + python-tornado-6)) (home-page "https://github.com/zeromq/pyzmq") (synopsis "Python bindings for 0MQ") (description @@ -13736,30 +14927,44 @@ replacement for dictionaries where immutability is desired.") (define-public python-emoji (package (name "python-emoji") - (version "1.6.1") + (version "2.12.1") (source (origin (method url-fetch) (uri (pypi-uri "emoji" version)) (sha256 - (base32 "0923mpixwq6hdpkgvi4r46alfvf608iq975rb8lnqpq29j71mmjk")))) - (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"))))))) + (base32 "1svk94pad8gcvjwd329zmfrw09wakwh6qjvnhf6sa6k92y44i82a")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest + python-setuptools + python-typing-extensions + python-wheel)) (home-page "https://github.com/carpedm20/emoji/") (synopsis "Emoji terminal output for Python") - (description "This package provides Emoji terminal output for Python. The + (description + "This package provides Emoji terminal output for Python. The entire set of Emoji codes as defined by the Unicode Consortium is supported in addition to a bunch of aliases.") (license license:bsd-3))) +;; TODO: Remove this package when upgrading python-gh-md-to-html to the +;; latest version. The latest gh-md-to-html does not build successfully from +;; the PyPI distribution. Let's resolve #72102 while keeping gh-md-to-html at +;; version 1.21.2 from failing. +;; https://issues.guix.gnu.org/72102 +;; https://github.com/phseiff/github-flavored-markdown-to-html/issues/73 +(define-public python-emoji-for-gh-md-to-html + (package + (inherit python-emoji) + (version "1.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "emoji" version)) + (sha256 + (base32 "0923mpixwq6hdpkgvi4r46alfvf608iq975rb8lnqpq29j71mmjk")))))) + (define-public python-sarge (package (name "python-sarge") @@ -13840,6 +15045,14 @@ you do not want to store entirely on disk or on memory.") (arguments `(#:phases (modify-phases %standard-phases + (add-before 'check 'fix-test + ;; See https://github.com/getsentry/sentry-python/pull/2712 + (lambda _ + (substitute* "tests/__init__.py" + (("import pytest") + "import warnings") + (("pytest.warns\\(None\\)") + "warnings.catch_warnings(record=True)")))) (replace 'check (lambda* (#:key inputs outputs tests? #:allow-other-keys) (when tests? @@ -13894,7 +15107,12 @@ you do not want to store entirely on disk or on memory.") " and not test_finds_transaction_when_descendent_span_is_on_scope" " and not test_finds_orphan_span_on_scope" " and not test_finds_non_orphan_span_on_scope" - " and not test_circular_references")))))))) + " and not test_circular_references" + + ;; AttributeError: module 'py' has no attribute 'process' + ;; See <https://github.com/pytest-dev/pytest-forked/issues/88>. + " and not test_threading" + " and not test_transport")))))))) (native-inputs (list python-django python-executing @@ -13942,21 +15160,57 @@ PEP 8.") (define-public python-pep8-naming (package (name "python-pep8-naming") - (version "0.13.0") + (version "0.14.1") (source (origin (method url-fetch) (uri (pypi-uri "pep8-naming" version)) (sha256 - (base32 - "1dc0b6xw1cxp01v9zsv4ryk49rfs1lngfpvzsixgp8b7z3ffcf4z")))) - (build-system python-build-system) - (propagated-inputs (list python-flake8)) + (base32 "0dlapswhvzkkyw9gmjngc4rbzasdxnpxwj8mdkmmfmc7h2p2iwhy")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "run_tests.py"))))))) + (native-inputs + (list python-setuptools + python-wheel)) + (propagated-inputs + (list python-flake8)) (home-page "https://github.com/PyCQA/pep8-naming") (synopsis "Check PEP-8 naming conventions") (description - "This package provides the @code{pep8-naming} Python module, a -plugin for flake8 to check PEP-8 naming conventions.") + "This package provides the @code{pep8-naming} Python module, a plugin for +flake8 to check PEP-8 naming conventions.") + (license license:expat))) + +(define-public python-pep440 + (package + (name "python-pep440") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pep440" version)) + (sha256 + (base32 "0kfhysbyci4f2sxvv991yvn22kbhncn0jg1arbhzw4rbri375csq")))) + (build-system pyproject-build-system) + (arguments + ;; This checks for "pep440" in the output, but we actually print + ;; ".pep440-real" due to wrapping. + (list #:test-flags '(list "-k" "not test_cli_help"))) + (propagated-inputs (list python-check-manifest python-mypy python-pytest + python-pytest-console-scripts python-pytest-cov)) + (native-inputs (list python-flit-core)) + (home-page "https://pypi.org/project/pep440/") + (synopsis "Utils to check whether versions number match PEP 440") + (description + "This package provides a simple package with utils to check whether +versions number match PEP 440.") (license license:expat))) (define-public python-pep517 @@ -13976,7 +15230,7 @@ plugin for flake8 to check PEP-8 naming conventions.") (define-public python-pyproject-metadata (package (name "python-pyproject-metadata") - (version "0.6.1") + (version "0.7.1") (source (origin (method git-fetch) @@ -13986,10 +15240,17 @@ plugin for flake8 to check PEP-8 naming conventions.") (file-name (git-file-name name version)) (sha256 (base32 - "00zahgw9zjfqwf0218bj5k732aibnn68cq1p8f0wmbirb7fy5k31")))) + "0yvs59ymz5gdix34a95wxlxvk9bnvjgrzsnmnc3ws7whpfv3yasm")))) (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Two tests fail because the error message slightly changed, so the + ;; tests' regular expressions no longer match. + '(list "--ignore=tests/test_standard_metadata.py"))) (propagated-inputs (list python-packaging)) - (native-inputs (list python-pypa-build python-pytest python-tomli)) + (native-inputs (list python-pypa-build python-pytest python-setuptools + python-tomli python-wheel)) (home-page "https://github.com/FFY00/python-pyproject-metadata") (synopsis "Dataclass for PEP 621 metadata") (description "This project does not implement the parsing of @@ -13999,22 +15260,6 @@ validate this input and generate a PEP 643-compliant metadata file (e.g. @file{PKG-INFO}).") (license license:expat))) -(define-public python-pyproject-metadata-0.7 - (package - (inherit python-pyproject-metadata) - (name "python-pyproject-metadata") - (version "0.7.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/FFY00/python-pyproject-metadata") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0yvs59ymz5gdix34a95wxlxvk9bnvjgrzsnmnc3ws7whpfv3yasm")))))) - ;; pep621 was renamed to pyproject-metadata. (define-public python-pep621 (deprecated-package "python-pep621" python-pyproject-metadata)) @@ -14040,39 +15285,49 @@ use of the Meson build system.") (define-public python-pyflakes (package (name "python-pyflakes") - (version "2.4.0") + (version "3.2.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "pyflakes" version)) - (sha256 - (base32 - "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "pyflakes" version)) + (sha256 + (base32 "0gxgz0kg008pgmjk1dn8z3g00dfa9pc3f80pm6r1yqjly4zn0q8w")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/PyCQA/pyflakes") (synopsis "Passive checker of Python programs") (description - "Pyflakes statically checks Python source code for common errors.") + "Pyflakes statically checks Python source code for common errors.") (license license:expat))) (define-public python-mccabe (package (name "python-mccabe") - (version "0.6.1") + (version "0.7.0") (source (origin (method url-fetch) (uri (pypi-uri "mccabe" version)) (sha256 - (base32 - "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx")))) - (build-system python-build-system) + (base32 "09b34c7jj2a0yya7fp3x7lncna4zj7pr4caj9vgvnq1vqd0053il")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Test fixtures are not released yet, see + ;; <https://github.com/PyCQA/mccabe/issues/93> + #:tests? #f)) (native-inputs - (list python-toml python-pytest-bootstrap python-pytest-runner)) + (list python-toml + python-setuptools + python-wheel)) (home-page "https://github.com/PyCQA/mccabe") (synopsis "McCabe checker, plugin for flake8") - (description "This package provides a Flake8 plug-in to compute the McCabe -cyclomatic complexity of Python source code.") + (description + "This package provides a Flake8 plug-in to compute the McCabe cyclomatic +complexity of Python source code.") (license license:expat))) (define-public python-autoflake8 @@ -14104,27 +15359,26 @@ cyclomatic complexity of Python source code.") (define-public python-flake8 (package (name "python-flake8") - (version "4.0.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "flake8" version)) - (sha256 - (base32 - "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v"))))))) + (version "7.1.1") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/pycqa/flake8") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qbj2m1ljyvpnncnkbm1cscy726c1if4n2c9ysfpmd2zm88rj87a")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-entrypoints - python-mccabe + (list python-mccabe python-pycodestyle python-pyflakes)) - (native-inputs (list python-pytest)) - (home-page "https://gitlab.com/pycqa/flake8") + (home-page "https://flake8.pycqa.org/en/latest/") (synopsis "The modular source code checker: pep8, pyflakes and co") (description "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") @@ -14153,35 +15407,28 @@ blind @code{except:} statements.") (define-public python-flake8-bugbear (package (name "python-flake8-bugbear") - (version "20.1.4") + (version "24.10.31") (source (origin (method url-fetch) - (uri (pypi-uri "flake8-bugbear" version)) + (uri (pypi-uri "flake8_bugbear" version)) (sha256 - (base32 - "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'check 'disable-test - (lambda _ - ;; This test fails on slow computers. - (substitute* "tests/test_bugbear.py" - (("def test_does_not_crash_on_any_valid_code") - "def _test_does_not_crash_on_any_valid_code"))))))) + (base32 "1nrrwhfmk49riflmng26qqjzvfang5lij14ripzqwzxjf8f56ns3")))) + (build-system pyproject-build-system) (native-inputs - (list python-hypothesis python-hypothesmith)) + (list python-hypothesmith + python-pytest + python-setuptools + python-wheel)) (propagated-inputs - (list python-attrs python-flake8)) + (list python-attrs + python-flake8)) (home-page "https://github.com/PyCQA/flake8-bugbear") - (synopsis - "Flake8 plugin for finding likely bugs and design problems in your program") + (synopsis "Flake8 plugin for finding likely bugs and design problems in your program") (description - "This package contains a plugin for Flake8 finding likely bugs and -design problems in your program. It contains warnings that don't belong -in pyflakes and pycodestyle.") + "This package contains a plugin for Flake8 finding likely bugs and design +problems in your program. It contains warnings that don't belong in pyflakes +and pycodestyle.") (license license:expat))) (define-public python-flake8-continuation @@ -14236,24 +15483,22 @@ and @code{InteractiveShellEmbed()()}.") (define-public python-flake8-implicit-str-concat (package (name "python-flake8-implicit-str-concat") - (version "0.2.0") + (version "0.5.0") (source (origin (method url-fetch) (uri (pypi-uri "flake8_implicit_str_concat" version)) (sha256 - (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6")))) - (build-system python-build-system) + (base32 "1s59w4x053j4794n6h9c7hafa8jjjymx6aar5q23pjw4vrdis7hh")))) + (build-system pyproject-build-system) (arguments - '(#:tests? #f ;no tests - #:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - ;; Permit newer versions of attrs. Remove for >0.2. - (substitute* "setup.py" - ((", <21") ""))))))) + (list + #:tests? #f)) ; no tests in PiPY or git checkout + (native-inputs + (list python-hatchling)) (propagated-inputs - (list python-attrs python-more-itertools)) + (list python-attrs + python-more-itertools)) (home-page "https://github.com/keisheiled/flake8-implicit-str-concat") (synopsis "Flake8 plugin to encourage correct string literal concatenation") (description @@ -14268,16 +15513,22 @@ unnecessary plus operators for explicit string literal concatenation.") (define-public python-flake8-print (package (name "python-flake8-print") - (version "4.0.0") + (version "5.0.0") (source (origin (method url-fetch) (uri (pypi-uri "flake8-print" version)) (sha256 - (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs")))) - (build-system python-build-system) + (base32 "1ydx92xck090ajp8vk2378fm0f4wj3mikhinjs3w1hcw70m5m4bn")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f)) ; no tests in PiPY or git checkout + (native-inputs + (list python-poetry-core)) (propagated-inputs - (list python-flake8 python-pycodestyle python-six)) + (list python-flake8 + python-pycodestyle)) (home-page "https://github.com/jbkahn/flake8-print") (synopsis "Print statement checker plugin for Flake8") (description @@ -14288,24 +15539,36 @@ files.") (define-public python-flake8-pyi (package (name "python-flake8-pyi") - (version "20.10.0") + (version "24.9.0") (source (origin (method url-fetch) - (uri (pypi-uri "flake8-pyi" version)) + (uri (pypi-uri "flake8_pyi" version)) (sha256 - (base32 - "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf")))) - (build-system python-build-system) + (base32 "1n8cqbqq9cfyn952kwqqs4s7lcyycgr829ymxnplg0cm49877yv4")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Prevent full threads utilization. + (substitute* "pyproject.toml" + (("-nauto") ""))))))) + (native-inputs + (list python-hatchling + python-pytest)) (propagated-inputs - (list python-attrs python-flake8 python-pyflakes)) + (list python-attrs + python-flake8 + python-pyflakes)) (home-page "https://github.com/ambv/flake8-pyi") - (synopsis - "Flake8 plugin that provides specializations for type hinting stub files") + (synopsis "Flake8 plugin that provides specializations for type hinting stub files") (description - "This package contains a plugin that provides specializations for -type hinting stub files, especially interesting for linting typeshed. It -adds the @file{.pyi} extension to the default value of the @code{--filename} + "This package contains a plugin that provides specializations for type +hinting stub files, especially interesting for linting typeshed. It adds the +@file{.pyi} extension to the default value of the @code{--filename} command-line argument to Flake8. This means stubs are linted by default with this plugin enabled, without needing to explicitly list every file. It modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation @@ -14313,17 +15576,34 @@ expressions after the entire file has been read. This enables support for first-class forward references that stub files use.") (license license:expat))) +;; XXX: Deprecated in upstream: This repository has been archived by the owner +;; on Nov 30, 2024. It is now read-only. +;; Consider to remove when nothing is depend on it. (define-public python-flake8-pie (package (name "python-flake8-pie") - (version "0.5.0") + (version "0.16.0") (source (origin (method url-fetch) (uri (pypi-uri "flake8-pie" version)) (sha256 - (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd")))) - (build-system python-build-system) + (base32 "1fhmwm8blimnfmi1cj8q0kqd77vskgjb794jbp837yh64ywvgp5q")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" "not test_examples and not test_prefer_simple_any_all") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-poetry-core + (lambda _ + ;; Patch to use the core poetry API. + (substitute* "pyproject.toml" + (("poetry.masonry.api") "poetry.core.masonry.api"))))))) + (native-inputs + (list python-poetry-core + python-pytest)) (home-page "https://github.com/sbdchd/flake8-pie") (synopsis "Flake8 extension that implements lints") (description @@ -14334,15 +15614,18 @@ lints.") (define-public python-flake8-quotes (package (name "python-flake8-quotes") - (version "3.2.0") + (version "3.4.0") (source (origin (method url-fetch) (uri (pypi-uri "flake8-quotes" version)) (sha256 - (base32 - "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z")))) - (build-system python-build-system) + (base32 "0v1762x0819xqha7w4l4hh66bpi82imgiib8pvmd78hhnwplkn5a")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-flake8)) (home-page "https://github.com/zheller/flake8-quotes/") @@ -14374,27 +15657,26 @@ TODO notes checker plugin for flake8.") (define-public python-flake8-isort (package (name "python-flake8-isort") - (version "6.1.0") + (version "6.1.1") (source (origin (method url-fetch) - (uri (pypi-uri "flake8-isort" version)) + (uri (pypi-uri "flake8_isort" version)) (sha256 - (base32 "0gk4q504v42hdzpkndczc0kkwnr85jn1h5pvb561jh65p91r6qyl")))) - (build-system python-build-system) + (base32 "1cvh0d18scgq36gqa2vqbifjarln1r3axgq93lzc303ay0y2zy61")))) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "run_tests.py"))))))) - (propagated-inputs (list python-flake8 python-isort)) - (native-inputs (list python-pytest)) + #:tests? #f)) ; no tests in PiPY or git checkout + (native-inputs + (list python-hatchling)) + (propagated-inputs + (list python-flake8 + python-isort)) (home-page "https://github.com/gforcada/flake8-isort") (synopsis "Flake8 plugin integrating isort") - (description "This package provides a flake8 plugin that integrates isort, + (description + "This package provides a flake8 plugin that integrates isort, extending flake8 so that it can warn about badly sorted Python import directives.") (license license:gpl2+))) @@ -14402,14 +15684,23 @@ directives.") (define-public python-autoflake (package (name "python-autoflake") - (version "1.3.1") + (version "2.3.1") (source (origin (method url-fetch) (uri (pypi-uri "autoflake" version)) (sha256 - (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338")))) - (build-system python-build-system) + (base32 "17lhrmz6h7pz2nald90p8gn3hhzbqwmd78819yf4b1habgf7b2y9")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "python" "test_autoflake.py")))))) + (native-inputs + (list python-hatchling)) (propagated-inputs (list python-pyflakes)) (home-page "https://github.com/myint/autoflake") @@ -14426,45 +15717,24 @@ It also removes useless @code{pass} statements.") (define-public python-mistune (package (name "python-mistune") - (version "0.8.4") + (version "3.0.2") (source (origin (method url-fetch) (uri (pypi-uri "mistune" version)) (sha256 (base32 - "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr")))) - (build-system python-build-system) + "1s4ba1m69yldrhnyfj8lm4bl3axbi95g1dicxya27j9hv7g96zzw")))) + (build-system pyproject-build-system) (native-inputs - (list python-nose python-cython)) + (list python-setuptools + python-wheel)) (home-page "https://github.com/lepture/mistune") (synopsis "Markdown parser in pure Python") (description "This package provides a fast markdown parser in pure Python.") (license license:bsd-3))) -;; 2.0 is not released yet, but some packages have started using it. -(define-public python-mistune-next - (package - (inherit python-mistune) - (name "python-mistune-next") - (version "2.0.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "mistune" version)) - (sha256 - (base32 - "024q9l6mgd37wa25w7dhskv1m3zsj5lf0w9cfyx7l9p2adhadq4y")))) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) - (native-inputs (list python-pytest)))) - (define-public python-markdown (package (name "python-markdown") @@ -14563,22 +15833,18 @@ functionalities with some extras.") (define-public python-ptyprocess (package (name "python-ptyprocess") - (version "0.5.2") + (version "0.7.0") (source (origin (method url-fetch) (uri (pypi-uri "ptyprocess" version)) (sha256 (base32 - "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6")))) - (build-system python-build-system) + "081j893x6c9qrfszp8swfqlpvk8agh1jc32y9140pvnf90xhlpaw")))) + (build-system pyproject-build-system) (native-inputs - (list python-nose)) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "nosetests")))))) + (list python-flit-core + python-pytest)) (home-page "https://github.com/pexpect/ptyprocess") (synopsis "Run a subprocess in a pseudo terminal") (description @@ -14636,7 +15902,7 @@ pseudo terminal (pty), and interact with both the process and its pty.") (invoke "make" "test")))))) (build-system python-build-system) (native-inputs - (list python-coverage which)) + (list python-coverage python-setuptools python-wheel which)) (synopsis "Simple testing framework for command line applications") (description "Cram is a functional testing framework for command line applications. @@ -14688,6 +15954,37 @@ checksums. It implement more than a hundred checksum routines.") "Python library that makes exceptions handling and inspection easier.") (license license:expat))) +(define-public python-stdio-mgr + (package + (name "python-stdio-mgr") + (version "1.0.1") + (source + (origin + (method git-fetch) ; no tests data in PyPi package + (uri (git-reference + (url "https://github.com/bskinn/stdio-mgr") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xb6779s7j162xhig6vc63f9nn3v406fvjh1zqbqbf8zcl17ific")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Do not run doctests requiring sphinx. + #:test-flags #~(list "--ignore=README.rst"))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-attrs)) + (home-page "https://github.com/bskinn/stdio-mgr") + (synopsis "Context manager for mocking/wrapping stdin/stdout/stderr") + (description + "This package contains a context manager for mocking/wrapping +stdin/stdout/stderr.") + (license license:expat))) + (define-public python-stdlib-list (package (name "python-stdlib-list") @@ -14775,6 +16072,7 @@ add functionality and customization to your projects with their own plugins.") (base32 "1zrfr1shin5wyfnfxc7jpk013594wasrp4ni9l70fhjlf2mvb3w7")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none. + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/irgeek/StrEnum") (synopsis "Enum that inherits from str") (description "StrEnum is a Python @code{enum.Enum} that inherits from @@ -14820,7 +16118,8 @@ the @code{sendfile(2)} system call.") ;; Using Pytest instead of the Makefile causes the command line tests to ;; fail on unknown Pytest arguments. (arguments (list #:test-flags #~(list "-k" "not TestCommandLineParser"))) - (native-inputs (list python-psutil python-pytest)) + (native-inputs (list python-psutil python-pytest python-setuptools + python-wheel)) (propagated-inputs (list python-pyopenssl python-pysendfile)) (home-page "https://github.com/giampaolo/pyftpdlib/") (synopsis "Asynchronous and scalable Python FTP server library") @@ -15011,8 +16310,9 @@ should be stored on various operating systems.") (base32 "0vm1r1jlaiagj0l9yf7j6zn9w3733dr2169911c0svgrr3gwiwn9")))) (build-system pyproject-build-system) (propagated-inputs (list python-six)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/google/pasta") - (synopsis "pasta is an AST-based Python refactoring library") + (synopsis "AST-based Python refactoring library") (description "This package provides \"pasta\", an AST-based Python refactoring library.") (license license:asl2.0))) @@ -15370,15 +16670,16 @@ distribution. It is not intended as an end-user tool.") (define-public python-immutables (package (name "python-immutables") - (version "0.18") + (version "0.21") (source (origin (method url-fetch) (uri (pypi-uri "immutables" version)) (sha256 - (base32 "1x4cinh0xbl6p6p2yfm2s07mxxy3lf0zzai9gqpydk4482bwfdjk")))) - (build-system python-build-system) - (native-inputs (list python-mypy python-pytest)) + (base32 "0jpw9nr2mbzqykigjhqa3a095bx7krwsnmjcxcpj944p8kqglpxm")))) + (build-system pyproject-build-system) + (native-inputs + (list python-mypy python-pytest python-setuptools python-wheel)) (home-page "https://github.com/MagicStack/immutables") (synopsis "High-performance immutable mapping type for Python") (description @@ -15390,27 +16691,23 @@ functional languages.") (define-public python-prettytable (package (name "python-prettytable") - (version "3.3.0") + (version "3.12.0") (source (origin (method url-fetch) (uri (pypi-uri "prettytable" version)) (sha256 - (base32 - "1c599w31i2ndzbkn85xwsgv9sd2j16r56dl922w4jh3rs97vb3hi")))) - (build-system python-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (base32 "0168xqdr0i9r4p3a3hjd4n7f133lp4xkxhvfx63aqisplcdkwjzh")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest - python-pytest-lazy-fixture + (list python-hatchling + python-hatch-vcs + python-pytest + python-pytest-cov + python-pytest-lazy-fixtures python-setuptools-scm)) - (propagated-inputs (list python-wcwidth)) + (propagated-inputs + (list python-wcwidth)) (home-page "https://github.com/jazzband/prettytable") (synopsis "Display tabular data in an ASCII table format") (description @@ -15440,30 +16737,36 @@ printing of sub-tables by specifying a row range.") (define-public python-curio (package (name "python-curio") - (version "1.5") + (version "1.6") (source (origin (method url-fetch) (uri (pypi-uri "curio" version)) (sha256 - (base32 "045wwg16qadsalhicbv21p14sj8i4w0l57639j7dmdqbb4p2225g")))) - (build-system python-build-system) + (base32 "0isj3jl5mx6m25nr1f7r91hfaydhkvmks9p85dyvl5h2n9nmhajn")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "-k" - (string-append - ;; Tries to open an outgoing connection. - "not test_ssl_outgoing " - ;; This test fails since Python 3.9.9 (see: - ;; https://github.com/dabeaz/curio/issues/347). - "and not test_timeout")))))))) + (list + #:test-flags + #~(list ;; AttributeError: 'NoneType' object has no attribute + ;; 'terminate' + "--deselect=tests/test_workers.py::test_exception" + ;; Tries to open an outgoing connection. + "--deselect=tests/test_network.py::test_ssl_outgoing" + ;; This test fails since Python 3.9.9, see + ;; <https://github.com/dabeaz/curio/issues/347>. + ;; AttributeError: 'NoneType' object has no attribute + ;; 'terminate' + "--deselect=tests/test_workers.py::test_worker_timeout" + ;; AttributeError: 'NoneType' object has no attribute + ;; 'terminate' + "--deselect=tests/test_workers.py::test_bad_cpu" + "--deselect=tests/test_workers.py::test_cpu" + "--deselect=tests/test_workers.py::test_worker_cancel"))) (native-inputs - (list python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/dabeaz/curio") (synopsis "Coroutine-based library for concurrent Python") (description @@ -15475,14 +16778,14 @@ tasks, sockets, files, locks, and queues.") (define-public python-tables (package (name "python-tables") - (version "3.6.1") + (version "3.7.0") (source (origin (method url-fetch) (uri (pypi-uri "tables" version)) (sha256 (base32 - "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9")) + "1zp1qmas4pgcag9sn0gwd40c6ibn9bg056d6ckjq7agjsrx8hap9")) (modules '((guix build utils))) (snippet '(begin @@ -15539,7 +16842,8 @@ tasks, sockets, files, locks, and queues.") (string-append "--hdf5=" (assoc-ref inputs "hdf5")))))))) (propagated-inputs - (list python-numexpr python-numpy)) + (list python-numexpr python-numpy python-packaging + python-py-cpuinfo)) (native-inputs (list python-cython pkg-config)) (inputs @@ -15563,7 +16867,7 @@ designed to efficiently cope with extremely large amounts of data.") (build-system pyproject-build-system) (propagated-inputs (list python-deprecated)) (native-inputs (list python-coverage python-coveralls python-nose2 - python-numpy)) + python-numpy python-setuptools python-wheel)) (home-page "https://github.com/scottgigante/tasklogger") (synopsis "Extension to the core Python logging library") (description "This package provides an extension to the core Python @@ -15574,22 +16878,20 @@ subtasks.") (define-public python-sniffio (package (name "python-sniffio") - (version "1.2.0") + (version "1.3.1") (source (origin (method url-fetch) (uri (pypi-uri "sniffio" version)) (sha256 - (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest" "-vv")))))) + (base32 "1p496yran6zwg47m7w26r8y89nrsbkrrbf4119slj3qaczf4wcpl")))) + (build-system pyproject-build-system) (native-inputs - (list python-curio python-pytest python-pytest-cov)) + (list python-curio + python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://github.com/python-trio/sniffio") (synopsis "Detect which async library a program is running under") (description "This package detects which async library a program is @@ -15610,7 +16912,8 @@ asyncio.") "0yv1wayrw9g6k0c2f721kha7wsv0s1fdlxpf5x7f34iqzq9z272h")))) (build-system pyproject-build-system) (propagated-inputs (list python-numpy python-pyparsing)) - (native-inputs (list python-hypothesis python-pytest)) + (native-inputs (list python-hypothesis python-pytest python-setuptools + python-wheel)) (home-page "https://github.com/mapbox/snuggs") (synopsis "Snuggs are S-expressions for Numpy") (description "Snuggs are S-expressions for Numpy.") @@ -15642,17 +16945,14 @@ Python code formatter \"black\".") (define-public python-geojson (package (name "python-geojson") - (version "2.5.0") + (version "3.1.0") (source (origin (method url-fetch) (uri (pypi-uri "geojson" version)) (sha256 - (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf")))) - (build-system python-build-system) - (arguments - ;; https://github.com/jazzband/geojson/issues/175 - `(#:tests? #f)) + (base32 "1b5df7skx3906046j12yjv8gdbcy17q9y3lbqbpmi83yf90gm9sq")))) + (build-system pyproject-build-system) (home-page "https://github.com/jazzband/geojson") (synopsis "Python bindings and utilities for GeoJSON") (description @@ -15661,9 +16961,40 @@ Python code formatter \"black\".") structures.") (license license:bsd-3))) +;; pyowm only accepts a version less than version 3. +(define-public python-geojson-for-pyowm + (package + (inherit python-geojson) + (version "2.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "geojson" version)) + (sha256 + (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf")))) + (arguments + ;; https://github.com/jazzband/geojson/issues/175 + (list #:tests? #f)))) + +(define-public python-gpxpy + (package + (name "python-gpxpy") + (version "1.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "gpxpy" version)) + (sha256 + (base32 "1bh1dkrbmcqb46r7j4fazzq7j6zfr2f04frm6h4bhhpcjx5lhb57")))) + (build-system pyproject-build-system) + (home-page "https://github.com/tkrajina/gpxpy") + (synopsis "Python GPX parser") + (description "GPX file parser and GPS track manipulation library.") + (license license:asl2.0))) + (define-public wfetch (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715") - (revision "1")) + (revision "2")) (package (name "wfetch") (version (git-version "0.1-pre" revision commit)) @@ -15691,7 +17022,10 @@ structures.") (mkdir-p share) (substitute* "wfetch/wfetch.py" (("os.sep, 'opt', 'wfetch'") (string-append "'" share "'"))) - (install-file "wfetch/wfetch.py" bin) + ; The documentation expects the executable to be named + ; 'wfetch', not 'wfetch.py'. + (rename-file "wfetch/wfetch.py" "wfetch/wfetch") + (install-file "wfetch/wfetch" bin) (copy-recursively "wfetch/icons" share))))))) (inputs (list python-pyowm python-fire python-termcolor python-requests)) (synopsis "Command-line tool to display weather info") @@ -15738,13 +17072,13 @@ your package is installed, via @code{pkg_resources} (part of (define-public python-filetype (package (name "python-filetype") - (version "1.0.8") + (version "1.2.0") (source (origin (method url-fetch) (uri (pypi-uri "filetype" version)) (sha256 - (base32 "05mkinkcn36v1cnb5hzay3zxmv7jmmflckxxp08rgzbkkf3i9pvp")))) + (base32 "1nxa91szfbhhbhvdwj06jz8zghzwgb9lf0v6aj61vx2b8zb6rdb6")))) (build-system python-build-system) (arguments `(#:phases @@ -16066,7 +17400,7 @@ domains support.") (build-system pyproject-build-system) (arguments (list #:tests? #f)) - (native-inputs (list python-setuptools-scm)) + (native-inputs (list python-setuptools python-setuptools-scm python-wheel)) (home-page "https://github.com/jaraco/path") (synopsis "Object-oriented file system path manipulation library") (description "@code{path} (formerly @code{path.py}) implements path @@ -16254,24 +17588,39 @@ a hash value.") (define-public python-termcolor (package (name "python-termcolor") - (version "1.1.0") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "termcolor" version)) (sha256 - (base32 - "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x")))) - (build-system python-build-system) - (arguments - ;; There are no tests. - `(#:tests? #f)) + (base32 "0vwaxyr2vk8gi7s1slq74nb0ssbb0wcn208ziqp48j3dv8kqv3cr")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatch-vcs + python-hatchling + python-pytest + python-pytest-cov)) (home-page "https://pypi.org/project/termcolor/") (synopsis "ANSII Color formatting for terminal output") (description "This package provides ANSII Color formatting for output in terminals.") (license license:expat))) +(define-public python-termcolor-1 + (package + (inherit python-termcolor) + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "termcolor" version)) + (sha256 + (base32 + "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x")))) + ;; There are no tests + (arguments (list #:tests? #false)))) + (define-public python-terminaltables (package (name "python-terminaltables") @@ -16292,6 +17641,30 @@ a hash value.") applications from a list of lists of strings. It supports multi-line rows.") (license license:expat))) +(define-public python-term-background + (package + (name "python-term-background") + (version "1.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "term_background" version)) + (sha256 + (base32 "0p674silrwc3jncncmdnj1lr6pl2q5qbx0xi3mzjq9sgcs5vmp4n")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-build + (lambda _ + (delete-file "setup.py")))))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wrapper python-setuptools-scm python-pkginfo python-pytest)) ; TODO: Remove python-pkginfo + (home-page "http://github.com/rocky/shell-term-background") + (synopsis "Determine if shell has a light or dark background") + (description "This package determines if shell has a light or dark +background.") + (license license:gpl2+))) + (define-public python-libarchive-c (package (name "python-libarchive-c") @@ -16361,120 +17734,116 @@ developed separately, both serve the same purpose: provide Python bindings for libmagic."))) (define-public python-pydevd - ;; Use the latest commit, which includes cleanups that removes Python 2 - ;; syntax that would fail to build. - (let ((revision "0") - (commit "47e298499ef19563bb2ef5941a57046a35ae6868")) - (package - (name "python-pydevd") - (version (git-version "2.8.0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/fabioz/PyDev.Debugger") - (commit commit))) - (modules '((guix build utils))) - (snippet '(begin - ;; Delete pre-built binaries. - (for-each delete-file (find-files "." "\\.(so|dylib|dll)")) - ;; This source is generated via Cython. - (delete-file "_pydevd_bundle/pydevd_cython.c"))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1yd017dh6xgxrqcyf8kk8jrr0a3zw895yfjih0z5jghyf0rck38q")))) - (build-system python-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "tests_python/test_convert_utilities.py" - ;; Add missing trailing '/'. - (("'\\\\\\\\usr\\\\\\\\bin\\\\\\\\') == '/usr/bin" all) - (string-append all "/"))))) - (add-after 'unpack 'patch-command-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "_pydevd_bundle/pydevd_api.py" - (("'kill'") - (format #f "~s" (search-input-file inputs "bin/kill"))) - (("'pgrep'") - (format #f "~s" (search-input-file inputs "bin/pgrep")))))) - (add-after 'unpack 'generate-sources - (lambda _ - (setenv "PYTHONPATH" (getcwd)) - (invoke "python" "build_tools/build.py"))) - (add-after 'unpack 'adjust-attach-binary-name - (lambda _ - (substitute* - '("pydevd_tracing.py" - "pydevd_attach_to_process/add_code_to_python_process.py") - (("def get_(target|python_helper_lib)_filename.*" all) - (format #f "~a return ~s~%" all - (string-append #$output "/lib/attach.so")))))) - (add-after 'unpack 'patch-gdb - (lambda* (#:key inputs #:allow-other-keys) - (substitute* - "pydevd_attach_to_process/add_code_to_python_process.py" - (("'gdb',") - (format #f "~s," (search-input-file inputs "bin/gdb")))))) - (add-after 'build 'build-attach-linux-binary - (lambda _ - (invoke #+(cxx-for-target) "-shared" "-o" "attach.so" - "-fPIC" "-nostartfiles" - "pydevd_attach_to_process/linux_and_mac/attach.cpp"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "PYDEVD_USE_CYTHON" "YES") - (invoke "pytest" "-vv" - "-n" (number->string (parallel-job-count)) - "-k" - (string-append - ;; The two "break_01" tests have been failing on - ;; Python 3.10: - ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>. - "not test_set_pydevd_break_01 " - ;; This one fails for unknown reasons. - "and not test_completion_sockets_and_messages " - ;; the GUI event loop requires an X server. - "and not test_gui_event_loop_custom " - ;; This test validates that 'pydevd' is not in the - ;; exception message, but it is due to being part - ;; of the build file name present in the message. - "and not test_evaluate_exception_trace " - ;; These fail on systems with YAMA LSM’s ptrace - ;; scope > 0. Upstream issue: - ;; https://github.com/fabioz/PyDev.Debugger/issues/218 - "and not test_attach_to_pid"))))) - (add-after 'install 'install-attach-binary - (lambda _ - (install-file "attach.so" - (string-append #$output "/lib")))) - ;; Some modules aren't designed to be loadable by themselves, such - ;; as 'pydev_app_engine_debug_startup' and fail. - (delete 'sanity-check)))) - (native-inputs - (list python-cython - python-numpy - python-psutil - python-pytest - python-pytest-xdist - python-trio - python-untangle)) - (inputs (list coreutils gdb procps)) - (home-page "https://github.com/fabioz/PyDev.Debugger/") - (synopsis "Python debugger") - (description "PyDev.Debugger is a capable Python debugger used in PyDev + (package + (name "python-pydevd") + (version "3.2.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fabioz/PyDev.Debugger") + (commit (string-append + "pydev_debugger_" + (string-join (string-split version #\.) "_"))))) + (modules '((guix build utils))) + (snippet '(begin + ;; Delete pre-built binaries. + (for-each delete-file (find-files "." "\\.(so|dylib|dll)")) + ;; This source is generated via Cython. + (delete-file "_pydevd_bundle/pydevd_cython.c"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0a40574f0rx23gissxmrpjq9cimhjxqsq9wbv5l7620h3blb5510")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-n" (number->string (parallel-job-count)) + "-k" + (string-append + ;; The two "break_01" tests have been failing on + ;; Python 3.10: + ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>. + "not test_set_pydevd_break_01 " + ;; the GUI event loop requires an X server. + "and not test_gui_event_loop_custom " + ;; This test validates that 'pydevd' is not in the + ;; exception message, but it is due to being part + ;; of the build file name present in the message. + "and not test_evaluate_exception_trace " + ;; This test fail with TimeoutError, no message on stderr. + "and not test_soft_terminate ")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "tests_python/test_convert_utilities.py" + ;; Add missing trailing '/'. + (("\"\\\\\\\\usr\\\\\\\\bin\\\\\\\\\") == \"/usr/bin" all) + (string-append all "/"))))) + (add-after 'unpack 'patch-command-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "_pydevd_bundle/pydevd_api.py" + (("'kill'") + (format #f "~s" (search-input-file inputs "bin/kill"))) + (("'pgrep'") + (format #f "~s" (search-input-file inputs "bin/pgrep")))))) + (add-after 'unpack 'generate-sources + (lambda _ + (setenv "PYTHONPATH" (getcwd)) + (invoke "python" "build_tools/build.py"))) + (add-after 'unpack 'adjust-attach-binary-name + (lambda _ + (substitute* + '("pydevd_tracing.py" + "pydevd_attach_to_process/add_code_to_python_process.py") + (("def get_(target|python_helper_lib)_filename.*" all) + (format #f "~a return ~s~%" all + (string-append #$output "/lib/attach.so")))))) + (add-after 'unpack 'patch-gdb + (lambda* (#:key inputs #:allow-other-keys) + (substitute* + "pydevd_attach_to_process/add_code_to_python_process.py" + (("'gdb',") + (format #f "~s," (search-input-file inputs "bin/gdb")))))) + (add-after 'build 'build-attach-linux-binary + (lambda _ + (invoke #+(cxx-for-target) "-shared" "-o" "attach.so" + "-fPIC" "-nostartfiles" + "pydevd_attach_to_process/linux_and_mac/attach.cpp"))) + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PYDEVD_USE_CYTHON" "YES")))) + (add-after 'install 'install-attach-binary + (lambda _ + (install-file "attach.so" + (string-append #$output "/lib")))) + ;; Some modules aren't designed to be loadable by themselves, such + ;; as 'pydev_app_engine_debug_startup' and fail. + (delete 'sanity-check)))) + (native-inputs + (list python-cython + python-numpy + python-psutil + python-pytest + python-pytest-xdist + python-setuptools + python-trio + python-untangle + python-wheel)) + (inputs (list coreutils gdb/pinned procps)) + (home-page "https://github.com/fabioz/PyDev.Debugger/") + (synopsis "Python debugger") + (description "PyDev.Debugger is a capable Python debugger used in PyDev and other @acronym{IDEs, Integrated Development Environments}.") - (license license:epl1.0)))) + (license license:epl1.0))) (define-public python-debugpy (package (name "python-debugpy") - (version "1.6.0") + (version "1.8.9") (source (origin (method git-fetch) @@ -16489,7 +17858,7 @@ and other @acronym{IDEs, Integrated Development Environments}.") (patches (search-patches "python-debugpy-unbundle-pydevd.patch")) (sha256 (base32 - "1dpfzs3p51648i7f3fz8dw5d0vrj39iwn1jhn0226idc02ybyqih")))) + "0rq9ndsg4za0np5lnlkdwaqlizay8ndm8ki2m7r7awji262dzzlx")))) (build-system python-build-system) (arguments (list @@ -16624,7 +17993,7 @@ JSON Reference and JSON Pointer.") (define-public python-fastbencode (package (name "python-fastbencode") - (version "0.0.7") + (version "0.3.1") (source (origin (method url-fetch) @@ -16633,7 +18002,7 @@ JSON Reference and JSON Pointer.") ;; Delete pre-generated Cython C files. (snippet '(for-each delete-file (find-files "." "\\.c$"))) (sha256 - (base32 "1r66w3vpmvfmssshjpgqaj2m14c8p94nymr96mwn61idajz9mg5n")))) + (base32 "15x1in22gwam7wwga5lbj1pd8hc9jk741pia3pv1m29n2xywpq2z")))) (build-system python-build-system) (native-inputs (list python-cython)) (home-page "https://github.com/breezy-team/fastbencode") @@ -16656,27 +18025,28 @@ significantly better performance.") (define-public python-fastjsonschema (package (name "python-fastjsonschema") - (version "2.15.1") + (version "2.20.0") (source (origin - (method url-fetch) - (uri (pypi-uri "fastjsonschema" version)) + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/horejsek/python-fastjsonschema") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7")))) + (base32 "0aqj7hf1fgana9hh9la475wiyivcr46fra1bvigp00805g14k599")))) (build-system pyproject-build-system) - (arguments `(#:tests? #f)) ;no tests included (native-inputs (list python-colorama python-json-spec python-jsonschema - python-pylint python-pytest python-pytest-benchmark - python-pytest-cache)) - (home-page - "https://github.com/horejsek/python-fastjsonschema") - (synopsis - "Fast Python implementation of JSON schema") + python-pytest-cache + python-setuptools + python-wheel)) + (home-page "https://github.com/horejsek/python-fastjsonschema") + (synopsis "Fast Python implementation of JSON schema") (description "This library implements validation of JSON documents by JSON schema for drafts 04, 06 and 07.") @@ -16685,30 +18055,36 @@ drafts 04, 06 and 07.") (define-public python-nbformat (package (name "python-nbformat") - (version "5.3.0") + (version "5.10.4") ;; The PyPi release tarball lacks some test cases and test data. (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jupyter/nbformat") - (commit version))) + (commit (string-append "v" version)))) (sha256 (base32 - "114c5c6cvpxhxj8zrw74351gcfzyzjh1jq3py4xf8wk9rahfay9z")) + "0abd1d8iq21dwh17m72na2f3kr6a5p6ji1gnykf06jshikalj2x3")) (file-name (git-file-name name version)))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (list + #:phases + #~(modify-phases %standard-phases + ;; We don't want to use hatch-nodejs just to get a version string. + (add-after 'unpack 'patch-pyproject + (lambda _ + (substitute* "pyproject.toml" + ((", \"hatch-nodejs-version\"") "") + (("dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"")))))))) (propagated-inputs (list python-fastjsonschema python-jsonschema python-jupyter-core python-traitlets)) (native-inputs - (list python-pytest + (list python-hatchling + python-pep440 + python-pytest python-testpath)) (home-page "https://jupyter.org") (synopsis "Jupyter Notebook format") @@ -16755,7 +18131,7 @@ systems, as a command line tool, and as a Python library.") (delete-file-recursively "bleach/_vendor/html5lib"))))) (build-system pyproject-build-system) (propagated-inputs (list python-html5lib python-tinycss2)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/mozilla/bleach") (synopsis "Whitelist-based HTML-sanitizing tool") (description "Bleach is an easy whitelist-based HTML-sanitizing tool.") @@ -16879,17 +18255,32 @@ time.") (define-public python-nbconvert (package (name "python-nbconvert") - (version "6.5.0") + (version "7.16.4") (source (origin (method url-fetch) (uri (pypi-uri "nbconvert" version)) (sha256 (base32 - "17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2")))) - (build-system python-build-system) + "1x7pz43nhlq3hwjn7cv753gapzwav6wwb9kgr66l82kb4sx93jl6")))) + (build-system pyproject-build-system) (arguments (list + #:test-flags + '(list "-k" + (string-append + ;; These tests require pyppeteer, not yet + ;; available in Guix. + "not test_webpdf_with_chromium" + " and not test_webpdf.py" + ;; These tests require ipywidgets, which would + ;; introduce a dependency cycle. + " and not test_execute_widgets_from_nbconvert" + " and not test_execute_multiple_notebooks" + + ;; This test calls nbconvert itself via "sys.executable -m + ;; nbconvert". It's probably harmless. + " and not test_default_config")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-paths @@ -16909,72 +18300,71 @@ time.") (("inkscape_path = which\\(\"inkscape\")") (format #f "inkscape_path = ~s" (search-input-file inputs "bin/inkscape")))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Tests depend on templates installed to output. - (setenv "JUPYTER_PATH" - (string-append #$output "/share/jupyter:" - (getenv "JUPYTER_PATH"))) - ;; Step outside of the source directory to avoid having both - ;; the installed package *and* the package from the source on - ;; Python's path. - (with-directory-excursion "/tmp" - (invoke "pytest" "--pyargs" "nbconvert" - "-vv" "-n" (number->string (parallel-job-count)) - "-k" - (string-append - ;; These tests require pyppeteer, not yet - ;; available in Guix. - "not test_webpdf_with_chromium " - "and not test_webpdf.py " - ;; These tests require ipywidgets, which would - ;; introduce a dependency cycle. - "and not test_execute_widgets_from_nbconvert " - "and not test_execute_multiple_notebooks "))))))))) + (add-after 'unpack 'ignore-deprecation-warnings + (lambda _ + (substitute* "pyproject.toml" + (("\"ignore:nbconvert.utils" m) + (string-append "\"ignore:zmq.eventloop.ioloop is deprecated:DeprecationWarning\",\n" + m))))) + (add-before 'check 'pre-check + (lambda _ + ;; Tests depend on templates installed to output. + (setenv "JUPYTER_PATH" + (string-append #$output "/share/jupyter:" + (getenv "JUPYTER_PATH"))) + ;; jupyter-core demands this + (setenv "JUPYTER_PLATFORM_DIRS" "1") + ;; Tests need a writable HOME. + (setenv "HOME" "/tmp")))))) (inputs (list inkscape/stable pandoc)) (native-inputs - (list python-ipykernel + (list python-flaky + python-hatchling + python-ipykernel ;; Adding ipywidgets would create a cycle. ;;python-ipywidgets - ;; XXX: Disabled, not in guix. - ;;python-pyppeteer python-pytest python-pytest-xdist)) (propagated-inputs (list python-beautifulsoup4 python-bleach python-defusedxml - python-entrypoints + python-importlib-metadata python-jinja2 python-jupyter-core + python-jupyterlab-pygments + python-markupsafe python-mistune python-nbclient python-nbformat + python-packaging python-pandocfilters python-pygments - python-jupyterlab-pygments - python-testpath + python-tinycss2 python-traitlets ;; Required, even if [serve] is not used. python-tornado-6 ;; Required at runtime for `jupyter nbconvert --to=pdf`. texlive-adjustbox + texlive-amsmath texlive-booktabs texlive-caption texlive-collection-basic texlive-enumitem texlive-environ + texlive-etoolbox texlive-eurosym + texlive-etoolbox texlive-fancyvrb texlive-float texlive-fontspec texlive-geometry texlive-grffile texlive-hyperref + texlive-infwarerr texlive-jknapltx - texlive-jknapltx + texlive-kvoptions texlive-lm texlive-lm-math texlive-mathpazo @@ -16983,6 +18373,7 @@ time.") texlive-pdfcol texlive-pgf texlive-rsfs + texlive-soul texlive-stringenc texlive-tcolorbox texlive-titling @@ -17015,17 +18406,32 @@ convert an @code{.ipynb} notebook file into various static formats including: (define-public python-notebook (package (name "python-notebook") - (version "6.4.10") + (version "6.5.7") (source (origin (method url-fetch) (uri (pypi-uri "notebook" version)) (sha256 (base32 - "03p976xq1l9xf4djwk0snmywd0zck3i6gjngxsl874i8qrmsf214")))) - (build-system python-build-system) + "1r38fwr0r4xgkz8y27w3xyz2dk97ih5azba28jylyqxcvw8r1sq4")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "-k" (string-append + ;; TODO: This tests fails because nbconvert does not + ;; list "python" as a format. + "not test_list_formats" + ;; AssertionError: Lists differ: + " and not test_disable" + " and not test_enable" + " and not test_merge_config" + " and not test_load_ordered" + " and not test_list_running_sock_servers" + " and not test_run") + ;; These tests require a browser. + "--ignore=notebook/tests/selenium") + #:phases + '(modify-phases %standard-phases (add-after 'unpack 'use-our-home-for-tests (lambda _ ;; The 'get_patch_env' function in this file reads: @@ -17038,20 +18444,13 @@ convert an @code{.ipynb} notebook file into various static formats including: (("'HOME': .*," all) (string-append "# " all "\n"))) (setenv "HOME" (getcwd)))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - ;; These tests require a browser. - (delete-file-recursively "notebook/tests/selenium") - (when tests? - ;; Interferes with test expectations. - (unsetenv "JUPYTER_CONFIG_PATH") - ;; Some tests do not expect all files to be installed in the - ;; same directory, but JUPYTER_PATH contains multiple entries. - (unsetenv "JUPYTER_PATH") - (invoke "pytest" "-vv" - ;; TODO: This tests fails because nbconvert does not - ;; list "python" as a format. - "-k" "not test_list_formats"))))))) + (add-before 'check 'pre-check + (lambda _ + ;; Interferes with test expectations. + (unsetenv "JUPYTER_CONFIG_PATH") + ;; Some tests do not expect all files to be installed in the + ;; same directory, but JUPYTER_PATH contains multiple entries. + (unsetenv "JUPYTER_PATH")))))) (propagated-inputs (list python-argon2-cffi python-ipykernel @@ -17060,6 +18459,7 @@ convert an @code{.ipynb} notebook file into various static formats including: python-jupyter-client python-jupyter-core python-nest-asyncio + python-nbclassic python-nbconvert python-nbformat python-prometheus-client @@ -17070,11 +18470,14 @@ convert an @code{.ipynb} notebook file into various static formats including: python-traitlets)) (native-inputs (list python-coverage + python-jupyter-server python-nbval python-pytest python-pytest-cov python-requests - python-requests-unixsocket)) + python-requests-unixsocket + python-setuptools + python-wheel)) (home-page "https://jupyter.org/") (synopsis "Web-based notebook environment for interactive computing") (description @@ -17085,17 +18488,19 @@ interactive computing.") (define-public python-widgetsnbextension (package (name "python-widgetsnbextension") - (version "3.5.1") + (version "4.0.10") (source (origin (method url-fetch) (uri (pypi-uri "widgetsnbextension" version)) (sha256 (base32 - "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7")))) - (build-system python-build-system) - (propagated-inputs - (list python-notebook)) + "13v88h3cvlf4cs70j568abr04w0bzckl56k9iqx1iadrydgnq6b4")))) + (build-system pyproject-build-system) + (native-inputs + (list python-jupyter-packaging + python-setuptools + python-wheel)) (home-page "https://ipython.org") (synopsis "IPython HTML widgets for Jupyter") (description "This package provides interactive HTML widgets for Jupyter @@ -17105,24 +18510,21 @@ notebooks.") (define-public python-ipywidgets (package (name "python-ipywidgets") - (version "7.6.3") + (version "8.1.2") (source (origin (method url-fetch) (uri (pypi-uri "ipywidgets" version)) (sha256 (base32 - "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz")))) + "1ja2xibll6v40va3s7wz5dfp95q01yds64z6csl2dsds94gb9ffh")))) (build-system python-build-system) (propagated-inputs - (list python-ipykernel - python-ipython - python-jupyterlab-widgets - python-nbformat - python-traitlets - python-widgetsnbextension)) + (list python-comm python-ipython python-jupyterlab-widgets + python-traitlets python-widgetsnbextension)) (native-inputs - (list python-mock python-pytest python-pytest-cov)) + (list python-ipykernel python-jsonschema python-pytest python-pytest-cov + python-pytz)) (home-page "https://ipython.org") (synopsis "IPython HTML widgets for Jupyter") (description "Ipywidgets are interactive HTML widgets for Jupyter @@ -17291,7 +18693,7 @@ simulation, statistical modeling, machine learning and much more.") (base32 "1r9ixxnish9j3dq4h0z0cwlkr4f5lgi6d8mhbzw59hbbjlmp2qhd")))) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (build-system pyproject-build-system) (arguments (list #:test-flags @@ -17365,6 +18767,18 @@ taking a new approach. All IANA character set names for which the Python core library provides codecs are supported.") (license license:expat))) +(define-public python-charset-normalizer-3 + (package + (inherit python-charset-normalizer) + (name "python-charset-normalizer") + (version "3.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "charset-normalizer" version)) + (sha256 + (base32 "1m9g0f513ng4dp2vd3smi4g2nmhqkjqh3bzcza14li947frkq37k")))))) + (define-public python-docopt (package (name "python-docopt") @@ -17493,7 +18907,7 @@ This allows one to make simple text-mode user interfaces on Unix-like systems") (build-system pyproject-build-system) (propagated-inputs (list python-pydantic python-srsly python-typing-extensions)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/explosion/confection") (synopsis "Config system for Python") (description "Confection is a lightweight library that offers a @@ -17552,12 +18966,16 @@ config files.") (add-after 'unpack 'loosen-requirements (lambda _ (substitute* "requirements/base.txt" - (("antlr4-python3-runtime==") - "antlr4-python3-runtime>="))))))) + (("antlr4-python3-runtime==.*") + "antlr4-python3-runtime >=4.9\n")) + ;; Ignore deprecation warnings. + (substitute* "pyproject.toml" + (("-Werror") ""))))))) (propagated-inputs (list java-antlr4-runtime-python python-pydevd python-pyyaml)) - (native-inputs (list icedtea antlr4 python-pytest python-pytest-mock)) + (native-inputs (list icedtea antlr4 python-pytest python-pytest-mock + python-setuptools python-wheel)) (home-page "https://github.com/omry/omegaconf") (synopsis "Flexible configuration system") (description "OmegaConf is a hierarchical configuration system and @@ -17576,10 +18994,10 @@ consistent API regardless of how the configuration was created.") (base32 "1l866g1dcf2ljf8fl7ggpxk1rggry0lya4d5b264gradi1qp81p7")))) (build-system pyproject-build-system) - (native-inputs - (list python-mock python-pytest)) (propagated-inputs (list python-pyyaml)) + (native-inputs + (list python-mock python-pytest python-setuptools python-wheel)) (synopsis "Replacement for argparse") (description "A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.") @@ -17606,15 +19024,18 @@ connection pool.") (define-public python-argparse-manpage (package (name "python-argparse-manpage") - (version "1.1") + (version "4.5") (source (origin (method url-fetch) (uri (pypi-uri "argparse-manpage" version)) (sha256 (base32 - "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p")))) - (build-system python-build-system) + "1nq4sq1zk1xzdsqq61hd27jhj978ys136aba1zjg02x1g0c0cg11")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pip python-pytest python-setuptools python-tomli + python-wheel)) (home-page "https://github.com/praiskup/argparse-manpage") (synopsis "Build manual page from Python's ArgumentParser object") (description @@ -17713,7 +19134,7 @@ for atomic file system operations.") (define-public python-qstylizer (package (name "python-qstylizer") - (version "0.1.10") + (version "0.2.4") (source (origin (method git-fetch) @@ -17722,25 +19143,24 @@ for atomic file system operations.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz")))) - (build-system python-build-system) + (base32 "0413msw23kv87fgs14ajp9wb2qxkcw6ydvwjzabz7xcp8iif9kr2")))) + (build-system pyproject-build-system) (arguments - `(#:test-target "pytest" - #:phases - (modify-phases %standard-phases - (add-before 'build 'set-pbr-version - (lambda _ - (setenv "PBR_VERSION" "3.0.1")))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-pbr-version + (lambda _ + (setenv "PBR_VERSION" "3.0.1")))))) (native-inputs (list python-pbr python-pytest - python-pytest-catchlog - python-pytest-cov python-pytest-mock - python-pytest-runner - python-pytest-xdist)) + python-setuptools + python-wheel)) (propagated-inputs - (list python-inflection python-tinycss)) + (list python-inflection + python-tinycss2)) (home-page "https://github.com/blambright/qstylizer") (synopsis "Qt stylesheet generation utility for PyQt/PySide") (description "@code{qstylizer} is a Python package designed to help with @@ -17789,14 +19209,16 @@ applications.") (package (name "python-click-default-group") (version "1.2.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "click_default_group" version)) - (sha256 - (base32 - "07i5w47lbihcb3cvs08vynz725z9skvhhzrarnk6qi8dxjckqgzb")))) + (source + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/click-contrib/click-default-group") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "06h12qwg0lhvxlgfm9768afibwp8j6r3r440v630a30bv0nkhngm")))) (build-system pyproject-build-system) - (arguments (list #:tests? #false)) ;there are none (propagated-inputs (list python-click)) (native-inputs @@ -17859,21 +19281,18 @@ pure Python module that works on virtually all Python versions.") (license license:expat))) (define-public python-execnet - ;; The latest release (1.9.0) is old and lacks support for Pytest 7.2. - (let ((commit "d6aa1a56773c2e887515d63e50b1d08338cb78a7") - (revision "1")) (package (name "python-execnet") - (version (git-version "1.9.0" revision commit)) + (version "2.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/pytest-dev/execnet") - (commit commit))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0s60jggcjiw38b7xsh1q2lnnr4c4kaki7c5zsv7xyj7df8ngbbsm")))) + "0xlfd0h9sjl0jpc2fc689a497chwbagali7qr364k75hdyax3jfq")))) (build-system pyproject-build-system) (arguments (list @@ -17906,10 +19325,7 @@ pure Python module that works on virtually all Python versions.") (native-inputs (list python-hatchling python-hatch-vcs - python-py - python-pytest - python-pytest-timeout - python-setuptools-scm)) + python-pytest-bootstrap)) (synopsis "Rapid multi-Python deployment") (description "Execnet provides a share-nothing model with channel-send/receive communication for distributing execution across many @@ -17921,24 +19337,34 @@ minimal and fast API targeting the following uses: @item write scripts to administer multiple environments @end enumerate") (home-page "https://codespeak.net/execnet/") - (license license:expat)))) + (license license:expat))) (define-public python-icalendar (package (name "python-icalendar") - (version "4.1.0") + (version "5.0.13") (source (origin (method url-fetch) (uri (pypi-uri "icalendar" version)) (sha256 (base32 - "15dkq42rkqjdi17rpvmd1plnbwn4daby0nk1s1c3xi7w5v0bfj4p")))) - (build-system python-build-system) + "01lp0advx60z8wgng8aga1p1668ydn1r6d9qm3d622yfikg9yycj")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "src/icalendar/tests"))))))) (propagated-inputs - (list python-dateutil python-pytz)) - (synopsis "Python library for parsing iCalendar files") - (description "The icalendar package is a parser/generator of iCalendar -files for use with Python.") + (list python-dateutil python-pytz python-tzdata)) + (native-inputs + (list python-pytest python-pytz python-setuptools python-wheel)) + (synopsis "Python library for parsing and generating iCalendar files") + (description + "@code{icalendar} is a Python library for parsing and generating iCalendar files.") (home-page "https://github.com/collective/icalendar") (license license:bsd-2))) @@ -18026,45 +19452,24 @@ with a new public API, and RPython support.") (define-public python-hy (package (name "python-hy") - (version "0.26.0") + (version "0.29.0") (source (origin - (method git-fetch) ; no tests in PyPI release + (method git-fetch) ;no tests in PyPI release (uri (git-reference (url "https://github.com/hylang/hy") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1czhh7s81sg0nrnf4zv0ydqi4f7s6sywf4ks4fd59vpx441ca39v")))) - (build-system python-build-system) + (base32 "0fp5x94hyckjfap2pb1rj551a3q70vrljxark7hj9kdhr7prbggi")))) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - ;; Hy includes a script that writes a version.py file that Hy uses to - ;; report its version. That script uses information from the git - ;; repository or the HY_VERSION environment variable. Therefore, - ;; these phases set HY_VERSION and then remove the support scripts - ;; which get installed in the root of the output. - (add-after 'unpack 'set-version - (lambda _ - (setenv "HY_VERSION" #$version))) - (add-after 'install 'remove-installed-build-scripts - (lambda _ - (delete-file-recursively (string-append #$output "/get_version")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "pytest" "-k" - (string-append ; skip some failed tests - "not test_sys_executable" - " and not test_circular_macro_require" - " and not test_macro_require" - " and not test_requires_pollutes_core")))))))) - (native-inputs - (list python-pytest python-wheel)) - (propagated-inputs - (list python-funcparserlib)) + ;; This test expects the hy executable to be called 'hy', but in Guix + ;; it's .hy-real. + #:test-flags #~(list "-k" "not test_sys_executable"))) + (native-inputs (list python-pytest python-wheel)) + (propagated-inputs (list python-funcparserlib)) (home-page "https://docs.hylang.org/en/stable/") (synopsis "Lisp frontend to Python") (description @@ -18135,27 +19540,33 @@ character, and suffix.") (define-public python-progressbar2 (package (name "python-progressbar2") - (version "3.51.3") + (version "4.5.0") (source (origin (method url-fetch) (uri (pypi-uri "progressbar2" version)) (sha256 - (base32 - "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc")))) - (build-system python-build-system) - (propagated-inputs - (list python-six python-utils)) + (base32 "1yw8j3sz9y3nw2x1ffiqqzml8l9vb0kixxnsjkmk3vc691icnqk6")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "--pyargs" "progressbar" "tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "pytest.ini" + ((".*-cov.*") ""))))))) (native-inputs - (list python-flake8 - python-freezegun - python-pycodestyle + (list python-dill python-pytest - python-pytest-cache - python-pytest-cov - python-pytest-flakes - python-pytest-pep8 - python-sphinx)) + python-freezegun + python-setuptools + python-setuptools-scm + python-wheel)) + (propagated-inputs + (list python-utils)) (home-page "https://github.com/WoLpH/python-progressbar") (synopsis "Text progress bar library for Python") (description @@ -18202,58 +19613,84 @@ text.") (home-page "https://pypi.org/project/colorama/") (license license:bsd-3))) -;; awscli and botocore do not accept version 0.4.4 -(define-public python-colorama-for-awscli +(define-public python-monthdelta (package - (inherit python-colorama) - (version "0.4.3") + (name "python-monthdelta") + (version "0.9.1") (source (origin (method url-fetch) - (uri (pypi-uri "colorama" version)) + (uri (pypi-uri "MonthDelta" version)) (sha256 - (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9")))))) + (base32 "0iwcsk7ryjw5h1wp10ykwd01f3am8gdlga6461q1v1njsk0rxh41")))) + (build-system pyproject-build-system) + (home-page "http://packages.python.org/MonthDelta") + (synopsis "Date computations with months") + (description + "MonthDelta provides functionality to do date computations with months.") + (license license:expat))) (define-public python-moto (package (name "python-moto") - (version "3.1.4") + (version "4.2.4") (source (origin (method url-fetch) (uri (pypi-uri "moto" version)) (sha256 - (base32 "0dfnad1f9d5ybabs69dzc7x357z1r4jbhrhgw57gyic1qnmcw864")))) - (build-system python-build-system) + (base32 "12dkx35jm8qzyf5205wzkmd82yjxrbfdymdk2qlb3s47k6rcb8zf")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "-m" "not network and not requires_docker" + "-k" + (string-append + ;; XXX: This test is timing sensitive and may + ;; fail non-deterministically. + "not test_cancel_pending_job" + + ;; The error message is more detailed than expected. + " and not test_list_queue_tags_errors" + + ;; Unknown failure: invalid length for parameter IpAdresses. + " and not test_route53resolver_bad_create_endpoint_subnets" + " and not test_route53resolver_invalid_create_endpoint_args" + + ;; FIXME: Unknown failure. Likely requires Docker. + " and not test_cancel_pending_job" + + ;; These tests require Docker. + " and not test_terminate_job" + " and not test_invoke_function_from_sqs_exception" + " and not test_create_custom_lambda_resource__verify_cfnresponse_failed" + " and not test_lambda_function" + " and not test_invoke_local_lambda_layers" + + ;; These tests also require the network. + " and not test_s3_server_post_cors_multiple_origins" + " and not test_put_record_batch_http_destination" + " and not test_put_record_http_destination" + " and not test_with_custom_request_header" + " and not test_dependencies" + " and not test_cancel_running_job" + " and not test_container_overrides")) + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'compatibility + (lambda _ + ;; pyparsing 3.0.6 does not support the "min" argument for + ;; DelimitedList. + (substitute* "moto/glue/utils.py" + (("DelimitedList\\(literal, min=1\\)") + "DelimitedList(literal)")))) (add-after 'unpack 'patch-hardcoded-executable-names (lambda* (#:key inputs #:allow-other-keys) (let ((bash-exec (search-input-file inputs "/bin/sh"))) (substitute* "moto/batch/models.py" (("/bin/sh") bash-exec)) (substitute* (find-files "tests" "\\.py$") - (("#!/bin/bash") (string-append "#!" bash-exec)))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-m" "not network" "-k" - (string-append - ;; XXX: This test is timing sensitive and may - ;; fail non-deterministically. - "not test_cancel_pending_job" - ;; These tests require Docker. - " and not test_terminate_job" - " and not test_invoke_function_from_sqs_exception" - " and not test_create_custom_lambda_resource__verify_cfnresponse_failed" - " and not test_lambda_function" - - ;; These tests also require the network. - " and not test_put_record_batch_http_destination" - " and not test_put_record_http_destination" - " and not test_dependencies" - " and not test_cancel_running_job" - " and not test_container_overrides")))))))) + (("#!/bin/bash") (string-append "#!" bash-exec))))))))) (native-inputs (list python-flask python-flask-cors @@ -18276,6 +19713,8 @@ text.") python-jose python-jsondiff python-markupsafe + python-openapi-spec-validator + python-py-partiql-parser python-pytz python-pyyaml python-requests @@ -18603,86 +20042,76 @@ enhancements to optimization and data fitting problems.") browser from Python.") (license license:bsd-3))) -(define-public python-boto - (package - (name "python-boto") - (version "2.49.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "boto" version)) - (sha256 - (base32 - "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga")))) - (build-system python-build-system) - (arguments - ;; XXX: This package is unmaintained and has problems with newer versions - ;; of Python 3 as well as test libraries. 'python-moto' still uses a - ;; subset of this library, so keep it around for now, but disable tests. - '(#:tests? #f)) - (propagated-inputs - (list python-paramiko python-requests)) - (home-page "https://github.com/boto/boto") - (synopsis "Python interfaces for Amazon Web Services") - (description - "This package provides various facilities for interacting with Amazon -Web Services through Python. - -This software is unmaintained, and new projects should use @code{boto3} instead.") - (license license:expat))) - (define-public python-botocore ;; Note: When updating botocore, also make sure that boto3 and awscli ;; are compatible. (package (name "python-botocore") - (version "1.24.35") + (version "1.35.59") (source (origin (method url-fetch) (uri (pypi-uri "botocore" version)) (sha256 (base32 - "0rv8mvhq5s373zdjs2yb45hzvqcqdh2lp2rbb21jjc8ciwnl5d9n")))) - (build-system python-build-system) + "161wp1ribgkc23w6wcfs6zzig2j84ava7ylxhs3jrh6zzrayc36y")))) + (build-system pyproject-build-system) (arguments - ;; FIXME: Many tests are failing. - '(#:tests? #f)) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; It strugles to find 'botocore'. + "--ignore" "tests/functional/leak/test_resource_leaks.py" + ;; Tests require networking. + "--ignore" "tests/integration"))) + (native-inputs + (list python-jsonschema + python-pytest + python-pytest-xdist + python-setuptools + python-wheel)) (propagated-inputs - (list python-dateutil python-jmespath python-urllib3)) + (list python-dateutil + python-jmespath + python-urllib3)) (home-page "https://github.com/boto/botocore") (synopsis "Low-level interface to AWS") - (description "Botocore is a Python library that provides a low-level -interface to the Amazon Web Services (AWS) API.") + (description + "Botocore is a Python library that provides a low-level interface to the +Amazon Web Services (AWS) API.") (license license:asl2.0))) (define-public python-boto3 (package (name "python-boto3") - (version "1.21.35") - (home-page "https://github.com/boto/boto3") - (source (origin - (method git-fetch) - (uri (git-reference (url home-page) (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1kdyf238rpfldnpzs0rdh3nhjn6hwfym4faskyhzlgzkf1smmbg1")))) + (version "1.35.59") + (source + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/boto/boto3") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "10bdzdaw7qg2m5n5ivb2zzsdl7wgjmz05xyxajd4cmk629ick95m")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-network-tests - ;; Deleting integration tests because they are trying to connect to AWS. - (lambda _ - (delete-file-recursively "tests/integration"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v"))))))) - (build-system python-build-system) + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Integration tests are trying to connect to AWS. + "--ignore" "tests/integration"))) (native-inputs - (list python-nose python-mock python-pytest)) + (list python-mock + python-pytest + python-pytest-xdist + python-setuptools + python-wheel)) (propagated-inputs - (list python-botocore python-jmespath python-s3transfer)) + (list python-botocore + python-jmespath + python-s3transfer)) + (home-page "https://github.com/boto/boto3") (synopsis "AWS SDK for Python") (description "Boto3 is a Python library for writing programs that interact with @@ -18718,6 +20147,7 @@ in pure Python.") (base32 "14hwk9j5zjc8rvirw95mrb07zdnpjaxjx2mj3rnq8pnlyaa809r4")))) (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; No tests in PyPi tarball. (native-inputs (list python-poetry-core)) (home-page "https://github.com/srstevenson/xdg-base-dirs") @@ -18836,22 +20266,48 @@ templates into Python modules.") (define-public python-waitress (package (name "python-waitress") - (version "1.1.0") + (version "3.0.0") (source (origin (method url-fetch) (uri (pypi-uri "waitress" version)) - (patches (search-patches "python-waitress-fix-tests.patch")) (sha256 (base32 - "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k")))) - (build-system python-build-system) + "18dq4bibsv6cfhv6a3b16w2xwycxqkkiwbb0vpcwsd21n1ws8p80")))) + (build-system pyproject-build-system) + (arguments + ;; https://github.com/Pylons/waitress/issues/443 + (list #:test-flags #~(list "-k" "not test_service_port"))) + (native-inputs + (list python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://github.com/Pylons/waitress") (synopsis "Waitress WSGI server") - (description "Waitress is meant to be a production-quality pure-Python WSGI -server with very acceptable performance.") + (description + "Waitress is meant to be a production-quality pure-Python WSGI server +with very acceptable performance.") (license license:zpl2.1))) +(define-public python-whatthepatch + (package + (name "python-whatthepatch") + (version "1.0.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "whatthepatch" version)) + (sha256 + (base32 "024grf30vkpcfr3bq822zv3slhx12ifm51rmfv1inn0j50blqdvz")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/cscorley/whatthepatch") + (synopsis "Patch parsing and application library") + (description + "This package provides a patch parsing and application library.") + (license license:expat))) + (define-public python-whichcraft (package (name "python-whichcraft") @@ -18876,13 +20332,13 @@ designed to work across multiple versions of Python.") (define-public python-cookiecutter (package (name "python-cookiecutter") - (version "2.5.0") + (version "2.6.0") (source (origin (method url-fetch) (uri (pypi-uri "cookiecutter" version)) (sha256 - (base32 "1v1iafk8j2f5cciw9mf4263v91070c6z049cpnw42gwffhs907p6")))) + (base32 "0762882zrvf3sslr9r7v8wkdwjckhm2clj4d831gvx54kqbgh8fv")))) (build-system python-build-system) (arguments (list @@ -18987,18 +20443,10 @@ and provides a uniform API regardless of which JSON implementation is used.") (uri (pypi-uri "amqp" version)) (sha256 (base32 "1qmmffiy48nady7is8529vxcyqbq88v5zgawqr3fk4q8rkz166rc")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - "-c" "/dev/null" ;take control over pytest options - ;; Integration tests require network connectivity. - "--ignore" "t/integration"))))))) + (list ; Integration tests require network connectivity. + #:test-flags '(list "--ignore=t/integration"))) (native-inputs (list python-pytest)) (propagated-inputs (list python-vine)) (home-page "https://github.com/celery/py-amqp") @@ -19012,15 +20460,17 @@ alternative when librabbitmq is not available.") (define-public python-benchmark-4dn (package (name "python-benchmark-4dn") - (version "0.5.23") + (version "0.5.24") (source (origin (method url-fetch) - (uri (pypi-uri "Benchmark-4dn" version)) + (uri (pypi-uri "benchmark_4dn" version)) (sha256 (base32 - "0z3vxrkap59sk394ynvp0457mdvb201idcswlrpgjscnrp2h4ypi")))) - (properties '(("upstream-name" . "Benchmark-4dn"))) + "1cjin99p8mrh4nkbr4hsdfks9c22dfw3gk5ad80b4rxngs8mwj0s")))) + (properties '(("upstream-name" . "benchmark_4dn"))) (build-system pyproject-build-system) + ;; There are none. + (arguments (list #:tests? #false)) (native-inputs (list python-poetry-core)) (home-page "https://github.com/SooLee/Benchmark/") @@ -19079,13 +20529,13 @@ applications.") (define-public python-kombu (package (name "python-kombu") - (version "5.3.6") + (version "5.3.7") (source (origin (method url-fetch) (uri (pypi-uri "kombu" version)) (sha256 - (base32 "1n9i4hj1h3aivgy82l7accyjh1rqn20am00152l5syhl19bmpnpk")))) + (base32 "1gwp3b7w7jhsas40655pa9nlblm12irjapfkx0flmhamlgclq701")))) (build-system pyproject-build-system) (arguments (list #:test-flags @@ -19129,7 +20579,8 @@ RabbitMQ messaging server is the most popular implementation.") '("billiard/popen_spawn_win32.py" "billiard/_win.py"))))))) (native-inputs - (list python-case python-psutil python-pytest)) + (list python-case python-psutil python-pytest python-setuptools + python-wheel)) (home-page "https://github.com/celery/billiard") (synopsis "Python multiprocessing fork with improvements and bugfixes") (description @@ -19142,13 +20593,13 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") (define-public python-celery (package (name "python-celery") - (version "5.3.6") + (version "5.4.0") (source (origin (method url-fetch) (uri (pypi-uri "celery" version)) (sha256 - (base32 "1fdacw13ij94s59l6lspl09iv6fc8h1p6399jz1h00kwfcfwf347")))) + (base32 "01p7lyydhqk7fna5zn49qxj3yk0xah63725dmkajjc4d1qa1jjjh")))) (build-system pyproject-build-system) (arguments (list @@ -19170,6 +20621,7 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") (list python-case python-dnspython python-flaky + python-google-cloud-storage python-iniconfig python-moto python-msgpack @@ -19230,7 +20682,8 @@ synchronously (wait until ready).") python-scikit-learn python-scipy python-toolz)) - (native-inputs (list python-cython python-pytest python-setuptools-scm)) + (native-inputs (list python-cython python-pytest python-setuptools-scm + python-setuptools python-wheel)) (home-page "https://pypi.org/project/cesium/") (synopsis "Library for time-series feature extraction and processing") (description @@ -19307,7 +20760,8 @@ ISO 8859, etc.).") (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen")))))) (native-inputs - (list python-pytest python-pytest-cov python-pytest-xdist)) + (list python-pytest python-pytest-cov python-pytest-xdist + python-setuptools python-wheel)) (inputs (list qtbase-5)) (propagated-inputs @@ -19479,44 +20933,43 @@ checking library.") (define-public python-codespell (package (name "python-codespell") - (version "2.2.5") + (version "2.3.0") (source (origin (method url-fetch) (uri (pypi-uri "codespell" version)) (sha256 - (base32 "0mmynpblhwbja0vmzbmbb9cgpxdl7b0lxaf9h2zr5dpddvgsv7vd")))) + (base32 "07s72zfxkznigqdc23k7jp9saq0hgq0gf2kjmmxzcrayyw87s31n")))) (build-system pyproject-build-system) - (inputs - (list python-chardet)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "pyproject.toml" + (("\"--cov=codespell_lib\",") "") + (("\"--cov-report=\",") ""))))))) (native-inputs - (list python-flake8 - python-pygments + (list python-pygments python-pytest - python-pytest-cov python-pytest-dependency - python-tomli)) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key outputs tests? #:allow-other-keys) - (when tests? - ;; Make installed executable available for running the tests. - (setenv "PATH" - (string-append (assoc-ref outputs "out") "/bin" - ":" (getenv "PATH"))) - (invoke "pytest" "-vv"))))))) + python-tomli + python-setuptools + python-wheel)) + (propagated-inputs + (list python-chardet)) (home-page "https://github.com/codespell-project/codespell/") (synopsis "Spellchecker for code") - (description "Codespell fixes common misspellings in text files. -It's designed primarily for checking misspelled words in source code, -but it can be used with other files as well. It does not check for word -membership in a complete dictionary, but instead looks for a set of -common misspellings. Therefore it should catch errors like \"adn\", but -it will not catch \"adnasdfasdf\". This also means it shouldn't -generate false-positives when you use a niche term it doesn't know -about.") + (description + "Codespell fixes common misspellings in text files. It's designed +primarily for checking misspelled words in source code, but it can be used +with other files as well. It does not check for word membership in a complete +dictionary, but instead looks for a set of common misspellings. Therefore it +should catch errors like \"adn\", but it will not catch \"adnasdfasdf\". This +also means it shouldn't generate false-positives when you use a niche term it +doesn't know about.") (license (list ; for codespell and codespell_lib @@ -19589,7 +21042,7 @@ encoding algorithms to do fuzzy string matching.") (define-public python-pdfminer-six (package (name "python-pdfminer-six") - (version "20201018") + (version "20231228") ;; There are no tests in the PyPI tarball. (source (origin @@ -19599,23 +21052,19 @@ encoding algorithms to do fuzzy string matching.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr")))) - (build-system python-build-system) + (base32 "1anyr0gm7amwls8qifflql1viz5rq6q95lfwcg43v3180h4w8wrd")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - ;; Tests write to the source tree. - (add-after 'unpack 'make-git-checkout-writable - (lambda _ - (for-each make-file-writable (find-files ".")) - #t)) - (replace 'check - (lambda _ - (invoke "make" "test")))))) + (list #:phases + #~(modify-phases %standard-phases + ;; Tests write to the source tree. + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (for-each make-file-writable (find-files "."))))))) (propagated-inputs - (list python-chardet python-cryptography python-sortedcontainers)) + (list python-charset-normalizer python-cryptography)) (native-inputs - (list python-nose python-tox)) + (list python-pytest)) (home-page "https://github.com/pdfminer/pdfminer.six") (synopsis "PDF parser and analyzer") (description "@code{pdfminer.six} is a community maintained fork of @@ -19694,42 +21143,37 @@ representation.") (define-public python-rich (package (name "python-rich") - (version "12.4.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "rich" version)) - (sha256 - (base32 - "149vjb4cpf9mz14iig0b6d8065dm8aslp6pc45g9ipmp1wf00ffj")))) - (build-system python-build-system) + (version "13.7.1") + (source + (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/willmcgugan/rich") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0jvkcp473c0icbb8md3grc3285j2cy0z0swxgk2g67d9n0zfdfzc")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs tests? #:allow-other-keys) - (when tests? - (copy-recursively (string-append - (assoc-ref inputs "tests") "/tests") - "tests") - (invoke "python" "-m" "pytest" "-vv"))))))) - (propagated-inputs - (list python-attrs python-colorama python-commonmark python-pygments - python-typing-extensions)) + (list + #:test-flags + ;; These fail for unknown reasons, but the results look identical. + ;; Perhaps only the terminal escape sequences are superficially + ;; different? + '(list "-k" (string-append "not test_card_render" + " and not test_markdown_render" + " and not test_python_render" + " and not test_python_render_simple" + " and not test_python_render_simple_passing_lexer_instance" + " and not test_python_render_indent_guides" + " and not test_option_no_wrap" + " and not test_syntax_highlight_ranges")))) + (propagated-inputs + (list python-markdown-it-py python-pygments)) (native-inputs - `(("python-pytest" ,python-pytest) - ("tests" - ;; The release on pypi comes without tests. We can't build from this - ;; checkout, though, because installation requires an invocation of - ;; poetry. - ,(origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/willmcgugan/rich") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "17c3gljn8zv32xnpsgd3fqgqn4r7cdfqri41hridcpbhssdgkyp9")))))) + (list python-poetry-core python-pytest)) (home-page "https://github.com/willmcgugan/rich") (synopsis "Render rich text and more to the terminal") (description @@ -19750,7 +21194,6 @@ syntax highlighting, markdown and more to the terminal.") (build-system python-build-system) (propagated-inputs (list python-click python-importlib-metadata python-rich)) - (native-inputs (list python-pre-commit)) (home-page "https://github.com/ewels/rich-click") (synopsis "Format click help output nicely with rich") (description "Click is a \"Python package for creating beautiful command @@ -19763,20 +21206,8 @@ customization required.") (define-public python-textual (package (name "python-textual") - (version "0.1.18") + (version "0.50.1") (source (origin - (method url-fetch) - (uri (pypi-uri "textual" version)) - (sha256 - (base32 - "08yg5a51hz1axfj5hx28hx31gq5apcj6vpkkmawmiplisa73z25j")))) - (build-system python-build-system) - (arguments - (let ((tests - ;; The release on pypi comes without tests. We can't build - ;; from this checkout, though, because installation requires - ;; an invocation of poetry. - (origin (method git-fetch) (uri (git-reference (url "https://github.com/Textualize/textual") @@ -19784,19 +21215,29 @@ customization required.") (file-name (git-file-name name version)) (sha256 (base32 - "0b3ycwqhp21mg9fvmadgxhgbvkwq6fd784l2xcmvy77rravrnnax"))))) - (list #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (copy-recursively #$(file-append tests "/tests") - "tests") - (invoke "python" "-m" "pytest" "-vv")))))))) + "10mmmgsq5pblr9ijgyln79p3hc7sah56k2hkzlvm2abrr9gwgpcf")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + ;; Snapshot tests require python-pytest-textual-snapshot which + ;; in turn depends on python-textual. + '(list "--ignore=tests/snapshot_tests/test_snapshots.py" + "-k" (string-append + ;; Broken for unknown reason. + "not test_textual_env_var" + ;; Tests that require python-treesitter-languages. + " and not test_language_binary_missing" + " and not test_register_language" + " and not test_register_language_existing_language")))) (propagated-inputs - (list python-rich python-typing-extensions)) + (list python-markdown-it-py + python-mdit-py-plugins + python-rich + python-tree-sitter + ;; python-tree-sitter-languages ; optional, not packed yet + python-typing-extensions)) (native-inputs - (list python-pytest)) + (list python-poetry-core python-pytest python-pytest-asyncio)) (home-page "https://github.com/Textualize/textual") (synopsis "Build text user interfaces in Python") (description "Textual is a @acronym{TUI, Text User Interface} framework @@ -19815,7 +21256,12 @@ for Python inspired by modern web development.") (file-name (git-file-name name version)) (sha256 (base32 - "1x11kfn4g244fia9a7y4ly8dqv5zsxfg3l5azc54dl6gkp2bk7vx")))) + "1x11kfn4g244fia9a7y4ly8dqv5zsxfg3l5azc54dl6gkp2bk7vx")) + (modules '((guix build utils))) + ;; Adjust expected output for file@5.45. + (snippet #~(substitute* "test/libmagic_test.py" + (("PDF document, version 1\\.2, 2 pages") + "PDF document, version 1.2, 2 page(s)"))))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -19834,7 +21280,7 @@ for Python inspired by modern web development.") (replace 'check (lambda* (#:key tests? #:allow-other-keys) ;; The test suite mandates this variable. - (setenv "LC_ALL" "en_US.UTF-8") + (setenv "LC_ALL" "C.UTF-8") (if tests? (with-directory-excursion "test" (invoke "python" "./libmagic_test.py")) @@ -20026,28 +21472,24 @@ respectively.") (define-public python-rope (package (name "python-rope") - (version "1.1.1") + (version "1.13.0") (source (origin (method url-fetch) (uri (pypi-uri "rope" version)) (sha256 (base32 - "0bkzwkllxxdxd3w70xiy137lqvnlmmaplsc2ya3s23ss4kq8y10k")))) - (build-system python-build-system) - (arguments - (list #:phases - `(modify-phases %standard-phases - (add-after 'unpack 'disable-broken-test - (lambda _ - (substitute* "ropetest/contrib/autoimporttest.py" - (("def test_search_module") - "def __notest_search_module") - (("def test_search_submodule") - "def __notest_search_submodule"))))))) - (native-inputs - (list python-pytest-timeout - python-pytest)) + "1078mkzivz45my8x2y5gxisr0vba630xj7yxx7anr068xhnpshsi")))) + (build-system pyproject-build-system) + (propagated-inputs + (list python-pytoolconfig)) + (native-inputs + (list python-pre-commit + python-pytest + python-pytest-cov + python-pytest-timeout + python-setuptools + python-wheel)) (home-page "https://github.com/python-rope/rope") (synopsis "Refactoring library for Python") (description "Rope is a refactoring library for Python. It facilitates @@ -20156,14 +21598,34 @@ library. It can be used to act both as a TFTP client or TFTP server.") (define-public python-greenlet (package (name "python-greenlet") - (version "2.0.1") + (version "3.1.1") (source (origin (method url-fetch) (uri (pypi-uri "greenlet" version)) (sha256 - (base32 "0rqgxp1fai0fcyv46nd1389mxvk3ccixgdkwws70xnk08ib05rj2")))) - (build-system python-build-system) + (base32 "0rsla5f2vgc6g450fziprjy98vf2fwbz6zjx8x37kpvavdnarqsc")))) + (build-system pyproject-build-system) + (arguments + (list + ;; AssertionError: 'Exception' not found in '' + #:test-flags + #~(list (string-join + (list "--deselect=src/greenlet/tests/test_greenlet.py" + "TestGreenlet" + "test_dealloc_catches_GreenletExit_throws_other") + "::")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'build-extensions + (lambda _ + (invoke "python" "setup.py" "build_ext" "--inplace")))))) + (native-inputs + (list python-objgraph + python-pytest + python-psutil + python-setuptools + python-wheel)) (home-page "https://greenlet.readthedocs.io/") (synopsis "Lightweight in-process concurrent programming") (description @@ -20173,6 +21635,18 @@ pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on \"channels\".") (license (list license:psfl license:expat)))) +(define-public python-greenlet-2 + (hidden-package + (package + (inherit python-greenlet) + (version "2.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "greenlet" version)) + (sha256 + (base32 "1h1l1mll5s4y1b09asf2jps0m7wyshnis1aassz9gc3xmw9xrj77"))))))) + (define-public python-objgraph (package (name "python-objgraph") @@ -20435,6 +21909,7 @@ Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying network support library.") (license license:bsd-3))) +;; WARNING: This package is a dependency of mesa. (define-public python-ply (package (name "python-ply") @@ -20456,18 +21931,19 @@ It uses LR parsing and does extensive error checking.") (define-public python-tabulate (package (name "python-tabulate") - (version "0.8.9") + (version "0.9.0") (source (origin (method url-fetch) (uri (pypi-uri "tabulate" version)) (sha256 (base32 - "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb")))) - (build-system python-build-system) - (arguments - ;; FIXME: The pypi release tarball is missing a 'test/common.py' - ;; and the latest release is not tagged in the upstream repository. - '(#:tests? #f)) + "0g4b0qnbw55igbpxfxzciqvb6w8ncw4gmcgyq0lyavcnylmv3580")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools-scm + python-setuptools + python-wheel)) (home-page "https://bitbucket.org/astanin/python-tabulate") (synopsis "Pretty-print tabular data") (description @@ -20542,6 +22018,24 @@ Python implementation of the @code{wcwidth} and @code{wcswidth} C functions specified in POSIX.1-2001 and POSIX.1-2008.") (license license:expat))) +(define-public python-columnize + (package + (name "python-columnize") + (version "0.3.11") + (source + (origin + (method url-fetch) + (uri (pypi-uri "columnize" version)) + (sha256 + (base32 "1clb3lfw694crq8m767q0yjaazkplcrbzdr9fr2w39hhndivhcd6")))) + (build-system pyproject-build-system) + (home-page "https://github.com/rocky/pycolumnize") + (synopsis "Format a simple (i.e. not nested) list into aligned columns.") + (description + "This package provides a way to format a simple (i.e. not nested) list +into aligned columns.") + (license license:expat))) + (define-public python-chai (package (name "python-chai") @@ -20612,7 +22106,9 @@ def get_requires_for_build_sdist(config_settings=None): python-pytest-flake8 python-pytest-mypy ;; For the version number - python-setuptools-scm)) + python-setuptools-scm + python-setuptools + python-wheel)) (home-page "https://github.com/jaraco/inflect") (synopsis "Correctly generate plurals, singular nouns, ordinals, indefinite articles") (description @@ -20653,7 +22149,8 @@ underscored string.") (base32 "1jivws8dsscsmyqngbc71r4qw8qmn98pqmhylz01r5dd1ljfw9bi")))) (build-system pyproject-build-system) (inputs (list mit-krb5)) - (native-inputs (list python-cython python-k5test python-pytest)) + (native-inputs (list python-cython python-k5test python-pytest + python-setuptools python-wheel)) (home-page "https://github.com/jborean93/pykrb5") (synopsis "Kerberos API bindings for Python") (description "This library provides Python functions that wraps the @@ -20681,19 +22178,21 @@ Wikipedia code samples at (define-public python-cleo (package (name "python-cleo") - (version "0.8.1") + (version "2.1.0") (source (origin (method url-fetch) (uri (pypi-uri "cleo" version)) (sha256 (base32 - "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix")))) - (build-system python-build-system) + "08ym7xaalxzka3k9wp7i05n6j9xmmjs1y02ilrz0lrhkbl5qhb0b")))) + (build-system pyproject-build-system) (native-inputs - (list ;; For testing - python-mock python-pytest-mock python-pytest)) + (list python-poetry-core + python-mock + python-pytest-mock + python-pytest)) (propagated-inputs - (list python-backpack python-clikit python-pastel python-pylev)) + (list python-crashtest python-rapidfuzz)) (home-page "https://github.com/sdispater/cleo") (synopsis "Command-line arguments library for Python") (description @@ -20871,7 +22370,7 @@ strings require only one extra byte in addition to the strings themselves.") (define-public python-cattrs (package (name "python-cattrs") - (version "22.1.0") + (version "23.2.3") (source (origin (method git-fetch) ;for tests (uri (git-reference @@ -20880,43 +22379,65 @@ strings require only one extra byte in addition to the strings themselves.") (file-name (git-file-name name version)) (sha256 (base32 - "1n0h25gj6zd02kqyl040xpdvg4hpy1j92716sz0rg019xjqqijqb")))) + "0lrrz4n6ygfyrzn40mxm82kkvgqclfi760zydy4lin3bcv73jqyd")))) (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; Skip all benchmark tests. + "--ignore=bench/test_attrs_collections.py" + "--ignore=bench/test_attrs_nested.py" + "--ignore=bench/test_attrs_primitives.py" + "--ignore=bench/test_primitives.py" + "-k" + (string-join + ;; XXX: Tests fail with error: AssertionError: assert ..., + ;; check why. + (list "not test_310_optional_field_roundtrip" + "test_310_union_field_roundtrip" + "test_nested_roundtrip" + "test_nested_roundtrip_tuple" + "test_omit_default_roundtrip" + "test_optional_field_roundtrip" + "test_simple_roundtrip" + "test_simple_roundtrip_defaults" + "test_simple_roundtrip_defaults_tuple" + "test_simple_roundtrip_tuple" + "test_simple_roundtrip_with_extra_keys_forbidden" + "test_structure_simple_from_dict_default" + "test_union_field_roundtrip" + "test_unmodified_generated_structuring") + " and not ")) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'adjust-for-older-attrs - ;; Our older attrs package is using the 'attr' rather than 'attrs' - ;; namespace. - ;; TODO: Remove after python-attrs is updated to >= 21.4.0. + (add-after 'unpack 'patch-pyproject (lambda _ - (substitute* (find-files "." "\\.py$") - (("from attrs\\b") - "from attr")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not use the 'pytest' binary as it hard-codes an older - ;; python-hypothesis version near the beginning of its - ;; GUIX_PYTHONPATH. - (invoke "python" "-m" "pytest" "-vv" "-c" "/dev/null" "tests" - "-n" (number->string (parallel-job-count)) - ;; This test requires orjson, which needs the maturin - ;; build system and new Rust dependencies. - "--ignore" "tests/test_preconf.py"))))))) + (substitute* "pyproject.toml" + ;; Fix version string + (("dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"")) + ;; Just run pytest with no frills + (("addopts = \"-l.*") ""))))))) (native-inputs - (list python-hypothesis + (list python-hatchling + python-hatch-vcs + python-hypothesis python-immutables python-msgpack - python-poetry-core python-pymongo ;for the bson module python-pytest + python-pytest-benchmark python-pytest-xdist)) (propagated-inputs (list python-attrs + python-cbor2 python-exceptiongroup - python-typing-extensions)) + python-orjson + python-pyyaml + python-tomlkit + python-typing-extensions + python-ujson)) (home-page "https://github.com/python-attrs/cattrs") (synopsis "Python library for structuring and unstructuring data") (description "@code{cattrs} is an Python library for structuring and @@ -20959,51 +22480,116 @@ database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.") (define-public poetry (package (name "poetry") - (version "1.1.12") + (version "1.8.4") (source (origin (method url-fetch) (uri (pypi-uri "poetry" version)) (sha256 - (base32 - "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw")))) - (build-system python-build-system) + (base32 "00ljr5r9h93wh68h4m242qw58mdai8gji4g0c3bfqznicvdgi42l")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ;PyPI does not have tests - #:phases - (modify-phases %standard-phases - (add-before 'build 'patch-setup-py - (lambda _ - (substitute* "setup.py" - ;; Relax some of the requirements. - (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring) - (("(packaging>=20.4),<21.0" _ packaging) packaging))))))) + (list + #:test-flags + #~(list "--ignore=tests/installation/test_executor.py" + "--ignore=tests/installation/test_chef.py" + "-k" (string-join + (list "not test_builder_setup_generation_runs_with_pip_editable" + "test_check_invalid" + "test_create_poetry_fails_on_invalid_configuration" + "test_installer_with_pypi_repository" + "test_shell" + ;; RuntimeError: No lockfile found. Unable to read + ;; locked packages + "test_not_fresh_lock" + ;; assert False is True + "test_env_system_packages_are_relative_to_lib" + ;; poetry.inspection.info.PackageInfoError: Unable + ;; to determine package info for path + "test_info_setup_complex_calls_script") + " and not ")) + #:phases + #~(modify-phases %standard-phases + ;; Almost every dependency is pinned too strictly. + (delete 'sanity-check)))) + (native-inputs + (list nss-certs-for-test + python-deepdiff + python-httpretty + python-pytest + python-pytest-mock + python-pytest-randomly + python-pytest-xdist)) (propagated-inputs (list python-cachecontrol - python-cachy python-cleo python-crashtest + python-dulwich python-entrypoints - python-html5lib + python-fastjsonschema + python-importlib-metadata + python-installer python-keyring - ; Use of deprecated version of msgpack reported upstream: - ; https://github.com/python-poetry/poetry/issues/3607 - python-msgpack-transitional python-packaging python-pexpect python-pip python-pkginfo - python-poetry-core-1.0 + python-platformdirs + python-poetry-core + python-poetry-plugin-export + python-pypa-build + python-pyproject-hooks python-requests python-requests-toolbelt python-shellingham + python-tomli python-tomlkit - python-virtualenv)) + python-trove-classifiers + python-virtualenv + python-xattr)) (home-page "https://python-poetry.org") (synopsis "Python dependency management and packaging made easy") - (description "Poetry is a tool for dependency management and packaging -in Python. It allows you to declare the libraries your project depends on and -it will manage (install/update) them for you.") + (description + "Poetry is a tool for dependency management and packaging in Python. It +allows you to declare the libraries your project depends on and it will +manage (install/update) them for you.") + (license license:expat))) + +(define-public python-pyproject-api + (package + (name "python-pyproject-api") + (version "1.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyproject_api" version)) + (sha256 + (base32 "0f75rajzk72ay4x9ajw1835amm932q7cdn0yrbwiy3fwi80xq5qq")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; This test fails with AssertionError. + #~(list "-k" "not test_setuptools_prepare_metadata_for_build_wheel") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'relax-packaging + (lambda _ + (substitute* "pyproject.toml" + ;; We have packaging 21.3. + (("packaging>=23.1") "packaging>=21.3"))))))) + (native-inputs + (list python-covdefaults + python-hatch-vcs + python-hatchling + python-pytest + python-pytest-mock)) + (propagated-inputs + (list python-packaging python-tomli)) + (home-page "https://pyproject-api.readthedocs.io/latest/") + (synopsis "API to interact with the Python pyproject.toml based projects") + (description + "@code{pyproject-api} aims to abstract away interaction with +@code{pyproject.toml} style projects in a flexible way.") (license license:expat))) (define-public python-pyproject-hooks @@ -21164,20 +22750,20 @@ inspection of types defined in the Python standard typing module.") (define-public python-lazy-loader (package (name "python-lazy-loader") - (version "0.3") + (version "0.4") (source (origin (method url-fetch) (uri (pypi-uri "lazy_loader" version)) (sha256 (base32 - "0dwghffnsjjf4pi4gwbl43rx04jmap375hdamafs5cpm6j78js1v")))) + "1lacaz292qxpgw6kxiirkx6sv9c5883nq4ssm3hs94cvb2153is7")))) (build-system pyproject-build-system) (native-inputs - (list python-pre-commit - python-pytest - python-pytest-cov)) + (list python-numpy python-pytest python-setuptools)) (propagated-inputs - (list python-flit-core)) + (list python-flit-core + python-setuptools + python-wheel)) (home-page "https://scientific-python.org/specs/spec-0001/") (synopsis "Load subpackages and functions on demand") (description "@code{python-lazy-loader} makes it easy to load subpackages @@ -21194,18 +22780,21 @@ times. (define-public python-lazy-object-proxy (package (name "python-lazy-object-proxy") - (version "1.5.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "lazy-object-proxy" version)) - (sha256 - (base32 - "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp")))) + (version "1.10.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "lazy-object-proxy" version)) + (sha256 + (base32 "0sdc92bbzy6slcl432j04mr131cy8n0many26ppm4fpl8mnpn93q")))) + (build-system pyproject-build-system) (native-inputs - (list python-setuptools-scm)) - (build-system python-build-system) + (list python-pip + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/ionelmc/python-lazy-object-proxy") - (synopsis "Lazy object proxy for python") + (synopsis "Lazy object proxy for Python") (description "Lazy object proxy is an object that wraps a callable but defers the call until the object is actually required, and caches the result of said call.") @@ -21354,28 +22943,25 @@ parsing UK postcodes.") (define-public python-faker (package (name "python-faker") - (version "15.0.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "Faker" version)) - (sha256 - (base32 - "1yx3gsivisf8ls43v0fgzy4n5q9625xrp9fr9cb5gp3h6k9cfpr4")))) - (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"))))))) + (version "33.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "faker" version)) + (sha256 + (base32 "1r518fmir10jwz29a9fsl66x834dr1w40l4bci3gqlbax305z4hw")))) + (build-system pyproject-build-system) (native-inputs (list python-freezegun python-pytest python-random2 python-ukpostcodeparser - python-validators)) - (propagated-inputs (list python-dateutil)) + python-setuptools + python-validators + python-wheel)) + (propagated-inputs + (list python-dateutil + python-typing-extensions)) (home-page "https://github.com/joke2k/faker") (synopsis "Python package that generates fake data") (description @@ -21448,13 +23034,13 @@ collections of data.") (define-public python-prompt-toolkit (package (name "python-prompt-toolkit") - (version "3.0.29") + (version "3.0.43") (source (origin (method url-fetch) (uri (pypi-uri "prompt_toolkit" version)) (sha256 - (base32 "19vf5cahp3imdpwhgvk55g3dvqmc6ga175r4vkq79kffx1h0yr5x")))) + (base32 "0zgzn02ffc9njpz0pfsin30nwmm3754cig20l1jvqv0h4spvf9rm")))) (build-system python-build-system) (arguments `(#:phases @@ -21510,7 +23096,7 @@ scans through a file and detects issues.") (define-public python-jedi (package (name "python-jedi") - (version "0.18.2") + (version "0.19.2") (source (origin (method git-fetch) @@ -21521,19 +23107,19 @@ scans through a file and detects issues.") (file-name (git-file-name name version)) (sha256 (base32 - "1nhsajmkn3qj32k5z3ymrd3r6dz2aliv2pqb824m5kaib986dm44")) - (modules '((guix build utils))))) - (build-system python-build-system) + "0w8rrw6s4bzr5csds8bhasrmzh9q77zh5dzisjysl8cb5qjx0w6s")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - (invoke "python" "-m" "pytest" "-vv"))))))) + (list + #:phases + '(modify-phases %standard-phases + (add-before 'check 'set-HOME + (lambda _ (setenv "HOME" "/tmp")))))) (native-inputs - (list python-colorama python-docopt python-pytest)) + (list python-docopt + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-parso)) (home-page "https://github.com/davidhalter/jedi") @@ -21688,20 +23274,17 @@ etc.") (sha256 (base32 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw")))) - (build-system python-build-system) - (arguments - '(#:tests? #f)) ; FIXME: 3/49 tests are failing. - ;; #:phases - ;; (modify-phases %standard-phases - ;; (replace 'check - ;; (lambda _ - ;; (zero? (system* "python" "test/run_all_tests.py" "loop://"))))))) - (home-page - "https://github.com/pyserial/pyserial") + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://github.com/pyserial/pyserial") (synopsis "Python Serial Port Bindings") - (description "@code{pyserial} provide serial port bindings for Python. It - supports different byte sizes, stop bits, parity and flow control with RTS/CTS - and/or Xon/Xoff. The port is accessed in RAW mode.") + (description + "@code{pyserial} provide serial port bindings for Python. It supports +different byte sizes, stop bits, parity and flow control with RTS/CTS and/or +Xon/Xoff. The port is accessed in RAW mode.") (license license:bsd-3))) (define-public python-pyserial-asyncio @@ -21739,7 +23322,8 @@ etc.") #:test-flags '(list "--ignore=pymemcache/test/test_compression.py"))) (native-inputs - (list python-faker python-pytest python-pytest-cov)) + (list python-faker python-pytest python-pytest-cov python-setuptools + python-wheel)) (home-page "https://github.com/pinterest/pymemcache") (synopsis "Comprehensive, fast, pure Python memcached client") (description @@ -22001,6 +23585,34 @@ multitouch applications.") Design spec without sacrificing ease of use or application performance.") (license license:expat))) +(define-public python-async-lru + (package + (name "python-async-lru") + (version "2.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "async-lru" version)) + (sha256 + (base32 "09sn3bc3gc2flijm9k8kn4hmbnlkaddhqahb49izy188yrfrm9dq")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-pytest-asyncio + python-pytest-timeout + python-setuptools)) + (propagated-inputs + (list python-typing-extensions)) + (home-page "https://github.com/aio-libs/async-lru") + (synopsis "Simple LRU cache for asyncio") + (description + "This package is a port of Python's built-in @code{functools.lru_cache} +function for @code{asyncio}. To better handle async behaviour, it also +ensures multiple concurrent calls will only result in 1 call to the wrapped +function, with all awaits receiving the result of that call when it +completes.") + (license license:expat))) + (define-public python-asyncinject (package (name "python-asyncinject") @@ -22012,7 +23624,8 @@ Design spec without sacrificing ease of use or application performance.") (sha256 (base32 "0x57idiy19lzyn32klgm06r223z8gr2aqqk91gysbshq7jg8g3pf")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-pytest-asyncio)) + (native-inputs (list python-pytest python-pytest-asyncio + python-setuptools python-wheel)) (home-page "https://github.com/simonw/asyncinject") (synopsis "Run async workflows using pytest-fixtures-style dependency injection") @@ -22324,6 +23937,7 @@ JSON) codec.") (base32 "16ynrq245c3nywv476izrc4bcacm9gxjzgr67ng91g929ny6bfl4")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/fchollet/namex") (synopsis "Separate implementation and public API surface of Python packages") @@ -22358,7 +23972,10 @@ implementation of your Python package and its public API surface.") (when tests? (invoke "pytest" "-v"))))))) (native-inputs - (list python-hypothesis python-pytest-cov python-pytest-mock + (list glibc-utf8-locales ;; Tests want en_US.UTF-8 + python-hypothesis + python-pytest-cov + python-pytest-mock python-pytest)) (propagated-inputs ; TODO: Add python-fastnumbers. (list python-pyicu)) @@ -22378,13 +23995,13 @@ numbers, real numbers, mixed types and more, and comes with a shell command (define-public glances (package (name "glances") - (version "3.4.0.3") + (version "4.1.1") (source (origin (method url-fetch) - (uri (pypi-uri "Glances" version)) + (uri (pypi-uri "glances" version)) (sha256 - (base32 "0pf8hxbgwkhv8l5frg61b073vscz5a7bz1al7xhn36fvh10xbcg7")) + (base32 "10yjwbmwv2x4x1n3hr1631m8l6l9w8fa7rnvfz1vmzkjs199ihib")) (modules '((guix build utils))) (snippet '(begin @@ -22398,7 +24015,7 @@ numbers, real numbers, mixed types and more, and comes with a shell command #t)))) (build-system python-build-system) (propagated-inputs - (list python-defusedxml python-future python-packaging python-psutil python-ujson)) + (list python-defusedxml python-orjson python-packaging python-psutil)) (home-page "https://github.com/nicolargo/glances") (synopsis "Cross-platform curses-based monitoring tool") (description @@ -22418,18 +24035,39 @@ numbers, real numbers, mixed types and more, and comes with a shell command (sha256 (base32 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-hardcoded-version - (lambda _ (substitute* - "setup.py" - (("'gevent==1.1rc1'") "'gevent'")) - #t))))) - (native-inputs - (list python-gevent python-mock python-pytest-mock)) + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'use-poetry-core + (lambda _ + ;; Patch to use the core poetry API. + (substitute* "pyproject.toml" + (("poetry.masonry.api") + "poetry.core.masonry.api") + ;; Poetry does not like line breaks. + (("description = \"\"\"") + "description = \"GraphQL-core is a Python port of GraphQL.js.\"\n") + (("^GraphQL-core is a Python.*") "") + (("^ the JavaScript reference.*") "")))) + (add-after 'unpack 'patch-setup.py + (lambda _ + (substitute* "setup.py" + ;; Relax hardcoded version + (("'gevent==1.1rc1'") "'gevent'") + ;; Poetry complains about this line break. + (("a port of GraphQL.js,\"") + (string-append "a port of GraphQL.js, " + "the JavaScript reference implementation for GraphQL.")) + ((" \" the JavaScript reference.*") ""))))))) + (native-inputs + (list python-gevent + python-mock + python-poetry-core + python-pytest + python-pytest-benchmark + python-pytest-mock)) (propagated-inputs (list python-promise python-six)) (home-page "https://github.com/graphql-python/graphql-core") @@ -22528,25 +24166,31 @@ numbers, real numbers, mixed types and more, and comes with a shell command between the different Python versions.") (license license:psfl))) +;; XXX: The last time updated in 2015, consider to remove it when nothing is +;; depend on it. (define-public python-snowballstemmer (package (name "python-snowballstemmer") - (version "2.0.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "snowballstemmer" version)) - (sha256 - (base32 - "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz")))) - (build-system python-build-system) + (version "2.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "snowballstemmer" version)) + (sha256 + (base32 "1ccwy75i0f5yi1vy6fyvr1gf43ydhjani45mswm43ls7hpmnvc89")))) + (build-system pyproject-build-system) (arguments - `(;; No tests exist - #:tests? #f)) + (list + #:tests? #f)) ; no tests + (native-inputs + (list python-setuptools + python-wheel)) (home-page "https://github.com/shibukawa/snowball_py") (synopsis "Snowball stemming library collection for Python") - (description "This package provides 16 word stemmer algorithms generated - from Snowball algorithms. It includes the 15 original ones plus the Poerter - English stemmer.") + (description + "This package provides 16 word stemmer algorithms generated from Snowball +algorithms. It includes the 15 original ones plus the Poerter English +stemmer.") (license license:bsd-3))) (define-public python-setproctitle @@ -22591,7 +24235,7 @@ OpenSSH Server for example.") (define-public python-pyelftools (package (name "python-pyelftools") - (version "0.29") + (version "0.30") (home-page "https://github.com/eliben/pyelftools") (source (origin @@ -22600,7 +24244,7 @@ OpenSSH Server for example.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1mi7i9zlhkkap4q50ciak57ia46mj2jzq0713m3dh0x8j05k9xml")) + (base32 "0gk47mq5cqv6qz35aydn67wma5m70gv5f9f6pg38zny6vsfavmq3")) (snippet ;; Delete bundled readelf executable. '(delete-file "test/external_tools/readelf")))) @@ -22617,9 +24261,9 @@ OpenSSH Server for example.") (synopsis "Analyze binary and library file information") (description "This Python library provides interfaces for parsing and - analyzing two binary and library file formats ; the Executable and Linking - Format (ELF), and debugging information in the Debugging With Attributed - Record Format (DWARF).") +analyzing two binary and library file formats ; the Executable and Linking +Format (ELF), and debugging information in the Debugging With Attributed +Record Format (DWARF).") (license license:public-domain))) (define-public python-pefile @@ -22647,20 +24291,21 @@ from the header, as well as section details and data available.") (define-public python-imagesize (package (name "python-imagesize") - (version "1.2.0") + (version "1.4.1") (source - (origin - (method url-fetch) - (uri (pypi-uri "imagesize" version)) - (sha256 - (base32 - "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "imagesize" version)) + (sha256 + (base32 + "0jndjx26p8qibrx997p3kb6vfbqbdxkv74jsrkav177vmx2085b9")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/shibukawa/imagesize_py") (synopsis "Gets image size of files in various formats in Python") (description - "This package allows determination of image size from - PNG, JPEG, JPEG2000 and GIF files in pure Python.") + "This package allows determination of image size from PNG, JPEG, +JPEG2000 and GIF files in pure Python.") (license license:expat))) (define-public python-termstyle @@ -22689,31 +24334,45 @@ from the header, as well as section details and data available.") (define-public python-argcomplete (package (name "python-argcomplete") - (version "1.11.1") + (version "3.2.2") (source (origin (method url-fetch) (uri (pypi-uri "argcomplete" version)) (sha256 (base32 - "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss")) - (patches (search-patches "python-argcomplete-1.11.1-fish31.patch")))) - (build-system python-build-system) + "18h023ma2m2gw8w8dm2pvv4k0vpli94293jl57p2ch4vln79xr7k")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; pip: command not found + (substitute* "test/test.py" + (("def test_console_script") + "def __disable_test_console_script")) + (invoke "python3" "./test/test.py" "-v"))))))) (native-inputs (list python-coverage - python-flake8 + python-mypy python-pexpect + python-setuptools + python-setuptools-scm python-wheel tcsh fish - bash)) ;full Bash for 'test_file_completion' + bash ;full Bash for 'test_file_completion' + zsh)) (home-page "https://github.com/kislyuk/argcomplete") (synopsis "Shell tab completion for Python argparse") (description "argcomplete provides extensible command line tab completion - of arguments and options for Python scripts using @code{argparse}. It's - particularly useful for programs with many options or sub-parsers that can - dynamically suggest completions ; for example, when browsing resources over the - network.") +of arguments and options for Python scripts using @code{argparse}. It's +particularly useful for programs with many options or sub-parsers that can +dynamically suggest completions ; for example, when browsing resources over +the network.") (license license:asl2.0))) (define-public python-csscompressor @@ -22818,7 +24477,8 @@ from the header, as well as section details and data available.") (propagated-inputs (list pigz python-isal python-typing-extensions)) (native-inputs - (list python-pytest python-pytest-timeout python-setuptools-scm)) + (list python-pytest python-pytest-timeout python-setuptools-scm + python-setuptools python-wheel)) (home-page "https://github.com/marcelm/xopen/") (synopsis "Open compressed files transparently") (description "This module provides an @code{xopen} function that works @@ -22902,29 +24562,39 @@ efficient as possible on all supported Python versions.") "1gqfh00ics2k1sm5g46l3bi8cl5fc5d1cwzh1ylvcxvdvypklqc7")))) (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;there are none + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/noahmorrison/chevron") (synopsis "Mustache templating language renderer") (description "This package provides a Python implementation of the Mustache templating language renderer.") (license license:expat))) +;; XXX: Try to inherit from duckdb and build from source with all extentions. (define-public python-duckdb (package (name "python-duckdb") - (version "0.8.1") + (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "duckdb" version)) (sha256 (base32 - "1sgfmii5xlkbx3hzyjxg80gl2ni1rxpabahl4gww9by2mgs3fkd5")))) + "0lyl6di1c7j31i2mk384j711kzyyf9rjd3nqx5mbgmf7gfvmk852")))) (build-system pyproject-build-system) (arguments (list #:test-flags - '(list "--ignore=tests/slow/test_h2oai_arrow.py" - ;; Don't install anything, thank you. - "-k" "not test_install_non_existent_extension") + #~(list "--ignore=tests/slow/test_h2oai_arrow.py" + ;; Do not relay on mypy. + "--ignore=tests/stubs/test_stubs.py" + "-k" (string-append + ;; Don't install anything, thank you. + "not test_install_non_existent_extension" + ;; See <https://github.com/duckdb/duckdb/issues/11961>. + " and not test_fetchmany" + ;; See <https://github.com/duckdb/duckdb/issues/10702>. + " and not test_connection_interrupt" + " and not test_query_interruption")) #:phases #~(modify-phases %standard-phases ;; Tests need this @@ -22943,18 +24613,21 @@ Mustache templating language renderer.") "pyfilesystem.hpp" "pybind11/conversions/pyconnection_default.hpp") (("const_name") "_")))))))) + (propagated-inputs + (list python-adbc-driver-manager)) (native-inputs (list pybind11 python-fsspec python-google-cloud-storage - python-mypy python-numpy python-pandas python-psutil python-pyarrow python-pytest python-pytest-runner - python-setuptools-scm)) + python-setuptools-scm + python-setuptools + python-wheel)) (home-page "https://www.duckdb.org") (synopsis "DuckDB embedded database") (description "DuckDB is an in-process SQL OLAP database management @@ -22998,6 +24671,47 @@ system.") ;; Can be used with either license. (license (list license:asl2.0 license:gpl2+)))) +(define-public python-dunamai + (package + (name "python-dunamai") + (version "1.21.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dunamai" version)) + (sha256 + (base32 "1i35i8ym6n8mpgrq31hivrvfciy12gv26jwlzimmkx9jy2spz0h5")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" "not test__version__from_git__shallow") + #:phases + #~(modify-phases %standard-phases + ;; These steps are taked from NixOS package definition: + ;; nixpkgs/pkgs/development/python-modules/dunamai/default.nix + (add-before 'check 'pre-check + (lambda _ + (setenv "PATH" (string-append #$output "/bin:" (getenv "PATH"))) + (setenv "HOME" "/tmp") + (invoke "git" "config" "--global" "user.email" "nobody@example.com") + (invoke "git" "config" "--global" "user.name" "Nobody")))))) + (propagated-inputs + (list python-packaging)) + (native-inputs + (list git-minimal + python-poetry-core + python-pytest)) + (home-page "https://github.com/mtkennerly/dunamai") + (synopsis "Dynamic version generation") + (description + "Dunamai is Python library and command line tool for producing dynamic, +standards-compliant version strings, derived from tags in your version control +system. This facilitates uniquely identifying nightly or per-commit builds in +continuous integration and releasing new versions of your software simply by +creating a tag.") + (license license:expat))) + (define-public python-pbkdf2 (package (name "python-pbkdf2") @@ -23127,25 +24841,27 @@ system.") (define-public python-ddt (package (name "python-ddt") - (version "1.4.2") + (version "1.7.2") (source (origin (method url-fetch) (uri (pypi-uri "ddt" version)) (sha256 - (base32 - "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4")))) - (build-system python-build-system) + (base32 "0jz0lglz5z5clsbralbpmd1hxs4ndb6ls7lvl7216c4nhfqdc5fj")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-aiounittest + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-pyyaml)) (home-page "https://github.com/datadriventests/ddt") (synopsis "Data-Driven Tests") (description "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by - running it with different test data, and make it appear as multiple test - cases.") +running it with different test data, and make it appear as multiple test +cases.") (license license:expat))) (define-public python-pycountry @@ -23235,6 +24951,27 @@ system.") parse many formal languages.") (license license:gpl2))) +(define-public python-pyformlang + (package + (name "python-pyformlang") + (version "1.0.10") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyformlang" version)) + (sha256 + (base32 "0szgy4pqfixmswjs37qgma4qa3bsadpp3l1xflrpfi10aa8hh2sp")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-networkx python-numpy python-pydot)) + (home-page "https://github.com/Aunsiels/pyformlang") + (synopsis "Framework for interacting with formal grammars") + (description + "This package provides a framework for working with formal +language grammars. The library was originally developed for educational +purposes and therefore implements many textbook algorithms regarding the +manipulation and interaction with formal grammars.") + (license license:expat))) + (define-public python-incremental (package (name "python-incremental") @@ -23292,14 +25029,14 @@ system.") (define-public python-automat (package (name "python-automat") - (version "20.2.0") + (version "22.10.0") (source (origin (method url-fetch) (uri (pypi-uri "Automat" version)) (sha256 (base32 - "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr")))) - (build-system python-build-system) + "0kmh9fwb6rkh8r5bi5jyxysywpgpjnwdks1h3p0xq6ddxn2fnsz5")))) + (build-system pyproject-build-system) ;; We disable the tests because they require python-twisted, while ;; python-twisted depends on python-automat. Twisted is optional, but the ;; tests fail if it is not available. Also see @@ -23314,7 +25051,10 @@ system.") (substitute* "setup.py" (("\"automat-visualize = automat._visualize:tool\"") ""))))))) (native-inputs - (list python-m2r python-setuptools-scm python-graphviz)) + (list python-graphviz + python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs (list python-six python-attrs)) (home-page "https://github.com/glyph/Automat") @@ -23324,35 +25064,6 @@ system.") transducers).") (license license:expat))) -(define-public python-m2r - (package - (name "python-m2r") - (version "0.3.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "m2r" version)) - (sha256 - (base32 - "1asnwazfznbs0r7x03pj5ns4npz18z3kli538sgdicfg97y6gyxa")) - (modules '((guix build utils))) - (snippet - ;; Adjust test regex for Python 3.10 compatibility. - ;; Taken from upstream pull request: - ;; https://github.com/miyakogi/m2r/pull/62 - '(substitute* "tests/test_cli.py" - (("self.assertIn\\('optional arguments:', message\\)") - "self.assertRegex(message, r'option(s|al arguments):')"))))) - (build-system python-build-system) - (propagated-inputs - (list python-docutils python-mistune)) - (native-inputs - (list python-pygments python-mock)) - (home-page "https://github.com/miyakogi/m2r") - (synopsis "Markdown to reStructuredText converter") - (description "M2R converts a markdown file including reST markups to valid - reST format.") - (license license:expat))) - (define-public python-constantly (package (name "python-constantly") @@ -23395,29 +25106,32 @@ both as keys and as attributes.") (define-public python-attrs (package (name "python-attrs") - (version "21.2.0") + (version "24.2.0") (source (origin (method url-fetch) (uri (pypi-uri "attrs" version)) (sha256 (base32 - "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg")))) - (build-system python-build-system) + "0ik35wvcmapzhyzvwhlsrk53pgxnswh3zh5fkdb8dc5m928ipysw")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-test-hypothesis-deadlines - (lambda _ - (substitute* "tests/test_make.py" - (("assume, given") "assume, given, settings") - (("( +)@given" all spaces) - (string-append spaces "@settings(deadline=None)\n" all))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest"))))))) + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'remove-test-hypothesis-deadlines + (lambda _ + (substitute* "tests/test_make.py" + (("assume, given") "assume, given, settings") + (("( +)@given" all spaces) + (string-append spaces "@settings(deadline=None)\n" all)))))))) (native-inputs - (list python-coverage python-hypothesis python-pympler python-pytest - python-six)) + (list python-hatchling + python-hatch-fancy-pypi-readme + python-hatch-vcs + python-pympler + python-pytest + python-pytest-xdist + python-zope-interface)) (home-page "https://github.com/python-attrs/attrs/") (synopsis "Attributes without boilerplate") (description "@code{attrs} is a Python package with class decorators that @@ -23429,7 +25143,9 @@ both as keys and as attributes.") (package (inherit python-attrs) (name "python-attrs-bootstrap") - (native-inputs `()) + (native-inputs (list python-hatchling + python-hatch-fancy-pypi-readme + python-hatch-vcs)) (arguments `(#:tests? #f)))) (define-public python-cliapp @@ -23499,7 +25215,7 @@ both as keys and as attributes.") (define-public python-astroid (package (name "python-astroid") - (version "2.11.7") + (version "3.3.4") (source (origin (method git-fetch) @@ -23508,12 +25224,16 @@ both as keys and as attributes.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0lmm5bhszg1nj0xsjnh5nm39if2jzpa3ycgvhy6ddycz28dy568y")))) - (build-system python-build-system) - (propagated-inputs - (list python-lazy-object-proxy python-typing-extensions python-wrapt)) + (base32 "16cnfis2d0cyqxxx7iqi3n7ljhd55yv9v9yl1kl59k4a5jg4cnpx")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-runner)) + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-lazy-object-proxy + python-typing-extensions + python-wrapt)) (home-page "https://github.com/PyCQA/astroid") (synopsis "Python source code base representation") (description "@code{python-astroid} provides a common base representation @@ -23547,10 +25267,32 @@ builds partial trees by inspecting living objects.") version, is suitable to be include as a dependency in other projects.") (license license:lgpl3+))) +(define-public python-isoduration + (package + (name "python-isoduration") + (version "20.11.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "isoduration" version)) + (sha256 + (base32 "1n8vpa9fckhc5934kp7m83wq81dhkvw987v7mjg2fdbr2car0bxc")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-arrow)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/bolsote/isoduration") + (synopsis "Operations with ISO 8601 durations") + (description "ISO 8601 is most commonly known as a way to exchange +datetimes in textual format. A lesser known aspect of the standard is the +representation of durations. The state of the art of ISO 8601 duration +handling in Python is more or less limited to what's offered by isodate. This +package attempts to address the shortcomings of @code{isodate}.") + (license license:isc))) + (define-public python-isort (package (name "python-isort") - (version "5.12.0") + (version "5.13.2") (source (origin (method git-fetch) @@ -23563,20 +25305,21 @@ builds partial trees by inspecting living objects.") (snippet '(for-each delete-file (find-files "." "\\.whl$"))) (sha256 (base32 - "1vbwc4gpffclf6hw08lvvgqlvsgfjlw7gjsm28jfcrln2pixla7j")))) - (build-system python-build-system) + "1d9cg5ms1qilhvpk2925zh87xgzd2ly29wywwxp0yisdddi8ln7z")))) + (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "tests/unit/" + "-k" (string-join + (list + "not test_gitignore" + ;; See <https://github.com/PyCQA/isort/issues/2234>. + "test_isort_should_warn_on_empty_custom_config_issue_1433") + " and not ") + "--ignore=tests/unit/test_deprecated_finders.py") #:phases #~(modify-phases %standard-phases - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) (add-after 'install 'install-example-plugins (lambda _ (for-each (lambda (source-directory) @@ -23590,26 +25333,19 @@ builds partial trees by inspecting living objects.") (setenv "HOME" (getcwd)) (let ((example-whls (find-files "dist" "^example.*\\.whl$"))) (apply invoke "pip" "--no-cache-dir" "--no-input" - "install" "--user" "--no-deps" example-whls)))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (let ((bin (string-append #$output "/bin"))) - (setenv "PATH" (string-append (getenv "PATH") ":" bin))) - (invoke "pytest" "-vv" "tests/unit/" - "-k" "not test_gitignore" ;requires git - "--ignore=tests/unit/test_deprecated_finders.py"))))))) + "install" "--user" "--no-deps" example-whls))))))) (native-inputs - (list python-black - python-colorama + (list python-colorama + python-black python-hypothesmith python-libcst-minimal python-natsort + python-pip python-poetry-core python-pylama python-pypa-build - python-pytest-mock - python-pytest)) + python-pytest + python-pytest-mock)) (home-page "https://github.com/PyCQA/isort") (synopsis "Python utility/library to sort python imports") (description "@code{python-isort} is a python utility/library to sort @@ -23763,70 +25499,75 @@ point is the point of maximum curvature.") (define-public python-utils (package (name "python-utils") - (version "2.4.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "python-utils" version)) - (sha256 - (base32 - "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj")))) - (build-system python-build-system) + (version "3.9.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python_utils" version)) + (sha256 + (base32 "18292j4p1bvlpbrfj2cgkdby6dpgnl5gbjwly0qb4pj1j914nmzb")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (delete-file "pytest.ini") - (invoke "pytest" "-vv")))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "pytest.ini" + ((".*--cov.*") ""))))))) (native-inputs - `(("pytest-runner" ,python-pytest-runner) - ("pytest" ,python-pytest) - ("six" ,python-six))) + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-loguru + python-typing-extensions)) (home-page "https://github.com/WoLpH/python-utils") (synopsis "Convenient utilities not included with the standard Python install") (description - "Python Utils is a collection of small Python functions and classes which - make common patterns shorter and easier.") + "Python Utils is a collection of small Python functions and classes +which make common patterns shorter and easier.") (license license:bsd-2))) (define-public python-diff-cover (package (name "python-diff-cover") - (version "7.5.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "diff_cover" version)) - (sha256 - (base32 - "1z7bxnij2sqsiz9313nwcak7nshakpq4b6c05v13hkqyhd505cx4")))) + (version "9.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "diff_cover" version)) + (sha256 + (base32 "0dms5f3axwkjpcck4mlglfn0pga5nmskyc7ahyg8yrxvxd9v7845")))) (build-system pyproject-build-system) (arguments (list #:test-flags - ;; missing fixture 'datadir'. - '(list "--ignore=tests/test_clover_violations_reporter.py" - ;; Difference in line breaks - "-k" "not test_html_with_external_css"))) + ;; Dropp check of flake8 in tests. + #~(list "-k" "not test_file_does_not_exist"))) + (native-inputs + (list python-pycodestyle + python-poetry-core + python-pyflakes + python-pylint + python-pytest + python-pytest-datadir + python-pytest-mock)) (propagated-inputs (list python-chardet python-jinja2 python-pluggy python-pygments + python-setuptools ; For pkg_resources. python-tomli)) - (native-inputs - (list python-flake8 - python-poetry-core - python-pylint - python-pytest - python-pytest-flake8 - python-pytest-mock)) (home-page "https://github.com/Bachmann1234/diff-cover") (synopsis "Run coverage and linting reports on diffs") - (description "Automatically find diff lines that need test coverage. It -also finds diff lines that have violations (according to tools such as -pycodestyle, pyflakes, flake8, or pylint). This is used as a code quality -metric during code reviews.") + (description + "Automatically find diff lines that need test coverage. It also finds +diff lines that have violations (according to tools such as pycodestyle, +pyflakes, flake8, or pylint). This is used as a code quality metric during +code reviews.") (license license:asl2.0))) (define-public python-diff-match-patch @@ -24027,7 +25768,8 @@ while only declaring the test-specific fields.") ;; Disable tests that require internet. (list #:test-flags '(list "-k" "not net"))) (native-inputs - (list python-pytest python-testfixtures python-click python-requests)) + (list python-pytest python-testfixtures python-click python-requests + python-setuptools python-wheel)) (home-page "https://github.com/pndurette/gTTS") (synopsis "Google Translate text-to-speech interface") (description @@ -24047,7 +25789,9 @@ manipulation, or @code{stdout}.") (if tests? (invoke "pytest" "-vv") (format #t "test suite not run~%"))))))) - (native-inputs (list python-pretend python-pytest)) + (native-inputs + (list python-flit-core + python-pretend python-pytest)) (propagated-inputs (list python-pyparsing python-six)) (home-page "https://github.com/pypa/packaging") (synopsis "Core utilities for Python packages") @@ -24123,6 +25867,27 @@ manipulation, or @code{stdout}.") @end itemize") (license license:expat))) +(define-public python-rgbxy + (package + (name "python-rgbxy") + (version "0.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rgbxy" version)) + (sha256 + (base32 "0c3dgm1rf7ih79pgkj7adffn8hlyqh5qah8rbzlq436kz3srk83q")))) + (build-system pyproject-build-system) + (native-inputs + (list python-setuptools + python-wheel)) + (home-page "https://github.com/benknight/hue-python-rgb-converter") + (synopsis "RGB conversion tool in Python") + (description + "This packages implements funtionality of RGB/CIE1931 'xy' gammuts +convertion: Gamut A, B, and C.") + (license license:expat))) + (define-public python-sure (package (name "python-sure") @@ -24178,15 +25943,16 @@ manipulation, or @code{stdout}.") (define-public python-jsonpointer (package (name "python-jsonpointer") - (version "1.10") + (version "1.14") (source (origin (method url-fetch) (uri (pypi-uri "jsonpointer" version)) (sha256 (base32 - "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz")))) - (build-system python-build-system) + "0kdckqca8i2ly87mxwn0ggwfzig4xvadbvcanfvk3is56n1az0f6")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/stefankoegl/python-json-pointer") (synopsis "Identify specific nodes in a JSON document") (description "@code{jsonpointer} allows you to access specific nodes @@ -24259,6 +26025,30 @@ manipulation, or @code{stdout}.") which adds support for zone identifiers to IPv6 addresses.") (license license:asl2.0))) +(define-public python-rfc3986-validator + (package + (name "python-rfc3986-validator") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rfc3986_validator" version)) + (sha256 + (base32 "0mfh82r37ma5n54n8ibnqvmwr3j3f2ixqfjfmv1rwfqvjbkvsi1x")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pip + python-pytest + python-pytest-runner + python-rfc3987 + python-setuptools + python-wheel)) + (home-page "https://github.com/naimetti/rfc3986-validator") + (synopsis "Pure python rfc3986 validator") + (description "This package implements a URI validator according to RFC3986 +in pure Python.") + (license license:expat))) + (define-public python-rfc3987 (package (name "python-rfc3987") @@ -24313,6 +26103,35 @@ manipulation, or @code{stdout}.") and integration into other projects.") (license license:asl2.0)))) +(define-public python-sacn + (package + (name "python-sacn") + (version "1.10.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sacn" version)) + (sha256 + (base32 "02pqfwwx83lgb8nj9p0s6vyi1s7wjgbx9k0bzlyz8qapszzdsr37")))) + (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (native-inputs (list python-pytest)) + (home-page "https://github.com/Hundemeier/sacn") + (synopsis + "Python library for sending and receiving sACN data") + (description + "This package provides a Python library for sending and receiving + sACN (Streaming Architecture for Control Networks) data, a standard + protocol used for controlling lighting and other devices over + a network.") + (license license:expat))) + (define-public python-bagit (package (name "python-bagit") @@ -24357,7 +26176,7 @@ manipulation, or @code{stdout}.") (("\\.serialize\\(format=\"nt\"\\)") ".serialize(format=\"nt\", encoding=\"utf-8\")"))))))) (propagated-inputs - (list python-dateutil python-lxml python-networkx python-rdflib)) + (list python-dateutil python-lxml python-networkx python-rdflib-6)) (native-inputs (list graphviz python-pydot)) (home-page "https://github.com/trungdong/prov") @@ -24439,30 +26258,33 @@ manipulation, or @code{stdout}.") (define-public python-validators (package (name "python-validators") - (version "0.18.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "validators" version)) - (sha256 - (base32 - "19lypf7hm7p203ay3v8zmckc5rv6889zkfdm16nki1972f99mk9p")))) - (build-system python-build-system) + (version "0.34.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "validators" version)) + (sha256 + (base32 "07vq3s77f5yndn7jfx39jbsaq5m8wqc3p52v4i6sgyasnh3y8zv4")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest" "-vv")))))) - (propagated-inputs - (list python-decorator python-six)) + (list + ;; python-eth-hash is not packed yet. + #:test-flags #~(list "--ignore=tests/crypto_addresses/test_eth_address.py"))) (native-inputs - (list python-flake8 python-isort python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-decorator + ;; python-eth-hash ; optional, not packed yet. + python-six)) (home-page "https://github.com/kvesteri/validators") (synopsis "Data validation library") (description "This package contains validators for different things such as email - addresses, IP addresses, URLs, hashes and more. It has been designed to - be easy to use and not require defining a schema or form just to validate - some input.") +addresses, IP addresses, URLs, hashes and more. It has been designed to be +easy to use and not require defining a schema or form just to validate some +input.") (license license:expat))) (define-public python-validate-email @@ -24512,30 +26334,33 @@ manipulation, or @code{stdout}.") (define-public python-marshmallow (package (name "python-marshmallow") - (version "3.19.0") + ;; XXX: The latest version requires missing timezones from python-pytz + ;; which needs to be updated. + (version "3.22.0") (source (origin (method url-fetch) (uri (pypi-uri "marshmallow" version)) (sha256 - (base32 - "0y6vpq2p5841kcw2qil68la0rx9z1vmxzj3dxjv99kjhsq7jq0wh")))) + (base32 "0gl2qmq5sqf1b3f84zd7yzkznaknr6j5lnbxcfw0n8ja20lzawj9")))) (build-system pyproject-build-system) - (propagated-inputs - (list python-packaging)) (native-inputs - (list python-flake8 - python-flake8-bugbear - python-mypy - python-pytest + (list python-pytest python-pytz - python-simplejson)) + python-simplejson + python-flit-core)) + (propagated-inputs + (list python-packaging)) (home-page "https://github.com/marshmallow-code/marshmallow") (synopsis "Convert complex datatypes to and from native Python datatypes") - (description "@code{marshmallow} provides a library for converting complex -datatypes to and from native Python datatypes.") + (description + "@code{marshmallow} provides a library for converting complex datatypes +to and from native Python datatypes.") (license license:expat))) +;; XXX: Deprecated upstream: This repository has been archived by the owner on +;; Jun 6, 2024. It is now read-only. +;; Consider to remove when nothing is depend on it. (define-public python-marshmallow-jsonapi (package (name "python-marshmallow-jsonapi") @@ -24546,81 +26371,71 @@ datatypes to and from native Python datatypes.") (uri (pypi-uri "marshmallow-jsonapi" version)) (sha256 (base32 "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x")))) - (build-system python-build-system) - (propagated-inputs - (list python-marshmallow)) + (build-system pyproject-build-system) (native-inputs (list python-faker - python-flake8 - python-flake8-bugbear python-flask - python-mock python-pytest - python-tox)) + python-setuptools + python-wheel)) + (propagated-inputs + (list python-marshmallow)) (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi") (synopsis "JSON:API 1.0 formatting with Marshmallow") (description "The marshmallow-jsonapi package provides a simple way to produce - @uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web framework. - It includes optional utilities to integrate with Flask.") +@uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web +framework. It includes optional utilities to integrate with Flask.") (license license:expat))) (define-public python-apispec (package (name "python-apispec") - (version "6.0.2") + (version "6.7.1") (source (origin (method url-fetch) (uri (pypi-uri "apispec" version)) (sha256 - (base32 - "11vqxwdxmm7qmyhdbxk4gnx37nbzmn266ah92gi4pvzd76vq0vg7")))) + (base32 "0cxr10m3gj7nmipi3blsj31jz6qfjbfzjrwsnxaxzzhgyipqn6y0")))) (build-system pyproject-build-system) - (arguments - (list - ;; Disable validation tests since they require - ;; the optional 'prance' library which is not - ;; yet in Guix. - #:test-flags '(list "-k" "not openapi_tools_validate"))) - (propagated-inputs - (list python-packaging)) (native-inputs - (list python-flake8 - python-flake8-bugbear - python-marshmallow + (list python-flit-core python-mypy - python-pytest + python-openapi-spec-validator + python-pytest)) + (propagated-inputs + (list python-marshmallow python-pyyaml)) (home-page "https://github.com/marshmallow-code/apispec") (synopsis "Swagger/OpenAPI specification generator") - (description "@code{python-apispec} is a pluggable API specification -generator. It currently supports the OpenAPI specification, formerly known as -Swagger.") + (description + "@code{python-apispec} is a pluggable API specification generator. It +currently supports the OpenAPI specification, formerly known as Swagger.") (license license:expat))) (define-public python-apispec-webframeworks (package (name "python-apispec-webframeworks") - (version "0.5.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "apispec-webframeworks" version)) - (sha256 - (base32 - "1wyw30402xq2a8icrsjmy9v43jyvawcjd85ccb2zicqlg4k5pcqd")))) + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "apispec_webframeworks" version)) + (sha256 + (base32 "10gxjwmk8w67b7vcivcky4hrpv1gx8acrshnyp1169va4s62i2an")))) (build-system pyproject-build-system) - (propagated-inputs (list python-apispec)) (native-inputs - (list python-bottle - python-flake8 - python-flake8-bugbear + (list python-aiohttp + python-flit-core + python-bottle python-flask - python-mock python-pytest python-pyyaml python-tornado - python-tox)) + python-wheel)) + (propagated-inputs + (list python-apispec)) (home-page "https://github.com/marshmallow-code/apispec-webframeworks") (synopsis "Web framework plugins for apispec") (description "This package provides plugins for using @code{apispec} with @@ -24630,16 +26445,16 @@ web frameworks.") (define-public python-flasgger (package (name "python-flasgger") - (version "0.9.5") + (version "0.9.7.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rochacbruno/flasgger") - (commit version))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0a2djgfq905a4in16068qz0ikg88dm4nbckaamhaz2v9khllr0bi")))) + (base32 "08dnn19swfa5lsscj38hil41b3xnqvwgwnx9q2vg9kv26bs1zcah")))) (build-system pyproject-build-system) (arguments (list @@ -24655,19 +26470,22 @@ web frameworks.") (for-each delete-file '("examples/marshmallow_apispec.py" "examples/validation.py"))))))) (propagated-inputs - (list python-flask python-pyyaml python-jsonschema python-mistune + (list python-flask + python-pyyaml + python-jsonschema + python-mistune python-six)) (native-inputs (list python-apispec python-apispec-webframeworks python-decorator - python-flake8 - python-flask-jwt python-flask-restful python-flex python-marshmallow python-pytest - python-pytest-cov)) + python-pytest-cov + python-setuptools + python-wheel)) (home-page "https://github.com/rochacbruno/flasgger/") (synopsis "Extract Swagger specs from your Flask project") (description "@code{python-flasgger} allows extracting Swagger specs @@ -24852,61 +26670,6 @@ library.") (description "This is the Cython-coded accelerator module for PyOpenGL."))) -(define-public python-glcontext - (let (;; Upstream is known for abusing mutable tag, hence pinpoint the - ;; relevant commit. - (revision "1") - (commit "0af21b7c8a8cc0e76f4d9aff6a4f156f43d37333")) - (package - (name "python-glcontext") - (version (git-version "2.4.0" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/moderngl/glcontext") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "03xpw776pvv8c5n58049yczlkgcqdh9vfcpjlghh3p6cal3yiq8a")))) - (build-system pyproject-build-system) - (arguments - (list #:phases #~(modify-phases %standard-phases - (add-before 'build 'fix-lib-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((mesa (assoc-ref inputs "mesa")) - (libx11 (assoc-ref inputs "libx11"))) - (substitute* '("glcontext/x11.cpp" - "glcontext/egl.cpp") - (("\"libGL.so\"") - (string-append "\"" mesa "/lib/libGL.so\"")) - (("\"libEGL.so\"") - (string-append "\"" mesa "/lib/libEGL.so\"")) - (("\"libX11.so\"") - (string-append "\"" libx11 "/lib/libX11.so\""))) - (substitute* '("glcontext/__init__.py") - (("find_library\\('GL'\\)") - (string-append "'" mesa "/lib/libGL.so'")) - (("find_library\\('EGL'\\)") - (string-append "'" mesa "/lib/libEGL.so'")) - (("find_library\\(\"X11\"\\)") - (string-append "'" libx11 "/lib/libX11.so'")))))) - (replace 'check - (lambda* (#:key inputs outputs tests? - #:allow-other-keys) - (when tests? - (system "Xvfb :1 &") - (setenv "DISPLAY" ":1") - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "tests"))))))) - (inputs (list libx11 mesa)) - (native-inputs (list xorg-server-for-tests python-pytest python-psutil)) - (home-page "https://github.com/moderngl/glcontext") - (synopsis "Portable OpenGL Context for ModernGL") - (description "Python-glcontext is a library providing an OpenGL -implementation for ModernGL on multiple platforms.") - (license license:expat)))) - (define-public python-rencode (package (name "python-rencode") @@ -25019,25 +26782,26 @@ ignoring formatting changes.") (define-public python-tqdm (package (name "python-tqdm") - (version "4.64.1") + (version "4.67.1") (source (origin (method url-fetch) (uri (pypi-uri "tqdm" version)) (sha256 - (base32 - "1r7i9kswpnrx4ppfvzz6discb04j1rqkqxdwa2sc2la900m6hksz")))) - (build-system python-build-system) + (base32 "1wi7cql2fc76b5z9v1sr96ix2gxcb974z8qfydjkmh885k2zkbpq")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest" "-vv" - "-o" "asyncio_mode=auto" - "-k" "not perf")))))) + (list #:test-flags + '(list "-o" "asyncio_mode=auto" + "-k" "not perf and not test_rlock_creation"))) (native-inputs - (list python-pytest python-pytest-asyncio python-pytest-timeout - python-setuptools-scm python-toml)) + (list python-pytest + python-pytest-asyncio + python-pytest-timeout + python-setuptools + python-setuptools-scm + python-toml + python-wheel)) (home-page "https://github.com/tqdm/tqdm") (synopsis "Fast, extensible progress meter") (description @@ -25049,16 +26813,19 @@ design and layout.") (define-public python-pkginfo (package (name "python-pkginfo") - (version "1.9.6") + (version "1.10.0") (source (origin (method url-fetch) (uri (pypi-uri "pkginfo" version)) (sha256 - (base32 "0inh57664sx2vlbd3913dsc9nz21ysb9vk591qpkg90qhxp8kmcg")))) + (base32 + "15v2mycr7m4ld5wp1sl9flqjjv8zdgc5rkgfz1wxn44d74skixsx")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://code.launchpad.net/~tseaver/pkginfo/trunk") (synopsis "Query metadatdata from sdists, bdists, and installed packages") (description @@ -25072,25 +26839,46 @@ created by running @code{python setup.py develop}).") (define-public python-twine (package (name "python-twine") - (version "1.15.0") + (version "5.1.1") (source - (origin - (method url-fetch) - (uri (pypi-uri "twine" version)) - (sha256 - (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "twine" version)) + (sha256 + (base32 "1nr24gd5gm22b0jzb5qmw4swh8bshixmqm0kv4s38ay0758q584s")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags ;; Disable failing tests. + #~(list "-k" (string-append + "not test_fails_rst_no_content" + " and not test_fails_rst_syntax_error" + " and not test_passes_markdown_description[text/markdown]" + " and not test_passes_markdown_description[text/plain]" + " and not test_passes_rst_description" + " and not test_warns_missing_description[False]" + " and not test_warns_missing_description[True]" + " and not test_warns_missing_file")))) + (native-inputs + (list python-pretend + python-pytest + python-pytest-socket + python-setuptools + python-setuptools-scm + python-wheel)) (propagated-inputs - (list python-tqdm - python-packaging + (list python-importlib-metadata + python-keyring python-pkginfo python-readme-renderer python-requests - python-requests-toolbelt)) + python-requests-toolbelt + python-rfc3986 + python-rich + python-urllib3)) (home-page "https://github.com/pypa/twine") (synopsis "Collection of utilities for interacting with PyPI") (description - "@code{twine} currently supports registering projects and uploading + "@code{twine} currently supports registering projects and uploading distributions. It authenticates the user over HTTPS, allows them to pre-sign their files and supports any packaging format (including wheels).") (license license:asl2.0))) @@ -25160,7 +26948,7 @@ interpreter when it prints a stack trace.") (base32 "0jwy5wwl0rcsgnx7hhq4z7ji3lx271sar4v2a1rmyh5vsj7sn784")))) (build-system pyproject-build-system) - (native-inputs (list python-setuptools-scm)) + (native-inputs (list python-setuptools python-setuptools-scm python-wheel)) (propagated-inputs (list python-html5tagger)) (home-page "https://github.com/sanic-org/tracerite") (synopsis "Human-readable HTML tracebacks") @@ -25292,6 +27080,7 @@ Git.") (arguments '(#:tests? #f)) ;no tests (propagated-inputs (list python-semantic-version python-typing-extensions)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/PyO3/setuptools-rust") (synopsis "Setuptools plugin for Rust extensions") (description @@ -25382,7 +27171,9 @@ particularly convenient for use in tests.") python-pytest-mypy python-setuptools-scm python-types-freezegun - python-types-pytz)) + python-types-pytz + python-setuptools + python-wheel)) (propagated-inputs (list python-jaraco-functools python-pytz)) (home-page "https://github.com/jaraco/tempora") (synopsis "Python date and time objects and routines") @@ -25446,14 +27237,14 @@ objects on other machines, also known as remote procedure calls (RPC).") (define-public python-phonenumbers (package (name "python-phonenumbers") - (version "8.9.1") + (version "8.13.37") (source (origin (method url-fetch) (uri (pypi-uri "phonenumbers" version)) (sha256 (base32 - "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1")))) + "1whw3p0p90x1iyw5cqf2pval90zy20c26ry3ywb0bsls2pnmycdx")))) (build-system python-build-system) (home-page "https://github.com/daviddrysdale/python-phonenumbers") @@ -25506,7 +27297,9 @@ queue.") (list python-pytest python-pytest-asyncio python-pytest-repeat - python-pytest-timeout)) + python-pytest-timeout + python-setuptools + python-wheel)) (home-page "https://zict.readthedocs.io/en/latest/") (synopsis "Composable mutable mapping tools") (description "This package provides abstract @code{MutableMapping} classes @@ -25518,7 +27311,7 @@ systems policies.") (define-public python-send2trash (package (name "python-send2trash") - (version "1.8.0") + (version "1.8.2") (source (origin (method git-fetch) ;; Source tarball on PyPI doesn't include tests. @@ -25528,19 +27321,15 @@ systems policies.") (file-name (git-file-name name version)) (sha256 (base32 - "1k7dfypaaq4f36fbciaasv72j6wgjihw8d88axmz9c329bz8v5qx")))) - (build-system python-build-system) + "0dl9nv3h3kkcavwiswzg76pksqczq448gbdvlbz88bm71zvdshx7")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases + (list + #:phases + '(modify-phases %standard-phases (add-before 'check 'pre-check - (lambda _ - (setenv "HOME" "/tmp"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) - (native-inputs (list python-pytest)) + (lambda _ (setenv "HOME" "/tmp")))))) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/arsenetar/send2trash") (synopsis "Send files to the user's @file{~/Trash} directory") (description "This package provides a Python library to send files to the @@ -25606,7 +27395,7 @@ such as lines length, trailing spaces, indentation, etc.") (propagated-inputs (list python-importlib-metadata python-platformdirs python-tomli)) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/google/yapf") (synopsis "Formatter for Python code") (description "YAPF is a formatter for Python code. It's based off of @@ -25696,7 +27485,7 @@ files, and Makefiles.") (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/Suor/whatever") (synopsis "Make anonymous functions by partial application of operators") (description "@code{whatever} provides an easy way to make anonymous @@ -25718,7 +27507,7 @@ functions by partial application of operators.") (file-name (git-file-name name version)))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-whatever)) + (list python-pytest python-whatever python-setuptools python-wheel)) (home-page "https://github.com/Suor/funcy") (synopsis "Functional tools") (description "@code{funcy} is a library that provides functional tools. @@ -25893,6 +27682,7 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style @code{f} strings.") (license license:expat))) +;; TODO: https://github.com/python/typed_ast/issues/179 (define-public python-typed-ast (package (name "python-typed-ast") @@ -25908,11 +27698,12 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style (file-name (git-file-name name version)))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest")))))) + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) (native-inputs (list python-pytest)) (home-page "https://github.com/python/typed_ast") (synopsis "Fork of Python @code{ast} modules with type comment support") @@ -25982,30 +27773,23 @@ based on the CPython 2.7 and 3.7 parsers.") (define-public python-typeguard (package (name "python-typeguard") - (version "2.13.3") + (version "4.4.1") (source (origin (method url-fetch) (uri (pypi-uri "typeguard" version)) (sha256 - (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80")) - (patches (search-patches "python-typeguard-python3.10.patch")))) - (build-system python-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-k" - ;; XXX: These fail when installed as a library: - ;; https://github.com/agronholm/typeguard/issues/176 - "not usefixtures and not test_cached_module"))))))) - (native-inputs (list python-mypy - python-pytest - python-setuptools-scm - python-typing-extensions)) + (base32 "06y22d1f5dhpyl71wbhsaibig5hvc2v44pw795yb8lxl02fsh8hd")))) + (build-system pyproject-build-system) + (native-inputs + (list python-mypy + python-pytest + python-setuptools + python-setuptools-scm + python-typing-extensions + python-wheel)) + (propagated-inputs + (list python-typing-extensions)) (home-page "https://github.com/agronholm/typeguard") (synopsis "Run-time type checker for Python") (description @@ -26013,24 +27797,6 @@ based on the CPython 2.7 and 3.7 parsers.") with PEP 484 argument (and return) type annotations.") (license license:expat))) -(define-public python-typeguard-4 - (package - (inherit python-typeguard) - (name "python-typeguard") - ;; This is the latest version we can use, because python-typeguard >= - ;; 4.0.1 requires python-typing-extensions >= 4.7.0. - (version "4.0.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "typeguard" version)) - (sha256 - (base32 "11yrc7pv2fajmicwiyc92sb5gphlw3zbxww8f2prrsh6rgdv6kqr")))) - (build-system pyproject-build-system) - (arguments - '()) - (propagated-inputs (list python-typing-extensions)))) - (define-public bpython (package (name "bpython") @@ -26041,38 +27807,42 @@ with PEP 484 argument (and return) type annotations.") (uri (pypi-uri "bpython" version)) (sha256 (base32 "1g9xzl49skghd9q2a8b71gg1n97lfnj9in2kzcmzsj4cgbynywwq")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'remove-failing-test - (lambda _ - ;; Remove failing test. FIXME: make it pass - (delete-file "bpython/test/test_args.py") - #t)) - (add-after 'wrap 'add-aliases - ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc. - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each - (lambda (old new) - (symlink old (string-append out "/bin/" new))) - '("bpython" "bpython-curses" "bpython-urwid" "bpdb") - '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))) - #t))))) + (list + #:test-flags + ;; Tests can't import curtsies, pygments and urwid. + #~(list "-k" (string-join + (list "not test_issue108" + "test_issue133") + " and not " )) + #:phases + #~(modify-phases %standard-phases + (add-after 'wrap 'add-aliases + ;; For symmetry to bpython2, add symlinks bypthon3, bpdb3, etc. + (lambda _ + (for-each + (lambda (old new) + (symlink old (string-append #$output "/bin/" new))) + '("bpython" "bpython-curses" "bpython-urwid" "bpdb") + '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3"))))))) + (native-inputs + (list python-mock + python-pytest + python-setuptools + python-sphinx + python-wheel)) (propagated-inputs - (list python-pygments - python-requests - python-curtsies - python-greenlet + (list python-curtsies python-cwcwidth + python-greenlet + python-jedi + python-pygments python-pyxdg - ;; optional dependencies - python-urwid ; for bpython-urwid only - python-watchdog - python-jedi)) - (native-inputs - (list python-sphinx python-mock python-tox python-wheel)) + python-requests + python-typing-extensions + python-urwid + python-watchdog)) (home-page "https://bpython-interpreter.org/") (synopsis "Fancy interface to the Python interpreter") (description "Bpython is a fancy interface to the Python @@ -26130,6 +27900,41 @@ and SML. @code{more-itertools} includes additional building blocks for working with iterables.") (license license:expat))) +;; Needed for python-yt, older version fails with exception: E ImportError: +;; cannot import name 'mark_ends' from 'more_itertools' +;; (<...>more_itertools/__init__.py) +(define-public python-more-itertools-next + (package + (inherit python-more-itertools) + (name "python-more-itertools") + (version "10.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "more-itertools" version)) + (sha256 + (base32 + "1q9rq9g026m4wl6ki2q8pw7xbc02vl34qqw702h9jgixqj0b9k4g")) + (snippet + ;; distutils.errors.DistutilsOptionError: No configuration found for + ;; dynamic 'description'. Some dynamic fields need to be specified via + ;; `tool.setuptools.dynamic`others must be specified via the equivalent + ;; attribute in `setup.py`. + '(delete-file "setup.py")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "unittest"))))))) + (native-inputs + (list python-flit-core)) + (propagated-inputs + (list python-six)))) + (define-public python-latexcodec (package (name "python-latexcodec") @@ -26160,7 +27965,7 @@ working with iterables.") "040i6bjqvl33j30v865shsk30s3h7f16pqwiaj5kig857dfmqm4r")))) (build-system pyproject-build-system) (propagated-inputs (list python-bitarray python-xxhash)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/joseph-fox/python-bloomfilter") (synopsis "Bloom filter") (description "This package provides a scalable Bloom filter implemented in @@ -26320,6 +28125,7 @@ submitting it.") (sha256 (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/iwalton3/python-mpv-jsonipc") (synopsis "Python API to control MPV using JSON IPC") (description "Python MPV JSONIPC implements an interface similar to @@ -26337,6 +28143,7 @@ python-mpv, but it uses the JSON IPC protocol instead of the C API.") (sha256 (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (propagated-inputs (list python-certifi python-requests python-urllib3 python-websocket-client)) (home-page "https://github.com/jellyfin/jellyfin-apiclient-python") @@ -26349,25 +28156,18 @@ Kodi plugin.") (define-public python-parso (package (name "python-parso") - (version "0.8.3") + (version "0.8.4") (source (origin (method url-fetch) (uri (pypi-uri "parso" version)) (sha256 - (base32 "185gkxq92kqiw2h5zp1cmyn04055x0lix4hmi5c077xm1clvw1wc")) - (patches - (search-patches "python-parso-unit-tests-in-3.10.patch")))) + (base32 "0bdr38l6p7d9q8agxljdbzm4158grkp1sms5lfcr1f8g4ic7nfpb")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/davidhalter/parso") (synopsis "Python Parser") (description "Parso is a Python parser that supports error recovery and @@ -26399,19 +28199,32 @@ generators and Python 3.7's context managers into Python 3.5.") (define-public python-async-timeout (package (name "python-async-timeout") - (version "4.0.2") + (version "4.0.3") (source (origin (method url-fetch) (uri (pypi-uri "async-timeout" version)) (sha256 - (base32 - "05bbjz16n1a7m1s3lmcwri2x5rc7hnh6f2hdr2lbflnv1mjf2qr1")))) - (build-system python-build-system) + (base32 "0bsj4z28ggxh1b6h6dvhx2mk6yqgb88bg8lyslpd10jdx1mxjh26")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements + (substitute* "setup.cfg" + ((".*--cov.*") ""))))))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/aio-libs/async-timeout") (synopsis "Timeout context manager for asyncio programs") - (description "@code{async-timeout} provides a timeout timeout context -manager compatible with @code{asyncio}.") + (description + "@code{async-timeout} provides a timeout timeout context manager +compatible with @code{asyncio}.") (license license:asl2.0))) (define-public python-glob2 @@ -26803,18 +28616,55 @@ inferring type information using compile-time introspection.") (define-public python-pooch (package (name "python-pooch") - (version "1.3.0") + (version "1.8.1") (source (origin (method url-fetch) (uri (pypi-uri "pooch" version)) (sha256 - (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h")))) - (build-system python-build-system) + (base32 "0w32fhfp67k0ip0gxjpw8kxdx9ghybxmqkv9sbwy99nrgl4n7vr7")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f)) ;requires online data + (list + #:test-flags + '(list "-k" + (string-append + ;; We don't have the test archives + "not test_decompress" + " and not test_multiple_unpacking" + " and not test_unpack_members_with_leading_dot" + " and not test_unpacking" + " and not test_unpacking_members_then_no_members" + " and not test_unpacking_wrong_members_then_no_members" + ;; These all require access to the internet + " and not test_check_availability" + " and not test_check_availability_invalid_downloader" + " and not test_check_availability_on_ftp" + " and not test_create_and_fetch" + " and not test_downloader_arbitrary_progressbar" + " and not test_fetch_with_downloader" + " and not test_figshare_data_repository_versions" + " and not test_load_registry_from_doi" + " and not test_pooch_corrupted" + " and not test_pooch_custom_url" + " and not test_pooch_download" + " and not test_pooch_download_retry" + " and not test_pooch_download_retry_fails_eventually" + " and not test_pooch_download_retry_off_by_default" + " and not test_pooch_logging_level" + " and not test_pooch_update" + " and not test_retrieve" + " and not test_retrieve_default_path" + " and not test_retrieve_fname" + " and not test_stream_download") + "--ignore=pooch/tests/test_downloaders.py"))) + (native-inputs + (list python-pytest + python-setuptools-scm + python-setuptools + python-wheel)) (propagated-inputs - (list python-appdirs python-packaging python-requests)) + (list python-packaging python-platformdirs python-requests)) (home-page "https://github.com/fatiando/pooch") (synopsis "Manage your Python library's sample data files") (description @@ -26844,7 +28694,8 @@ and corruption checks.") (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "pytest"))))))) - (native-inputs (list python-diskcache python-more-itertools python-pytest)) + (native-inputs (list python-diskcache python-more-itertools + python-setuptools python-pytest python-wheel)) (home-page "https://github.com/harlowja/fasteners") (synopsis "Python package that provides useful locks") (description @@ -26885,10 +28736,33 @@ and corruption checks.") library to allow local file system access via @code{file://} URLs.") (license license:asl2.0))) +(define-public python-ukkonen + (package + (name "python-ukkonen") + (version "1.0.1") + (source + (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/asottile/ukkonen") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "17gspl2dsykg000275svvyam4k7wz9ypi9xrfrmsgcgryczravlc")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (propagated-inputs (list python-cffi)) + (home-page "https://github.com/asottile/ukkonen") + (synopsis "Implementation of bounded Levenshtein distance (Ukkonen)") + (description "This package is an implementation of of bounded Levenshtein +distance (Ukkonen).") + (license license:expat))) + (define-public python-identify (package (name "python-identify") - (version "1.4.25") + (version "2.5.36") (source (origin ;; There are no tests in the PyPI tarball. @@ -26898,19 +28772,16 @@ library to allow local file system access via @code{file://} URLs.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz")))) - (build-system python-build-system) + (base32 "1il0d1zh31jx36m0lvhpiykx95i95dcfrgrfbz2x6la884zsmvq8")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - ;; system-error "utime" "~A" ("No such file or directory") - (delete 'ensure-no-mtimes-pre-1980) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (list + #:phases #~(modify-phases %standard-phases + ;; system-error "utime" "~A" ("No such file or directory") + (delete 'ensure-no-mtimes-pre-1980)))) (native-inputs - (list python-coverage python-pytest)) + (list python-coverage python-pytest python-setuptools + python-ukkonen python-wheel)) (propagated-inputs (list python-editdistance)) (home-page "https://github.com/chriskuehl/identify") @@ -26951,33 +28822,34 @@ Public Suffix List's private domains as well.") (define-public python-tldr (package (name "python-tldr") - (version "3.2.0") + (version "3.3.0") (source (origin - ;; There's no test in PyPI. - (method git-fetch) + (method git-fetch) ; there's no test in PyPI (uri (git-reference (url "https://github.com/tldr-pages/tldr-python-client") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0hkjsnz03p9pdfgk85wampha4pyr82bwmnj8hj6kigc784ddy2ag")))) - (build-system python-build-system) + (base32 "15mab6a7ph2rviy5f2ypid6qdbb583fvaf5zhd6q0nrggxx0kkcm")))) + (build-system pyproject-build-system) (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-after 'build 'build-doc - (lambda _ - (invoke "make" "-C" "docs"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; This test fails. It tries to open a network socket. - (invoke "pytest" "-vv" "-k" "not test_error_message"))))))) + (list + ;; This test fails. It tries to open a network socket. + #:test-flags #~(list "-k" "not test_error_message") + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'build-doc + (lambda _ + (invoke "make" "-C" "docs")))))) (native-inputs - (list python-pytest python-pytest-runner python-sphinx-argparse)) - (inputs - (list python-argcomplete python-colorama python-termcolor python-shtab)) + (list python-pytest + python-pytest-runner + python-sphinx-argparse)) + (propagated-inputs + (list python-colorama + python-termcolor + python-shtab)) (home-page "https://github.com/tldr-pages/tldr-python-client") (synopsis "Python command-line client for tldr pages") (description "This package provides the @code{tldr} command allowing users @@ -26988,7 +28860,7 @@ effort to simplify the man pages with practical examples.") (define-public python-nodeenv (package (name "python-nodeenv") - (version "1.4.0") + (version "1.8.0") (source (origin ;; There's no tarball in PyPI. @@ -26998,17 +28870,19 @@ effort to simplify the man pages with practical examples.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7")))) - (build-system python-build-system) + (base32 "0g8zp8zw5nnfc14ml0sil9yh7lnpz3xrdkazdkwg6pf5jqsxlvv9")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - ;; This test fails. It tries to open a network socket. - (invoke "pytest" "-vv" "-k" "not test_smoke")))))) + (list #:test-flags + #~(list "-k" (string-append + "not test_smoke" + " and not test_smoke_n_system_special_chars")))) (native-inputs - (list python-coverage python-mock python-pytest)) + (list python-coverage + python-mock + python-pytest + python-setuptools + python-wheel)) (home-page "https://ekalinin.github.io/nodeenv/") (synopsis "Create isolated node.js environments") (description @@ -27096,7 +28970,7 @@ Let's Encrypt.") (define-public python-cfgv (package (name "python-cfgv") - (version "3.3.1") + (version "3.4.0") (source (origin ;; There are no tests in the PyPI tarball. @@ -27106,17 +28980,10 @@ Let's Encrypt.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1pci97cmn3v45sfch9s3lshidrl0309ls9byidic0l8drkwnkwcj")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (base32 "0g7jg6dssyax6k85lk8afs8qdzgq138g6ij0jmmhgdv5fzks6k9z")))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/asottile/cfgv") (synopsis "Configuration validation library") (description @@ -27149,28 +29016,61 @@ validation testing and application logic.") (define-public python-numba (package (name "python-numba") - (version "0.56.4") + (version "0.59.1") (source (origin (method url-fetch) (uri (pypi-uri "numba" version)) (sha256 (base32 - "1vlnmirhay8gl36cxa94nvlgs41k9p7vdkp0xzbq65682bsgxn9j")))) - (build-system python-build-system) + "02rp5x59kw3qw6x821d4k4r4x8r8qpl1a16j9rvx4a30p4r93xkn")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:phases + `(modify-phases %standard-phases (add-after 'unpack 'disable-proprietary-features (lambda _ (setenv "NUMBA_DISABLE_HSA" "1") (setenv "NUMBA_DISABLE_CUDA" "1"))) (add-after 'unpack 'disable-failing-tests (lambda _ + ;; This expects to be able to run pip. + (delete-file "numba/tests/test_sysinfo.py") ;; This one test fails because a deprecation warning is printed. (substitute* "numba/tests/test_import.py" (("def test_no_accidental_warnings") - "def disabled_test_no_accidental_warnings")))) + "def disabled_test_no_accidental_warnings")) + ;; Some tests timeout or crash on some architectures. + ,@(cond + ((target-aarch64?) + `((substitute* "numba/tests/test_sets.py" + (("def test_add_discard") + "def disabled_test_add_discard") + (("def test_isdisjoint") + "def disabled_test_isdisjoint") + (("def test_issubset") + "def disabled_test_issubset") + (("def test_issuperset") + "def disabled_test_issuperset") + (("def test_remove_error") + "def disabled_test_remove_error")))) + ((target-ppc64le?) + `((substitute* "numba/tests/test_mathlib.py" + (("def test_ldexp") + "def disabled_test_ldexp")))) + ((target-arm32?) + ;; Armhf emulation on aarch64 using armv8 machines returns + ;; 'armv8l' from platform.machine() and won't skip some tests. + ;; Fix borrowed from an upstream bug report: + ;; https://github.com/numba/numba/issues/6345#issuecomment-764993001 + `((substitute* '("numba/tests/support.py" + "numba/tests/test_dispatcher.py") + (("platform\\.machine\\(\\) == 'armv7l'") + (string-append + "platform.machine().startswith('armv') and " + "int(platform.machine()[len('armv'):-1]) >= 7"))))) + (#t '())))) (replace 'check (lambda* (#:key tests? inputs outputs #:allow-other-keys) (when tests? @@ -27181,10 +29081,8 @@ validation testing and application logic.") (with-directory-excursion "/tmp" (setenv "HOME" (getcwd)) (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))) - (propagated-inputs - (list python-llvmlite python-numpy python-singledispatch)) - (native-inputs ;for tests - (list python-jinja2 python-pygments)) + (propagated-inputs (list python-llvmlite python-numpy)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://numba.pydata.org") (synopsis "Compile Python code using LLVM") (description "Numba gives you the power to speed up your applications with @@ -27201,6 +29099,7 @@ tool).") (define-public python-numcodecs (package (name "python-numcodecs") + ;; XXX: Starting from 0.11.0 numcodecs requires NumPy 1.7 or higher. (version "0.10.2") (source (origin @@ -27229,6 +29128,12 @@ tool).") (build-system pyproject-build-system) (arguments (list + #:test-flags + ;; Tests fail with error: ValueError: setting an array element with a + ;; sequence. The requested array has an inhomogeneous shape after 1 + ;; dimensions. The detected shape was (3,) + inhomogeneous part. + #~(list "--deselect=numcodecs/tests/test_json.py::test_non_numpy_inputs" + "--deselect=numcodecs/tests/test_msgpacks.py::test_non_numpy_inputs") #:phases '(modify-phases %standard-phases (add-after 'unpack 'disable-avx2 @@ -27260,7 +29165,8 @@ tool).") python-msgpack python-typing-extensions)) (native-inputs - (list python-cython python-pytest python-setuptools-scm)) + (list python-cython python-pytest python-setuptools-scm + python-setuptools python-wheel)) (home-page "https://github.com/zarr-developers/numcodecs") (synopsis "Buffer compression and transformation codecs") (description @@ -27288,19 +29194,23 @@ codecs for use in data storage and communication applications.") (define-public python-zarr (package (name "python-zarr") - (version "2.17.1") + (version "2.17.2") (source (origin (method url-fetch) (uri (pypi-uri "zarr" version)) (sha256 (base32 - "0qb2wj60i7v1c95k6m0pskx20ss6dxrj3ym0d7z4c98jfah3ljsn")))) + "1kjj0pk0s6306ljrig77m39zqdy32ch4nyja5lalab9l9v5sdfic")))) (build-system pyproject-build-system) (arguments (list #:test-flags - #~(list "-n" "auto") + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; This tests are flaky. The pass several times on my laptop + ;; but occasionally fail. They fail pretty reliably on the + ;; build farm. + "-k not test_lazy_loader and not open_array") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-service-tests @@ -27320,7 +29230,8 @@ codecs for use in data storage and communication applications.") python-pytest-doctestplus python-pytest-timeout python-pytest-xdist - python-setuptools-scm)) + python-setuptools-scm + python-wheel)) (home-page "https://github.com/zarr-developers/zarr-python") (synopsis "Chunked, compressed, N-dimensional arrays for Python") (description @@ -27331,7 +29242,7 @@ N-dimensional arrays for Python.") (define-public python-anndata (package (name "python-anndata") - (version "0.8.0") + (version "0.10.7") (source (origin ;; The tarball from PyPi doesn't include tests. @@ -27342,29 +29253,39 @@ N-dimensional arrays for Python.") (file-name (git-file-name name version)) (sha256 (base32 - "0v7npqrg1rdm8jzw22a45c0mqrmsv05r3k88i3lhzi0pzzxca1i1")))) + "1i08rm1xnsnq12rjv4virgdx61bra1gsfagjdq0kcpz8npxqa0as")))) (build-system pyproject-build-system) (arguments (list #:test-flags - '(list "-k" "not concatenation.rst") + '(list "-k" (string-append "not concatenation.rst" + ;; fixture 'mocker' not found + " and not test_consecutive_bool")) #:phases #~(modify-phases %standard-phases ;; Doctests require scanpy from (gnu packages bioinformatics) (add-after 'unpack 'disable-doctests (lambda _ + (substitute* "conftest.py" + (("import pytest") + (string-append "import pytest\nimport _pytest\n")) + (("pytest.DoctestItem") + "_pytest.doctest.DoctestItem")) (substitute* "pyproject.toml" (("--doctest-modules") "")))) (add-before 'build 'set-version (lambda _ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version) - (substitute* "anndata/_metadata.py" - (("__version__ =.*") - (string-append "__version__ = \"" #$version "\"\n"))) ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800")))))) + (setenv "SOURCE_DATE_EPOCH" "315532800"))) + ;; Numba needs a writable dir to cache functions. + (add-before 'check 'set-numba-cache-dir + (lambda _ + (setenv "NUMBA_CACHE_DIR" "/tmp")))))) (propagated-inputs - (list python-h5py + (list python-array-api-compat + python-exceptiongroup ;only for Python <3.11 + python-h5py python-importlib-metadata python-natsort python-numcodecs @@ -27372,11 +29293,21 @@ N-dimensional arrays for Python.") python-pandas python-scipy python-scikit-learn + python-setuptools ; For pkg_resources. python-zarr)) (native-inputs - (list python-boltons + (list python-awkward + python-boltons + python-dask + python-distributed + python-hatchling + python-hatch-vcs python-joblib + python-loompy + python-matplotlib python-pytest + python-pytest-doctestplus + python-pytest-xdist python-toml python-flit python-setuptools-scm)) @@ -27409,7 +29340,7 @@ object-oriented library such as @code{scikit-learn}.") (with-directory-excursion "/tmp" (invoke "nosetests" "-v")))))))) (native-inputs - (list python-nose)) + (list python-nose python-setuptools python-wheel)) (home-page "https://pypi.org/project/dill/") (synopsis "Serialize all of Python") (description "Dill extends Python's @code{pickle} module for serializing @@ -27461,6 +29392,7 @@ preload_resources\ (invoke "python" "-m" "multiprocess.tests"))))))) (propagated-inputs (list python-dill)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://pypi.org/project/multiprocess/") (synopsis "Multiprocessing and multithreading in Python") (description @@ -27642,10 +29574,10 @@ that is accessible to other projects developed in Cython.") pure-Python.") (license license:asl2.0))) -(define python-cloudpickle-testpkg +(define-public python-cloudpickle (package - (name "python-cloudpickle-testpkg") - (version "1.6.0") + (name "python-cloudpickle") + (version "3.1.0") (source (origin ;; Archive on pypi does not include test infrastructure. @@ -27655,41 +29587,12 @@ pure-Python.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ (chdir "tests/cloudpickle_testpkg")))))) - (home-page "https://github.com/cloudpipe/cloudpickle") - (synopsis "Extended pickling support for Python objects") - (description - "Cloudpickle makes it possible to serialize Python constructs not -supported by the default pickle module from the Python standard library. It -is especially useful for cluster computing where Python expressions are -shipped over the network to execute on remote hosts, possibly close to the -data.") - (license license:bsd-3))) - -(define-public python-cloudpickle - (package - (inherit python-cloudpickle-testpkg) - (name "python-cloudpickle") - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-s" "-vv") - (format #t "test suite not run~%"))))))) + (base32 "16z0jdg5b1r23vw1l0bwsg40zcmnrbznr4frjac9kq5j6jm4fw6d")))) + (build-system pyproject-build-system) (native-inputs - (list ;; For tests. - python-cloudpickle-testpkg python-psutil python-pytest - python-tornado-6)) + (list python-flit-core + python-psutil + python-pytest)) (home-page "https://github.com/cloudpipe/cloudpickle") (synopsis "Extended pickling support for Python objects") (description @@ -27722,22 +29625,18 @@ they use the same path.") (define-public python-partd (package (name "python-partd") - (version "1.2.0") + (version "1.4.1") (source (origin (method url-fetch) (uri (pypi-uri "partd" version)) (sha256 (base32 - "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa")))) + "0rvz2si6lbyhk7hj804gilq2y2bfdi33q81iwwkmgskgkva5vhjn")))) (build-system pyproject-build-system) (propagated-inputs - (list python-blosc - python-locket - python-numpy - python-pandas - python-pyzmq - python-toolz)) + (list python-locket python-numpy python-pandas python-pyzmq python-toolz)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/dask/partd/") (synopsis "Appendable key-value storage") (description "Partd stores key-value pairs. Values are raw bytes. We @@ -27747,7 +29646,7 @@ append on old values. Partd excels at shuffling operations.") (define-public python-fsspec (package (name "python-fsspec") - (version "2023.5.0") + (version "2024.10.0") (source (origin (method git-fetch) @@ -27756,8 +29655,7 @@ append on old values. Partd excels at shuffling operations.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "0c0brw5s4330rj0yjcrqi56hanvaahn43854jai70qzqg1qvyl88")))) + (base32 "0fba2wsf0z80y2x60rag5h393vn0ln7s0fbmvvl1cwjw30pgl9qb")))) (build-system pyproject-build-system) (arguments (list @@ -27765,20 +29663,31 @@ append on old values. Partd excels at shuffling operations.") #~(modify-phases %standard-phases (add-after 'unpack 'fix-version (lambda _ - (substitute* "fsspec/__init__.py" - (("__version__ = .*") - (string-append "__version__ = \"" #$version "\""))) - (substitute* "setup.py" - (("versioneer.get_version\\(\\)") - (string-append "\"" #$version "\"")))))) + (call-with-output-file "fsspec/_version.py" + (lambda (port) + (display (string-append "__version__ = \"" #$version "\"") + port))) + (substitute* "pyproject.toml" + (("\\[tool\\.hatch\\.build\\.hooks\\.vcs\\]") + "") + (("^dynamic = \\[\"version\"\\]") + (string-append "version = \"" #$version "\"\n"))))) + (add-after 'install 'install-version + (lambda _ + (install-file + "fsspec/_version.py" + (dirname (car (find-files #$output "gui\\.py"))))))) #:test-flags '(list - ;; requires internet access - "--ignore=fsspec/implementations/tests/test_dbfs.py"))) + ;; XXX: Unclear why this test fail. + "-k" "not test_processes"))) (propagated-inputs (list python-aiohttp python-libarchive-c python-requests python-tqdm)) (native-inputs - (list python-pytest python-pytest-mock python-numpy)) + (list python-hatchling + python-pytest + python-pytest-mock + python-numpy)) (home-page "https://github.com/intake/filesystem_spec") (synopsis "File-system specification") (description "The purpose of this package is to produce a template or @@ -27792,26 +29701,41 @@ decisions with any given backend.") (define-public python-dask (package (name "python-dask") - (version "2023.7.0") + (version "2024.4.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dask/dask/") - (commit "8523b3bae2ec0183d9d92cc536a3405f15189b7e"))) + (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1x617m0jlc63v938kqga9mhflhac3aj1ylq5mkpf2g9pd9x2hcbz")))) + (base32 "1kaxlvqd5hknlb0awck5vcw9b18nl8rpxx4j78js8p9d0y5rsgw8")))) (build-system pyproject-build-system) (arguments (list ;; Avoid coverage #:test-flags - #~(list "-n" "auto" + #~(list "--numprocesses" (number->string (parallel-job-count)) "-m" "not gpu and not slow and not network" + ;; These all fail with different hashes. Doesn't seem + ;; problematic. + "--ignore-glob=**/test_tokenize.py" + ;; ORC tests crash Python with a failure to find the global + ;; localtime file. See also + ;; https://github.com/apache/arrow/issues/40633. + "--ignore-glob=**/test_orc.py" "-k" (string-append ;; This one cannot be interrupted. "not test_interrupt" + ;; This one fails with "local variable 'ctx' referenced + ;; before assignment". Maybe enable this in later + ;; versions (or when pandas has been upgraded. + " and not test_dt_accessor" + ;; This fails when dask-expr is among the inputs. + " and not test_groupby_internal_repr" + ;; This fails with different job ids. + " and not test_to_delayed_optimize_graph" ;; This one expects a deprecation warning that never ;; comes. " and not test_RandomState_only_funcs") @@ -27846,11 +29770,17 @@ parentdir_prefix = dask- ;; This option is not supported by our version of pytest. (substitute* "pyproject.toml" (("--cov-config=pyproject.toml") "")))) + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; We use pyarrow > 14 + (substitute* "pyproject.toml" + (("\"pyarrow_hotfix\",") "")))) (add-before 'check 'pre-check (lambda _ (chdir "/tmp")))))) (propagated-inputs (list python-click ;needed at runtime python-cloudpickle + python-dask-expr python-fsspec python-importlib-metadata ;needed at runtime for dask/_compatibility.py python-numpy @@ -27865,7 +29795,8 @@ parentdir_prefix = dask- python-pytest-rerunfailures python-pytest-runner python-pytest-xdist - python-versioneer)) + python-versioneer + python-wheel)) (home-page "https://github.com/dask/dask/") (synopsis "Parallel computing with task scheduling") (description @@ -27877,6 +29808,66 @@ larger-than-memory or distributed environments. These parallel collections run on top of the dynamic task schedulers.") (license license:bsd-3))) +(define-public python-dask/bootstrap + (package + (inherit python-dask) + (properties '((hidden? . #true))) + (arguments + (substitute-keyword-arguments (package-arguments python-dask) + ((#:tests? _ #t) #f))) + (propagated-inputs + (modify-inputs (package-propagated-inputs python-dask) + (delete "python-dask-expr"))))) + +(define-public python-dask-image + (package + (name "python-dask-image") + (version "2023.8.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dask-image" version)) + (sha256 + (base32 "1dh49lvirf5fbgq5hw1c4972czg5w12fg9y689cinyjjn22qk6jy")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Flake8 attribute errors. + '(list "--ignore=dask_image/ndfilters/_threshold.py" + "--ignore=dask_image/ndfourier/_utils.py" + "--ignore=dask_image/ndinterp/__init__.py" + "--ignore=dask_image/ndmeasure/__init__.py" + "--ignore=dask_image/ndmeasure/_utils/_find_objects.py" + "--ignore=dask_image/ndmeasure/_utils/_label.py" + "--ignore=tests/test_dask_image/test_ndfilters/test__conv.py" + "--ignore=tests/test_dask_image/test_ndfourier/test_core.py" + "--ignore=tests/test_dask_image/test_ndinterp/test_spline_filter.py" + "--ignore=tests/test_dask_image/test_ndmeasure/test_core.py" + "--ignore=tests/test_dask_image/test_ndmeasure/test_find_objects.py"))) + (propagated-inputs (list python-dask + python-numpy + python-pandas-2 + python-pims + python-scipy + python-tifffile)) + (native-inputs + (list python-pytest-flake8 python-pytest)) + (home-page "https://github.com/dask/dask-image") + (synopsis "Distributed image processing") + (description "This is a package for image processing with Dask arrays. +Features: + +@itemize +@item Provides support for loading image files. +@item Implements commonly used N-D filters. +@item Includes a few N-D Fourier filters. +@item Provides some functions for working with N-D label images. +@item Supports a few N-D morphological operators. +@end itemize +") + (license license:bsd-3))) + (define-public python-ilinkedlist (package (name "python-ilinkedlist") @@ -28008,6 +29999,7 @@ RFC 8265 and RFC 8266.") (base32 "0ga3b0m8lfsv1m3260p83lhis52yvz3d42q8gip4gfj823849hnj")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/abseil/abseil-py") (synopsis "Abseil Python common libraries") (description @@ -28220,69 +30212,70 @@ project.") (define-public python-trio (package (name "python-trio") - (version "0.21.0") + (version "0.27.0") (source (origin (method url-fetch) (uri (pypi-uri "trio" version)) (sha256 - (base32 "04qwzy4295ajxpns0hrmn3asma80sjpimzpb3i877vwynsvkjgsj")))) - (build-system python-build-system) + (base32 "0cb8qy1yj274xa21nf2jpmwssjzp39vgva7y982xmci62ymrbk0x")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-sleep - (lambda _ - (substitute* "trio/tests/test_subprocess.py" - (("/bin/sleep") - (which "sleep"))))) - (add-before 'check 'change-home + (list + #:test-flags + '(list "-k" + (string-append + ;; This tests times out. + "not test_ki_protection_works" + " and not test_KI_interrupts" + ;; This fails with: signal only works in main thread of the main interpreter + " and not test_catch_signals_race_condition_on_exit" + ;; Assertion errors. + " and not test_named_thread_os" + " and not test_has_pthread_setname_np" + " and not test_guest_mode_ki" + " and not test_run_in_trio_thread_ki" + " and not test_simple_cancel_scope_usage_doesnt_create\ +_cyclic_garbage" + " and not test_nursery_cancel_doesnt_create_cyclic_garbage" + " and not test_cancel_scope_exit_doesnt_create_cyclic_garbage" + " and not test_locals_destroyed_promptly_on_cancel" + " and not test_ipython_exc_handler" + " and not test_for_leaking_fds" + ;; Signals don’t work in the build sandbox. + " and not test_open_signal_receiver" + ;; These try to raise KeyboardInterrupt which does not work + ;; in the build environment. + " and not test_ki_self" + " and not test_ki_wakes_us_up" + ;; Failure in name resolution. + " and not test_getnameinfo" + " and not test_SocketType_resolve" + ;; OSError: protocol not found. + " and not test_getprotobyname" + ;; EOFError: Ran out of input. + " and not test_static_tool_sees_all_symbols") + ;; It rerquires black and ruff to generate a final report. + "--ignore=src/trio/_tests/tools/test_gen_exports.py" + "src/trio/_tests") + #:phases + '(modify-phases %standard-phases + (add-before 'check 'set-env (lambda _ ;; Tests require a writable home. - (setenv "HOME" "/tmp"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - "-n" (number->string (parallel-job-count)) - "-k" - (string-append - ;; This test times out. - "not test_ki_protection_works" - ;; Assertion errors. - " and not test_guest_mode_ki" - " and not test_run_in_trio_thread_ki" - " and not test_simple_cancel_scope_usage_doesnt_create\ -_cyclic_garbage" - " and not test_nursery_cancel_doesnt_create_cyclic_garbage" - " and not test_cancel_scope_exit_doesnt_create_cyclic_garbage" - " and not test_locals_destroyed_promptly_on_cancel" - " and not test_ipython_exc_handler" - " and not test_for_leaking_fds" - ;; Signals don’t work in the build sandbox. - " and not test_open_signal_receiver" - ;; These try to raise KeyboardInterrupt which does not work - ;; in the build environment. - " and not test_ki_self" - " and not test_ki_wakes_us_up" - ;; Failure in name resolution. - " and not test_getnameinfo" - " and not test_SocketType_resolve" - ;; OSError: protocol not found. - " and not test_getprotobyname" - ;; EOFError: Ran out of input. - " and not test_static_tool_sees_all_symbols") - "trio/tests"))))))) + (setenv "HOME" "/tmp") + ;; #$output is first in path which causes "import file mismatch" + (setenv "PYTHONPATH" (string-append (getcwd) "/src:$PYTHONPATH"))))))) (native-inputs (list python-astor - python-ipython python-jedi - python-pylint python-pyopenssl python-pytest - python-pytest-xdist - python-pytest-cov - python-trustme)) + python-isort + python-pytest-asyncio + python-trustme + python-setuptools + python-wheel)) (propagated-inputs (list python-async-generator python-attrs @@ -28312,7 +30305,8 @@ programs that do multiple things at the same time with parallelized I/O.") (sha256 (base32 "15wa66cs165wawh4pi808ac43n67b8jqddi5ppdcbkj5gfi68hpi")))) (build-system pyproject-build-system) - (native-inputs (list python-attrs python-pytest)) + (native-inputs (list python-attrs python-pytest python-setuptools + python-wheel)) (propagated-inputs (list python-mypy python-mypy-extensions python-trio python-typing-extensions)) @@ -28378,7 +30372,7 @@ the Trio framework}.") "006vpl19bffy9fn0sssxbfakcvgrx7fhvy6l515fzln7vwpqf7zf")))) (build-system pyproject-build-system) (native-inputs - (list python-freezegun python-pytest)) + (list python-freezegun python-pytest python-setuptools python-wheel)) (home-page "https://github.com/jmoiron/humanize") (synopsis "Print numerical information in a human-readable form") (description "This package provides a Python module that displays numbers @@ -28399,7 +30393,7 @@ and dates in \"human readable\" forms. For example, it would display "017p9x0bssf7g9slmf30ddh1baawsmxas4nivx334pkfjxp23agr")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest python-twisted)) + (list python-pytest python-setuptools python-twisted python-wheel)) (home-page "https://github.com/crossbario/txaio") (synopsis "Compatibility layer between Python asyncio and Twisted") (description "Txaio provides a compatibility layer between the Python @@ -28489,6 +30483,9 @@ format.") "tests/test_frequency.py") (("test_07_non_posix_shell") "__off_test_07_non_posix_shell") + ;; Fails on leap years + (("test_19_frequency_at_month") + "__off_test_19_frequency_at_month") ;; AssertionError: 48 != 24 (("test_20_frequency_at_year") "__off_test_20_frequency_at_year"))))))) @@ -28603,8 +30600,7 @@ enumeration library in Python.") " and not test_launch_and_close_context_manager" " and not test_launch_and_close" " and not test_close_multiple_times")))) - (native-inputs - (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-ifaddr)) (home-page "https://github.com/jstasiak/python-zeroconf") @@ -28709,7 +30705,7 @@ time-or-computationally-expensive properties quick and easy and works in Python (define-public python-folium (package (name "python-folium") - (version "0.13.0") + (version "0.16.0") (source (origin ;; PyPI has a ".whl" file but not a proper source release. @@ -28720,12 +30716,46 @@ time-or-computationally-expensive properties quick and easy and works in Python (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "00adpdi1890zzzg7ffp04hmx59igdcdpyqa129vnmwqh54b5a006")))) - (build-system python-build-system) + (base32 "1dbndpqpd7c5pmc58yxz7m6bsll377fz7xqpzh58wm0hjn6ylc00")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + ;; This file requires Selenium. + #~(list "--ignore" "tests/selenium/test_selenium.py" + "-k" (string-append + ;; The tests below also require Selenium. + "not test__repr_png_is_bytes" + " and not test_valid_png" + " and not test_valid_png_size" + " and not test_geojson" + " and not test_heat_map_with_weights" + ;; This performs an online request. + " and not test_json_request" + ;; AssertionError. + " and not test_minimap")) + #: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-branca python-jinja2 python-numpy python-requests)) + (list python-branca + python-jinja2 + python-numpy + python-requests + python-xyzservices)) (native-inputs - (list python-pytest)) + (list python-geopandas + python-nbconvert + python-pandas + python-pillow + python-pytest + python-selenium + python-setuptools-scm)) (home-page "https://github.com/python-visualization/folium") (synopsis "Make beautiful maps with Leaflet.js & Python") (description "@code{folium} makes it easy to visualize data that’s been @@ -28779,7 +30809,11 @@ translating between quadkey and tile coordinates.") (list #:test-flags #~(list "-m" "not request"))) (native-inputs - (list python-pytest python-mercantile python-requests)) + (list python-pytest + python-mercantile + python-requests + python-setuptools + python-wheel)) (home-page "https://github.com/geopandas/xyzservices") (synopsis "Source of XYZ tiles providers") (description "@code{xyzservices} is a lightweight library providing a @@ -28791,7 +30825,7 @@ repository is provided via Python API and as a compressed JSON file.") (package ;; This is a command-line tool, so no "python-" prefix. (name "jube") - (version "2.2.2") + (version "2.6.1") (source (origin (method url-fetch) (uri (string-append @@ -28799,9 +30833,10 @@ repository is provided via Python API and as a compressed JSON file.") version)) (sha256 (base32 - "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk")) + "0r5d2gdqa0f4c468q3k25ycw1k2g76gg8fyiln4ni98fvfsbx3il")) (file-name (string-append "jube-" version ".tar.gz")))) (build-system python-build-system) + (native-inputs (list python-pyyaml)) ; pyyaml is needed for tests (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html") (synopsis "Benchmarking environment") (description @@ -28886,17 +30921,16 @@ information in various formats.") (uri (pypi-uri "CairoSVG" version)) (sha256 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "pytest")))))) + (build-system pyproject-build-system) (propagated-inputs (list python-cairocffi python-cssselect2 python-defusedxml python-pillow python-tinycss2)) (native-inputs - (list python-pytest-flake8 python-pytest-isort python-pytest-runner)) + (list python-pytest-flake8 + python-pytest-isort + python-pytest-runner + python-setuptools + python-wheel)) (home-page "https://cairosvg.org/") (synopsis "SVG to PDF/PS/PNG converter based on Cairo") (description "CairoSVG is a SVG converter based on Cairo. It can export @@ -28990,36 +31024,46 @@ for YAML and JSON.") (define-public python-dbus-python (package - (name "python-dbus-python") - (version "1.3.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "dbus-python" version)) - (sha256 - (base32 "1y28h90v2ib8zqhs3r2yr7ycg8ccwvw3gqkvadlm12v1129q2rxd")))) - (build-system pyproject-build-system) - (arguments - (list #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'patch-requirements - (lambda _ - (substitute* (list "pyproject.toml" "setup.py") - (("'(ninja|patchelf)',?") "")) - (substitute* "setup.cfg" - (("(ninja|patchelf)") ""))))))) - (inputs (list dbus glib)) - (propagated-inputs (list python-pygobject)) - (native-inputs (list pkg-config - python-meson-python - meson ninja patchelf - python-sphinx python-sphinx-rtd-theme - python-tappy - python-wheel)) - (home-page "https://dbus.freedesktop.org/doc/dbus-python/") - (synopsis "Python bindings for libdbus") - (description "This package provides Python bindings to libdbus, the -reference implementation of the D-Bus protocol.") - (license license:expat))) + (name "python-dbus-python") + (version "1.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dbus-python" version)) + (sha256 + (base32 "1y28h90v2ib8zqhs3r2yr7ycg8ccwvw3gqkvadlm12v1129q2rxd")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-requirements + (lambda _ + (substitute* (list "pyproject.toml" "setup.py") + (("'(ninja|patchelf)',?") "")) + (substitute* "setup.cfg" + (("(ninja|patchelf)") ""))))))) + (native-inputs + (list pkg-config + python-meson-python + meson + ninja + patchelf + python-setuptools + python-sphinx + python-sphinx-rtd-theme + python-tappy + python-wheel)) + (inputs + (list dbus glib)) + (propagated-inputs + (list python-pygobject)) + (home-page "https://dbus.freedesktop.org/doc/dbus-python/") + (synopsis "Python bindings for libdbus") + (description + "This package provides Python bindings to libdbus, the reference +implementation of the D-Bus protocol.") + (license license:expat))) (define-public python-dbusmock (package @@ -29199,15 +31243,15 @@ standard error channel (stderr) in your program.") (define-public python-anyio (package (name "python-anyio") - (version "3.6.2") + (version "4.6.2") (source (origin (method url-fetch) (uri (pypi-uri "anyio" version)) (sha256 (base32 - "08bljjq5xq0l9id36q3vvjgygirq7g7q2bs41hdg82p379khvsi5")))) - (build-system python-build-system) + "0ir3n40gdcm1kd7qyn4c46pgdyyp36h49a0pifyv6lh7vnrpnapp")))) + (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -29258,15 +31302,17 @@ standard error channel (stderr) in your program.") python-typing-extensions)) (native-inputs (list python-contextlib2 - python-coverage python-hypothesis python-mock + python-psutil python-pytest python-pytest-mock + python-setuptools python-setuptools-scm python-trio python-trustme - python-uvloop)) + python-uvloop + python-wheel)) (home-page "https://github.com/agronholm/anyio") (synopsis "Compatibility layer for multiple asynchronous event loops") (description @@ -29531,7 +31577,7 @@ scripts to load entry points more quickly.") (when tests? (invoke "python" "-m" "unittest" "discover" "-v"))))))) ;; ModuleNotFoundError: No module named 'poetry' - (native-inputs (list python-poetry-core)) + (native-inputs (list python-poetry-core python-six)) (home-page "https://github.com/vlasovskikh/funcparserlib") (synopsis "Recursive descent parsing library based on functional combinators") @@ -29584,23 +31630,26 @@ Notation (CSON).") (define-public python-aionotify (package (name "python-aionotify") - (version "0.2.0") + (version "0.3.1") (source (origin ;; Source tarball on PyPi lacks tests (method git-fetch) (uri (git-reference (url "https://github.com/rbarrois/aionotify") - (commit (string-append "v" version)))) + (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y")) - (patches (search-patches "python-aionotify-0.2.0-py3.8.patch")))) - (build-system python-build-system) + (base32 "1p08g0h4bjlra25cwysag7gifsrm35d5vkjfv845w1rig8b57q9s")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/rbarrois/aionotify") - (synopsis "Asyncio-powered inotify library") + (synopsis "inotify library for Python") (description - "@code{aionotify} is a simple, asyncio-based inotify library.") + "@code{python-aionotify} is a simple, asyncio-based inotify library.") (license license:bsd-3))) (define-public python-forbiddenfruit @@ -29758,20 +31807,30 @@ files. These files are used to translate strings in android apps.") (define-public python-watchdog (package (name "python-watchdog") - (version "2.1.6") + (version "6.0.0") (source (origin (method url-fetch) (uri (pypi-uri "watchdog" version)) (sha256 - (base32 "1rx2nyl0cyj0v4ja795cl3gi26577c5wg48syr3byz3ndkgpavm3")))) + (base32 "10n2v2iflhdriwfp34yvhfcckqb6vs7378fdvqj8xbm3zn17rpwx")))) (build-system pyproject-build-system) (arguments - (list #:test-flags #~(list "-k" "not test_kill_auto_restart"))) + (list + #:test-flags + #~(list "-k" (string-join + (list "not test_kill_auto_restart" + "test_auto_restart_on_file_change_debounce" + ;; Fails with too many open files. + "test_select_fd") + " and not ")))) (propagated-inputs (list python-pathtools python-pyyaml)) (native-inputs - (list python-pytest-cov python-pytest-timeout)) + (list python-pytest + python-pytest-cov + python-pytest-timeout + python-setuptools python-wheel)) (home-page "https://github.com/gorakhargosh/watchdog") (synopsis "File system events monitoring") (description "This package provides a way to monitor file system events @@ -29797,7 +31856,9 @@ but portable.") (arguments (list #:test-flags '(list "-o" "asyncio_mode=auto" ;; PytestUnraisableExceptionWarning - "-k" "not test_watch_log and not test_awatch"))) + "-k" "not test_watch_log and not test_awatch") + #:phases #~(modify-phases %standard-phases + (delete 'sanity-check)))) (native-inputs (list python-anyio python-coverage @@ -29807,7 +31868,8 @@ but portable.") python-pytest-cov python-pytest-mock python-pytest-sugar - python-pytest-toolbox)) + python-setuptools + python-wheel)) (home-page "https://github.com/samuelcolvin/watchgod") (synopsis "Simple, modern file watching and code reload in Python") (description @@ -29892,14 +31954,14 @@ an upload option to send your work back to the platform.") (define-public python-titlecase (package (name "python-titlecase") - (version "2.4") + (version "2.4.1") (source (origin (method url-fetch) (uri (pypi-uri "titlecase" version)) (sha256 (base32 - "00h92jdpj108z4sb6dpayfblpax20698290jnbyi5z5iwk5974i6")))) + "1x9myq3rlbw6wh946ncch8px7wyabhzacy2fjji13nmvrivs50vx")))) (build-system python-build-system) (home-page "https://github.com/ppannuto/python-titlecase") (synopsis "Capitalize strings similar to book titles") @@ -29930,7 +31992,7 @@ lowercase.") (setenv "PYTHONPATH" (string-append (getcwd) "/code:" (getenv "GUIX_PYTHONPATH")))))))) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/drj11/pypng") (synopsis "Pure Python PNG image encoder/decoder") (description @@ -30090,26 +32152,92 @@ and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).") (license license:expat))) +(define-public python-json-e + (package + (name "python-json-e") + (version "4.8.0") + (source + (origin + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/json-e/json-e") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zsx17jjhvan1ziq5aaqwids3b9kzx3j8czf9qznqqqvb1n133g8")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; Git repository provides implementations for JavaScript, Golang, + ;; Python and Rust, pick "py". + (add-before 'build 'chdir-to-py + (lambda _ + (chdir "py")))))) + (native-inputs + (list python-freezegun + python-pytest + python-pyyaml + python-setuptools + python-wheel)) + (home-page "https://json-e.js.org") + (synopsis "Data-structure parameterizer for embedding context in JSON objects") + (description + "This package provides a data-structure parameterization system written +for embedding context in JSON objects.") + (license license:mpl2.0))) + (define-public python-json-logger (package (name "python-json-logger") - (version "0.1.11") + (version "2.0.7") (source (origin (method url-fetch) (uri (pypi-uri "python-json-logger" version)) (sha256 (base32 - "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp")))) - (build-system python-build-system) - (home-page - "https://github.com/madzak/python-json-logger") + "071f9d62ds1xdp88yzsfpf1pba2f78cp18193smcads2sc1frrr3")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/madzak/python-json-logger") (synopsis "JSON log formatter in Python") (description "This library allows standard Python logging to output log data as JSON objects. With JSON we can make our logs more readable by machines and we can stop writing custom parsers for syslog-type records.") (license license:bsd-3))) +(define-public python-unique-log-filter + (package + (name "python-unique-log-filter") + (version "0.1.0") + (source + ;; The version on pypi does not include test files. + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/twizmwazin/unique_log_filter") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "036mh6nqskck2fa1q2inasqxb9wcz2p09qcpldnnffzcy1a6kzba")))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "test_unique_log_filter.py"))))))) + (native-inputs (list python-flit-core)) + (home-page "https://github.com/twizmwazin/unique_log_filter") + (synopsis "Log filter that removes duplicate log messages") + (description + "This library provides a filter for the @code{logging} module +from the Python standard library which allows removing duplicate log +messages.") + (license license:bsd-2))) + (define-public python-daiquiri (package (name "python-daiquiri") @@ -30202,7 +32330,7 @@ HTML-containing files.") (define-public python-json5 (package (name "python-json5") - (version "0.8.5") + (version "0.9.25") (source (origin ;; sample.json5 is missing from PyPi source tarball @@ -30212,11 +32340,11 @@ HTML-containing files.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn")))) - (build-system python-build-system) + (base32 "1c96dqc8hn8c82q89rr7ix8d4da07ls3iac64f8jvjlgmhfik46q")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/dpranke/pyjson5") - (synopsis - "Python implementation of the JSON5 data format") + (synopsis "Python implementation of the JSON5 data format") (description "JSON5 extends the JSON data interchange format to make it slightly more usable as a configuration language. This Python package implements parsing and @@ -30827,7 +32955,7 @@ accessor layer.") (define-public pyzo (package (name "pyzo") - (version "4.15.0") + (version "4.16.0") (source (origin (method git-fetch) @@ -30837,7 +32965,7 @@ accessor layer.") (file-name (git-file-name name version)) (sha256 (base32 - "0m2sp65q21hhlfkvyby4sjc8cmwv3l0avw42xsna8za8ax9xadxr")))) + "18775dhd5z7l505khrh1vsv5w1x1icshv34av8bbhfj8dz8nvgx5")))) (build-system python-build-system) (arguments `(#:phases @@ -30921,18 +33049,10 @@ intended for validating data coming into Python as JSON, YAML, etc.") (sha256 (base32 "0h1naik558qh48gx2iyy0a0khvw5fz0in69y84mbrhsm9nq7w3bm")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-vv" "-k" - ;; These tests fail because no EDITOR is in PATH. - "not test_find_editor_not_specified \ -and not test_transcript") - (format #t "test suite not run~%"))))))) + (list #:test-flags '(list "-k" "not test_find_editor_not_specified \ +and not test_transcript"))) (propagated-inputs (list python-attrs python-colorama python-pyperclip python-wcwidth)) (native-inputs @@ -30941,7 +33061,9 @@ and not test_transcript") python-pytest python-pytest-cov python-pytest-mock - python-setuptools-scm)) + python-setuptools + python-setuptools-scm + python-wheel)) (home-page "https://github.com/python-cmd2/cmd2") (synopsis "Tool for building interactive command line applications") (description @@ -31073,6 +33195,33 @@ For the most part it's transliterated from C, the major differences are: "Jinxed is an implementation of a subset of the Python curses library.") (license license:mpl2.0))) +(define-public python-svgelements + (package + (name "python-svgelements") + (version "1.9.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "svgelements" version)) + (sha256 + (base32 "1xrp7yxg65dqdrmghriljf9hh2smq2zhzr2hzmqifgfd0ijas0kw")))) + (build-system pyproject-build-system) + (native-inputs + (list python-anyio + python-pytest + python-numpy + python-pillow + python-scipy + python-setuptools + python-wheel)) + (home-page "https://github.com/meerk40t/svgelements") + (synopsis "SVG parsing for elements, paths, and other SVG objects") + (description + "This module does high fidelity SVG parsing and geometric rendering. +The goal is to successfully and correctly process SVG for use with any scripts +that may need or want to use SVG files as geometric data.") + (license license:expat))) + (define-public python-svgutils (package (name "python-svgutils") @@ -31115,7 +33264,7 @@ placement and scaling of SVG figures and adding markers, such as labels.") ;; Avoid python-pytest-coverage #:test-flags '(list "-c /dev/null"))) (propagated-inputs (list python-six python-wcwidth)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/jquast/blessed") (synopsis "Wrapper around terminal capabilities") (description @@ -31126,45 +33275,44 @@ positioning, and keyboard input.") (define-public python-readme-renderer (package (name "python-readme-renderer") - (version "34.0") + (version "41.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "readme_renderer" version)) - (sha256 - (base32 - "1c75h9znffc2lh4j56yg23l5ifj5l8fbdq3kfigi8vbh45zx3d6z")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "readme_renderer" version)) + (sha256 + (base32 + "1xvkf2i075rdqkwdrcrw4xglziqd7qs5lb2rbxr5snizi7ji2jsg")))) + (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-cmarkgfm-dependency - (lambda _ - ;; Permit newer versions of cmarkgfm. - (substitute* "setup.py" - (("cmarkgfm>=0\\.5\\.0,<0\\.7\\.0") - "cmarkgfm>=0.5.0")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; The GFM tests fail due to slight differences in the - ;; generated vs expected HTML due to using a more - ;; recent bleach version (see: - ;; https://github.com/pypa/readme_renderer/issues/234). - (invoke "pytest" "-vv" "-k" "not GFM"))))))) - (propagated-inputs - (list python-bleach python-docutils python-pygments - + (list + #:test-flags + '(list "-k" + (string-append + ;; These tests fail due to slight differences in the generated + ;; vs expected HTML, e.g. because of difference in whitespace or + ;; line breaks. (See also + ;; https://github.com/pypa/readme_renderer/issues/234). + "not test_md_fixtures[test_CommonMark_008.md]" + " and not test_rst_fixtures[test_rst_008.rst]" + " and not GFM")))) + (propagated-inputs + (list python-bleach + python-docutils + python-pygments ;; Optional dependencies. python-cmarkgfm)) ;required by postorius (native-inputs - (list python-mock python-pytest)) + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/pypa/readme_renderer") (synopsis "Render README files in Warehouse") (description "Readme Renderer is a library that will safely render arbitrary README files into HTML. It is designed to be used in Warehouse to render the -@code{long_description} for packages. It can handle Markdown, reStructuredText, -and plain text.") +@code{long_description} for packages. It can handle Markdown, +reStructuredText, and plain text.") (license license:asl2.0))) (define-public python-lazr-delegates @@ -31392,7 +33540,8 @@ It adds a simple and readable way to print stuff during development.") (list python-dateutil python-pytz python-regex python-ruamel.yaml python-tzlocal)) (native-inputs - (list python-flake8 python-pytest python-parameterized tzdata-for-tests)) + (list python-flake8 python-pytest python-parameterized tzdata-for-tests + python-setuptools python-wheel)) (arguments `(#:phases (modify-phases %standard-phases @@ -31505,31 +33654,34 @@ By default it uses the open Python vulnerability database Safety DB.") (define-public python-pypandoc (package (name "python-pypandoc") - (version "1.7.5") + (version "1.14") (source (origin (method url-fetch) (uri (pypi-uri "pypandoc" version)) (sha256 - (base32 - "0l6a8ngzpx363q2jskxxkx6psfhqrvc4js80dmn16r3vw6m2cb40")))) - (build-system python-build-system) - (inputs - (list pandoc python-pandocfilters)) - (propagated-inputs - `(("wheel" ,python-wheel))) - (native-inputs - `(("texlive" ,(texlive-updmap.cfg (list texlive-lm texlive-xcolor))))) + (base32 "15x161bxr7hky7rvq0jlgf1kxg6vdf069487casmpyxry7slak3b")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'disable-tests - (lambda _ - ;; Disable test requiring network access - (substitute* "tests.py" - (("test_basic_conversion_from_http_url") - "skip_test_basic_conversion_from_http_url")) - #t))))) + `(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-tests + (lambda _ + (substitute* "tests.py" + ;; Disable test requiring network access + (("test_basic_conversion_from_http_url") + "skip_test_basic_conversion_from_http_url") + ;; Disable tests with missing files + (("test_basic_conversion_from_file_pattern") + "skip_test_basic_conversion_from_file_pattern") + (("test_conversion_with_data_files") + "skip_test_conversion_with_data_files")) #t))))) + ;; Ideally, we would supersede texlive-xpatch with texlive-regexpatch once + ;; the missing etoolbox.sty file is added + (native-inputs (list python-poetry-core + (texlive-updmap.cfg (list texlive-xpatch texlive-lm + texlive-xcolor)))) + (inputs (list pandoc python-pandocfilters)) + (propagated-inputs (list python-wheel)) (home-page "https://github.com/bebraw/pypandoc") (synopsis "Python wrapper for pandoc") (description "pypandoc is a thin Python wrapper around pandoc @@ -31645,6 +33797,106 @@ a console. It provides a collection of ‘print’ functions that allow you to cleanly print different types of messages.") (license license:gpl3+))) +(define-public python-userpath + (package + (name "python-userpath") + (version "1.9.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "userpath" version)) + (sha256 + (base32 "05fqxzdi27vqm5lywxs6bm2j4d8k91fx2ihqhg65g4h6mf6jhlkc")))) + (build-system pyproject-build-system) + (arguments + ;; See https://github.com/ofek/userpath/issues/43. + ;; In Guix, tests try to find the temporary build directory in PATH, but + ;; only the store output is present. + (list #:tests? #f)) + (native-inputs (list python-hatchling python-pytest)) + (propagated-inputs (list python-click)) + (home-page "https://github.com/ofek/userpath") + (synopsis "Add locations to the user's PATH") + (description "This package provides a tool for modifying a user's PATH.") + (license license:expat))) + +(define-public hatch + (package + (name "hatch") + (version "1.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hatch" version)) + (sha256 + (base32 "0ipvj1pxdb6wb1sblh22h9gnh6byjnwcl7hfcnk88dmkslgp1z3s")) + (modules '((guix build utils))) + (snippet '(substitute* "pyproject.toml" + ;; We have virtualenv 20.3.1. + (("virtualenv>=20.16.2") + "virtualenv>=20.3.1"))))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; XXX: tests below fail due to zipfile reporting incorrect zip dates. + #~(list "-k" + (string-append + "not " + (string-join + (list "test_default" + "test_explicit_path" + "test_editable_default" + "test_editable_default_dependencies" + "test_editable_default_force_include" + "test_editable_default_force_include_option" + "test_editable_exact" + "test_editable_exact_extra_dependencies" + "test_editable_exact_force_include" + "test_editable_exact_force_include_option" + "test_editable_exact_force_include_build_data_precedence" + "test_editable_pth") + " and not "))) + #:phases #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs (list git-minimal + python-pytest + python-pytest-mock + python-pytest-xdist)) + (propagated-inputs (list python-click + python-hatchling + python-httpx + python-hyperlink + python-keyring + python-packaging + python-pexpect + python-platformdirs + python-pyperclip + python-rich + python-shellingham + python-tomli-w + python-tomlkit + python-userpath + python-virtualenv)) + (home-page "https://hatch.pypa.io/latest/") + (synopsis "Python project management") + (description "Hatch is a modern, extensible Python project manager. + +Features + +@itemize +@item Standardized build system with reproducible builds by default +@item Robust environment management with support for custom scripts +@item Configurable Python distribution management +@item Easy publishing to PyPI or other indexes +@item Version management +@item Configurable project generation with sane defaults +@item Responsive CLI, ~2-3x faster than equivalent tools +@end itemize") + (license license:expat))) + (define-public python-nestedtext (package (name "python-nestedtext") @@ -31755,6 +34007,48 @@ heterogeneous and multi-platform clusters (including clusters running other applications with variable CPU loads).") (license license:bsd-3))) +(define-public python-param + (package + (name "python-param") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "param" version)) + (sha256 + (base32 "07z7az7xg8pzjrmaf928is7n6siw9v9nxfmf0a5vgqj7nl40pcx7")))) + (build-system pyproject-build-system) + (native-inputs + (list python-cloudpickle + python-coverage + python-hatchling + python-hatch-vcs + python-ipython + python-jsonschema + python-nbval + python-nest-asyncio + python-numpy + python-odfpy + python-openpyxl + python-pandas + python-pyarrow + python-pytest + python-pytest-asyncio + python-pytest-xdist + python-tables + python-xlrd)) + (home-page "https://param.holoviz.org/") + (synopsis + "Make your Python code clearer and more reliable by declaring Parameters") + (description + "Param is a library for handling all the user-modifiable parameters, +arguments, and attributes that control your code. It provides automatic, +robust error-checking while dramatically reducing boilerplate code, letting +you focus on what you want your code to do rather than on checking for all the +possible ways users could supply inappropriate values to a function or +class.") + (license license:bsd-3))) + (define-public python-djitellopy (package (name "python-djitellopy") @@ -31780,6 +34074,7 @@ applications with variable CPU loads).") python-av python-numpy python-pillow)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/damiafuentes/DJITelloPy") (synopsis "DJI Tello drone video streaming, swarms and state packets library") @@ -31861,26 +34156,22 @@ EDU SDK. This library has the following features: (build-system pyproject-build-system) (arguments (list + ;; Minimize test requirements. + #:test-flags + #~(list "--deselect=test/git/test_git.py::Repo::test_pyproject" + "--ignore=test/git/test_invocations.py" + "--ignore=test/test_render.py") #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Taken from tox.ini. - (invoke "python" "setup.py" "make_versioneer") - (invoke "python" "-m" "unittest" "discover" "test") - (invoke "python" "test/git/test_git.py" "-v") - ;; Some invocation tests require the network. - ;;(invoke "python" "test/git/test_invocations.py" "-v") - (invoke "python" "setup.py" "make_long_version_py_git") - (invoke "pyflakes" "setup.py" "versioneer.py" "git_version.py") - (invoke "python" "test/run_pyflakes_src.py") - (invoke "pyflakes" "test") - (invoke "flake8" "git_version.py" "versioneer.py") - (invoke "pycodestyle" "--max-line-length=88" - "git_version.py" "versioneer.py"))))))) - (native-inputs - (list git python-flake8 python-pycodestyle python-pyflakes)) + (add-before 'check 'pre-check + (lambda _ + (invoke "python" "setup.py" "make_versioneer" + "make_long_version_py_git")))))) + (native-inputs + (list git-minimal/pinned + python-pytest + python-setuptools + python-wheel)) (propagated-inputs (list python-tomli)) (home-page "https://github.com/python-versioneer/python-versioneer") @@ -31969,19 +34260,24 @@ process.") (define-public python-aiofiles (package (name "python-aiofiles") - (version "23.1.0") + (version "24.1.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "aiofiles" version)) - (sha256 - (base32 - "0d8n79slihf1lkbh2m6yw51rlq6n6vssljsdacbdpq0rkbglglpd")))) - (build-system python-build-system) + (origin + (method url-fetch) + (uri (pypi-uri "aiofiles" version)) + (sha256 + (base32 "0v0namryb6acj9bkic5rcgbnb36njj601ws85q60z0d3wp4pb812")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatch-vcs + python-hatchling + python-pytest + python-pytest-asyncio)) (home-page "https://github.com/Tinche/aiofiles") (synopsis "File support for @code{asyncio}") - (description "@code{python-aiofiles} is a library for handling local -disk files in asyncio applications.") + (description + "@code{python-aiofiles} is a library for handling local disk files in +asyncio applications.") (license license:asl2.0))) (define-public python-pyre-extensions @@ -32123,32 +34419,30 @@ older versions of Python and so are packaged here.") (define-public python-loguru (package (name "python-loguru") - (version "0.7.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "loguru" version)) - (sha256 - (base32 - "1q83kr9zwwxchgyzf8gc6wi68ch5391mwzfxb5wlvs3axly0a4hn")))) + (version "0.7.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "loguru" version)) + (sha256 + (base32 "1b2ipp8di3y10gd7kiin9fyazv5rijbfwh3383yk8psi48ssawg6")))) (build-system pyproject-build-system) (arguments (list #:test-flags - ;; All of these fail with: error: Cannot find implementation or library - ;; stub for module named "loguru" - '(list "--ignore=tests/typesafety/test_logger.yml"))) - (propagated-inputs (list python-colorama)) - (native-inputs (list python-colorama - python-freezegun - python-mypy - python-pre-commit - python-pytest - python-pytest-cov - python-pytest-mypy-plugins - python-sphinx - python-sphinx-autobuild - python-sphinx-rtd-theme - python-tox)) + #~(list"--numprocesses" (number->string (parallel-job-count)) + ;; All of these fail with: error: Cannot find implementation or + ;; library stub for module named "loguru" + "--ignore=tests/typesafety/test_logger.yml"))) + (native-inputs + (list python-freezegun + python-pytest + python-pytest-mypy-plugins + python-pytest-xdist + python-setuptools + python-wheel)) + (propagated-inputs + (list python-colorama)) (home-page "https://github.com/Delgan/loguru") (synopsis "Python logging made (stupidly) simple") (description "Python logging made (stupidly) simple") @@ -32329,6 +34623,57 @@ YAML. It takes care of defaults, overrides, type checking, command-line integration, human-readable errors, and standard OS-specific locations.") (license license:expat))) +(define-public python-referencing + (package + (name "python-referencing") + (version "0.35.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "referencing" version)) + (sha256 + (base32 "0g3hvzz6ci6dcf701q7ilr4b7vw3fw428kqp4nj35dn8lqj23d15")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + '(list "--pyargs" "referencing/tests") + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; The build system does not like this. + (substitute* "pyproject.toml" + ((" \"Topic :: File Formats.*") ""))))))) + (propagated-inputs (list python-attrs python-rpds-py)) + (native-inputs + (list python-hatchling + python-hatch-vcs + python-jsonschema + python-pytest + python-pytest-subtests)) + (home-page "https://github.com/python-jsonschema/referencing") + (synopsis "JSON Referencing + Python") + (description "This package provides an implementation-agnostic +implementation of JSON reference resolution.") + (license license:expat))) + +(define-public python-referencing-bootstrap + (package + (inherit python-referencing) + (name "python-referencing-bootstrap") + (arguments + (list + #:tests? #false + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; The build system does not like this. + (substitute* "pyproject.toml" + ((" \"Topic :: File Formats.*") ""))))))) + (native-inputs (list python-hatchling python-hatch-vcs)))) + (define-public python-reflink (package (name "python-reflink") @@ -32382,7 +34727,7 @@ used to retry a function a given number of times.") (define-public python-pivy (package (name "python-pivy") - (version "0.6.5") + (version "0.6.8") (source (origin (method git-fetch) @@ -32391,20 +34736,20 @@ used to retry a function a given number of times.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx")))) + (base32 "00l4r06dwmgn8h29nrl3g3yv33cfyizyylk28x1j95qyj36sggfb")))) (build-system python-build-system) (arguments - `(;; The test suite fails due to an import cycle between 'pivy' and '_coin' - #:tests? #f - #:phases - (modify-phases %standard-phases + (list + ;; The test suite fails due to an import cycle between 'pivy' and '_coin' + #:tests? #f + #:phases + #~(modify-phases %standard-phases (add-after 'unpack 'patch-cmake-include-dirs - (lambda _ - ;; Patch buildsystem to respect Coin3D include directory - (substitute* "CMakeLists.txt" - (("\\$\\{SoQt_INCLUDE_DIRS}") - "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}")) - #t))))) + (lambda _ + ;; Patch buildsystem to respect Coin3D include directory + (substitute* "CMakeLists.txt" + (("\\$\\{SoQt_INCLUDE_DIRS}") + "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))))))) (native-inputs (list cmake swig)) (inputs @@ -32412,7 +34757,6 @@ used to retry a function a given number of times.") qtbase-5 libxi libice - soqt glew coin3d)) (home-page "https://github.com/coin3d/pivy") @@ -32488,6 +34832,13 @@ and frame grabber interface.") (("^(CMAKE_DEFAULT_EXECUTABLE = ).*" _ head) (format #f "~a ~s~%" head (search-input-file inputs "bin/cmake")))))) + (add-before 'check 'pre-check + (lambda _ + ;; Some tests try to access the network before being skipped. + ;; Skip them by default. + (substitute* "tests/test_setup.py" + (("pytest\\.mark\\.skipif\\(not is_site_reachable.*") + "pytest.mark.isolated()\n")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -32587,8 +34938,7 @@ CMake.") (string-append x11 "/lib/libX11.so.6"))) (substitute* "Screenkey/xlib.py" (("libXtst.so.6") - (string-append xtst "/lib/libXtst.so.6"))) - #t))) + (string-append xtst "/lib/libXtst.so.6")))))) (add-after 'install 'wrap-screenkey (lambda* (#:key outputs #:allow-other-keys) (wrap-program @@ -32597,7 +34947,8 @@ CMake.") `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))) (inputs - (list python-distutils-extra + (list bash-minimal + python-distutils-extra python-tokenize-rt libx11 libxtst @@ -33007,6 +35358,421 @@ instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM and BMI2).") (license license:bsd-2)))) +(define-public python-cart + (package + (name "python-cart") + (version "1.2.2") + (source + (origin + ;; No source releases available on pypi, hence fetching from GitHub. + (method git-fetch) + (uri (git-reference + (url "https://github.com/CybercentreCanada/cart") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zycv620iljrsval5rai1wsn0hr25ddx9xhjsyy6xxrgprfxvlfi")))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "unittest" "discover"))))))) + (propagated-inputs (list python-pycryptodome)) + (home-page "https://github.com/CybercentreCanada/cart") + (synopsis "Library for interacting with the CaRT file format") + (description + "This Python library implements the CaRT file format which is commonly +used to store and transmit information about computer malware and associated +metadata.") + (license license:bsd-2))) + +(define-public python-ailment + (package + (name "python-ailment") + ;; Must be the same version as python-angr. + (version "9.2.112") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ailment" version)) + (sha256 + (base32 "1rv8rwvdm7fc9mf8z5hqb54dsj0n7jlnwghd12ll0b2jmh2ix8mn")))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + ;; Many tests are skipped due to cyclic dependencies. + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "python" "-m" "unittest")))))))) + (home-page "https://github.com/angr/ailment") + (synopsis "The angr intermediate language") + (description + "This Python module implements an @acronym{IL, Intermediate Language}, +also known as @acronym{IR, Intermediate Representation}, used by the angr +binary analysis platform.") + (license license:bsd-2))) + +(define-public python-cle + (package + (name "python-cle") + ;; Must be the same version as python-angr. + (version "9.2.112") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cle" version)) + (sha256 + (base32 "11jbvg12wqxz74iy83ax0q8k156xrw6iqv75dix5cpqgacds3gdj")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f)) + (propagated-inputs (list python-pefile python-pyelftools python-pyvex + python-sortedcontainers python-cart)) + (native-inputs (list python-cffi)) + (home-page "https://github.com/angr/cle") + (synopsis "Python loader for binaries and their associated libraries") + (description + "CLE loads binaries and their associated libraries, resolves +imports and provides an abstraction of process memory the same way as if +it was loader by the operating system's loader.") + (license license:bsd-2))) + +(define-public python-pyvex + (package + (name "python-pyvex") + ;; Must be the same version as python-angr. + (version "9.2.112") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyvex" version)) + (sha256 + (base32 "0z1jiflp7h07mfc26am3v7v5z2n6mw9hkfylbs86qgpm93qcf6i3")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "python" "-m" "unittest"))))) + + (add-before 'build 'set-cc + (lambda _ + (setenv "CC" #$(cc-for-target)) + (setenv "CC_NATIVE" "gcc")))))) + (propagated-inputs (list python-archinfo python-bitstring python-cffi)) + (home-page "https://github.com/angr/pyvex") + (synopsis "Python interface to libVEX and VEX IR") + (description + "This package provides a Python interface the libVEX and VEX IR. +VEX is the intermediate representation (also known as intermediate +language) used by the Valgrind analysis tool. As such, VEX is designed +to enable all kinds of binary analysis tasks.") + (license license:bsd-2))) + +(define-public python-claripy + (package + (name "python-claripy") + ;; Must be the same version as python-angr. + (version "9.2.112") + (source + (origin + ;; Fetching from Git as pypi release doesn't include all test files. + (method git-fetch) + (uri (git-reference + (url "https://github.com/angr/claripy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0c6q6imxjwhxn87d9yz8zvyrszk94r25w8x0g1lr6mrpa9bx7wai")) + (modules '((guix build utils))) + (snippet '(begin + (substitute* "setup.cfg" + ;; Relax the z3 version constraint. + ;; See https://github.com/angr/claripy/commit/d1fe2df + (("z3-solver==4.13.0.0") + "")))))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "python" "-m" "unittest")))))))) + (propagated-inputs (list python-cachetools python-decorator python-pysmt + z3)) + (home-page "https://github.com/angr/claripy") + (synopsis "Abstraction layer for constraint solvers") + (description + "This Python module provides an abstraction layer for interacting +with constraint solvers. Specifically, it is intended to be used with +SMT solvers and is built on top of the Z3 solver.") + (license license:bsd-2))) + +(define-public python-pysmt + (package + (name "python-pysmt") + (version "0.9.5") + (source + (origin + ;; Fetching from Git as pypi release doesn't include all test files. + (method git-fetch) + (patches (search-patches "python-pysmt-fix-pow-return-type.patch" + "python-pysmt-fix-smtlib-serialization-test.patch")) + (uri (git-reference + (url "https://github.com/pysmt/pysmt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hrxv23y5ip4ijfx5pvbwc2fq4zg9jz42wc9zqgqm0g0mjc9ckvh")))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'check 'set-pysmt-solver + (lambda _ + (setenv "PYSMT_SOLVER" "z3")))))) + (native-inputs (list python-pytest)) + (propagated-inputs (list z3)) + (home-page "https://github.com/pysmt/pysmt") + (synopsis + "Solver-agnostic library for SMT formula manipulation and solving") + (description + "This Python module provides a solver-agnostic abstraction for +working with @acronym{SMT, Satisfiability Modulo Theory} formulas. For example, +it allows manipulation and solving such formulas.") + (license license:asl2.0))) + +(define-public python-rpyc + (package + (name "python-rpyc") + (version "5.3.1") + (source + (origin + ;; Fetching from Git as pypi release doesn't include all test files. + (method git-fetch) + (uri (git-reference + (url "https://github.com/tomerfiliba-org/rpyc") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15mnp9qkyw3mmxmr5y4kf3xkvxyp00n892vqaqwznr7al35apgnr")) + (snippet '(begin + ;; Disable deploy tests, these rely on OpenSSH and require + ;; configuring the SSH client manually to accept the host key. + (delete-file "tests/test_deploy.py") + ;; Disable tests requiring network access. These tests + ;; presently fail with the error "Network is unreachable". + (delete-file "tests/test_registry.py"))))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "python" "-m" "unittest")))))))) + (propagated-inputs (list python-hatchling python-plumbum)) + (home-page "https://github.com/tomerfiliba-org/rpyc") + (synopsis + "Remote Python Call (RPyC) is a symmetric distributed computing library") + (description + "This Python module enables remote procedure calls, clustering, and +distributed-computing. For this purpose, it makes use of object-proxying, a technique +that employs python's dynamic nature, to overcome the physical boundaries between +processes and computers, so that remote objects can be manipulated as if they +were local.") + (license license:expat))) + +(define-public python-nampa + (package + (name "python-nampa") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "nampa" version)) + (sha256 + (base32 "0k6cq2gflpkm40qhgqbbcjmq5lq589c15bmk567qyh3d08062hvd")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-future)) + (home-page "https://github.com/thebabush/nampa") + (synopsis "Python implementation of IDA Pro's FLIRT technology") + (description + "This Python module implements the @acronym{FLIRT, Fast Library Identification +and Recognition Technology}. This technology is useful for identifying +common library subroutines in disassembled binaries.") + (license license:lgpl3))) + +(define-public python-mulpyplexer + (package + (name "python-mulpyplexer") + (version "0.09") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mulpyplexer" version)) + (sha256 + (base32 "0c5xzci1djy1yi9hxxh8g67l6ms8r7ad7ja20pv8hfbdysdrwkhl")))) + (build-system pyproject-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "mulpyplexer.py"))))))) + (home-page "https://github.com/zardus/mulpyplexer/") + (synopsis "Multiplexes interactions with lists of Python objects") + (description "This module provides utilities for multiplexing +interactions with lists of Python objects.") + (license license:bsd-2))) + +(define-public python-itanium-demangler + (package + (name "python-itanium-demangler") + (version "1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + ;; PyPI only provides wheels and no source code. + (url "https://github.com/whitequark/python-itanium_demangler") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1q47aqm5z3db6pasdzw05d6236vnb8hnapfy88fcmn9dr5ym98r3")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (invoke "python" "-m" "unittest")))))))) + (home-page "https://github.com/whitequark/python-itanium_demangler/") + (synopsis "Pure Python Itanium C++ ABI demangler") + (description +"This Python module provides an implementation of the Itanium C++ ABI symbol +mangling language. The demangler generates an abstract syntax tree from +mangled symbols, which can be used for directly extracting type information.") + (license license:bsd-0))) + +(define-public python-angr + (package + (name "python-angr") + (version "9.2.112") + (source + (origin + ;; Fetching from Git as pypi release doesn't include all test files. + (method git-fetch) + (patches (search-patches "python-angr-check-exec-deps.patch")) + (uri (git-reference + (url "https://github.com/angr/angr") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1179926xbfh2930laz33p90vj532jk7g2qylzzpw1185yhlf9cis")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + ;; The constraint exists because of a capstone bug for which + ;; we backport a patch, hence we can relax the constraint. + ;; + ;; See https://github.com/angr/angr/issues/4656 + (substitute* "setup.cfg" + (("capstone==5.0.0.post1") + "capstone")) + ;; Relax constraint on python-rich, the constraint is too strict, + ;; angr work well with our packaged version of python-rich. + (substitute* "setup.cfg" + (("rich>=13.1.0") + "rich")) + (substitute* "tests/common.py" + (("\\[\"cc\"\\]") + "[\"gcc\"]"))))) + (replace 'check + (lambda* (#:key inputs tests? #:allow-other-keys) + (when tests? + (copy-recursively #$(this-package-native-input "binaries") + "../binaries") + (with-directory-excursion "tests" + ;; test_mips32_missing_offset_in_instructions fails + ;; with capstone 5 and passes with capstone 4. Might + ;; be a capstone regressions, needs investigation. + ;; + ;; test_concrete_memset is a non-deterministic benchmark. + (invoke "pytest" "-vv" "-x" "--dist" "loadfile" + "-k" "not test_mips32_missing_offset_in_instructions and not test_concrete_memset" + "-n" (number->string (parallel-job-count))))))) + (add-before 'build 'set-cc + (lambda _ + (setenv "CC" "gcc")))))) + (propagated-inputs (list python-ailment + python-archinfo + python-cachetools + python-cffi + python-claripy + python-cle + python-colorama + python-cppheaderparser + python-dpkt + python-gitpython + python-mulpyplexer + python-nampa + python-networkx + python-protobuf + python-psutil + python-itanium-demangler + python-pycparser + python-pyvex + python-pyformlang + python-rich + python-rpyc + python-sortedcontainers + python-sqlalchemy + python-sympy + python-unique-log-filter + unicorn)) + (native-inputs `(("python-pytest" ,python-pytest) + ("python-pytest-xdist" ,python-pytest-xdist) + ("binaries" + ;; This repository ships several binaries used only for testing + ;; purpose. The binaries are not executed and not part of the + ;; angr distribution, they are only used to test angr's binary + ;; analysis capabilities. In the context of the GNU FSDG, these + ;; files should be considered non-functional data. + ,(origin + (method git-fetch) + (uri (git-reference (url + "https://github.com/angr/binaries") + (commit (string-append "v" + version)))) + (file-name (git-file-name "angr-binaries" version)) + (sha256 (base32 + "0bxzf6alkczv9r0151ksvcwyksnw8077acz1wd8drbxw0zl0qnmr")))))) + (home-page "https://github.com/angr/angr") + (synopsis "Multi-architecture binary analysis toolkit") + (description + "This package provides a versatile binary analysis platform with the +ability to perform dynamic symbolic execution as well as various +static analyses directly on binaries. As such, it can be used for all +kinds of reverse engineering, vulnerability discovery, exploit +generation, and software testing purposes.") + (license license:bsd-2))) + (define-public python-peachpy ;; There is no tag in this repo. (let ((commit "913d74c35a6b1d330e90bfc055208ce5b06b35a0") @@ -33045,6 +35811,7 @@ PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings for the Go language tool chain; it adapts to different calling conventions and application binary interfaces (ABIs); it takes care of register allocation; it supports x86_64 instructions up to AVX-512 and SHA.") + (supported-systems '("x86_64-linux")) (license license:bsd-2)))) (define-public python-sgmllib3k @@ -33076,23 +35843,33 @@ Generalized Mark-up Language}.") (define-public python-cwcwidth (package (name "python-cwcwidth") - (version "0.1.4") + (version "0.1.9") (source (origin (method url-fetch) (uri (pypi-uri "cwcwidth" version)) (sha256 - (base32 - "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8")))) - (build-system python-build-system) + (base32 "1f3nvc4f2icg0c285bl6l4ak9km8pj9nxjb4s2n8qjld2jh137gi")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'build-extensions + (lambda _ + (invoke "python" "setup.py" "build_ext" "--inplace")))))) (native-inputs - (list python-cython python-pytest python-setuptools-scm python-toml + (list python-cython + python-pytest + python-setuptools + python-setuptools-scm + python-toml python-wheel)) - (home-page - "https://github.com/sebastinas/cwcwidth") + (home-page "https://github.com/sebastinas/cwcwidth") (synopsis "Python bindings for wc(s)width") - (description "This package provides bindings for wcwidth and wcswidth -functions defined in POSIX.1-2001 and POSIX.1-2008.") + (description + "This package provides bindings for wcwidth and wcswidth functions +defined in POSIX.1-2001 and POSIX.1-2008.") (license license:expat))) (define-public python-pyan3 @@ -33112,19 +35889,9 @@ functions defined in POSIX.1-2001 and POSIX.1-2008.") "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z")) (patches (search-patches "python-pyan3-fix-positional-arguments.patch" "python-pyan3-fix-absolute-path-bug.patch")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Extend PYTHONPATH so the built package will be found. - (setenv "GUIX_PYTHONPATH" - (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH"))) - (invoke "pytest"))))))) + (build-system pyproject-build-system) (native-inputs - (list python-pytest python-pytest-cov python-wheel)) + (list python-pytest python-pytest-cov python-setuptools python-wheel)) (propagated-inputs (list python-jinja2)) (home-page "https://github.com/Technologicat/pyan") @@ -33169,7 +35936,7 @@ function implementations based on the types of the arguments.") (sha256 (base32 "07xv92q7f4bkp6dzkqvcv0zxr11729qdak4s3ldmbhdwgsf44g5h")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/coady/multimethod") (synopsis "Python support for multiple argument dispatching") (description @@ -33198,6 +35965,34 @@ needed and registers the function with its annotations.") symbolic expressions in pure Python using the technique of logical unification.") (license license:bsd-3))) +(define-public python-looseversion + (package + (name "python-looseversion") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "looseversion" version)) + (sha256 + (base32 "17k625ws83lwksa7yyy4mn0i39lmxgrzxihn22l335dvyvrnbppb")))) + (build-system pyproject-build-system) + (arguments + (list + ;; No tests provided. + #:tests? #f)) + (native-inputs + (list python-hatchling)) + (home-page "https://github.com/effigies/looseversion") + (synopsis "Version numbering for anarchists and software realists") + (description + "This package provides a drop-in replacement for the original +@code{LooseVersion}. It implements an identical interface and comparison +logic to @code{LooseVersion}. The only major change is that a +@code{looseversion.LooseVersion} is comparable to a +@code{distutils.version.LooseVersion}, which means tools should not need to +worry whether all dependencies that use LooseVersion have migrated.") + (license license:psfl))) + (define-public python-cons (package (name "python-cons") @@ -33446,6 +36241,28 @@ quite huge, this Guix package doesn't depend on pandas. In case, just also install @code{python-pandas}.") (license license:expat))) +(define-public python-taskgroup + (package + (name "python-taskgroup") + (version "0.0.0a4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "taskgroup" version)) + (sha256 + (base32 "170m7b59nxrhzs0nz6brj9brz4rzvw6k587ja0cnc9qy48nr027b")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ; no tests in PyPI and Git checkout + (native-inputs + (list python-flit-core)) + (home-page "https://github.com/graingert/taskgroup") + (synopsis "Backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout") + (description + "This package provides a backport of @code{asyncio.TaskGroup}, +@code{asyncio.Runner} and @code{asyncio.timeout}.") + (license license:expat))) + (define-public python-csb43 (package (name "python-csb43") @@ -33610,19 +36427,21 @@ compatible with a wide range of versions of the Stripe API.") (define-public python-platformdirs (package (name "python-platformdirs") - (version "3.10.0") + (version "4.2.1") (source (origin (method url-fetch) (uri (pypi-uri "platformdirs" version)) (sha256 - (base32 "0vbzyw1k6wvg8gv9cg99ds5pri007c6rqx9668d6kk6pnbd9cmml")))) + (base32 "1pwv0fvr6xzykv6dyibp7y3ac66j2w2arsnwh8zcagn69s6x2703")))) (build-system pyproject-build-system) (native-inputs (list python-appdirs + python-covdefaults python-hatchling python-hatch-vcs python-pytest + python-pytest-cov python-pytest-mock)) (home-page "https://github.com/platformdirs/platformdirs") (synopsis "Determine the appropriate platform-specific directories") @@ -33761,7 +36580,7 @@ and powerful way to handle real-world data, featuring: (propagated-inputs (list python-msgpack python-ruamel.yaml python-tomli python-tomli-w)) (native-inputs - (list python-cython python-pytest python-wheel)) + (list python-cython python-pytest python-setuptools python-wheel)) (home-page "https://github.com/cdgriffith/Box") (synopsis "Advanced Python dictionaries with dot notation access") (description @@ -33911,49 +36730,35 @@ Python @code{set} interface.") "0fj2ffvzfvjf4d7f672h5x5fzq26f8hax9j3dfsix158fwm0212w")) (patches (search-patches "dynaconf-unvendor-deps.patch")) (modules '((guix build utils))) - (snippet '(begin - ;; Remove vendored dependencies - (let ((unvendor '("click" "dotenv" "ruamel" "toml"))) - (with-directory-excursion "dynaconf/vendor" - (for-each delete-file-recursively unvendor))) - ;; Lower coverage quality gate for unit tests - (substitute* ".coveragerc" - (("fail_under = 95") "fail_under = 50")))))) + ;; Remove vendored dependencies + (snippet '(let ((unvendor '("click" "dotenv" "ruamel" "toml"))) + (with-directory-excursion "dynaconf/vendor" + (for-each delete-file-recursively unvendor)))))) (build-system pyproject-build-system) (arguments `(#:test-flags - '("-k" - ,(let ((click-tests '("test_negative_get" - "test_inspect_invalid_format"))) - ;; Disable integration tests - (string-append "not integration and not " - ;; These tests fail because we use Click 8.* instead of - ;; Click 7 - (string-join click-tests " and not ")))) + '("--ignore=tests/test_vault.py" ; depend on hvac and a live Vault + "-k" ,(let ((click-tests '("test_negative_get" + "test_inspect_invalid_format"))) + ;; Disable integration tests + (string-append "not integration and not " + ;; These tests fail because we use Click 8.* + ;; instead of Click 7 + (string-join click-tests " and not "))) + "tests") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-for-click-8 (lambda _ (substitute* "dynaconf/cli.py" (("click.get_os_args\\()") ;deprecated from Click 8.1+ - "sys.argv[1:]")))) - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - ;; These tests depend on hvac and a live Vault process. - (delete-file "tests/test_vault.py") - (apply invoke - `("py.test" ,@test-flags "-v" - "--cov-config" ".coveragerc" - "--cov=dynaconf" - "-l" "--tb=short" - "--maxfail=1" "tests/")))))))) + "sys.argv[1:]"))))))) (propagated-inputs (list python-click python-configobj python-dotenv-0.13.0 python-ruamel.yaml-0.16 python-toml python-tomli)) (native-inputs (list python-django python-flask python-pytest python-pytest-cov - python-pytest-mock)) + python-pytest-mock python-setuptools python-wheel)) (home-page "https://www.dynaconf.com/") (synopsis "The dynamic configurator for your Python project") (description @@ -34130,7 +36935,7 @@ of several plugins.") (arguments (list #:test-flags '(list "-k" "not test_execute"))) (propagated-inputs (list python-cloudpickle python-importlib-metadata)) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://pydoit.org") (synopsis "Automation tool to execute any kind of task in a build-tools fashion") @@ -34184,6 +36989,7 @@ to: (build-system pyproject-build-system) (arguments (list #:tests? #false)) ;no tests (propagated-inputs (list python-doit python-rich-click)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/pydoit/pydevtool") (synopsis "CLI dev tools powered by pydoit") (description "This package provides command line tools, powered by pydoit. @@ -34201,7 +37007,14 @@ these linters: @code{pycodestlye}, @code{pyflakes}") (uri (pypi-uri "Nikola" version)) (sha256 (base32 "1h96y4sfypp2fbqxa8xrqch5f7r3srm2ly222k9w2n143h2spx4m")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (native-inputs + (list nss-certs-for-test + python-freezegun + python-pytest + python-pytest-cov + python-setuptools + python-wheel)) (propagated-inputs (list python-babel python-blinker @@ -34224,21 +37037,6 @@ these linters: @code{pycodestlye}, @code{pyflakes}") python-toml python-unidecode python-yapsy)) - (native-inputs - (list python-coverage - python-flake8 - python-freezegun - python-pytest - python-pytest-cov)) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "tests" "--no-cov" - "-k" "not test_compiling_markdown[hilite]"))))))) (home-page "https://getnikola.com/") (synopsis "Modular, fast and simple static website and blog generator") (description "Nikola generates static websites and blogs. Out of the box, @@ -34353,6 +37151,7 @@ Python, with static types.") "0cas3cjkhrvsz2rmqnhqiihy9j79wxi9xbih8jk0p9r48c2q3iyy")))) (build-system pyproject-build-system) (propagated-inputs (list python-types-urllib3)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/python/typeshed") (synopsis "Typing stubs for requests") (description "This package provides typing stubs for requests.") @@ -34385,6 +37184,7 @@ Python, with static types.") (base32 "0zcipjdnbnc8ymk8mh9n5mypa0qr03rqj98lbmahldcdrrap6md1")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/python/typeshed") (synopsis "Typing stubs for urllib3") (description "This package provides typing stubs for urllib3.") @@ -34402,6 +37202,7 @@ Python, with static types.") "1vdwp1jjg27b22qxgm49v21nb8vm1iki3bfsm0fnq2rsz5alfwz2")))) (build-system pyproject-build-system) (propagated-inputs (list python-importlib-resources)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/JelleZijlstra/typeshed_client") (synopsis "Library for accessing stubs in typeshed") (description @@ -34485,6 +37286,27 @@ async I/O support.") "This package adds ANSI colors and decorations to your strings.") (license license:isc))) +(define-public python-types-dateutil + (package + (name "python-types-dateutil") + (version "2.9.0.20240316") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-python-dateutil" version)) + (sha256 + (base32 "00h2xi8p6ygdv9nhgwdyx86ky9m9dpdqgmsdji05x4461cj2wbsx")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; no tests + (native-inputs + (list python-pytest python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-dateutil") + (description + "This is a PEP 561 type stub package for the @code{python-dateutil} +package.") + (license license:asl2.0))) + (define-public python-types-freezegun (package (name "python-types-freezegun") @@ -34634,7 +37456,13 @@ writing STL files. It supports both the text and binary forms of STL.") "0hzshd665rl1bkwvaj9va4j3gs8nmb478fbvligx20663xhmzfzp")))) (build-system python-build-system) (propagated-inputs (list python-six)) - (native-inputs (list python-pyyaml python-mock python-pytest-cov)) + (native-inputs + (list python-mock + python-pytest + python-pytest-cov + python-pyyaml + python-setuptools + python-wheel)) (arguments `(#:phases (modify-phases %standard-phases ;; There is a bug in the test_suit specification. @@ -34709,30 +37537,22 @@ adapted from the @code{packaging} package.") (define-public python-shtab (package (name "python-shtab") - (version "1.5.3") + (version "1.7.1") (source (origin (method url-fetch) (uri (pypi-uri "shtab" version)) (sha256 - (base32 "127mymfm7r0hddk2vknqq34fj6dirj6ip990i3g4isx0lsd7pnsc")))) - (build-system python-build-system) + (base32 "0g14778c5zgiq6b92k40n9irp75c5vcsvl5541cw8bmqxq1cnjsf")))) + (build-system pyproject-build-system) (native-inputs (list bash python-pytest python-pytest-cov python-pytest-timeout + python-setuptools python-setuptools-scm python-wheel)) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace - 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest"))))))) (home-page "https://github.com/iterative/shtab") (synopsis "Automagic shell tab completion for Python CLI applications") (description @@ -34806,7 +37626,9 @@ than trying to just split strings.") python-pytest-timeout python-mock python-numpy - python-psutil)) + python-psutil + python-setuptools + python-wheel)) (home-page "https://github.com/explosion/srsly") (synopsis "Serialization utilities for Python") (description "This package bundles some of the best Python serialization @@ -35001,13 +37823,13 @@ implementing a pre-defined interface.") (name "python-itemloaders") (version "1.1.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "itemloaders" version)) - (sha256 - (base32 "0j2aw4ipalj208594x80blpgkh1i63gqqa4nb67b823av9hirn11")))) + (origin + (method url-fetch) + (uri (pypi-uri "itemloaders" version)) + (sha256 + (base32 "0j2aw4ipalj208594x80blpgkh1i63gqqa4nb67b823av9hirn11")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (propagated-inputs (list python-itemadapter python-jmespath python-parsel python-w3lib)) (home-page "https://github.com/scrapy/itemloaders") @@ -35032,6 +37854,7 @@ parsing rules in a single place.") (sha256 (base32 "0g4cn522n4dv6ly8pwf97dc62rr4f7my38v0bh6vmac7jmrip7pv")))) (build-system pyproject-build-system) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/pR0Ps/iterable-io") (synopsis "Adapt generators and other iterables to a file-like interface") (description @@ -35058,7 +37881,7 @@ objects.") (base32 "1irw4sqrsgpc0ibxdv1hlx0d0jr1fqs48bj6mpfylzqkag9ywlfj")))) (build-system pyproject-build-system) (native-inputs - (list python-pytest)) + (list python-pytest python-setuptools python-wheel)) (home-page "https://github.com/cgdeboer/iteround") (synopsis "Sum-safe rounding for Iterables") (description "Iteround is a standard library sum-safe rounding library for @@ -35108,30 +37931,26 @@ to Github via gh-pages.") (define-public python-arpeggio (package (name "python-arpeggio") - (version "2.0.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "Arpeggio" version)) - (sha256 - (base32 - "0ggdsck1wpladd5bh9drhkmm86bblgk2wagrhn3sdf4v04wkic6n")))) - (build-system python-build-system) - (native-inputs (list python-coverage - python-coveralls - python-flake8 - python-mike - python-mkdocs - python-pytest - python-pytest-runner - python-twine - python-wheel)) + (version "2.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Arpeggio" version)) + (sha256 + (base32 "00571cmdxw8w8khzscb085kfqv2hgxdzpyz4d3a2sv92dsqb5467")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) (home-page "https://github.com/textX/Arpeggio") (synopsis "Packrat parser interpreter for Python") (description - "This Python library provides a recursive descent parser with backtracking -and memoization (a.k.a. packrat parser). Arpeggio grammars are based on PEG -formalism. Arpeggio's main use is a foundation for a toolchain for DSL -development but it can be used for all sorts of general purpose parsing.") + "This Python library provides a recursive descent parser with +backtracking and memoization (a.k.a. packrat parser). Arpeggio grammars are +based on PEG formalism. Arpeggio's main use is a foundation for a toolchain +for DSL development but it can be used for all sorts of general purpose +parsing.") (license license:expat))) (define-public python-flatten-json @@ -35172,7 +37991,10 @@ object, which can be useful if you want to force your objects into a table.") python-mock python-numpy python-pytest - python-pyyaml)) + python-pyyaml + python-setuptools + python-wheel + python-toml)) (home-page "https://github.com/seperman/deepdiff") (synopsis "Deep difference and search of any Python object/data") (description @@ -35201,7 +38023,9 @@ other.") (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) (native-inputs (list python-setuptools-scm - python-pytest)) + python-pytest + python-setuptools + python-wheel)) (home-page "https://deepmerge.readthedocs.io/en/latest/") (synopsis "Merge nested data structures") (description @@ -35545,6 +38369,33 @@ terminal. It has red, blue, green, yellow, purple and black/white (default) colors.") (license license:expat))) +(define-public python-mido + (package + (name "python-mido") + (version "1.3.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "mido" version)) + (sha256 + (base32 + "0j63cydiinfyrvlhydzsb00cb7dyvrw3bnhjbdyp63vkxnv2isis")))) + (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + ;; This package requires python-packaging~=23.1 which is not yet + ;; updated to. As per pyproject.toml, it is required to provide + ;; a nice version_info opbject. + ;; TODO: After updating python-packaging, fix this. + (delete 'sanity-check)))) + (propagated-inputs (list python-importlib-metadata python-packaging)) + (native-inputs (list python-pytest)) + (home-page "https://mido.readthedocs.io/en/stable/") + (synopsis "MIDI Objects for Python") + (description "This library is for working with MIDI 1.0 ports, messages and +files.") + (license license:expat))) + (define-public python-musical-scales (package (name "python-musical-scales") @@ -35626,7 +38477,7 @@ versa. Extended WKB/WKT are also supported.") (base32 "1c0xx3p3lzrlyqhmccyq9c50f8v9pqk2992gb4nl50h2yy1m3s8v")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest)) + (native-inputs (list python-pytest python-setuptools python-wheel)) (home-page "https://nedbatchelder.com/code/cog") (synopsis "Content generation tool that leverages Python") (description "Cog is a file generation tool. It allows using pieces of @@ -35657,7 +38508,7 @@ and @code{bspatch4}.") (define-public python-mpv (package (name "python-mpv") - (version "1.0.1") + (version "1.0.7") (source (origin ;; python-mpv from pypi does not include the tests directory. @@ -35667,28 +38518,14 @@ and @code{bspatch4}.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "10w6j3n62ap45sf6q487kz8z6g58sha37i14fa2hhng794z7a8jh")) - (modules '((guix build utils))) - (snippet - #~(begin - ;; One of the tests never completes, so neutering it using - ;; early return allows other test to run without issue. - (substitute* "tests/test_mpv.py" - ;; Note the typo in "prooperty" - this was fixed later in - ;; upstream but has no effect on whether the tests hangs or not. - (("test_wait_for_prooperty_event_overflow.*" line) - ;; The long whitespace between \n and return is to match the - ;; identation level, which is significant in python. - (string-append line "\n return\n"))))))) - (build-system python-build-system) + (base32 "102fajzrcgxapsanh0phlqmk9q2v95bvix6mrkg8rypv717idins")))) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'build 'patch-reference-to-mpv (lambda* (#:key inputs #:allow-other-keys) - ;; Without an absolute path it is not able find and - ;; load the libmpv library. + ;; Without an absolute path it is not able find and load libmpv. (substitute* "mpv.py" (("sofile = .*") (string-append "sofile = \"" @@ -35699,11 +38536,17 @@ and @code{bspatch4}.") ;; Fontconfig throws errors when it has no cache dir to use. (setenv "XDG_CACHE_HOME" (getcwd)) ;; Some tests fail without a writable and readable HOME. - (setenv "HOME" (getcwd))))))) + (setenv "HOME" (getcwd)) + (setenv "PY_MPV_SKIP_TESTS" + "test_wait_for_property_event_overflow")))))) (native-inputs - (list python-xvfbwrapper)) ; needed for tests only + (list python-pytest + python-pyvirtualdisplay + python-setuptools + python-xvfbwrapper + python-wheel)) (inputs (list mpv)) - (propagated-inputs (list python-pillow)) ; for raw screenshots + (propagated-inputs (list python-pillow)) ;for raw screenshots (home-page "https://github.com/jaseg/python-mpv") (synopsis "Python interface to the mpv media player") (description @@ -35771,7 +38614,7 @@ window managers.") (define-public i3-autotiling (package (name "i3-autotiling") - (version "1.8") + (version "1.9.1") (source (origin (method git-fetch) (uri (git-reference @@ -35780,7 +38623,7 @@ window managers.") (file-name (git-file-name name version)) (sha256 (base32 - "1nsm0gd45ys4ghlzrvjrf0lvcyhvpx58lz8gg325a762wn5a4a72")))) + "010sw3b2nx5cl578drd3xj58wlza76zkzh1jhsp44chg1vvhacrx")))) (build-system python-build-system) (arguments (list #:tests? #f)) ;no tests (native-inputs (list python-wheel)) @@ -35879,7 +38722,7 @@ etc. to check code that uses @code{orjson}.") (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'prepare-python-module 'build-python-module + (add-after 'build 'build-python-module (assoc-ref py:%standard-phases 'build)) (add-after 'build-python-module 'install-python-module (assoc-ref py:%standard-phases 'install))) @@ -36076,7 +38919,10 @@ path.") python-ruamel.yaml python-slugify python-tornado - tzdata-for-tests)) + tzdata-for-tests + python-setuptools + python-wheel + python-toml)) (home-page "https://github.com/spanezz/staticsite") (synopsis "Static site generator") (description "Statistic is a static site generator based on Markdown and @@ -36144,18 +38990,23 @@ markdown-compliant strings.") (define-public python-yattag (package (name "python-yattag") - (version "1.15.1") + (version "1.16.1") (source (origin (method url-fetch) (uri (pypi-uri "yattag" version)) (sha256 - (base32 "05p4dgdp8wwvnsvcv7n4zn8k602w345kw4vq67s9d792w55sa3wn")))) - (build-system python-build-system) + (base32 "1x2is0lkpywvqaayc21n1cvfbq0havzx46i83033wpgawxag5a5s")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (home-page "https://www.yattag.org/") (synopsis "HTML or XML generator for Python") (description - "Yattag is a Python library for generating HTML or XML in a pythonic way.") - (home-page "https://www.yattag.org/") + "Yattag is a Python library for generating HTML or XML in a pythonic +way.") (license license:lgpl2.1))) (define-public python-zbarlight @@ -36169,8 +39020,9 @@ markdown-compliant strings.") (base32 "1v5c9bim8af6g8kgxp2dhm96n5vkr8sqi56w0bdh1xy49v03lw3g")))) (build-system pyproject-build-system) - (propagated-inputs (list python-pillow)) + (propagated-inputs (list python-pillow python-setuptools)) (inputs (list zbar)) + (native-inputs (list python-wheel)) (home-page "https://github.com/Polyconseil/zbarlight") (synopsis "Simple Python wrapper for the zbar barcode library") (description "Zbarlight is a simple wrapper for the zbar library. It can @@ -36189,6 +39041,7 @@ read all zbar supported codes.") "0bqkrjxp2fbz34x3wxkxji39kxinypzg8q2994sibiay29mpipxb")))) (build-system pyproject-build-system) (inputs (list openssl)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://zeroc.com") (synopsis "RPC framework") (description @@ -36209,6 +39062,7 @@ interfaces.") (base32 "0fdp90mzy0sd4kyw8kd8kybd1ni765fvqn8hz2wx5sqbjjkm4d5k")))) (build-system pyproject-build-system) (propagated-inputs (list python-cffi python-typing-extensions)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/mideind/BinPackage") (synopsis "Vocabulary of the modern Icelandic language, in a Python package") @@ -36238,9 +39092,16 @@ forms, and about 300,000 distinct lemmas.") ;; https://github.com/gruns/icecream/issues/144 (string-append "not testEnableDisable" " and not testSingledispatchArgumentToString")))) - (propagated-inputs (list python-asttokens python-colorama python-executing - python-pygments)) - (native-inputs (list python-hypothesis python-pytest)) + (native-inputs + (list python-hypothesis + python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-asttokens + python-colorama + python-executing + python-pygments)) (home-page "https://github.com/gruns/icecream") (synopsis "Single function call to debug variables, expressions, and program execution") @@ -36261,6 +39122,7 @@ with one function call. IceCream makes print debugging a little sweeter.") (base32 "1ajcjngvr4rlgb0q6p6vjz2sncwhvq3msjy6qaiz5g37vgvw2ij8")))) (build-system pyproject-build-system) (propagated-inputs (list python-cffi)) + (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/mideind/Icegrams") (synopsis "Trigram statistics for Icelandic") (description @@ -36283,6 +39145,48 @@ write text fast, and for various text generation, statistics, and modeling tasks (base32 "0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2")))))) +(define-public python-xmp-toolkit + (package + (name "python-xmp-toolkit") + (version "2.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-xmp-toolkit" version)) + (sha256 + (base32 "12x6lyaxjpbl8ll3cj97039kwvsha2nkx2v8v8irfbi2p0dl721s")) + (patches (search-patches + "python-xmp-toolkit-add-missing-error-codes.patch")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" (string-append "not test_can_put_xmp and " + "not test_exempi_bad_combinations and " + "not test_formats and " + "not test_get_xmp and " + "not test_open_file_with_options")) + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'configure-environment + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((exempi #$(this-package-input "exempi"))) + (setenv "LD_LIBRARY_PATH" + (string-append exempi "/lib")))))))) + (inputs (list exempi)) + (propagated-inputs (list python-pytz)) + (native-inputs (list python-pytest)) + (home-page "https://github.com/python-xmp-toolkit/python-xmp-toolkit") + (synopsis "Python XMP Toolkit for working with metadata") + (description "Python XMP Toolkit is a library for working with XMP +metadata, as well as reading/writing XMP metadata stored in many different +file formats. + +Python XMP Toolkit is wrapping Exempi (using ctypes), a C/C++ XMP library +based on Adobe XMP Toolkit, ensuring that future updates to the XMP standard +are easily incorporated into the library with a minimum amount of work.") + (license license:bsd-3))) + ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar |