diff options
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 1371 |
1 files changed, 634 insertions, 737 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 38c182ca96..97837bcfec 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1,13 +1,13 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2013-2023 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, 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber <cwebber@dustycloud.org> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> @@ -114,7 +114,7 @@ ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com> ;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev> ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> -;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.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 drozdov <drozdov@portalenergy.tech> @@ -135,6 +135,7 @@ ;;; Copyright © 2023 Gabriel Wicki <gabriel@erlikon.ch> ;;; Copyright © 2023 Amade Nemes <nemesamade@gmail.com> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> +;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com> ;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw> ;;; ;;; This file is part of GNU Guix. @@ -969,7 +970,7 @@ Markdown. All extensions are found under the module namespace of pymdownx.") "0rv0cbala7ibjbaf6kkcn0mdhqdbajnvlcw0f15gwzfwg10g0z1q")))) (build-system python-build-system) (native-inputs - (list python-pytest-7.1 ;for pytest-subtests + (list python-pytest ;for pytest-subtests python-pytest-cov python-pytest-mpl python-pytest-subtests @@ -1060,7 +1061,7 @@ generator MkDocs.") (define-public python-slixmpp (package (name "python-slixmpp") - (version "1.5.2") + (version "1.8.3") (source (origin (method git-fetch) @@ -1072,7 +1073,7 @@ generator MkDocs.") (file-name (git-file-name name version)) (sha256 - (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx")))) + (base32 "0cvr037qhf0fpby5dci6ckqngaly1mnjs2zpndwgmvr3dyvrd8l8")))) (build-system python-build-system) (arguments `(#:phases @@ -1088,7 +1089,12 @@ generator MkDocs.") ("gnupg" ,gnupg) ("pkg-config" ,pkg-config))) (propagated-inputs - (list python-aiodns python-aiohttp python-pyasn1 + (list python-aiodns + python-aiohttp + python-cryptography + python-defusedxml + python-emoji + python-pyasn1 python-pyasn1-modules)) (inputs (list libidn python)) ; We are building a Python extension. @@ -1756,51 +1762,6 @@ compositions like @code{XOR} and @code{NAND} are emulated on top of them. Expressions are constructed from parsed strings or directly in Python.") (license license:bsd-2))) -(define-public python-hatchling - (package - (name "python-hatchling") - (version "1.13.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "hatchling" version)) - (sha256 - (base32 - "1isk1kqra0sm2sj2yp39sgk62mx0bp1jnbkwdcl3a1vjrji7blpq")))) - (build-system pyproject-build-system) - (arguments - (list - #:tests? #false ;there are none - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'do-not-depend-on-hatchling - (lambda _ - ;; We don't use hatchling. - (delete-file "pyproject.toml") - (call-with-output-file "pyproject.toml" - (lambda (port) - (format port "\ -[build-system] -build-backend = 'setuptools.build_meta' -requires = ['setuptools'] -"))) - (call-with-output-file "setup.cfg" - (lambda (port) - (format port "\ -[metadata] -name = hatchling -version = '~a' " #$version)))))))) - (propagated-inputs - (list python-editables - python-importlib-metadata - python-packaging - python-pathspec - python-pluggy - python-tomli)) - (home-page "https://pypi.org/project/hatchling/") - (synopsis "Extensible Python build backend") - (description "Hatchling is an extensible Python build backend.") - (license license:expat))) - (define-public python-hdf4 (package (name "python-hdf4") @@ -1864,14 +1825,14 @@ library.") (define-public python-h5py (package (name "python-h5py") - (version "3.6.0") + (version "3.8.0") (source (origin (method url-fetch) (uri (pypi-uri "h5py" version)) (sha256 (base32 - "0afv805vqrm5071g7alwv41920nhh8kjv4m5nbia9awj9a0x4ll7")))) + "0pyr6z4h2xqbp49yx2i1401gl6yqh03h771zslwcy0201hpxiskg")))) (build-system python-build-system) (arguments `(#:tests? #f ; no test target @@ -2351,8 +2312,20 @@ other machines, such as over the network.") (substitute* "setuptools/py33compat.py" (("html_parser.HTMLParser\\(\\).unescape") "html.unescape")) + ;; collections classes have moved in Python 3.10 + (substitute* "pkg_resources/_vendor/pyparsing.py" + (("collections.MutableMapping") + "collections.abc.MutableMapping") + (("collections.Iterable") + "collections.abc.Iterable")) ;; This needs distutils.msvc9compiler - (delete-file "setuptools/tests/test_msvc.py")))))) + (delete-file "setuptools/tests/test_msvc.py") + ;; See https://github.com/pypa/setuptools/issues/2558 + (delete-file "setuptools/command/bdist_wininst.py") + (substitute* "setuptools/command/install_scripts.py" + (("bw_cmd =.*") "\n") + (("is_wininst =.*") + "is_wininst = False\n"))))))) (native-inputs (list python-pytest python-mock python-six))))) @@ -2435,13 +2408,18 @@ language. It aims to be fast.") (define-public python-aenum (package (name "python-aenum") - (version "2.2.4") + (version "3.1.12") (source (origin (method url-fetch) (uri (pypi-uri "aenum" version)) (sha256 - (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1")))) + (base32 "1w1ffkcxgnimi5w8802qk6w2qxz9k8hpvsg6yy2zi08ahs8iqlry")) + (modules '((guix build utils))) + (snippet + ;; Delete the Python 2 specific files which won't compile + ;; in Python 3. + '(for-each delete-file (find-files "." "_py2.py$"))))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -3036,7 +3014,12 @@ standard.") "-v" "tests/" "-I" "greendns_test.py" "-I" "socket_test.py" - "-e" "test_018b_http_10_keepalive_framing"))))))) + "-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"))))))) (home-page "https://eventlet.net") (synopsis "Concurrent networking library for Python") (description @@ -3144,14 +3127,14 @@ lossless but can be tweaked for more aggressive cleaning.") (define-public python-mechanize (package (name "python-mechanize") - (version "0.4.5") + (version "0.4.7") (source (origin (method url-fetch) (uri (pypi-uri "mechanize" version)) (sha256 (base32 - "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3")))) + "02b845y85ka5sl2cj93lll3v326d8bww07bq1q0y1643h7sshwqp")))) (build-system python-build-system) (propagated-inputs (list python-html5lib)) @@ -3556,6 +3539,7 @@ and is not compatible with JSON.") (build-system python-build-system) (arguments (list + #:tests? #f ;TODO: Circular dependency on pytest #:phases #~(modify-phases %standard-phases ;; XXX: PEP 517 manual build/install procedures copied from @@ -3575,7 +3559,7 @@ and is not compatible with JSON.") (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "pytest" "-vv" "tests"))))))) - (native-inputs (list python-flit-scm python-pypa-build python-pytest)) + (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 @@ -3738,14 +3722,14 @@ port forwards using @acronym{UPnP, Universal Plug and Play}.") (define-public python-py (package (name "python-py") - (version "1.10.0") + (version "1.11.0") (source (origin (method url-fetch) (uri (pypi-uri "py" version)) (sha256 (base32 - "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11")))) + "06c7m7sfcn7587xd4s2bng8m6q1gsfd3j93afhplfjq74r0mrisi")))) (build-system python-build-system) (arguments ;; FIXME: "ImportError: 'test' module incorrectly imported from @@ -3971,7 +3955,7 @@ with sensible defaults out of the box.") "010j9zz0gd2za5l4hibicypnfw721x0gxp3rr0329bc97vw5maha")))) (build-system python-build-system) (propagated-inputs - (list python-pillow python-toml python-numpy-next python-attrs)) + (list python-pillow python-toml python-numpy python-attrs)) (inputs (list libx11 libpng libxcursor)) (native-inputs (list python-wheel)) (home-page "https://github.com/ful1e5/clickgen") @@ -4075,37 +4059,6 @@ compare, diff, and patch JSON and JSON-like structures in Python.") (define-public python-jsonschema (package (name "python-jsonschema") - (version "3.2.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "jsonschema" version)) - (sha256 - (base32 - "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (setenv "JSON_SCHEMA_TEST_SUITE" "json") - (invoke "trial" "jsonschema"))))))) - (native-inputs - `(("python-setuptools_scm" ,python-setuptools-scm) - ("python-twisted" ,python-twisted))) - (propagated-inputs - (list python-attrs python-pyrsistent python-six)) - (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))) - -;;; TODO: Make the default python-jsonschema on core-updates -(define-public python-jsonschema-next - (package - (inherit python-jsonschema) ;; XXX: Update to the latest version requires new build system - Hatch ;; https://hatch.pypa.io/ (version "4.5.1") @@ -4116,13 +4069,50 @@ compare, diff, and patch JSON and JSON-like structures in Python.") (sha256 (base32 "1z0x22691jva7lwfcfh377jdmlz68zhiawxzl53k631l34k8hvbw")))) (build-system pyproject-build-system) - (native-inputs - (list python-setuptools-scm python-twisted)) + (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'. + (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)) (propagated-inputs (list python-attrs python-importlib-metadata python-pyrsistent - python-typing-extensions)))) + python-typing-extensions)) + (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))) + +(define-public python-jsonschema-3 + (package + (inherit python-jsonschema) + (version "3.2.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "jsonschema" version)) + (sha256 + (base32 + "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68")))) + (arguments + (substitute-keyword-arguments (package-arguments python-jsonschema) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'pretend-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))))) (define-public python-schema (package @@ -4350,6 +4340,18 @@ JavaScript-like message boxes. Types of dialog boxes include: (base32 "1ynkqpv2akldmvkll5vh5zhwj433s1d59iv0f76lygyak4silgwr")))) (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'skip-broken-test + (lambda _ + ;; FIXME: This test fails for no good reason: + ;; https://github.com/pympler/pympler/issues/153 + (substitute* "test/muppy/test_tracker.py" + (("^([[:blank:]]+)def test_stracker_create_summary" all indent) + (string-append indent "@unittest.skipIf(True, \ +'Fails on Guix too for unknown reasons')\n" all)))))))) (synopsis "Measure, monitor and analyze memory behavior") (description "Pympler is a development tool to measure, monitor and analyze @@ -4609,14 +4611,14 @@ possible.") (define-public python-markupsafe (package (name "python-markupsafe") - (version "2.0.1") + (version "2.1.1") (source (origin (method url-fetch) (uri (pypi-uri "MarkupSafe" version)) (sha256 (base32 - "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r")))) + "0jqxp5sfrc0byp6bk0gwdmildi4mck2gprp42afri3z4r5y1k4bz")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -4801,13 +4803,13 @@ bookmarks using a declarative input in the form of a markdown file.") (define-public python-joblib (package (name "python-joblib") - (version "1.1.0") + (version "1.1.1") (source (origin (method url-fetch) (uri (pypi-uri "joblib" version)) (sha256 (base32 - "0d8ypyhsw1bjr96zan9ms8wbvnzbjqxniq4vcszghcrps7ngqn21")))) + "0019p280s2k941mihl67l7y6amwx86639xp3zvpsg1lmyish67rh")))) (build-system python-build-system) (arguments `(#:phases @@ -5056,14 +5058,13 @@ leaf preserving the overall structure.") (define-public python-docutils (package (name "python-docutils") - (version "0.17.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "docutils" version)) - (sha256 - (base32 - "09gii36lp1bs26cpxqyfd20xahnpbrbjzcnba2xq08y3wk97frb8")))) + (version "0.19") + (source (origin + (method url-fetch) + (uri (pypi-uri "docutils" version)) + (sha256 + (base32 + "1rprvir116g5rz2bgzkzgyn6mv0z8582rz7bgxbpy2y3adkmm69k")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -5071,8 +5072,7 @@ leaf preserving the overall structure.") (lambda* (#:key tests? #:allow-other-keys) (if tests? (invoke "python" "test/alltests.py") - (format #t "test suite not run~%")) - #t))))) + (format #t "test suite not run~%"))))))) (home-page "https://docutils.sourceforge.net/") (synopsis "Python Documentation Utilities") (description @@ -5086,18 +5086,6 @@ via commands such as @command{rst2man}, as well as supporting Python code.") ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+)))) -;; TODO: Make this the default in the next rebuild cycle. -(define-public python-docutils-0.19 - (package - (inherit python-docutils) - (version "0.19") - (source (origin - (method url-fetch) - (uri (pypi-uri "docutils" version)) - (sha256 - (base32 - "1rprvir116g5rz2bgzkzgyn6mv0z8582rz7bgxbpy2y3adkmm69k")))))) - ;; awscli refuses to be built with docutils < 0.16. (define-public python-docutils-0.15 (package @@ -5493,7 +5481,7 @@ operating_system/path_expansion.robot"))) (invoke "xvfb-run" "atest/run.py"))))))) (native-inputs (list python-docutils - python-jsonschema-next + python-jsonschema python-invoke python-lxml python-pygments @@ -6129,25 +6117,6 @@ and integrated feature-set for programming Python effectively.") (define-public python-language-server (deprecated-package "python-language-server" python-lsp-server)) -(define-public python-pathspec - (package - (name "python-pathspec") - (version "0.9.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pathspec" version)) - (sha256 - (base32 - "1cdbdb3s6ldnjpwbi0bgl0xlmw4mbfxk08bbdxc3srx26na4jr75")))) - (build-system python-build-system) - (home-page "https://github.com/cpburnz/python-path-specification") - (synopsis "Utility library for gitignore style pattern matching of file paths") - (description - "This package provides a utility library for gitignore style pattern -matching of file paths.") - (license license:mpl2.0))) - (define-public python-black (package (name "python-black") @@ -6367,7 +6336,7 @@ writing C extensions for Python as easy as Python itself.") (define-public python-numpy (package (name "python-numpy") - (version "1.21.6") + (version "1.23.2") (source (origin (method url-fetch) @@ -6376,7 +6345,7 @@ writing C extensions for Python as easy as Python itself.") version "/numpy-" version ".tar.gz")) (sha256 (base32 - "0b0c5y35rd3mvwfk5is1d5ppfw9nl4d2rgx9xkwh1p0w394wdvyl")))) + "00bx3idjwhmzkdawg2dx1bp0316ig37jfx0dm82bvyv1hbj013dp")))) (build-system python-build-system) (arguments (list @@ -6398,7 +6367,10 @@ writing C extensions for Python as easy as Python itself.") [openblas] libraries = openblas library_dirs = ~a/lib -include_dirs = ~:*~a/include~%" #$(this-package-input "openblas")))))) +include_dirs = ~:*~a/include~%" + (dirname (dirname + (search-input-file + inputs "include/openblas_config.h")))))))) (add-before 'build 'fix-executable-paths (lambda* (#:key inputs #:allow-other-keys) ;; Make /gnu/store/...-bash-.../bin/sh the default shell, @@ -6422,7 +6394,20 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas")))))) ;; These tests may fail on 32-bit systems (see: ;; https://github.com/numpy/numpy/issues/18387). "not test_float_remainder_overflow " - "and not test_pareto" + "and not test_pareto " + ;; The 'test_rint_big_int' test fails on older + ;; x86_64 CPUs such as the Core 2 Duo (see: + ;; https://github.com/numpy/numpy/issues/22170). + "and not test_rint_big_int " + ;; The huge_array test is too large for 32-bit (see: + ;; https://bugs.gentoo.org/843599 and + ;; https://bugs.gentoo.org/846548). + ;; TestKind.test_all is a Fortran type failure + ;; that may be toolchain or environment related. + #$@(if (or (target-x86?) (target-arm32?)) + `(" and not test_identityless_reduction_huge_array" + " and not (TestKind and test_all)") + '()) ;; These tests seem to fail on machines without ;; an FPU is still under investigation upstream. ;; https://github.com/numpy/numpy/issues/20635 @@ -6432,9 +6417,10 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas")))))) '()))))))))) (native-inputs (list python-cython - python-hypothesis-next + python-hypothesis python-pytest python-pytest-xdist + python-typing-extensions gfortran)) (inputs (list bash openblas)) (home-page "https://numpy.org") @@ -6448,22 +6434,6 @@ capabilities.") '((upstream-name . "numpy"))) (license license:bsd-3))) -(define-public python-numpy-next - (package - (inherit python-numpy) - (name "python-numpy-next") - (version "1.22.3") - (source - (origin - (inherit (package-source python-numpy)) - (method url-fetch) - (uri (string-append - "https://github.com/numpy/numpy/releases/download/v" - version "/numpy-" version ".tar.gz")) - (sha256 - (base32 - "19dw91pqbqcniw2z57kiyqs1qp56g7kqy1bdyv664g8s62sc01m9")))))) - (define-public python-numpy-documentation (package (inherit python-numpy) @@ -6832,36 +6802,47 @@ debugger, with which it shares the same interface.") (license license:bsd-3))) (define-public python-pdbpp - (package - (name "python-pdbpp") - (version "0.10.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pdbpp" version)) - (sha256 - (base32 - "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (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 + ;; 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 @@ -6871,7 +6852,7 @@ includes the following improvements compared to @code{pdb}: @item smart command parsing @item additional convenience functions in the @code{pdb} module. @end itemize") - (license license:bsd-3))) + (license license:bsd-3)))) (define-public python-pdftotext (package @@ -6971,23 +6952,18 @@ parse and apply unified diffs. It has features such as: (define-public python-numpydoc (package (name "python-numpydoc") - (version "1.2.1") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "numpydoc" version)) (sha256 (base32 - "1xjsli2fqks4iv3524v1d329siad7bbsi4kr174zvhsl1pnjds3w")))) + "0k2z3g4s3w39h1nd293542hl9qv55j29gcr3bkia0rr3ldsppnxh")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "setup.py" - (("'Jinja2>=2.10,<3.1'") - "'Jinja2>=2.10'")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -7004,14 +6980,14 @@ parse and apply unified diffs. It has features such as: (define-public python-numexpr (package (name "python-numexpr") - (version "2.7.3") + (version "2.8.4") (source (origin (method url-fetch) (uri (pypi-uri "numexpr" version)) (sha256 (base32 - "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3")))) + "0iv1h1lvry5vmzqyvwxfbckyhzm1vbb1bmhmj4dnj64d84vjahym")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; no tests included (propagated-inputs @@ -7209,16 +7185,23 @@ tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk")))))) (invoke "pytest" "-n" (number->string (parallel-job-count)) "-m" "not network" "--pyargs" "matplotlib" - ;; The 'test_lazy_auto_backend_selection' fails - ;; because it would require an X server; skip it. - "-k" "not test_lazy_auto_backend_selection")))))))) + "-k" + (string-append + ;; The 'test_lazy_auto_backend_selection' fails + ;; because it would require an X server; skip it. + "not test_lazy_auto_backend_selection" + ;; test_getattr fails for the GTK backend because + ;; of an unexpected warning from Python 3.10 + ;; (via the gi module): + ;; https://gitlab.gnome.org/GNOME/pygobject/-/issues/494 + " and not test_getattr"))))))))) (propagated-inputs (list gobject-introspection python-cairocffi python-certifi python-cycler python-dateutil - python-fonttools + python-fonttools-minimal python-kiwisolver python-numpy python-packaging @@ -7694,31 +7677,43 @@ by pycodestyle.") (define-public python-distlib (package (name "python-distlib") - (version "0.3.1") + (version "0.3.5") (source (origin (method url-fetch) - (uri (pypi-uri "distlib" version ".zip")) + (uri (pypi-uri "distlib" version)) (sha256 (base32 - "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd")))) + "1zmjraasgqkz0gfv4mc4w4fj4k2fxj62h1pf5dgb5qqbqwvmgxx7")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'no-/bin/sh - (lambda _ - (substitute* '("distlib/scripts.py" "tests/test_scripts.py") - (("/bin/sh") (which "sh"))) - #t)) - (add-before 'check 'prepare-test-env - (lambda _ - (setenv "HOME" "/tmp") - ;; NOTE: Any value works, the variable just has to be present. - (setenv "SKIP_ONLINE" "1") - #t))))) - (native-inputs (list unzip)) - (home-page "https://bitbucket.org/pypa/distlib") + (list + #:phases + #~(modify-phases %standard-phases + (replace 'build + (lambda _ + ;; ZIP does not support timestamps before 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (add-before 'build 'no-/bin/sh + (lambda _ + (substitute* '("distlib/scripts.py" "tests/test_scripts.py") + (("/bin/sh") (which "sh"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (setenv "HOME" "/tmp") + ;; NOTE: Any value works, the variable just has to be present. + (setenv "SKIP_ONLINE" "1") + (when tests? + (invoke "pytest" "-vv")))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl))))))) + (native-inputs + (list python-pypa-build python-pytest)) + (home-page "https://github.com/pypa/distlib") (synopsis "Distribution utilities") (description "Distlib is a library which implements low-level functions that relate to packaging and distribution of Python software. It is intended to be @@ -7824,7 +7819,6 @@ retrieve text and metadata from PDFs as well as merge entire files together.") (package (name "python-pillow") (version "9.2.0") - (replacement python-pillow/security-fixes) (source (origin (method url-fetch) (uri (pypi-uri "Pillow" version)) @@ -7833,7 +7827,9 @@ retrieve text and metadata from PDFs as well as merge entire files together.") "011wgm1mssjchpva9wsi2a07im9czyjvik137xlp5f0g7vykdrkm")) (modules '((guix build utils))) (snippet '(begin - (delete-file-recursively "src/thirdparty"))))) + (delete-file-recursively "src/thirdparty"))) + (patches + (search-patches "python-pillow-CVE-2022-45199.patch")))) (build-system python-build-system) (native-inputs (list python-pytest)) (inputs (list freetype @@ -7872,10 +7868,6 @@ a general image processing tool.") "http://www.pythonware.com/products/pil/license.htm" "The PIL Software License")))) -(define python-pillow/security-fixes - (package-with-patches python-pillow - (search-patches "python-pillow-CVE-2022-45199.patch"))) - (define-public python-pillow-2.9 (package (inherit python-pillow) @@ -8941,15 +8933,53 @@ older Python versions.") (define-public python-importlib-resources (package (name "python-importlib-resources") - (version "3.0.0") + (version "5.12.0") (source (origin (method url-fetch) (uri (pypi-uri "importlib_resources" version)) (sha256 (base32 - "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr")))) - (build-system python-build-system) - (native-inputs (list python-setuptools-scm python-toml)) + "1xi2ggdfdj1bg7w728lvy6j3rjqhklalaanzmscpj7awpy4jbs2b")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + ;; The build system insists on ignoring the existing environment and + ;; running "pip install". + (add-after 'unpack 'do-not-use-pip-install + (lambda _ + (substitute* "pyproject.toml" + (("^build-backend.*") "\ +build-backend = \"backend\" +backend_path = [\"_custom_build\"]\n") + (("requires = .*") "requires = []\n")) + (mkdir-p "_custom_build") + (with-output-to-file "_custom_build/backend.py" + (lambda _ + (display "\ +from setuptools import build_meta as _orig +from setuptools.build_meta import * +def get_requires_for_build_wheel(config_settings=None): + return [] +def get_requires_for_build_sdist(config_settings=None): + return [] +"))) + (setenv "PYTHONPATH" + (string-append (getcwd) "/_custom_build"))))))) + (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 + python-setuptools-57 + python-setuptools-scm)) + (propagated-inputs + (list python-zipp)) (home-page "https://importlib-resources.readthedocs.io/") (synopsis "Read resources from Python packages") (description @@ -8960,14 +8990,14 @@ older Python versions.") (define-public python-importlib-metadata (package (name "python-importlib-metadata") - (version "4.11.3") + (version "5.2.0") (source (origin (method url-fetch) (uri (pypi-uri "importlib_metadata" version)) (sha256 (base32 - "0f951zynlh39yicqnhrs3p1qa5p3g6ajjfcggf12y51ppxz5jk7a")))) + "1kf7qclcz820xl5wwjpzcwpfy6shj7ymwh4xzxvpl2xs5gb4hka0")))) (build-system python-build-system) (arguments (list @@ -9765,13 +9795,13 @@ abstract syntax tree (AST) nodes without side effects.") (define-public python-asttokens (package (name "python-asttokens") - (version "2.0.5") + (version "2.2.1") (source (origin (method url-fetch) (uri (pypi-uri "asttokens" version)) (sha256 - (base32 "1mglbkikxvnhrk3inbx0v1qzxwd38qjr6l35sn098yicy0ac2m4s")))) + (base32 "1wwlpvnrh67z4228841zgpqc46vigslzmbvk2izbfc3g585i28j6")))) (build-system python-build-system) (propagated-inputs (list python-six)) (native-inputs (list python-astroid python-pytest python-setuptools-scm)) @@ -9830,13 +9860,13 @@ than the default.") (define-public python-ipython (package (name "python-ipython") - (version "8.2.0") + (version "8.5.0") (source (origin (method url-fetch) (uri (pypi-uri "ipython" version ".tar.gz")) (sha256 - (base32 "1hcxa713wh3axa57412iy02rj0494ljvv6gpnls4lndc5h9yprbh")))) + (base32 "114z175hnv1lgprj06zfcil7lkq013rggjbrc43gsxkmv1fdyyq9")))) (build-system python-build-system) (arguments `(#:phases @@ -10984,17 +11014,18 @@ low-level X clients. It is written entirely in Python.") (define-public python-singledispatch (package (name "python-singledispatch") - (version "3.4.0.3") + (version "4.0.0") (source (origin (method url-fetch) (uri (pypi-uri "singledispatch" version)) (sha256 (base32 - "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) - (build-system python-build-system) + "1z5qbbvvjvh3cwcjv57p7vzhayx0j1ysnvjq0d5py6k5d2ljghzk")))) + (build-system pyproject-build-system) (native-inputs - (list python-six)) ; required for conversion, not at run-time + (list python-pytest + python-six)) ; required for conversion, not at run-time (home-page "https://docs.python.org/3/library/functools.html#functools.singledispatch") (synopsis "Backport of singledispatch feature from Python 3.4") @@ -11087,13 +11118,13 @@ applications.") (define-public python-pyzmq (package (name "python-pyzmq") - (version "22.3.0") + (version "25.0.2") (source (origin (method url-fetch) (uri (pypi-uri "pyzmq" version)) (sha256 - (base32 "0737kizh53n4rjq1xbm6nhr0bq65xflg04i1d8fcky0nwwrw1pcf")) + (base32 "0jai5sbd4ypihsvr4ikq6d93nkmxwv53598sh24dqs78f2xip33b")) (snippet #~(begin (use-modules (guix build utils)) @@ -11101,8 +11132,7 @@ applications.") (delete-file-recursively "bundled") ;; Delete cythonized files. (for-each delete-file - (list "zmq/backend/cython/constants.c" - "zmq/backend/cython/context.c" + (list "zmq/backend/cython/context.c" "zmq/backend/cython/_device.c" "zmq/backend/cython/error.c" "zmq/backend/cython/message.c" @@ -11118,6 +11148,15 @@ applications.") (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) #:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-problematic-tests + (lambda _ + ;; FIXME: The test_draft.TestDraftSockets test fails with: + ;; zmq.error.Again: Resource temporarily unavailable + (delete-file "zmq/tests/test_draft.py") + ;; These tests fail for unknown reasons (see: + ;; https://github.com/zeromq/pyzmq/issues/1853). + (delete-file "zmq/tests/test_auth.py") + (delete-file "zmq/tests/test_zmqstream.py"))) (add-before 'check 'build-extensions (lambda _ ;; Cython extensions have to be built before running the tests. @@ -11125,7 +11164,11 @@ applications.") (inputs (list zeromq)) (native-inputs - (list pkg-config python-cython python-pytest)) + (list pkg-config + python-cython + python-pytest + python-pytest-asyncio + python-tornado)) (home-page "https://github.com/zeromq/pyzmq") (synopsis "Python bindings for 0MQ") (description @@ -12236,17 +12279,17 @@ number of lines in the contained files easily.") (license license:expat))) ;;; Tests are left out in the main package to avoid cycles. -(define-public python-fonttools +(define-public python-fonttools-minimal (hidden-package (package - (name "python-fonttools") - (version "4.28.5") + (name "python-fonttools-minimal") + (version "4.39.3") (source (origin (method url-fetch) (uri (pypi-uri "fonttools" version ".zip")) (sha256 (base32 - "1jhl5n3rfqq7fznvsh6r80n7ylap1a7ppq1040y8cflhyz80ap2l")))) + "1msibi5cmi5znykkg66dq7xshl07lkqjxhrz5hcipqvlggsvjd4j")))) (build-system python-build-system) (native-inputs (list unzip)) @@ -12261,60 +12304,48 @@ also contains a tool called “TTX” which converts TrueType/OpenType fonts to from an XML-based format.") (license license:expat)))) -;;; Rename 'python-fonttools' in next cycle, renaming the current -;;; 'python-fonttools' to 'python-fonttools-minimal'. -(define-public python-fonttools-full - (package/inherit python-fonttools - (arguments - (substitute-keyword-arguments (package-arguments python-fonttools) - ((#:tests? _ #f) - (not (%current-target-system))) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - "-k" - ;; XXX: These tests need .trm files that are - ;; not shipped with the PyPI release. - (format #f "not ~a" - (string-join - '("test_read_fontdimens_mathsy" - "test_read_fontdimens_mathex" - "test_read_fontdimens_vanilla" - "test_read_boundary_char" - "fontTools.tfmLib" - ;; The MtiTest tests fail for unknown - ;; reasons (see: - ;; https://github.com/fonttools/ - ;; fonttools/issues/3078) - "MtiTest") - " and not ")))))))))) - (native-inputs - (modify-inputs (package-native-inputs python-fonttools) - (append python-pytest))) - (propagated-inputs - (list python-brotli - python-fs - python-lxml - python-lz4 - python-scipy - python-unicodedata2 - python-zopfli)) - (properties (alist-delete 'hidden? (package-properties python-fonttools))))) - -(define-public python-fonttools-next - (package - (inherit python-fonttools-full) - (version "4.39.3") - (source (origin - (inherit (package-source python-fonttools-full)) - (method url-fetch) - (uri (pypi-uri "fonttools" version ".zip")) - (sha256 - (base32 - "1msibi5cmi5znykkg66dq7xshl07lkqjxhrz5hcipqvlggsvjd4j")))))) +(define-public python-fonttools + (let ((base python-fonttools-minimal)) + (package/inherit base + (name "python-fonttools") + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:tests? _ #f) + (not (%current-target-system))) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" + "-k" + ;; XXX: These tests need .trm files that are + ;; not shipped with the PyPI release. + (format #f "not ~a" + (string-join + '("test_read_fontdimens_mathsy" + "test_read_fontdimens_mathex" + "test_read_fontdimens_vanilla" + "test_read_boundary_char" + "fontTools.tfmLib" + ;; The MtiTest tests fail for unknown + ;; reasons (see: + ;; https://github.com/fonttools/ + ;; fonttools/issues/3078) + "MtiTest") + " and not ")))))))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (append python-pytest))) + (propagated-inputs + (list python-brotli + python-fs + python-lxml + python-lz4 + python-scipy + python-unicodedata2 + python-zopfli)) + (properties (alist-delete 'hidden? (package-properties base)))))) (define-public python-ly (package @@ -12341,14 +12372,14 @@ provided that can be used to do various manipulations with LilyPond files.") (define-public python-appdirs (package (name "python-appdirs") - (version "1.4.3") + (version "1.4.4") (source (origin (method url-fetch) (uri (pypi-uri "appdirs" version)) (sha256 (base32 - "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y")))) + "0hfzmwknxqhg20aj83fx80vna74xfimg8sk18wb85fmin9kh2pbx")))) (build-system python-build-system) (home-page "https://github.com/ActiveState/appdirs") (synopsis @@ -12441,37 +12472,6 @@ reading and writing MessagePack data.") (base32 "1109s2yynrahwi64ikax68hx0mbclz8p35afmpphw5dwynb49q7s")))))) -;; This msgpack library's name changed from "python-msgpack" to "msgpack" with -;; release 0.5. Some packages like borg still call it by the old name for now. -;; <https://bugs.gnu.org/30662> -(define-public python-msgpack-transitional - (package - (inherit python-msgpack) - (name "python-msgpack-transitional") - (version "0.5.6") - (source (origin - (method url-fetch) - (uri (pypi-uri "msgpack" version)) - (sha256 - (base32 - "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f")))) - (arguments - (substitute-keyword-arguments (package-arguments python-msgpack) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'configure-transitional - (lambda _ - ;; Keep using the old name. - (substitute* "setup.py" - (("TRANSITIONAL = False") - "TRANSITIONAL = 1")) - ;; This old version is not compatible with Python 3.9 - (substitute* '("test/test_buffer.py" "test/test_extension.py") - ((".tostring\\(") ".tobytes(")) - (substitute* '("test/test_buffer.py" "test/test_extension.py") - ((".fromstring\\(") ".frombytes(")) - #t)))))))) - (define-public python-netaddr (package (name "python-netaddr") @@ -13529,32 +13529,22 @@ $ rm -rf /tmp/env (file-name (git-file-name name version)) (sha256 (base32 "1gb5j73nw3nmx030rf8pm75rns5syxhv44zxr6i74kjicyly1i9w")))) - (build-system cmake-build-system) + (build-system python-build-system) (arguments - (list #:out-of-source? #f - #:phases + (list #:phases #~(modify-phases %standard-phases - (replace 'install + (add-before 'build 'configure (lambda _ - ;; Build and install the Python bindings. The underlying - ;; C++ library is apparently not meant to be installed. - (with-directory-excursion "py_ext" - (and (system* "python" "setup.py" "build") - (system* "python" "setup.py" "install" - (string-append "--prefix=" #$output)))))) - ;; Delay tests until the phase above has run. - (delete 'check) - (add-after 'install 'check + (invoke "cmake" "."))) ;to generate tlsh_version.h + (add-after 'configure 'chdir + (lambda _ + (chdir "py_ext"))) + (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (substitute* "Testing/python_test.sh" - ;; The script sets up a working PYTHONPATH, but does not - ;; export it for all subsequent test commands. Fix that. - (("^PYTHONPATH=\".*" all) - (string-append all "\nexport PYTHONPATH\n"))) (when tests? - (with-directory-excursion "Testing" + (with-directory-excursion "../Testing" (invoke "./python_test.sh")))))))) - (inputs (list python-wrapper)) ;for the bindings + (native-inputs (list cmake-minimal)) (synopsis "Fuzzy matching library for Python") (description "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library. @@ -13748,8 +13738,14 @@ libmagic."))) "-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. - "not test_gui_event_loop_custom " + "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. @@ -13908,20 +13904,21 @@ Debian-related files, such as: (define-public python-json-spec (package (name "python-json-spec") - (version "0.10.1") + (version "0.11.0") (source (origin (method url-fetch) - (uri (pypi-uri "json-spec" version)) + (uri (pypi-uri "json_spec" version)) (sha256 (base32 - "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb")))) + "0fwxirzxx5s9l0lwnjl6ki39xw1fsjm0vr6cm67ws27fkmcxcry7")))) (build-system python-build-system) (propagated-inputs - (list python-pathlib python-six)) + (list python-importlib-metadata + python-termcolor)) (native-inputs (list python-pytest)) - (home-page "http://py.errorist.io/json-spec") + (home-page "https://json-spec.readthedocs.io/") (synopsis "JSON Schema, JSON Pointer and JSON Reference for Python") (description @@ -13987,8 +13984,7 @@ significantly better performance.") python-pylint python-pytest python-pytest-benchmark - python-pytest-cache - python-validictory)) + python-pytest-cache)) (home-page "https://github.com/horejsek/python-fastjsonschema") (synopsis @@ -14253,7 +14249,8 @@ time.") (list python-ipykernel ;; Adding ipywidgets would create a cycle. ;;python-ipywidgets - ;;python-pyppeteer ;TODO: package me + ;; XXX: Disabled, not in guix. + ;;python-pyppeteer python-pytest python-pytest-xdist)) (propagated-inputs @@ -14279,14 +14276,14 @@ time.") texlive-caption texlive-enumitem texlive-fontspec - texlive-generic-iftex + texlive-iftex texlive-grffile texlive-hyperref - texlive-latex-fancyvrb + texlive-fancyvrb texlive-latex-float texlive-latex-geometry texlive-latex-jknapltx - texlive-latex-ms + texlive-ms texlive-latex-parskip texlive-latex-trimspaces texlive-latex-upquote @@ -14859,28 +14856,16 @@ consistent API regardless of how the configuration was created.") (define-public python-configargparse (package (name "python-configargparse") - (version "1.2.3") + (version "1.5.3") (source (origin (method url-fetch) (uri (pypi-uri "ConfigArgParse" version)) (sha256 (base32 - "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd")))) - (build-system python-build-system) + "17vky4ihicbf7nggg30xs7h3g5rxzwgch8vilnnrvdaacszkq2qv")))) + (build-system pyproject-build-system) (native-inputs - (list python-pyyaml)) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - ;; Bypass setuptools-shim because one test relies on "setup.py" - ;; being the first argument passed to the python call. - ;; - ;; NOTE: Many tests do not run because they rely on Python's - ;; built-in test.test_argparse, but we remove the unit tests from - ;; our Python installation. - (invoke "python" "setup.py" "test")))))) + (list python-mock python-pytest)) (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.") @@ -15087,26 +15072,22 @@ explicit subcommand name.") (define-public python-structlog (package (name "python-structlog") - (version "20.2.0") + (version "23.1.0") (source (origin (method url-fetch) (uri (pypi-uri "structlog" version)) (sha256 (base32 - "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg")))) - (build-system python-build-system) - (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")) - #t))))) + "0swh5wxghpzdkncsl3zhiq5bblkj4i5r3g00lldw2qyiswfnh397")))) + (build-system pyproject-build-system) (native-inputs - (list python-coverage + (list ;; For the build + python-hatch-fancy-pypi-readme + python-hatch-vcs + python-hatchling + ;; For the tests + python-coverage python-freezegun python-pretend python-pytest @@ -15140,34 +15121,59 @@ pure Python module that works on virtually all Python versions.") (license license:expat))) (define-public python-execnet - (package - (name "python-execnet") - (version "1.9.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "execnet" version)) - (sha256 - (base32 - "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg")) - (patches (search-patches "python-execnet-read-only-fix.patch")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - ;; Unset PYTHONDONTWRITEBYTECODE to match the - ;; expectations of a test in - ;; 'testing/test_gateway.py'. - (unsetenv "PYTHONDONTWRITEBYTECODE") - - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv"))))))) - (native-inputs - (list python-pytest python-setuptools-scm)) - (synopsis "Rapid multi-Python deployment") - (description "Execnet provides a share-nothing model with + ;; 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)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pytest-dev/execnet") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0s60jggcjiw38b7xsh1q2lnnr4c4kaki7c5zsv7xyj7df8ngbbsm")))) + (build-system pyproject-build-system) + (arguments + (list + ;; ;; This test hasn't been updated for the latest Pytest yet: + ;; #:test-flags #~(list "--ignore" "testing/test_rsync.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'adjust-for-pytest-7.2+ + (lambda _ + ;; This test fails with an error because @py.test has been + ;; deprecated for @pytest in recent Pytest. + (substitute* "testing/test_rsync.py" + (("@py.test") + "@pytest")))) + (add-before 'build 'pretend-version + ;; The version string is usually derived via setuptools-scm, but + ;; without the git metadata available this fails. + (lambda _ + ;; hatch-vcs uses setuptools under the hood. + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + ;; Massage the version string to a PEP-0440 compatible + ;; one. + #$(car (string-split version #\-))))) + (add-before 'check 'prepare-for-tests + (lambda _ + ;; Unset PYTHONDONTWRITEBYTECODE to match the + ;; expectations of a test in + ;; 'testing/test_gateway.py'. + (unsetenv "PYTHONDONTWRITEBYTECODE")))))) + (native-inputs + (list python-hatchling + python-hatch-vcs + python-py + python-pytest + python-pytest-timeout + python-setuptools-scm)) + (synopsis "Rapid multi-Python deployment") + (description "Execnet provides a share-nothing model with channel-send/receive communication for distributing execution across many Python interpreters across version, platform and network barriers. It has a minimal and fast API targeting the following uses: @@ -15176,8 +15182,8 @@ minimal and fast API targeting the following uses: @item write and deploy hybrid multi-process applications @item write scripts to administer multiple environments @end enumerate") - (home-page "https://codespeak.net/execnet/") - (license license:expat))) + (home-page "https://codespeak.net/execnet/") + (license license:expat)))) (define-public python-icalendar (package @@ -15318,7 +15324,7 @@ with a new public API, and RPython support.") " and not test_macro_require" " and not test_requires_pollutes_core")))))))) (native-inputs - (list python-pytest-7.1 python-wheel)) + (list python-pytest python-wheel)) (propagated-inputs (list python-funcparserlib)) (home-page "https://docs.hylang.org/en/stable/") @@ -15568,39 +15574,6 @@ library as well as on the command line.") (home-page "https://stuvel.eu/rsa") (license license:asl2.0))) -(define-public python-pluggy - (package - (name "python-pluggy") - (version "0.13.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pluggy" version)) - (sha256 - (base32 - "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm")))) - (build-system python-build-system) - (native-inputs - (list python-setuptools-scm)) - (synopsis "Plugin and hook calling mechanism for Python") - (description "Pluggy is an extraction of the plugin manager as used by -Pytest but stripped of Pytest specific details.") - (home-page "https://pypi.org/project/pluggy/") - (license license:expat))) - -;;; TODO: Make this the default python-pluggy in the next rebuild cycle. -(define-public python-pluggy-next - (package - (inherit python-pluggy) - (version "1.0.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pluggy" version)) - (sha256 - (base32 - "0n8iadlas2z1b4h0fc73b043c7iwfvx9rgvqm1azjmffmhxkf922")))))) - (define-public python-plumbum (package (name "python-plumbum") @@ -16072,27 +16045,27 @@ of @acronym{REGEXPs, regular expressions}.") (define-public python-mako (package (name "python-mako") - (version "1.1.3") + (version "1.2.2") (source (origin (method url-fetch) (uri (pypi-uri "Mako" version)) (sha256 (base32 - "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1")))) + "0gqnv9py1dqp01jmf5zxp0vj2dbhq1l9zy55fai319iv6sdqc91p")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? - (invoke "nosetests" "-v") + (invoke "pytest" "-vv") (format #t "test suite not run~%")) #t))))) (propagated-inputs (list python-markupsafe)) (native-inputs - (list python-mock python-nose)) + (list python-mock python-pytest)) (home-page "https://www.makotemplates.org/") (synopsis "Templating language for Python") (description "Mako is a templating language for Python that compiles @@ -16410,7 +16383,7 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") python-iniconfig python-moto python-msgpack - python-pytest-7.1 ;for pytest-subtests + python-pytest ;for pytest-subtests python-pytest-celery python-pytest-subtests python-pytest-timeout @@ -16504,7 +16477,7 @@ ISO 8859, etc.).") (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen")))))) (native-inputs - (list python-pytest-7.1 python-pytest-cov python-pytest-xdist)) + (list python-pytest python-pytest-cov python-pytest-xdist)) (inputs (list qtbase-5)) (propagated-inputs @@ -16644,7 +16617,7 @@ import platform reason=\"Fails on 32 bit architectures\") " m)))))))) (build-system python-build-system) - (native-inputs (list python-pytest-6)) + (native-inputs (list python-pytest)) (home-page "https://software.clapper.org/munkres/") (synopsis "Implementation of the Munkres algorithm") (description "The Munkres module provides an implementation of the Munkres @@ -16901,6 +16874,29 @@ is made as zipfile like as possible.") syntax highlighting, markdown and more to the terminal.") (license license:expat))) +(define-public python-rich-click + (package + (name "python-rich-click") + (version "1.6.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "rich-click" version)) + (sha256 + (base32 + "0zkp2sn0vz1hhjbv9bf8fifyzi8ib2d7v7sfak8n3qn67rlrdzzq")))) + (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 +line interfaces\". Rich is a \"Python library for rich text and beautiful +formatting in the terminal\". The intention of rich-click is to provide +attractive help output from click, formatted with rich, with minimal +customization required.") + (license license:expat))) + (define-public python-textual (package (name "python-textual") @@ -16947,17 +16943,16 @@ for Python inspired by modern web development.") (define-public python-magic (package (name "python-magic") - (version "0.4.24") + (version "0.4.27") (home-page "https://github.com/ahupp/python-magic") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit version))) (file-name (git-file-name name version)) - (patches (search-patches "python-magic-python-bytecode.patch")) (sha256 (base32 - "17jalhjbfd600lzfz296m0nvgp6c7vx1mgz82jbzn8hgdzknf4w0")))) + "1x11kfn4g244fia9a7y4ly8dqv5zsxfg3l5azc54dl6gkp2bk7vx")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -16979,16 +16974,13 @@ for Python inspired by modern web development.") (setenv "LC_ALL" "en_US.UTF-8") (if tests? (with-directory-excursion "test" - (invoke "python" "./test.py") (invoke "python" "./libmagic_test.py")) (format #t "test suite not run~%"))))))) (native-inputs (list which)) (inputs ;; python-magic needs to be able to find libmagic.so. - ;; Use a newer version because 5.39 returns bogus for some archives - ;; (notably Chromium .crx extensions), which breaks e.g. 'diffoscope'. - (list file-next)) + (list file)) (synopsis "File type identification using libmagic") (description "This module uses ctypes to access the libmagic file type @@ -17778,13 +17770,13 @@ docstring and colored output.") (define-public python-tomlkit (package (name "python-tomlkit") - (version "0.7.0") + (version "0.11.6") (source (origin (method url-fetch) (uri (pypi-uri "tomlkit" version)) (sha256 - (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc")))) + (base32 "0wsxnv9bs7jk8ig8blj9c438a1ygvdad7y9cn1zr720nfbjm5fbi")))) (build-system python-build-system) (native-inputs (list python-pytest python-pyyaml)) @@ -17801,14 +17793,23 @@ implementation has been adapted, improved, and fixed from Molten.") (define-public python-shellingham (package (name "python-shellingham") - (version "1.4.0") + (version "1.5.1") (source (origin (method url-fetch) (uri (pypi-uri "shellingham" version)) (sha256 - (base32 "07hpndvcv9mf9hp54b4apzpwzmzfzl8ryaacsfdq4139im2w4ma8")))) + (base32 "0iawv24xx6vhwbhqlxyyg901f8pf6abqyfg0711v1bvlipx83g21")))) (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "pytest" "-v"))))))) + (native-inputs + (list python-pytest python-pytest-mock)) (home-page "https://github.com/sarugaku/shellingham") (synopsis "Tool to detect surrounding shell") (description @@ -17942,7 +17943,7 @@ strings require only one extra byte in addition to the strings themselves.") ;; build system and new Rust dependencies. "--ignore" "tests/test_preconf.py"))))))) (native-inputs - (list python-hypothesis-next + (list python-hypothesis python-immutables python-msgpack python-poetry-core @@ -17995,25 +17996,26 @@ 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.4.2") (source (origin (method url-fetch) (uri (pypi-uri "poetry" version)) (sha256 (base32 - "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw")))) + "0g0vczn6qa4b2bdkq4k7fm1g739vyxp2iiblwwsrcmw24jj81m8b")))) (build-system python-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))))))) + ;; #: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))))) + )) (propagated-inputs (list python-cachecontrol python-cachy @@ -18022,9 +18024,7 @@ database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.") python-entrypoints python-html5lib python-keyring - ; Use of deprecated version of msgpack reported upstream: - ; https://github.com/python-poetry/poetry/issues/3607 - python-msgpack-transitional + python-msgpack python-packaging python-pexpect python-pip @@ -18462,7 +18462,7 @@ scans through a file and detects issues.") (define-public python-jedi (package (name "python-jedi") - (version "0.18.1") + (version "0.18.2") (source (origin (method git-fetch) @@ -18473,26 +18473,12 @@ scans through a file and detects issues.") (file-name (git-file-name name version)) (sha256 (base32 - "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1")) - (modules '((guix build utils))) - (snippet - ;; Adjust comprehension syntax for Python > 3.8. - ;; From <https://github.com/davidhalter/jedi/issues/1824>. - '(substitute* "test/completion/lambdas.py" - (("if lambda: 3") - "if (lambda: 3)"))))) + "1nhsajmkn3qj32k5z3ymrd3r6dz2aliv2pqb824m5kaib986dm44")) + (modules '((guix build utils))))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-completion-test - (lambda _ - ;; This resolves a failure in the 'test_completion' test (see: - ;; https://github.com/davidhalter/jedi/issues/1824). - ;; TODO: Remove after a new release is made (currently: 0.18.1). - (substitute* "test/completion/lambdas.py" - (("\\[a for a in \\[1,2\\] if lambda: 3\\]\\[0\\]") - "[a for a in [1,2] if (lambda: 3)][0]")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -18986,6 +18972,35 @@ callback-heavy mode of interaction typical in some Kivy applications.") without requiring an event loop, useful for creative responsive GUIs.") (license license:expat))) +(define-public python-asynctest + (package + (name "python-asynctest") + (version "0.13.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "asynctest" version)) + (sha256 + (base32 + "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62")))) + (build-system python-build-system) + (arguments + ;; The test suite appears to be incompatible with Python 3.9+, completes + ;; with 25 failures and 41 errors out of 220 tests (see: + ;; https://github.com/Martiusweb/asynctest/issues/149). + (list #:tests? #f + #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "unittest" "test"))))))) + (home-page "https://github.com/Martiusweb/asynctest/") + (synopsis "Unittest extensions for testing asyncio libraries") + (description + "The @code{asynctest} Python package is built on top of the standard +@code{unittest} module and cuts down boilerplate code when testing libraries +for @code{asyncio}.") + (license license:asl2.0))) + (define-public python-binaryornot (package (name "python-binaryornot") @@ -19474,42 +19489,6 @@ task each process is busy with. The technique is used by PostgreSQL and the OpenSSH Server for example.") (license license:bsd-3))) -(define-public python-validictory - (package - (name "python-validictory") - (version "1.0.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "validictory" version)) - (sha256 - (base32 - "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q")))) - (build-system python-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - ;; Move the tests out of the package directory to avoid - ;; packaging them. - (lambda* _ - (rename-file "validictory/tests" "tests") - (delete-file "tests/__init__.py"))) - (replace 'check - (lambda _ - (invoke "py.test" "-vv" )))))) - (native-inputs - (list python-pytest)) - (home-page - "https://github.com/jamesturk/validictory") - (synopsis "General purpose Python data validator") - (description "It allows validation of arbitrary Python data structures. - - The schema format is based on the JSON Schema - proposal (http://json-schema.org), so combined with json the library is also - useful as a validator for JSON data.") - (license license:expat))) - (define-public python-pyelftools (package (name "python-pyelftools") @@ -19751,14 +19730,14 @@ from the header, as well as section details and data available.") (define-public python-cheetah (package (name "python-cheetah") - (version "3.2.4") + (version "3.3.1") (source (origin (method url-fetch) - (uri (pypi-uri "Cheetah3" version)) + (uri (pypi-uri "CT3" version)) (sha256 (base32 - "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya")))) + "1j36vampqip18jx0jzngb9rnkhhhl8hqnscg117y0d6cgrgm57qw")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -20176,13 +20155,13 @@ from the header, as well as section details and data available.") (define-public python-m2r (package (name "python-m2r") - (version "0.2.1") + (version "0.3.1") (source (origin (method url-fetch) (uri (pypi-uri "m2r" version)) (sha256 (base32 - "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z")) + "1asnwazfznbs0r7x03pj5ns4npz18z3kli538sgdicfg97y6gyxa")) (modules '((guix build utils))) (snippet ;; Adjust test regex for Python 3.10 compatibility. @@ -20220,21 +20199,21 @@ from the header, as well as section details and data available.") and bit flag values.") (license license:expat))) -(define-public python-attrdict +(define-public python-attrdict3 (package - (name "python-attrdict") - (version "2.0.1") + (name "python-attrdict3") + (version "2.0.2") (source (origin (method url-fetch) - (uri (pypi-uri "attrdict" version)) + (uri (pypi-uri "attrdict3" version)) (sha256 (base32 - "0w3vsz64j9npxfgh83hghsh161wwkrx1fxqi1533js2wnnc0dj9m")))) + "1s2z6c9jam5azm746l49wsqsyi29zbbrknq1axsw230jl4f1fk00")))) (build-system python-build-system) ;; The package is no longer maintained and tests need some work. (arguments '(#:tests? #f)) (propagated-inputs (list python-six)) - (home-page "https://github.com/bcj/AttrDict") + (home-page "https://github.com/pirofti/AttrDict3") (synopsis "Attribute-style access dictionaries") (description "This package provides mapping objects whose elements can be accessed @@ -20348,7 +20327,7 @@ both as keys and as attributes.") (define-public python-astroid (package (name "python-astroid") - (version "2.9.0") + (version "2.11.7") (source (origin (method git-fetch) @@ -20357,7 +20336,7 @@ both as keys and as attributes.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "19iiys4233cicpm48fd7lrkm31kk47qiv44wvk952rqbcn4rd2dh")))) + (base32 "0lmm5bhszg1nj0xsjnh5nm39if2jzpa3ycgvhy6ddycz28dy568y")))) (build-system python-build-system) (propagated-inputs (list python-lazy-object-proxy python-typing-extensions python-wrapt)) @@ -20399,7 +20378,7 @@ builds partial trees by inspecting living objects.") (define-public python-isort (package (name "python-isort") - (version "5.10.1") + (version "5.12.0") (source (origin (method git-fetch) @@ -20412,61 +20391,42 @@ builds partial trees by inspecting living objects.") (snippet '(for-each delete-file (find-files "." "\\.whl$"))) (sha256 (base32 - "09spgl2k9xrprr5gbpfc91a8p7mx7a0c64ydgc91b3jhrmnd9jg1")))) + "1vbwc4gpffclf6hw08lvvgqlvsgfjlw7gjsm28jfcrln2pixla7j")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - ;; Permit newer versions of black. - (substitute* "example_isort_formatting_plugin/pyproject.toml" - (("\\^20\\.08b1") - ">= 20.08b1")))) - ;; A foretaste of what our future python-build-system will need to - ;; do. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" out whl)))) - (add-after 'install 'install-example-plugins - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Patch to use the core poetry API. - (substitute* '("example_isort_formatting_plugin/pyproject.toml" - "example_isort_sorting_plugin/pyproject.toml" - "example_shared_isort_profile/pyproject.toml") - (("poetry>=0.12") - "poetry-core>=1.0.0") - (("poetry.masonry.api") - "poetry.core.masonry.api")) - ;; Build the example plugins. - (for-each (lambda (source-directory) - (invoke "python" "-m" "build" "--wheel" - "--no-isolation" "--outdir=dist" - source-directory)) - '("example_isort_formatting_plugin" - "example_isort_sorting_plugin" - "example_shared_isort_profile")) - ;; Install them to temporary storage, for the test. - (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 (assoc-ref outputs "out") "/bin"))) - (setenv "PATH" (string-append (getenv "PATH") ":" bin))) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "tests/unit/" - "-k" "not test_gitignore" ;requires git - "--ignore=tests/unit/test_deprecated_finders.py"))))))) + (list + #: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) + (invoke "python" "-m" "build" "--wheel" + "--no-isolation" "--outdir=dist" + source-directory)) + '("example_isort_formatting_plugin" + "example_isort_sorting_plugin" + "example_shared_isort_profile")) + ;; Install them to temporary storage, for the test. + (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"))))))) (native-inputs (list python-black python-colorama @@ -20876,12 +20836,8 @@ manipulation, or @code{stdout}.") (if tests? (invoke "pytest" "-vv") (format #t "test suite not run~%"))))))) - (native-inputs - `(("python-pretend" ,python-pretend) - ("python-pytest" ,python-pytest))) - (propagated-inputs - `(("python-pyparsing" ,python-pyparsing) - ("python-six" ,python-six))) + (native-inputs (list python-pretend python-pytest)) + (propagated-inputs (list python-pyparsing python-six)) (home-page "https://github.com/pypa/packaging") (synopsis "Core utilities for Python packages") (description "Packaging is a Python module for dealing with Python packages. @@ -20959,19 +20915,19 @@ manipulation, or @code{stdout}.") (define-public python-sure (package (name "python-sure") - (version "1.4.11") + (version "2.0.1") (source (origin (method url-fetch) (uri (pypi-uri "sure" version)) (sha256 (base32 - "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w")))) + "1jmrskj399idw1czx6dvy2zfaijnwi02b55vx979ixp7q2mnzz68")))) (build-system python-build-system) (propagated-inputs (list python-mock python-six)) (native-inputs - (list python-nose)) + (list python-nose python-rednose)) (home-page "https://github.com/gabrielfalcao/sure") (synopsis "Automated testing library in python for python") (description @@ -22744,7 +22700,8 @@ based on the CPython 2.7 and 3.7 parsers.") (method url-fetch) (uri (pypi-uri "typeguard" version)) (sha256 - (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80")))) + (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80")) + (patches (search-patches "python-typeguard-python3.10.patch")))) (build-system python-build-system) (arguments (list @@ -22766,82 +22723,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-typing-extensions - (package - (name "python-typing-extensions") - (version "4.0.1") - (source (origin - ;; The test script is missing from the PyPI archive. - (method git-fetch) - (uri (git-reference - (url "https://github.com/python/typing") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0a35fh5wk9s538x0w3dz95y0avnhd2srzyv9s1a372711n8hdl4p")))) - (build-system python-build-system) - (arguments - (list - #:tests? #f ;requires Python's test module, not available in Guix - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'enter-source-directory - (lambda _ - (chdir "typing_extensions"))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "src/test_typing_extensions.py")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) - (native-inputs (list python-pypa-build python-flit-core)) - (home-page "https://github.com/python/typing/typing_extensions") - (synopsis "Experimental type hints for Python") - (description - "The typing_extensions module contains additional @code{typing} hints not -yet present in the of the @code{typing} standard library. -Included are implementations of: -@enumerate -@item ClassVar -@item ContextManager -@item Counter -@item DefaultDict -@item Deque -@item NewType -@item NoReturn -@item overload -@item Protocol -@item runtime -@item Text -@item Type -@item TYPE_CHECKING -@item AsyncGenerator -@end enumerate\n") - (license license:psfl))) - -(define-public python-typing-extensions-next - (package - (inherit python-typing-extensions) - (name "python-typing-extensions") - (version "4.2.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/python/typing") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1bbry1rg7q5ppkgzdk4nwl7q1w8bbhajm4q68wb9dm6rf7hg1023")))))) - (define-public bpython (package (name "bpython") @@ -23034,7 +22915,9 @@ time-based (TOTP) passwords.") (method url-fetch) (uri (pypi-uri "parso" version)) (sha256 - (base32 "185gkxq92kqiw2h5zp1cmyn04055x0lix4hmi5c077xm1clvw1wc")))) + (base32 "185gkxq92kqiw2h5zp1cmyn04055x0lix4hmi5c077xm1clvw1wc")) + (patches + (search-patches "python-parso-unit-tests-in-3.10.patch")))) (native-inputs (list python-pytest)) (build-system python-build-system) @@ -23806,14 +23689,14 @@ validation testing and application logic.") (define-public python-numba (package (name "python-numba") - (version "0.55.1") + (version "0.56.4") (source (origin (method url-fetch) (uri (pypi-uri "numba" version)) (sha256 (base32 - "18rf8i32m1045zxglvicpgldvzmqdxqvs3dhjd7wilb64sd0ds83")))) + "1vlnmirhay8gl36cxa94nvlgs41k9p7vdkp0xzbq65682bsgxn9j")))) (build-system python-build-system) (arguments `(#:phases @@ -24262,25 +24145,19 @@ that is accessible to other projects developed in Cython.") (define-public python-sortedcontainers (package (name "python-sortedcontainers") - (version "2.1.0") + (version "2.4.0") (source (origin (method url-fetch) (uri (pypi-uri "sortedcontainers" version)) (sha256 (base32 - "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp")))) + "126vpywl7aly6zir033a9indgyficlzl68qls61nn2y3djhabji5")))) (build-system python-build-system) (arguments - ;; FIXME: Tests require many extra dependencies, and would introduce - ;; a circular dependency on hypothesis, which uses this package. + ;; TODO: Circular dependency on pytest. '(#:tests? #f)) - (propagated-inputs - `(("python-appdirs" ,python-appdirs) - ("python-distlib" ,python-distlib) - ("python-filelock" ,python-filelock) - ("python-six" ,python-six-bootstrap))) - (home-page "https://www.grantjenks.com/docs/sortedcontainers/") + (home-page "https://grantjenks.com/docs/sortedcontainers/") (synopsis "Sorted List, Sorted Dict, Sorted Set") (description "This package provides a sorted collections library, written in @@ -24622,7 +24499,16 @@ RFC 8265 and RFC 8266.") (sha256 (base32 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-version-check + (lambda _ + ;; Python 3.10 is indeed more recent than Python 3.4. + (substitute* "setup.py" + ((" or py_version\\[0\\] == '3'.*") ":"))))))) (propagated-inputs (list python-six)) (home-page "https://github.com/abseil/abseil-py") @@ -24888,7 +24774,8 @@ _cyclic_garbage" ;; OSError: protocol not found. " and not test_getprotobyname" ;; EOFError: Ran out of input. - " and not test_static_tool_sees_all_symbols")))))))) + " and not test_static_tool_sees_all_symbols") + "trio/tests"))))))) (native-inputs (list python-astor python-ipython @@ -26239,14 +26126,14 @@ also be usable with other GSSAPI mechanisms.") (define-public python-check-manifest (package (name "python-check-manifest") - (version "0.48") + (version "0.49") (source (origin (method url-fetch) (uri (pypi-uri "check-manifest" version)) (sha256 (base32 - "0my6ammldi8mddrbq798qxbl90qr8nlk7gzliq3v7gp7mlfmymrv")))) + "05plc1835zz1w1k7wpf2n6jir71ds1w7nz3535lj5ks2am2419k4")))) (build-system pyproject-build-system) (arguments '(;; This test requires setting up a venv which does not work @@ -26265,7 +26152,7 @@ also be usable with other GSSAPI mechanisms.") (native-inputs (list git-minimal/pinned python-pytest)) (propagated-inputs - (list python-pypa-build python-setuptools python-tomli)) + (list python-pypa-build python-setuptools)) (home-page "https://github.com/mgedmin/check-manifest") (synopsis "Check MANIFEST.in in a Python source package for completeness") (description "Python package can include a MANIFEST.in file to help with @@ -27051,14 +26938,14 @@ library.") (define-public python-boltons (package (name "python-boltons") - (version "20.0.0") + (version "23.0.0") (source (origin (method url-fetch) (uri (pypi-uri "boltons" version)) (sha256 (base32 - "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4")))) + "1c5lpqi74i55li0wvpyxnircj40na797x7447k53an2j54cafl4c")))) (build-system python-build-system) (home-page "https://github.com/mahmoud/boltons") (synopsis "Extensions to the Python standard library") @@ -28034,7 +27921,7 @@ By default it uses the open Python vulnerability database Safety DB.") (native-inputs `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts texlive-fonts-ec - texlive-generic-iftex + texlive-iftex texlive-hyperref texlive-oberdiek texlive-lm @@ -28861,13 +28748,13 @@ and frame grabber interface.") (define-public python-scikit-build (package (name "python-scikit-build") - (version "0.14.0") + (version "0.17.1") (source (origin (method url-fetch) - (uri (pypi-uri "scikit-build" version)) + (uri (pypi-uri "scikit_build" version)) (sha256 - (base32 "1wx1m9vnxnnz59lyaisgyxldp313kciyd4af8lf112vb8vbjy9yk")))) + (base32 "0v1qcn3nsjxqdl6fa07b7acq6xndqbvvic5dvsgbjgldkjr1drqp")))) (build-system pyproject-build-system) (arguments (list @@ -28885,7 +28772,9 @@ and frame grabber interface.") ;; These tests attempt to pull dependencies from the Internet. (delete-file "tests/test_distribution.py") (delete-file "tests/test_pep518.py") - (invoke "pytest" "-vv" + ;; The tests marked as "isolate" are tests that require access + ;; to the network. + (invoke "pytest" "-vv" "-m" "not isolated" "-n" (number->string (parallel-job-count)) "-k" (string-append ;; These tests attempt to write to read-only @@ -28904,14 +28793,21 @@ and frame grabber interface.") ;; nondeterministically (see: ;; https://github.com/scikit-build/scikit-build/issues/711). "and not test_generator_cleanup " - "and not test_generator_selection ")))))))) + "and not test_generator_selection " + ;; The compiler test fails with a + ;; SKBuildGeneratorNotFoundError error (see: + ;; https://github.com/scikit-build/scikit-build/issues/945). + "and not test_cxx_compiler ")))))))) (native-inputs (list cmake-minimal gfortran - git-minimal/pinned ;for tests + git-minimal/pinned ;for tests ninja python-coverage python-cython + python-hatchling + python-hatch-fancy-pypi-readme + python-hatch-vcs python-mock python-packaging python-path @@ -28923,7 +28819,7 @@ and frame grabber interface.") python-requests python-setuptools-scm)) (propagated-inputs - (list python-distro python-packaging python-wheel)) + (list python-distro python-packaging python-tomli python-wheel)) (home-page "https://github.com/scikit-build/scikit-build") (synopsis "Build system generator for Python C/C++/Fortran/Cython extensions") (description "Scikit-build is an improved build system generator for @@ -29402,7 +29298,8 @@ supports x86_64 instructions up to AVX-512 and SHA.") (file-name (git-file-name name version)) (sha256 (base32 - "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr")))) + "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr")) + (patches (search-patches "python-sgmllib3k-assertions.patch")))) (build-system python-build-system) (home-page "https://github.com/hsoft/sgmllib") (synopsis "Python 3 port of sgmllib") @@ -29525,7 +29422,7 @@ symbolic expressions in pure Python using the technique of logical unification." "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm")))) (build-system python-build-system) (native-inputs - (list python-pytest-6 python-toml)) + (list python-pytest python-toml)) (propagated-inputs (list python-logical-unification)) (home-page "https://github.com/pythological/python-cons") |