From ecceef27c8913654714b091243263b9e590e3f8a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 27 Mar 2020 13:55:03 +0100 Subject: gnu: gunicorn: Update to 20.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-web.scm (gunicorn) [version]: Update to 20.0.4 [arguments] Re-enable previously failing tests Signed-off-by: Ludovic Courtès --- gnu/packages/python-web.scm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 26e2fe04ec..19c08026f2 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3390,14 +3390,14 @@ hard or impossible to fix in cssselect.") (define-public gunicorn (package (name "gunicorn") - (version "20.0.0") + (version "20.0.4") (source (origin (method url-fetch) (uri (pypi-uri "gunicorn" version)) (sha256 (base32 - "0l1zm8a0vz8ws3lkn8q9a0f93ipdzyvlf2zlwdj5xyadh6jdwsgg")))) + "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r")))) (outputs '("out" "doc")) (build-system python-build-system) (arguments @@ -3413,11 +3413,6 @@ hard or impossible to fix in cssselect.") (lambda _ (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) - ;; Remove test modules failing due to libc not found due to - ;; section '.dynamic' not found in libc.so - (delete-file "tests/test_arbiter.py") - (delete-file "tests/test_config.py") - (delete-file "tests/test_sock.py") (invoke "pytest"))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) -- cgit v1.3 From 44dbd856b7e937df890314812c532eceb26bfefc Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 27 Mar 2020 13:58:11 +0100 Subject: gnu: python-aiohttp: Enable tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-web.scm (python-aiohttp) [arguments]: Enable tests [native-inputs] Add test dependencies [patches] Add test case patch * gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch: New file * gnu/local.mk (dist_patch_DATA): Add it Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + .../python-aiohttp-3.6.2-no-warning-fail.patch | 34 ++++++++++++++++++++ gnu/packages/python-web.scm | 36 ++++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 19ab32c0f5..6c85e6e806 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1338,6 +1338,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3.8-search-paths.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ + %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch \ %D%/packages/patches/python-alembic-exceptions-cause.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ diff --git a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch b/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch new file mode 100644 index 0000000000..6cdddefd50 --- /dev/null +++ b/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch @@ -0,0 +1,34 @@ +Do not fail test on runtime warning like: RuntimeWarning: coroutine 'noop2' was +never awaited. This could be related to +https://github.com/aio-libs/aiohttp/commit/60f01cca36b9f9d8d35dd351384eaae2f8fd0d4b, +which does not fix this issue though. + +--- a/aiohttp/pytest_plugin.py 2019-10-09 18:52:31.000000000 +0200 ++++ b/aiohttp/pytest_plugin.py 2020-03-05 08:35:48.230396025 +0100 +@@ -120,15 +120,6 @@ + """ + with warnings.catch_warnings(record=True) as _warnings: + yield +- rw = ['{w.filename}:{w.lineno}:{w.message}'.format(w=w) +- for w in _warnings # type: ignore +- if w.category == RuntimeWarning] +- if rw: +- raise RuntimeError('{} Runtime Warning{},\n{}'.format( +- len(rw), +- '' if len(rw) == 1 else 's', +- '\n'.join(rw) +- )) + + + @contextlib.contextmanager +--- a/tests/test_pytest_plugin.py 2020-03-05 09:26:58.502284893 +0100 ++++ a/tests/test_pytest_plugin.py 2020-03-05 09:27:06.074284619 +0100 +@@ -170,7 +170,7 @@ + expected_outcomes = ( + {'failed': 0, 'passed': 2} + if IS_PYPY and bool(os.environ.get('PYTHONASYNCIODEBUG')) +- else {'failed': 1, 'passed': 1} ++ else {'failed': 0, 'passed': 2} + ) + """Under PyPy "coroutine 'foobar' was never awaited" does not happen.""" + result.assert_outcomes(**expected_outcomes) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 19c08026f2..3686432a1d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -90,10 +90,23 @@ (uri (pypi-uri "aiohttp" version)) (sha256 (base32 - "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5")))) + "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5")) + (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch")))) + (build-system python-build-system) (arguments - `(#:tests? #f)) ;missing pytest-timeout + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + ;; disable brotli tests, because we’re not providing that optional library + (substitute* "tests/test_http_parser.py" + ((" async def test_feed_eof_no_err_brotli") + " @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") + #t))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) ("python-async-timeout" ,python-async-timeout) @@ -102,6 +115,15 @@ ("python-idna-ssl" ,python-idna-ssl) ("python-multidict" ,python-multidict) ("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-mock" ,python-pytest-mock) + ("gunicorn" ,gunicorn-bootstrap) + ("python-freezegun" ,python-freezegun) + ("python-async-generator" ,python-async-generator))) (home-page "https://github.com/aio-libs/aiohttp/") (synopsis "Async HTTP client/server framework (asyncio)") (description "@code{aiohttp} is an asynchronous HTTP client/server @@ -3447,6 +3469,16 @@ various web frameworks, simply implemented, light on server resources, and fairly speedy.") (license license:expat))) +;; break cyclic dependency for python-aiohttp, which depends on gunicorn for +;; its tests +(define-public gunicorn-bootstrap + (package + (inherit gunicorn) + (name "gunicorn") + (arguments `(#:tests? #f)) + (properties '((hidden? . #t))) + (native-inputs `()))) + (define-public python-translation-finder (package (name "python-translation-finder") -- cgit v1.3 From 67dbc06de1715bd1f04069291ab9fe31d9e8dc8e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 11 Apr 2020 15:21:25 +0200 Subject: gnu: python-flask: Update to 1.1.2. * gnu/packages/python-web.scm (python-flask): Update to 1.1.2. --- gnu/packages/python-web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 3686432a1d..a9a22f565d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1774,13 +1774,13 @@ minimum of WSGI.") (define-public python-flask (package (name "python-flask") - (version "1.1.1") + (version "1.1.2") (source (origin (method url-fetch) (uri (pypi-uri "Flask" version)) (sha256 (base32 - "0ljdjgyjn7vh8ic1n1dc2l1cl421i6pr3kx5sz2w5irhyfbg3y8k")))) + "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf")))) (build-system python-build-system) (arguments '(#:phases -- cgit v1.3 From 658505d7a92f0518e1fc4c965bdaa389a6e83f2c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 11 Apr 2020 16:35:29 +0200 Subject: gnu: python-genshi: Update to 0.7.3. * gnu/packages/python-web.scm (python-genshi): Update to 0.7.3. --- gnu/packages/python-web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index a9a22f565d..1d99239dbb 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2672,7 +2672,7 @@ for Flask programs that are using @code{python-alembic}.") (define-public python-genshi (package (name "python-genshi") - (version "0.7.2") + (version "0.7.3") (source (origin (method git-fetch) @@ -2681,7 +2681,7 @@ for Flask programs that are using @code{python-alembic}.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "06rch30x10l105k5b6rahd839lkhmgrzn6691wbci0cb2fzps32w")))) + (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf")))) (build-system python-build-system) (home-page "https://genshi.edgewall.org/") (synopsis "Toolkit for generation of output for the web") -- cgit v1.3 From 82bd276d604785725116976b5388b40d679e5742 Mon Sep 17 00:00:00 2001 From: Holger Peters Date: Fri, 24 Apr 2020 20:38:24 +0200 Subject: gnu: python-pastedeploy: Update to 2.1.0 * gnu/packages/python-web.scm (python-pastedeploy): Update to 2.1.0. [arguments]: Add test-target. [native-inputs]: Replace python-nose with python-pytest and python-pytest-runner. --- gnu/packages/python-web.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 1d99239dbb..9f8bcdc5b5 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Evan Straw ;;; Copyright © 2020 Alexandros Theodotou +;;; Copyright © 2020 Holger Peters ;;; ;;; This file is part of GNU Guix. ;;; @@ -1717,17 +1718,19 @@ and to spawn subprocesses to handle requests.") (define-public python-pastedeploy (package (name "python-pastedeploy") - (version "1.5.2") + (version "2.1.0") (source (origin (method url-fetch) (uri (pypi-uri "PasteDeploy" version)) (sha256 - (base32 - "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm")))) + (base32 "16qsq5y6mryslmbp5pn35x4z8z3ndp5rpgl42h226879nrw9hmg7")))) (build-system python-build-system) + (arguments + '(#:test-target "pytest")) (native-inputs - `(("python-nose" ,python-nose))) + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://pylonsproject.org/") (synopsis "Load, configure, and compose WSGI applications and servers") -- cgit v1.3 From b0ec8c675eef98e49bb0c8ba3a5250e9df3b31c8 Mon Sep 17 00:00:00 2001 From: Holger Peters Date: Fri, 24 Apr 2020 20:35:18 +0200 Subject: gnu: python-webob: Update to 1.8.3 * gnu/packages/python-web.scm (python-webob): Update to 1.8.3. --- gnu/packages/python-web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9f8bcdc5b5..cc79c38acf 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -969,14 +969,14 @@ your Web app.") (define-public python-webob (package (name "python-webob") - (version "1.5.1") + (version "1.8.3") (source (origin (method url-fetch) (uri (pypi-uri "WebOb" version)) (sha256 (base32 - "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq")))) + "1cpqskanmvwia8wqlpcr3ykyxysynjdnbl5namvpg8vw6jnkv1dh")))) (build-system python-build-system) (native-inputs `(("python-nose" ,python-nose))) -- cgit v1.3 From 2b829898c77c4f5655db6f70de2b3a51e8f35947 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 26 Apr 2020 12:48:56 +0200 Subject: gnu: python-publicsuffix2: Adjust for Guile 3.0. * gnu/packages/python-web.scm (python-publicsuffix2): Provide explicit destination in calls to FORMAT. --- gnu/packages/python-web.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index cc79c38acf..6b77a9d949 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2809,7 +2809,7 @@ List.") ;; the unused ‘update_psl’ helper command. (substitute* "setup.py" (("'requests " match) - (format "# ~a" match))) + (format #f "# ~a" match))) #t))) #:tests? #f)) ; the test suite requires network access (home-page "https://github.com/pombredanne/python-publicsuffix2") -- cgit v1.3