[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: python-aiohttp: Update to 3.7.3.
From: |
guix-commits |
Subject: |
02/02: gnu: python-aiohttp: Update to 3.7.3. |
Date: |
Thu, 26 Nov 2020 15:02:26 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit 00a85828b06744a8b53a55f52a651ff88e071044
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Nov 26 18:59:27 2020 +0100
gnu: python-aiohttp: Update to 3.7.3.
* gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch: Delete
file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/python-web.scm (python-aiohttp)[source](patches): Remove.
[arguments]: Use UTIME instead of calling out to 'touch'. Don't delete
now-working tests; but disable some new ones. Replace the 'check' phase.
[propagated-inputs]: Add PYTHON-TYPING-EXTENSIONS.
[native-inputs]: Remove PYTHON-PYTEST-RUNNER, PYTHON-PYTEST-XDIST,
PYTHON-PYTEST-TIMEOUT, and PYTHON-PYTEST-FORKED. Add PYTHON-PYTEST and
PYTHON-RE-ASSERT.
---
gnu/local.mk | 1 -
.../python-aiohttp-3.6.2-no-warning-fail.patch | 34 ---------------
gnu/packages/python-web.scm | 49 ++++++++++++----------
3 files changed, 28 insertions(+), 56 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e188f8f..289f510 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1511,7 +1511,6 @@ dist_patch_DATA =
\
%D%/packages/patches/python-3-fix-tests.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-aionotify-0.2.0-py3.8.patch \
%D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
%D%/packages/patches/python-axolotl-AES-fix.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
deleted file mode 100644
index 6cdddef..0000000
--- a/gnu/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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 172c36d..f5ffc2e 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -92,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
@@ -112,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)))