X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/39386de24439c81f1a7c683ae8c5dd1c5f24e09e..e4574a66fe310c67029442568881cb9d2df5d365:/gnu/packages/python-xyz.scm diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a5c2e60ce4..593bb3f468 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -83,6 +83,7 @@ ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Guy Fleury Iteriteka +;;; Copyright © 2020 Hendursaga ;;; ;;; This file is part of GNU Guix. ;;; @@ -122,6 +123,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) #:use-module (gnu packages graphviz) #:use-module (gnu packages graphics) #:use-module (gnu packages gsasl) @@ -133,6 +135,7 @@ #:use-module (gnu packages kerberos) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) + #:use-module (gnu packages libidn) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages man) @@ -187,6 +190,52 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26)) +(define-public python-slixmpp + (package + (name "python-slixmpp") + (version "1.5.2") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://lab.louiz.org/poezio/slixmpp.git") + (commit + (string-append "slix-" version)))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* "setup.py" + (("'CC', 'cc'") + "'CC', 'gcc'")) + #t))))) + (native-inputs + `(("cython" ,python-cython) + ("gnupg" ,gnupg) + ("pkg-config" ,pkg-config))) + (propagated-inputs + `(("python-aiodns" ,python-aiodns) + ("python-aiohttp" ,python-aiohttp) + ("python-pyasn1" ,python-pyasn1) + ("python-pyasn1-modules" ,python-pyasn1-modules))) + (inputs + `(("libidn" ,libidn) + ("python" ,python))) ; We are building a Python extension. + (synopsis "XMPP library without threads") + (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of +SleekXMPP. Its goal is to only rewrite the core of the library (the low level +socket handling, the timers, the events dispatching) in order to remove all +threads.") + (home-page "https://lab.louiz.org/poezio/slixmpp") + (license license:expat))) + (define-public python-tenacity (package (name "python-tenacity") @@ -1177,14 +1226,13 @@ language. It aims to be fast.") (define-public python-aenum (package (name "python-aenum") - (version "2.2.3") + (version "2.2.4") (source (origin (method url-fetch) (uri (pypi-uri "aenum" version)) (sha256 - (base32 - "1s3008rklv4n1kvmq6xdbdfyrpl0gf1rhqasmd27s5kwyjmlqcx4")))) + (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -1504,6 +1552,43 @@ files are easily readable and they work nicely with version control systems.") ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2. (license (list license:bsd-2 license:psfl)))) +(define-public dosage + (package + (name "dosage") + (version "2.17") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dosage" version)) + (sha256 + (base32 + "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0")))) + (build-system python-build-system) + (propagated-inputs + `(("python2-backports-functools-lru-cache" + ,python2-backports-functools-lru-cache) + ("python2-backports-shutil-get-terminal-size" + ,python2-backports-shutil-get-terminal-size) + ("python-cached-property" ,python-cached-property) + ("python-colorama" ,python-colorama) + ("python-imagesize" ,python-imagesize) + ("python-importlib-metadata" ,python-importlib-metadata) + ("python-lxml" ,python-lxml) + ("python-requests" ,python-requests) + ("python-six" ,python-six))) + (native-inputs + `(("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-responses" ,python-responses) + ("python-setuptools-scm" ,python-setuptools-scm))) + (home-page "https://github.com/webcomics/dosage") + (synopsis "Comic strip downloader and archiver") + (description "Dosage is designed to keep a local copy of specific webcomics and other +picture-based content such as Picture of the Day sites. With the @command{dosage} +command-line script you can get the latest strip of a webcomic, catch-up to the last strip +downloaded, or download a strip for a particular date or index, if possible.") + (license license:expat))) + (define-public python-et-xmlfile (package (name "python-et-xmlfile") @@ -3820,6 +3905,43 @@ Language (TOML) configuration files.") "This package provides a JSON RPC 2.0 server library for Python.") (license license:expat))) +(define-public python-pydantic + (package + (name "python-pydantic") + (version "1.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/samuelcolvin/pydantic") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; Reported upstream: + ;; . + ;; Disable the faulty test as the fix is unclear. + (add-before 'check 'disable-test + (lambda _ + (substitute* "tests/test_validators.py" + (("test_assert_raises_validation_error") + "_test_assert_raises_validation_error")) + #t)) + (replace 'check + (lambda _ (invoke "pytest" "-vv" "tests")))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/samuelcolvin/pydantic") + (synopsis "Python data validation and settings management") + (description + "Pydantic enforces type hints at runtime, and provides user friendly +errors when data is invalid.") + (license license:expat))) + (define-public python-pydocstyle (package (name "python-pydocstyle") @@ -4580,6 +4702,17 @@ that client code uses to construct the grammar directly in Python code.") (define-public python2-pyparsing (package-with-python2 python-pyparsing)) +(define-public python-pyparsing-2.4.7 + (package + (inherit python-pyparsing) + (version "2.4.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyparsing" version)) + (sha256 + (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2")))))) + (define-public python-numpydoc (package (name "python-numpydoc") @@ -5031,6 +5164,34 @@ operators such as union, intersection, and difference.") (define-public python2-pysnptools (package-with-python2 python-pysnptools)) +(define-public python-wurlitzer + (package + (name "python-wurlitzer") + (version "2.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "wurlitzer" version)) + (sha256 + (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv" "test.py")))))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/minrk/wurlitzer") + (synopsis "Capture C-level output in context managers") + (description + "This library helps to redirect @code{sys.stdout} to a stream or a file +while executing some piece of code, including C code running within a Python +process.") + (license license:expat))) + (define-public python-socksipy-branch (package (name "python-socksipy-branch") @@ -7729,6 +7890,55 @@ PEP 8.") (define-public python2-pep8 (package-with-python2 python-pep8)) +(define-public python-pep517 + (package + (name "python-pep517") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pep517" version)) + (sha256 + (base32 + "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (delete-file "pytest.ini") + ;; This test tries to connect to the internet + (delete-file "tests/test_meta.py") + (if tests? + (invoke "pytest") + #t)))))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-pytest" ,python-pytest) + ("python-testpath" ,python-testpath))) + (propagated-inputs + `(("python-toml" ,python-toml) + ("python-wheel" ,python-wheel))) + (home-page "https://github.com/pypa/pep517") + (synopsis "Wrappers to build Python packages using PEP 517 hooks") + (description + "Wrappers to build Python packages using PEP 517 hooks.") + (properties `((python2-variant . ,(delay python2-pep517)))) + (license license:expat))) + +;; Skip the tests so we don't create a cyclical dependency with pytest. +(define-public python2-pep517 + (let ((base (package-with-python2 + (strip-python2-variant python-pep517)))) + (package + (inherit base) + (name "python2-pep517") + (arguments + `(#:tests? #f + ,@(package-arguments base))) + (native-inputs `())))) + (define-public python-pyflakes (package (name "python-pyflakes") @@ -8019,6 +8229,48 @@ expressions after the entire file has been read. This enables support for first-class forward references that stub files use.") (license license:expat))) +(define-public python-flake8-pie + (package + (name "python-flake8-pie") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "flake8-pie" version)) + (sha256 + (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd")))) + (build-system python-build-system) + (home-page "https://github.com/sbdchd/flake8-pie") + (synopsis "Flake8 extension that implements lints") + (description + "This package provides a flake8 extension that implements miscellaneous +lints.") + (license license:bsd-2))) + +(define-public python-autoflake + (package + (name "python-autoflake") + (version "1.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "autoflake" version)) + (sha256 + (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338")))) + (build-system python-build-system) + (propagated-inputs + `(("python-pyflakes" ,python-pyflakes))) + (home-page "https://github.com/myint/autoflake") + (synopsis "Removes unused imports and unused variables") + (description + "@code{autoflake} removes unused imports and unused variables from Python +code as reported by @code{pyflakes}. + +By default, it only removes unused imports for modules that are part of the +standard library. Removal of unused variables is also disabled by default. +It also removes useless @code{pass} statements.") + (license license:expat))) + (define-public python-mistune (package (name "python-mistune") @@ -8173,6 +8425,23 @@ output.") (define-public python2-cram (package-with-python2 python-cram)) +(define-public python-crashtest + (package + (name "python-crashtest") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "crashtest" version)) + (sha256 + (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2")))) + (build-system python-build-system) + (home-page "https://github.com/sdispater/crashtest") + (synopsis "Manage Python errors with ease") + (description + "Python library that makes exceptions handling and inspection easier.") + (license license:expat))) + (define-public python-straight-plugin (package (name "python-straight-plugin") @@ -8505,6 +8774,25 @@ Unicode-aware. It is not intended as an end-user tool.") (define-public python2-xlrd (package-with-python2 python-xlrd)) +(define-public python-immutables + (package + (name "python-immutables") + (version "0.14") + (source + (origin + (method url-fetch) + (uri (pypi-uri "immutables" version)) + (sha256 + (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0")))) + (build-system python-build-system) + (home-page "https://github.com/MagicStack/immutables") + (synopsis "High-performance immutable mapping type for Python") + (description + "An immutable mapping type for Python. The underlying datastructure is a +Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other +functional languages.") + (license license:asl2.0))) + (define-public python-prettytable (package (name "python-prettytable") @@ -8529,6 +8817,36 @@ printing of sub-tables by specifying a row range.") (define-public python2-prettytable (package-with-python2 python-prettytable)) +(define-public python-curio + (package + (name "python-curio") + (version "1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "curio" version)) + (sha256 + (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + ;; Tries to open an outgoing connection. + "not test_ssl_outgoing")))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/dabeaz/curio") + (synopsis "Coroutine-based library for concurrent Python") + (description + "Curio is a coroutine-based library for concurrent Python systems +programming. It provides standard programming abstractions such as as +tasks, sockets, files, locks, and queues.") + (license license:bsd-3))) + (define-public python-tables (package (name "python-tables") @@ -8601,6 +8919,35 @@ designed to efficiently cope with extremely large amounts of data.") (define-public python2-tables (package-with-python2 python-tables)) +(define-public python-sniffio + (package + (name "python-sniffio") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sniffio" version)) + (sha256 + (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-curio" ,python-curio) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov))) + (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 +running under. It supports multiple async I/O packages, like Trio, and +asyncio.") + ;; Either license applies. + (license (list license:expat license:asl2.0)))) + (define-public python-pytest-black (package (name "python-pytest-black") @@ -9080,10 +9427,14 @@ Python's @code{ctypes} foreign function interface (FFI).") (native-inputs (if (%current-target-system) `(("self" ,this-package)) '())) - (synopsis "Python bindings to the libmagic file type guesser. Note that -this module and the python-magic module both provide a \"magic.py\" file; -these two modules, which are different and were developed separately, both -serve the same purpose: provide Python bindings for libmagic."))) + (synopsis "Python bindings to the libmagic file type guesser") + (description "This package provides Python bindings to the libmagic file +type guesser. + +Note that this module and the @code{python-magic} module both provide a +@file{magic.py} file; these two modules, which are different and were +developed separately, both serve the same purpose: provide Python bindings for +libmagic."))) (define-public python2-file (package-with-python2 python-file)) @@ -9252,6 +9603,64 @@ functions to find and load entry points.") from elisp.") (license license:gpl3))) +(define-public python-forex-python + (package + (name "python-forex-python") + (version "1.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "forex-python" version)) + (sha256 + (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj")))) + (build-system python-build-system) + (arguments + ;; Tests are not included in the PyPI tarball. Also, the tests in the + ;; repository require online data. + `(#:tests? #f)) + (propagated-inputs + `(("python-requests" ,python-requests) + ("python-simplejson" ,python-simplejson))) + (home-page "https://github.com/MicroPyramid/forex-python") + (synopsis "Foreign exchange rates and currency conversion") + (description + "@code{python-forex-python} can be used to manipulate foreign +exchange rates and to operate currency conversions. + +Features: +@itemize +@item List all currency rates. +@item BitCoin price for all currencies. +@item Converting amount to BitCoins. +@item Get historical rates for any day since 1999. +@item Conversion rate for one currency(ex; USD to INR). +@item Convert amount from one currency to other.('USD 10$' to INR). +@item Currency symbols. +@item Currency names. +@end itemize") + (license license:expat))) + +(define-public python-simpleeval + (package + (name "python-simpleeval") + (version "0.9.10") + (source + (origin + (method url-fetch) + (uri (pypi-uri "simpleeval" version)) + (sha256 + (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839")))) + (build-system python-build-system) + (home-page "https://github.com/danthedeckie/simpleeval") + (synopsis "Simple, safe single expression evaluator library") + (description + "This package provides a quick single file library for easily adding +evaluatable expressions into python projects. Say you want to allow a user +to set an alarm volume, which could depend on the time of day, alarm level, +how many previous alarms had gone off, and if there is music playing at the +time.") + (license license:expat))) + (define-public python-nbconvert (package (name "python-nbconvert") @@ -12168,13 +12577,13 @@ Wikipedia code samples at (define-public python-cleo (package (name "python-cleo") - (version "0.7.6") + (version "0.8.1") (source (origin (method url-fetch) (uri (pypi-uri "cleo" version)) (sha256 (base32 - "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr")))) + "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix")))) (build-system python-build-system) (native-inputs `( ;; For testing @@ -12274,17 +12683,19 @@ more, possibly remote, memcached servers.") (define-public python-clikit (package (name "python-clikit") - (version "0.4.2") + (version "0.6.2") (source (origin (method url-fetch) (uri (pypi-uri "clikit" version)) (sha256 (base32 - "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn")))) + "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4")))) (build-system python-build-system) + (arguments '(#:tests? #f)) ; no test in the PyPI tarball (propagated-inputs - `(("python-pastel" ,python-pastel) + `(("python-crashtest" ,python-crashtest) + ("python-pastel" ,python-pastel) ("python-pylev" ,python-pylev))) (home-page "https://github.com/sdispater/clikit") (synopsis "Group of utilities to build command line interfaces") @@ -12382,7 +12793,12 @@ database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.") (substitute* "setup.py" ;; poetry won't update version as 21.0.0 relies on python > 3.6 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0") - (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")) + (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0") + ;; Reported upstream: + ;; . + (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0") + (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0") + (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0")) #t))))) (propagated-inputs `(("python-cachecontrol" ,python-cachecontrol) @@ -12510,13 +12926,13 @@ inspection of types defined in the Python standard typing module.") (define-public python-lazy-object-proxy (package (name "python-lazy-object-proxy") - (version "1.4.3") + (version "1.5.1") (source (origin (method url-fetch) (uri (pypi-uri "lazy-object-proxy" version)) (sha256 (base32 - "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k")))) + "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp")))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm))) (build-system python-build-system) @@ -12746,14 +13162,13 @@ collections of data.") (define-public python-prompt-toolkit (package (name "python-prompt-toolkit") - (version "3.0.5") + (version "3.0.7") (source (origin (method url-fetch) (uri (pypi-uri "prompt_toolkit" version)) (sha256 - (base32 - "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan")))) + (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2")))) (build-system python-build-system) (arguments `(#:phases @@ -12779,7 +13194,8 @@ interfaces in Python. It's like GNU Readline but it also features syntax highlighting while typing, out-of-the-box multi-line input editing, advanced code completion, incremental search, support for Chinese double-width characters, mouse support, and auto suggestions.") - (license license:bsd-3))) + (license license:bsd-3) + (properties `((python2-variant . ,(delay python-prompt-toolkit-2)))))) (define-public python-prompt-toolkit-2 (package (inherit python-prompt-toolkit) @@ -12795,7 +13211,8 @@ characters, mouse support, and auto suggestions.") (propagated-inputs `(("python-wcwidth" ,python-wcwidth) ("python-six" ,python-six) - ("python-pygments" ,python-pygments))))) + ("python-pygments" ,python-pygments))) + (properties '()))) (define-public python2-prompt-toolkit (package-with-python2 python-prompt-toolkit-2)) @@ -12854,18 +13271,18 @@ well.") (define-public ptpython (package (name "ptpython") - (version "0.34") + (version "3.0.5") (source (origin (method url-fetch) (uri (pypi-uri "ptpython" version)) (sha256 (base32 - "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13")))) + "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h")))) (build-system python-build-system) (arguments '(#:tests? #f)) ; FIXME: No tests in pypi tarball. (propagated-inputs - `(("python-docopt" ,python-docopt) + `(("python-appdirs" ,python-appdirs) ("python-jedi" ,python-jedi) ("python-prompt-toolkit" ,python-prompt-toolkit) ("python-pygments" ,python-pygments))) @@ -14026,7 +14443,7 @@ PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which is part of the RSA Public Key Cryptography Standards series. The provided implementation takes a password or a passphrase and a salt value (and optionally a iteration count, a digest module, and a MAC module) and provides -a file-like object from which an arbitrarly-sized key can be read.") +a file-like object from which an arbitrarily-sized key can be read.") (license license:expat))) (define-public python2-pbkdf2 @@ -14106,7 +14523,7 @@ to ansi-escaped strings suitable for display in a terminal.") (synopsis "Convert ANSI-decorated console output to HTML") (description "@command{ansi2html} is a Python library and command line utility for -convering text with ANSI color codes to HTML or LaTeX.") +converting text with ANSI color codes to HTML or LaTeX.") (license license:gpl3+))) (define-public python2-ansi2html @@ -14175,16 +14592,18 @@ through a Python API.") (define-public python-pycosat (package (name "python-pycosat") - (version "0.6.1") + (version "0.6.3") (source (origin (method url-fetch) - (uri (pypi-uri "pycosat" version)) + (uri (pypi-uri "pycosat" version ".zip")) (sha256 (base32 - "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l")))) + "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac")))) ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/ (build-system python-build-system) + (native-inputs + `(("unzip" ,unzip))) (home-page "https://github.com/ContinuumIO/pycosat") (synopsis "Bindings to picosat (a SAT solver)") (description @@ -14590,13 +15009,20 @@ clone, while other processes access the original tree.") (define-public python-astroid (package (name "python-astroid") - (version "2.4.1") + (version "2.4.2") (source (origin (method url-fetch) (uri (pypi-uri "astroid" version)) (sha256 - (base32 "1h99jal7ax07xna1djw5z7hpgb8vjrl3hrrg49p1phljwniww5sc")))) + (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Check to see if the version pinning has been removed. + (substitute* "astroid/__pkginfo__.py" + (("==1\\.4\\.\\*") ">=1.4.0")) + #t)))) (build-system python-build-system) (propagated-inputs `(("python-lazy-object-proxy" ,python-lazy-object-proxy) @@ -14763,13 +15189,13 @@ in other versions.") (define-public python-mamba (package (name "python-mamba") - (version "0.11.0") + (version "0.11.1") (source (origin (method url-fetch) (uri (pypi-uri "mamba" version)) (sha256 (base32 - "0bpbgz9v63rpanjjpc8bnvrr8fkms5rzylh77xrcki1x6az7gnsz")))) + "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; No test (propagated-inputs @@ -15740,14 +16166,14 @@ validating Swagger API specifications.") (define-public python-apache-libcloud (package (name "python-apache-libcloud") - (version "2.4.0") + (version "3.1.0") (source (origin (method url-fetch) (uri (pypi-uri "apache-libcloud" version)) (sha256 (base32 - "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j")))) + "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v")))) (build-system python-build-system) (arguments `(#:phases @@ -15760,22 +16186,10 @@ validating Swagger API specifications.") #t)) (add-after 'unpack 'patch-tests (lambda _ - (substitute* "./libcloud/test/test_file_fixtures.py" - ;; See . - (("def _ascii") "def _raw_data(self, method, url, body, headers): - return (httplib.OK, - \"1234abcd\", - {\"test\": \"value\"}, - httplib.responses[httplib.OK]) - def _ascii")) (substitute* "libcloud/test/compute/test_ssh_client.py" (("class ShellOutSSHClientTests") "@unittest.skip(\"Guix container doesn't have ssh service\") -class ShellOutSSHClientTests") - ;; See . - (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") - (("'.xF0', '.x90', '.x8D', '.x88'") - "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) +class ShellOutSSHClientTests")) #t)) (add-before 'check 'copy-secret (lambda _ @@ -16993,14 +17407,13 @@ based on the CPython 2.7 and 3.7 parsers.") (define-public python-typing (package (name "python-typing") - (version "3.7.4.1") + (version "3.7.4.3") (source (origin (method url-fetch) (uri (pypi-uri "typing" version)) (sha256 - (base32 - "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi")))) + (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi")))) (build-system python-build-system) (home-page "https://docs.python.org/3/library/typing.html") (synopsis "Type hints for Python") @@ -18803,6 +19216,149 @@ easy-to-extend subclass system, and lots of primitive constructs to make your work easier.") (license license:expat))) +(define-public python-outcome + (package + (name "python-outcome") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "outcome" version)) + (sha256 + (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-asyncio" ,python-pytest-asyncio))) + (propagated-inputs + `(("python-async-generator" ,python-async-generator) + ("python-attrs" ,python-attrs))) + (home-page "https://github.com/python-trio/outcome") + (synopsis "Capture the outcome of Python function calls") + (description + "Capture the outcome of Python function calls. Extracted from the Trio +project.") + ;; Either license applies. + (license (list license:expat license:asl2.0)))) + +(define-public python-trio + (package + (name "python-trio") + (version "0.16.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trio" version)) + (sha256 + (base32 "0g6gkwz6i05rm9ym4l4imxakzld7qcgxhb21kprilchcav87s1nz")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'change-home + (lambda _ + ;; Tests require a writable home. + (setenv "HOME" "/tmp") + #t)) + (replace 'check + (lambda _ + (invoke "pytest" "-vv" "-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" + ;; 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"))))))) + (native-inputs + `(("python-astor" ,python-astor) + ("python-ipython" ,python-ipython) + ("python-jedi" ,python-jedi) + ("python-pylint" ,python-pylint) + ("python-pyopenssl" ,python-pyopenssl) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-trustme" ,python-trustme))) + (propagated-inputs + `(("python-attrs" ,python-attrs) + ("python-idna" ,python-idna) + ("python-outcome" ,python-outcome) + ("python-sniffio" ,python-sniffio) + ("python-sortedcontainers" + ,python-sortedcontainers))) + (home-page "https://github.com/python-trio/trio") + (synopsis "Friendly Python library for async concurrency and I/O") + (description + "Trio strives to be a production-quality, async/await-native I/O library +for Python. Like all async libraries, its main purpose is to help you write +programs that do multiple things at the same time with parallelized I/O.") + ;; Either license applies. + (license (list license:expat license:asl2.0)))) + +(define-public python-trio-typing + (package + (name "python-trio-typing") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trio-typing" version)) + (sha256 + (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-attrs" ,python-attrs) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-mypy" ,python-mypy) + ("python-mypy-extensions" + ,python-mypy-extensions) + ("python-trio" ,python-trio) + ("python-typing-extensions" + ,python-typing-extensions))) + (home-page "https://github.com/python-trio/trio-typing") + (synopsis "Static type checking support for Trio and related projects") + (description + "This package provides: + +@itemize +@item PEP 561 typing stubs packages for the Trio project packages: + +@itemize +@item trio (@code{trio-stubs}) +@item outcome (@code{outcome-stubs}) +@item async_generator (@code{async_generator-stubs}) +@end itemize + +@item A package @code{trio_typing} containing types that Trio programs often +want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and +a mypy plugin that smooths over some limitations in the basic type hints. +@end itemize") + ;; Either license applies. + (license (list license:expat license:asl2.0)))) + (define-public python-humanize (package (name "python-humanize") @@ -19929,6 +20485,49 @@ such as a file modification and trigger an action. This is similar to inotify, but portable.") (license license:asl2.0))) +(define-public python-watchgod + (package + (name "python-watchgod") + (version "0.6") + (source + (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/samuelcolvin/watchgod") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (native-inputs + `(("python-coverage" ,python-coverage) + ("python-docutils" ,python-docutils) + ("python-flake8" ,python-flake8) + ("python-isort" ,python-isort) + ("python-pycodestyle" ,python-pycodestyle) + ("python-pyflakes" ,python-pyflakes) + ("python-pygments" ,python-pygments) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-aiohttp" ,python-pytest-aiohttp) + ("python-pytest-mock" ,python-pytest-mock) + ("python-pytest-sugar" ,python-pytest-sugar) + ("python-pytest-toolbox" ,python-pytest-toolbox))) + (home-page "https://github.com/samuelcolvin/watchgod") + (synopsis "Simple, modern file watching and code reload in Python") + (description + "Simple, modern file watching and code reload in Python inspired by +@code{watchdog}. Among the differences are a unified approach for each +operating systems and an elegant approach to concurrency using threading.") + (license license:expat))) + (define-public python-wget (package (name "python-wget") @@ -21250,3 +21849,133 @@ and have a maximum lifetime built-in.") "This package contains a small collection of test tool plugins for @code{nose2} and @code{flake8}.") (license license:asl2.0))) + +(define-public python-devtools + (package + (name "python-devtools") + (version "0.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/samuelcolvin/python-devtools") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-mock" ,python-pytest-mock))) + (propagated-inputs + `(("python-pygments" ,python-pygments))) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest") + #t))))) + (home-page "https://github.com/samuelcolvin/python-devtools") + (synopsis "Debug command and development tools") + (description + "This package provides a debug print command and other development tools. +It adds a simple and readable way to print stuff during development.") + (license license:expat))) + +(define-public python-dateparser + (package + (name "python-dateparser") + (version "0.7.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dateparser" version)) + (sha256 + (base32 + "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8")))) + (build-system python-build-system) + (inputs + `(("tzdata" ,tzdata))) + (propagated-inputs + `(("python-dateutil" ,python-dateutil) + ("python-pytz" ,python-pytz) + ("python-regex" ,python-regex) + ("python-ruamel.yaml" ,python-ruamel.yaml) + ("python-tzlocal" ,python-tzlocal))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-parameterized" ,python-parameterized))) + (arguments + `(;; TODO: Of 23320 tests, 6 fail and 53 error. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'check 'set-check-environment + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TZ" "UTC") + (setenv "TZDIR" + (string-append (assoc-ref inputs "tzdata") + "/share/zoneinfo")) + #t))))) + (home-page "https://github.com/scrapinghub/dateparser") + (synopsis + "Date parsing library designed to parse dates from HTML pages") + (description + "@code{python-dateparser} provides modules to easily parse localized +dates in almost any string formats commonly found on web pages.") + (license license:bsd-3))) + +(define-public python-dparse + (package + (name "python-dparse") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dparse" version)) + (sha256 + (base32 + "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-packaging" ,python-packaging) + ("python-pyyaml" ,python-pyyaml) + ("python-toml" ,python-toml))) + (home-page "https://github.com/pyupio/dparse") + (synopsis "Parser for Python dependency files") + (description "This package provides a parser for Python dependency files.") + (license license:expat))) + +(define-public python-safety + (package + (name "python-safety") + (version "1.9.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "safety" version)) + (sha256 + (base32 + "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-tests + (lambda _ + (substitute* "tests/test_safety.py" + ;; requires network + (("def test_check_live") "def _test_check_live")) + #t))))) + (propagated-inputs + `(("python-click" ,python-click) + ("python-dparse" ,python-dparse) + ("python-packaging" ,python-packaging) + ("python-requests" ,python-requests))) + (home-page "https://github.com/pyupio/safety") + (synopsis "Check installed dependencies for known vulnerabilities") + (description "Safety checks installed dependencies for known vulnerabilities. +By default it uses the open Python vulnerability database Safety DB.") + (license license:expat)))