diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 605 |
1 files changed, 547 insertions, 58 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index a0770df17d..f97e6a12e3 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu> @@ -26,11 +26,11 @@ ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2018, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org> ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot> ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> -;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org> +;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com> ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org> @@ -68,6 +68,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages django) + #:use-module (gnu packages graphviz) #:use-module (gnu packages groff) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) @@ -76,6 +77,7 @@ #:use-module (gnu packages python-check) #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) @@ -90,14 +92,13 @@ (define-public python-aiohttp (package (name "python-aiohttp") - (version "3.6.3") + (version "3.7.3") (source (origin (method url-fetch) (uri (pypi-uri "aiohttp" version)) (sha256 - (base32 "0i9n7h8n06m2d8ryqyk4fv1si1m44ibq7blbfaxq46vx7jydg339")) - (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch")))) + (base32 "1i3p4yrfgrf1zpbgnywqmb33ps4k51wylcxykhf2cwky0spq26lw")))) (build-system python-build-system) (arguments '(#:phases @@ -110,33 +111,41 @@ " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli")) ;; make sure the timestamp of this file is > 1990, because a few ;; tests like test_static_file_if_modified_since_past_date depend on it - (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type") - - ;; FIXME: These tests are failing due to deprecation warnings - ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7. - ;; https://github.com/aio-libs/aiohttp/issues/4477 - ;; https://github.com/aio-libs/aiohttp/issues/4525 - (with-directory-excursion "tests" - (for-each delete-file '("test_client_session.py" - "test_multipart.py" - "test_web_middleware.py" - "test_web_protocol.py" - "test_web_urldispatcher.py"))) - #t))))) + (let ((late-90s (* 60 60 24 365 30))) + (utime "tests/data.unknown_mime_type" late-90s late-90s)) + + ;; Disable test that attempts to access httpbin.org. + (substitute* "tests/test_formdata.py" + (("async def test_mark_formdata_as_processed.*" all) + (string-append "@pytest.mark.xfail\n" all))) + + ;; Don't test the aiohttp pytest plugin to avoid a dependency loop. + (delete-file "tests/test_pytest_plugin.py") + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (setenv "PYTHONPATH" + (string-append ".:" (getenv "PYTHONPATH"))) + (if tests? + (invoke "pytest" "-vv" + ;; Disable loading the aiohttp coverage plugin + ;; to avoid a circular dependency (code coverage + ;; is not very interesting to us anyway). + "-o" "addopts=''") + (format #t "test suite not run~%"))))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) ("python-async-timeout" ,python-async-timeout) - ("python-attrs" ,python-attrs) + ("python-attrs" ,python-attrs) ;note: remove for > 3.7 ("python-chardet" ,python-chardet) ("python-idna-ssl" ,python-idna-ssl) ("python-multidict" ,python-multidict) + ("python-typing-extensions" ,python-typing-extensions) ("python-yarl" ,python-yarl))) (native-inputs - `(("python-pytest-runner" ,python-pytest-runner) - ("python-pytest-xdit" ,python-pytest-xdist) - ("python-pytest-timeout" ,python-pytest-timeout) - ("python-pytest-forked" ,python-pytest-forked) + `(("python-pytest" ,python-pytest) ("python-pytest-mock" ,python-pytest-mock) + ("python-re-assert" ,python-re-assert) ("gunicorn" ,gunicorn-bootstrap) ("python-freezegun" ,python-freezegun) ("python-async-generator" ,python-async-generator))) @@ -276,6 +285,158 @@ WSGI. This package includes libraries for implementing ASGI servers.") ;; looks like the user can choose a license. (license (list license:gpl3+ license:lgpl3+ license:expat)))) +(define-public python-aws-sam-translator + (package + (name "python-aws-sam-translator") + (version "1.30.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "aws-sam-translator" version)) + (sha256 + (base32 + "0d9ppd94x2kw404m49ajswmmxgdngbs4p5ajyrdvnlivfzqbv7dx")))) + (build-system python-build-system) + (arguments + `(;; XXX: Tests are not distributed with the PyPI archive, and would + ;; introduce a circular dependency on python-cfn-lint. + #:tests? #f + #:phases (modify-phases %standard-phases + (add-after 'unpack 'loosen-requirements + (lambda _ + ;; The package needlessly specifies exact versions + ;; of dependencies, when it works fine with others. + (substitute* "requirements/base.txt" + (("(.*)(~=[0-9\\.]+)" all package version) + package)) + #t))))) + (propagated-inputs + `(("python-boto3" ,python-boto3) + ("python-jsonschema" ,python-jsonschema) + ("python-six" ,python-six))) + (home-page "https://github.com/awslabs/serverless-application-model") + (synopsis "Transform AWS SAM templates into AWS CloudFormation templates") + (description + "AWS SAM Translator is a library that transform @dfn{Serverless Application +Model} (SAM) templates into AWS CloudFormation templates.") + (license license:asl2.0))) + +(define-public python-aws-xray-sdk + (package + (name "python-aws-xray-sdk") + (version "2.6.0") + (home-page "https://github.com/aws/aws-xray-sdk-python") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12fzr0ylpa1lx3xr1x2f1jx8iiyzcr6g57fb9jign0j0lxdlbzpv")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-tests + (lambda _ + (for-each delete-file + '(;; These tests require packages not yet in Guix. + "tests/ext/aiobotocore/test_aiobotocore.py" + "tests/ext/aiohttp/test_middleware.py" + "tests/ext/pg8000/test_pg8000.py" + "tests/ext/psycopg2/test_psycopg2.py" + "tests/ext/pymysql/test_pymysql.py" + "tests/ext/pynamodb/test_pynamodb.py" + "tests/test_async_recorder.py" + + ;; FIXME: Why is this failing? + "tests/test_patcher.py" + + ;; TODO: How to configure Django for these tests. + "tests/ext/django/test_db.py" + "tests/ext/django/test_middleware.py" + + ;; These tests want to access httpbin.org. + "tests/ext/requests/test_requests.py" + "tests/ext/httplib/test_httplib.py" + "tests/ext/aiohttp/test_client.py")))) + (replace 'check + (lambda _ + (setenv "PYTHONPATH" + (string-append "./build/lib:.:" + (getenv "PYTHONPATH"))) + (invoke "pytest" "-vv" "tests")))))) + (native-inputs + `(;; These are required for the test suite. + ("python-bottle" ,python-bottle) + ("python-flask" ,python-flask) + ("python-flask-sqlalchemy" ,python-flask-sqlalchemy) + ("python-pymysql" ,python-pymysql) + ("python-pytest" ,python-pytest) + ("python-pytest-aiohttp" ,python-pytest-aiohttp) + ("python-requests" ,python-requests) + ("python-sqlalchemy" ,python-sqlalchemy) + ("python-webtest" ,python-webtest))) + (propagated-inputs + `(("python-aiohttp" ,python-aiohttp) + ("python-botocore" ,python-botocore) + ("python-future" ,python-future) + ("python-jsonpickle" ,python-jsonpickle) + ("python-urllib3" ,python-urllib3) + ("python-wrapt" ,python-wrapt))) + (synopsis "Profile applications on AWS X-Ray") + (description + "The AWS X-Ray SDK for Python enables Python developers to record and +emit information from within their applications to the AWS X-Ray service.") + (license license:asl2.0))) + +(define-public python-cfn-lint + (package + (name "python-cfn-lint") + (version "0.41.0") + (home-page "https://github.com/aws-cloudformation/cfn-python-lint") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nqs0fmj3hd7pnd9hkb4z57jvi2iv82hh6n3xxba6i6p8zgx75q4")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Remove test for the documentation update scripts + ;; to avoid a dependency on 'git'. + (delete-file + "test/unit/module/maintenance/test_update_documentation.py") + (setenv "PYTHONPATH" + (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (setenv "PATH" (string-append out "/bin:" + (getenv "PATH"))) + (invoke "python" "-m" "unittest" "discover" + "-s" "test"))))))) + (native-inputs + `(("python-pydot" ,python-pydot) + ("python-mock" ,python-mock))) + (propagated-inputs + `(("python-aws-sam-translator" ,python-aws-sam-translator) + ("python-jsonpatch" ,python-jsonpatch) + ("python-jsonschema" ,python-jsonschema) + ("python-junit-xml" ,python-junit-xml) + ("python-networkx" ,python-networkx) + ("python-pyyaml" ,python-pyyaml) + ("python-six" ,python-six))) + (synopsis "Validate CloudFormation templates") + (description + "This package lets you validate CloudFormation YAML/JSON templates against +the CloudFormation spec and additional checks. Includes checking valid values +for resource properties and best practices.") + (license license:expat))) + (define-public python-falcon (package (name "python-falcon") @@ -429,14 +590,14 @@ other HTTP libraries.") (define-public httpie (package (name "httpie") - (version "2.2.0") + (version "2.3.0") (source (origin (method url-fetch) (uri (pypi-uri "httpie" version)) (sha256 (base32 - "18058k0i3cc4ixvgzj882w693lf40283flvspbrvd876iq42ib1i")))) + "15ngl3yc186gkgqdx8iav9bpj8gxjpzz26y32z92jwyhj4cmfh6m")))) (build-system python-build-system) (arguments ;; The tests attempt to access external web servers, so we cannot run them. @@ -444,27 +605,30 @@ other HTTP libraries.") (propagated-inputs `(("python-colorama" ,python-colorama) ("python-pygments" ,python-pygments) - ("python-requests" ,python-requests))) - (home-page "https://httpie.org/") + ("python-requests" ,python-requests) + ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1))) + (home-page "https://httpie.io") (synopsis "cURL-like tool for humans") (description "A command line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more. It consists of a single http command designed for painless debugging and interaction with HTTP servers, RESTful APIs, and web services.") + ;; This was fixed in 1.0.3. + (properties `((lint-hidden-cve . ("CVE-2019-10751")))) (license license:bsd-3))) (define-public python-html2text (package (name "python-html2text") - (version "2019.8.11") + (version "2020.1.16") (source (origin (method url-fetch) (uri (pypi-uri "html2text" version)) (sha256 (base32 - "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm")))) + "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2")))) (build-system python-build-system) (arguments '(#:phases @@ -482,7 +646,94 @@ Swartz.") (license license:gpl3+))) (define-public python2-html2text - (package-with-python2 python-html2text)) + (let ((base (package-with-python2 python-html2text))) + (package + (inherit base) + ;; This is the last version with support for Python 2. + (version "2019.8.11") + (source (origin + (method url-fetch) + (uri (pypi-uri "html2text" version)) + (sha256 + (base32 + "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))))) + +(define-public python-jose + (package + (name "python-jose") + (version "3.2.0") + (home-page "http://github.com/mpdavis/python-jose") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1xmnf8whzv2gnkkdv0fqcn9qwmcc7y647p4kw9fi3lvcp9kch8vi")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv") + (format #t "test suite not run~%")) + #t))))) + (native-inputs + `(;; All native inputs are for tests. + ("python-pyasn1" ,python-pyasn1) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-runner" ,python-pytest-runner))) + (propagated-inputs + `(("python-cryptography" ,python-cryptography) + ("python-rsa" ,python-rsa) + ("python-six" ,python-six))) + (synopsis "JOSE implementation in Python") + (description + "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies +- JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and +JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign +content using a variety of algorithms.") + (license license:expat))) + +(define-public python-jsonpickle + (package + (name "python-jsonpickle") + (version "1.4.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "jsonpickle" version)) + (sha256 + (base32 + "1fn86z468hamw8njh2grw2xdhsm7g48dyxs3lw0n10nn1g6vgm78")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (setenv "PYTHONPATH" + (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (invoke "pytest" "-vv" + ;; Prevent running the flake8 and black + ;; pytest plugins, which only tests style + ;; and frequently causes harmless failures. + "-o" "addopts=''")))))) + (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-toml" ,python-toml) ;XXX: for setuptools_scm[toml] + ;; For tests. + ("python-numpy" ,python-numpy) + ("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest))) + (home-page "https://jsonpickle.github.io/") + (synopsis "Serialize object graphs into JSON") + (description + "This package provides a Python library for serializing any arbitrary +object graph to and from JSON.") + (license license:bsd-3))) (define-public python-mechanicalsoup (package @@ -709,6 +960,80 @@ both of which are installed automatically if you install this library.") (define-public python2-flask-babel (package-with-python2 python-flask-babel)) +(define-public python-flask-cors + (package + (name "python-flask-cors") + (version "3.0.9") + (source (origin + (method url-fetch) + (uri (pypi-uri "Flask-Cors" version)) + (sha256 + (base32 + "1f36hkaxc92zn12f88fkzwifdvlvsnmlp1dv3p5inpcc500c3kvb")))) + (build-system python-build-system) + (native-inputs + `(("python-flask" ,python-flask) + ("python-nose" ,python-nose) + ("python-packaging" ,python-packaging))) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page "https://flask-cors.readthedocs.io/en/latest/") + (synopsis "Handle Cross-Origin Resource Sharing with Flask") + (description + "This package provides a Flask extension for handling @acronym{CORS,Cross +Origin Resource Sharing}, making cross-origin AJAX possible.") + (license license:expat))) + +(define-public python-flask-markdown + (package + (name "python-flask-markdown") + (version "0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Flask-Markdown" version)) + (sha256 + (base32 + "0l32ikv4f7va926jlq4f7gx0xid247bhlxl6bd9av5dk8ljz1hyq")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; Tests seem to be incompatible with latest python + (propagated-inputs + `(("python-markdown" ,python-markdown) + ("python-flask" ,python-flask))) + (native-inputs + `(("python-nose" ,python-nose))) + (home-page "https://github.com/dcolish/flask-markdown") + (synopsis "Small extension to help with using Markdown in Flask") + (description + "Flask-Markdown supports several extensions for Markdown and integrates +into Jinja2 by default.") + (license license:bsd-3))) + +(define-public python-flask-session + (package + (name "python-flask-session") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Flask-Session" version)) + (sha256 + (base32 + "08s4msg8jzb8vgb9bd491zvrzhrdldxdw6vimb0kx5kgy2xy4s07")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; Tests require the various storage backends to be present + (propagated-inputs + `(("python-flask" ,python-flask))) + (home-page "https://github.com/fengsp/flask-session") + (synopsis "Adds server-side session support to your Flask application") + (description + "Flask-Session is an extension for Flask that adds support for +Server-side sessions, with a variety of different backends for session +storage.") + (license license:bsd-3))) + (define-public python-html5lib (package (name "python-html5lib") @@ -785,6 +1110,41 @@ C, yielding parse times that can be a thirtieth of the html5lib parse times.") (define-public python2-html5-parser (package-with-python2 python-html5-parser)) +(define-public python-minio + (package + (name "python-minio") + (version "6.0.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "minio" version)) + (sha256 + (base32 + "1cxpa0m7mdvpdbc1g6wlihq6ja4g4paxkl6f3q84bbnx07zpbllp")))) + (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-failing-tests + (lambda _ + ;; This test requires network access. + (delete-file "tests/unit/credentials_test.py") + #t))))) + (native-inputs + `(("python-faker" ,python-faker) + ("python-mock" ,python-mock) + ("python-nose" ,python-nose))) + (propagated-inputs + `(("python-certifi" ,python-certifi) + ("python-configparser" ,python-configparser) + ("python-dateutil" ,python-dateutil) + ("python-pytz" ,python-pytz) + ("python-urllib3" ,python-urllib3))) + (home-page "https://github.com/minio/minio-py") + (synopsis "Programmatically access Amazon S3 from Python") + (description + "This package provides a Python library for interacting with any +Amazon S3 compatible object storage server.") + (license license:asl2.0))) + (define-public python-pycurl (package (name "python-pycurl") @@ -955,19 +1315,22 @@ options.") (package (inherit python-cssutils) (name "python-css-parser") - (version "1.0.4") + (version "1.0.6") (source (origin (method url-fetch) (uri (pypi-uri "css-parser" version ".tar.gz")) (sha256 - (base32 - "0i4xfykiffxzr4f6y0m2ggqvx1rzam6pw6krlr5k6ldf29akbay7")))) + (base32 "0bmg4kiiir6pj9x3sd12x4dz2c1xpp2bn5nn60fxnbk2lnl4im2f")))) (home-page "https://github.com/ebook-utils/css-parser") (synopsis "Fork of cssutils modified for parsing ebooks") (description - "Css-parser is a fork of cssutils 1.0.2, updated and modified for parsing -ebooks, due to cssutils not receiving updates as of 1.0.2.") + "Css-parser is a Python package for parsing and building CSS +Cascading Style Sheets. Currently it provides a DOM only and no rendering +options. + +It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to +cssutils not receiving updates as of 1.0.2.") (license license:lgpl3+))) (define-public python2-css-parser @@ -1007,6 +1370,49 @@ another XPath engine to find the matching elements in an XML or HTML document.") (define-public python2-cssselect (package-with-python2 python-cssselect)) +(define-public python-databricks-cli + (package + (name "python-databricks-cli") + (version "0.14.1") + (home-page "https://github.com/databricks/databricks-cli") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03w19rzh72jll9phai23wp0c2mlv39qsrv50mhckziy39z60yxh8")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (setenv "PYTHONPATH" + (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (invoke "pytest" "tests" "-vv" + ;; XXX: This fails with newer Pytest + ;; (upstream uses Pytest 3..). + "-k" "not test_get_request_with_list")))))) + (native-inputs + `(;; For tests. + ("python-decorator" ,python-decorator) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest) + ("python-requests-mock" ,python-requests-mock))) + (propagated-inputs + `(("python-click" ,python-click) + ("python-configparser" ,python-configparser) + ("python-requests" ,python-requests) + ("python-six" ,python-six) + ("python-tabulate" ,python-tabulate))) + (synopsis "Command line interface for Databricks") + (description + "The Databricks Command Line Interface is a tool which provides an easy +to use interface to the Databricks platform. The CLI is built on top of the +Databricks REST APIs.") + (license license:asl2.0))) + (define-public python-openid-cla (package (name "python-openid-cla") @@ -1157,6 +1563,37 @@ WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can utilise asyncio, uvloop, or trio worker types.") (license license:expat))) +(define-public python-querystring-parser + (package + (name "python-querystring-parser") + (version "1.2.4") + (source (origin + (method url-fetch) + (uri (pypi-uri "querystring_parser" version)) + (sha256 + (base32 + "0qlar8a0wa003hm2z6wcpb625r6vjj0a70rsni9h8lz0zwfcwkv4")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; XXX FIXME: This test is broken with Python 3.7: + ;; https://github.com/bernii/querystring-parser/issues/35 + (substitute* "querystring_parser/tests.py" + (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)") + "True")) + (invoke "python" "querystring_parser/tests.py")))))) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page "https://github.com/bernii/querystring-parser") + (synopsis "QueryString parser that correctly handles nested dictionaries") + (description + "This package provides a query string parser for Python and Django +projects that correctly creates nested dictionaries from sent form/querystring +data.") + (license license:expat))) + (define-public python-tornado (package (name "python-tornado") @@ -2277,15 +2714,16 @@ supports url redirection and retries, and also gzip and deflate decoding.") (define-public awscli (package + ;; Note: updating awscli typically requires updating botocore as well. (name "awscli") - (version "1.18.6") + (version "1.18.183") (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 (base32 - "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm")))) + "0n1pmdl33r1v8qnrcg08ihvri9zm4fvsp14605vwmlkxvs8nb7s5")))) (build-system python-build-system) (arguments ;; FIXME: The 'pypi' release does not contain tests. @@ -2730,6 +3168,19 @@ provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients." (define-public python2-cachecontrol (package-with-python2 python-cachecontrol)) +(define-public python-cachecontrol-0.11 + (package + (inherit python-cachecontrol) + (name "python-cachecontrol") + (version "0.11.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "CacheControl" version)) + (sha256 + (base32 + "07jsfhlbcwgqg6ayz8nznzaqg5rmxqblbzxz1qvg5wc44pcjjy4g")))))) + (define-public python-betamax (package (name "python-betamax") @@ -2783,13 +3234,13 @@ Betamax.") (define-public python-s3transfer (package (name "python-s3transfer") - (version "0.2.0") + (version "0.3.3") (source (origin (method url-fetch) (uri (pypi-uri "s3transfer" version)) (sha256 (base32 - "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj")))) + "1nzp5kwmy9669334shcz9ipg89jgpdqhrmbkgdg18r7wmvi3f6lj")))) (build-system python-build-system) (arguments `(#:phases @@ -2892,21 +3343,30 @@ pretty printer and a tree visitor.") (name "python-flask-basicauth") (version "0.2.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "Flask-BasicAuth" version)) - (sha256 - (base32 - "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz")))) + (origin + (method url-fetch) + (uri (pypi-uri "Flask-BasicAuth" version)) + (sha256 + (base32 + "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz")))) (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-imports + (lambda _ + (substitute* '("docs/index.rst" + "docs/conf.py" + "flask_basicauth.py" + "test_basicauth.py") + (("flask\\.ext\\.basicauth") + "flask_basicauth")) + #t))))) (propagated-inputs `(("python-flask" ,python-flask))) - (home-page - "https://github.com/jpvanhal/flask-basicauth") - (synopsis - "HTTP basic access authentication for Flask") + (home-page "https://github.com/jpvanhal/flask-basicauth") + (synopsis "HTTP basic access authentication for Flask") (description - "This package provides HTTP basic access authentication for Flask.") + "This package provides HTTP basic access authentication for Flask.") (license license:bsd-3))) (define-public python-flask-htpasswd @@ -3517,16 +3977,15 @@ addon modules.") (define-public python-bottle (package (name "python-bottle") - (version "0.12.18") + (version "0.12.19") (source (origin (method url-fetch) (uri (pypi-uri "bottle" version)) (sha256 - (base32 - "17pn43kzr7m6czjbm4nda7kzs4ap9mmb30qfbhifyzas2i5vf688")))) + (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9")))) (build-system python-build-system) - (home-page "http://bottlepy.org/") + (home-page "https://bottlepy.org/") (synopsis "WSGI framework for small web-applications.") (description "@code{python-bottle} is a WSGI framework for small web-applications.") (license license:expat))) @@ -5137,14 +5596,13 @@ Encoding for HTTP.") (define-public python-cloudscraper (package (name "python-cloudscraper") - (version "1.2.46") + (version "1.2.48") (source (origin (method url-fetch) (uri (pypi-uri "cloudscraper" version)) (sha256 - (base32 - "1br4p648yassywsd7whz1c7s10rwdysnd7wdqfjq9bksqfxrac3r")) + (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv")) (modules '((guix build utils))) (snippet '(with-directory-excursion "cloudscraper" @@ -5155,6 +5613,10 @@ Encoding for HTTP.") "captcha/deathbycaptcha.py" "interpreters/js2py.py" "interpreters/v8.py")) + (substitute* "__init__.py" + ;; Perhaps it's a joke, but don't promote proprietary software. + (("([Th]is feature is not available) in the .*'" _ prefix) + (string-append prefix ".'"))) #t)))) (build-system python-build-system) (propagated-inputs @@ -5169,3 +5631,30 @@ Encoding for HTTP.") "This module acts as a webbrowser solving Cloudflare's Javascript challenges.") (license license:expat))) + +(define-public python-imap-tools + (package + (name "python-imap-tools") + (version "0.29.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "imap_tools" version)) + (sha256 + (base32 + "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb")))) + (build-system python-build-system) + (arguments '(#:tests? #f)) ; tests require internet access + (home-page "https://github.com/ikvk/imap_tools") + (synopsis "Work with email and mailbox by IMAP") + (description + "This Python library provides tools to deal with email and mailboxes +over IMAP: + +@itemize +@item Parsed email message attributes +@item Query builder for searching emails +@item Work with emails in folders (copy, delete, flag, move, seen) +@item Work with mailbox folders (list, set, get, create, exists, rename, delete, status) +@end itemize") + (license license:asl2.0))) |