From 9962b877804b4fc347b60fae8445ddc5d3ad8bbe Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Apr 2020 23:24:33 +0200 Subject: gnu: python-aiohttp: Disable tests that fail with Python 3.8. * gnu/packages/python-web.scm (python-aiohttp)[arguments]: Delete failing tests. --- gnu/packages/python-web.scm | 14 ++++++++++++-- 1 file changed, 12 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 1d99239dbb..5423aa917e 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge -;;; Copyright © 2016, 2017 Marius Bakke +;;; Copyright © 2016, 2017, 2020 Marius Bakke ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2017 Roel Janssen ;;; Copyright © 2016, 2017, 2020 Julien Lepiller @@ -92,7 +92,6 @@ (base32 "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5")) (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch")))) - (build-system python-build-system) (arguments '(#:phases @@ -106,6 +105,17 @@ ;; 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))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) -- cgit v1.3 From 6ac6c1d28d8a89d0f9b0f15e7df2a011f24aa091 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 25 Apr 2020 00:11:53 +0200 Subject: gnu: python-geventhttpclient: Disable test that fails with Python 3.8. * gnu/packages/python-web.scm (python-geventhttpclient)[arguments]: In the check phase, add pytest flag to filter broken test. While at it, don't reorder the phase, as it now runs after install by default. --- gnu/packages/python-web.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 5423aa917e..a73128a77c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1978,14 +1978,16 @@ library.") (lambda _ (delete-file "src/geventhttpclient/tests/test_client.py") #t)) - (delete 'check) - (add-after 'install 'check + (replace 'check (lambda* (#:key inputs outputs #:allow-other-keys) (add-installed-pythonpath inputs outputs) (invoke "py.test" "src/geventhttpclient/tests" "-v" ;; Append the test modules to sys.path to avoid ;; namespace conflict which breaks SSL tests. - "--import-mode=append") + "--import-mode=append" + ;; XXX: Disable test fails with Python 3.8: + ;; https://github.com/gwik/geventhttpclient/issues/119 + "-k" (string-append "not test_cookielib_compatibility")) #t))))) (native-inputs `(("python-pytest" ,python-pytest))) -- cgit v1.3 From c63bd847816061e76389e93dc094df98800f081b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 2 May 2020 15:43:37 +0100 Subject: gnu: python-s3transfer: Fix build with Python 3.8. * gnu/packages/python-web.scm (python-s3transfer)[arguments]: Add a 'patch phase to fix a test to work under Python 3.8. --- gnu/packages/python-web.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 27749246d8..56887ef9d4 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2204,6 +2204,15 @@ Betamax.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + ;; There's a small issue with one test with Python 3.8, this + ;; change has been suggested upstream: + ;; https://github.com/boto/s3transfer/pull/164 + (substitute* "tests/unit/test_s3transfer.py" + (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)") + "futures.Future()")) + #t)) (replace 'check (lambda _ ;; Some of the 'integration' tests require network access or -- cgit v1.3