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.
This commit is contained in:
		
							parent
							
								
									47f95d3f16
								
							
						
					
					
						commit
						00a85828b0
					
				
					 3 changed files with 27 additions and 55 deletions
				
			
		| 
						 | 
					@ -1511,7 +1511,6 @@ dist_patch_DATA =						\
 | 
				
			||||||
  %D%/packages/patches/python-3-fix-tests.patch			\
 | 
					  %D%/packages/patches/python-3-fix-tests.patch			\
 | 
				
			||||||
  %D%/packages/patches/python-3.8-fix-tests.patch		\
 | 
					  %D%/packages/patches/python-3.8-fix-tests.patch		\
 | 
				
			||||||
  %D%/packages/patches/python-CVE-2018-14647.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-aionotify-0.2.0-py3.8.patch	\
 | 
				
			||||||
  %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch	\
 | 
					  %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch	\
 | 
				
			||||||
  %D%/packages/patches/python-axolotl-AES-fix.patch		\
 | 
					  %D%/packages/patches/python-axolotl-AES-fix.patch		\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -92,14 +92,13 @@
 | 
				
			||||||
(define-public python-aiohttp
 | 
					(define-public python-aiohttp
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "python-aiohttp")
 | 
					    (name "python-aiohttp")
 | 
				
			||||||
    (version "3.6.3")
 | 
					    (version "3.7.3")
 | 
				
			||||||
    (source
 | 
					    (source
 | 
				
			||||||
     (origin
 | 
					     (origin
 | 
				
			||||||
       (method url-fetch)
 | 
					       (method url-fetch)
 | 
				
			||||||
       (uri (pypi-uri "aiohttp" version))
 | 
					       (uri (pypi-uri "aiohttp" version))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32 "0i9n7h8n06m2d8ryqyk4fv1si1m44ibq7blbfaxq46vx7jydg339"))
 | 
					        (base32 "1i3p4yrfgrf1zpbgnywqmb33ps4k51wylcxykhf2cwky0spq26lw"))))
 | 
				
			||||||
       (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch"))))
 | 
					 | 
				
			||||||
    (build-system python-build-system)
 | 
					    (build-system python-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     '(#:phases
 | 
					     '(#:phases
 | 
				
			||||||
| 
						 | 
					@ -112,33 +111,41 @@
 | 
				
			||||||
                "    @pytest.mark.xfail\n    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
 | 
					             ;; 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
 | 
					             ;; tests like test_static_file_if_modified_since_past_date depend on it
 | 
				
			||||||
             (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type")
 | 
					             (let ((late-90s (* 60 60 24 365 30)))
 | 
				
			||||||
 | 
					               (utime "tests/data.unknown_mime_type" late-90s late-90s))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
             ;; FIXME: These tests are failing due to deprecation warnings
 | 
					             ;; Disable test that attempts to access httpbin.org.
 | 
				
			||||||
             ;; in Python 3.8.  Remove this when updating to aiohttp >= 3.7.
 | 
					             (substitute* "tests/test_formdata.py"
 | 
				
			||||||
             ;; https://github.com/aio-libs/aiohttp/issues/4477
 | 
					               (("async def test_mark_formdata_as_processed.*" all)
 | 
				
			||||||
             ;; https://github.com/aio-libs/aiohttp/issues/4525
 | 
					                (string-append "@pytest.mark.xfail\n" all)))
 | 
				
			||||||
             (with-directory-excursion "tests"
 | 
					
 | 
				
			||||||
               (for-each delete-file '("test_client_session.py"
 | 
					             ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
 | 
				
			||||||
                                       "test_multipart.py"
 | 
					             (delete-file "tests/test_pytest_plugin.py")
 | 
				
			||||||
                                       "test_web_middleware.py"
 | 
					             #t))
 | 
				
			||||||
                                       "test_web_protocol.py"
 | 
					         (replace 'check
 | 
				
			||||||
                                       "test_web_urldispatcher.py")))
 | 
					           (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
             #t)))))
 | 
					             (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
 | 
					    (propagated-inputs
 | 
				
			||||||
     `(("python-aiodns" ,python-aiodns)
 | 
					     `(("python-aiodns" ,python-aiodns)
 | 
				
			||||||
       ("python-async-timeout" ,python-async-timeout)
 | 
					       ("python-async-timeout" ,python-async-timeout)
 | 
				
			||||||
       ("python-attrs" ,python-attrs)
 | 
					       ("python-attrs" ,python-attrs)   ;note: remove for > 3.7
 | 
				
			||||||
       ("python-chardet" ,python-chardet)
 | 
					       ("python-chardet" ,python-chardet)
 | 
				
			||||||
       ("python-idna-ssl" ,python-idna-ssl)
 | 
					       ("python-idna-ssl" ,python-idna-ssl)
 | 
				
			||||||
       ("python-multidict" ,python-multidict)
 | 
					       ("python-multidict" ,python-multidict)
 | 
				
			||||||
 | 
					       ("python-typing-extensions" ,python-typing-extensions)
 | 
				
			||||||
       ("python-yarl" ,python-yarl)))
 | 
					       ("python-yarl" ,python-yarl)))
 | 
				
			||||||
    (native-inputs
 | 
					    (native-inputs
 | 
				
			||||||
     `(("python-pytest-runner" ,python-pytest-runner)
 | 
					     `(("python-pytest" ,python-pytest)
 | 
				
			||||||
       ("python-pytest-xdit" ,python-pytest-xdist)
 | 
					 | 
				
			||||||
       ("python-pytest-timeout" ,python-pytest-timeout)
 | 
					 | 
				
			||||||
       ("python-pytest-forked" ,python-pytest-forked)
 | 
					 | 
				
			||||||
       ("python-pytest-mock" ,python-pytest-mock)
 | 
					       ("python-pytest-mock" ,python-pytest-mock)
 | 
				
			||||||
 | 
					       ("python-re-assert" ,python-re-assert)
 | 
				
			||||||
       ("gunicorn" ,gunicorn-bootstrap)
 | 
					       ("gunicorn" ,gunicorn-bootstrap)
 | 
				
			||||||
       ("python-freezegun" ,python-freezegun)
 | 
					       ("python-freezegun" ,python-freezegun)
 | 
				
			||||||
       ("python-async-generator" ,python-async-generator)))
 | 
					       ("python-async-generator" ,python-async-generator)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue