me
/
guix
Archived
1
0
Fork 0

gnu: python-aiohttp: Update to 3.8.4.

* gnu/packages/python-web.scm (python-aiohttp): Update to 3.8.4.
[arguments]: Adjust comments in fix-tests phase.  Skip/ignore more tests in
check phase.  Remove extraneous or (it wouldn't have worked with invoke
anyway).
[propagated-inputs]: Add python-asynctest.  Remove python-typing-extensions.
master
Maxim Cournoyer 2023-04-17 11:22:19 -04:00
parent 0a5da1d655
commit ba9551073b
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 22 additions and 18 deletions

View File

@ -311,13 +311,13 @@ for adding, removing and dropping callbacks.")
(define-public python-aiohttp (define-public python-aiohttp
(package (package
(name "python-aiohttp") (name "python-aiohttp")
(version "3.8.1") (version "3.8.4")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "aiohttp" version)) (uri (pypi-uri "aiohttp" version))
(sha256 (sha256
(base32 "0y3m1dzl4h6frg8vys0fc3m83ijd1plfpihv3kvmxqadlphp2m7w")) (base32 "0p5bj6g7ca19gvwk8fz00k579ma9w9kd27ssh2zl3r61ca8ilbmz"))
(snippet (snippet
#~(begin #~(begin
(use-modules ((guix build utils))) (use-modules ((guix build utils)))
@ -333,12 +333,14 @@ for adding, removing and dropping callbacks.")
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'fix-tests (add-after 'unpack 'fix-tests
(lambda _ (lambda _
;; disable brotli tests, because were not providing that optional library ;; Disable brotli tests, because were not providing that
;; optional library.
(substitute* "tests/test_http_parser.py" (substitute* "tests/test_http_parser.py"
((" async def test_feed_eof_no_err_brotli") ((" async def test_feed_eof_no_err_brotli")
" @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.
(let ((late-90s (* 60 60 24 365 30))) (let ((late-90s (* 60 60 24 365 30)))
(utime "tests/data.unknown_mime_type" late-90s late-90s)) (utime "tests/data.unknown_mime_type" late-90s late-90s))
@ -378,33 +380,35 @@ for adding, removing and dropping callbacks.")
"not test_client_session_timeout_zero and " "not test_client_session_timeout_zero and "
"not test_empty_body and " "not test_empty_body and "
"not test_mark_formdata_as_processed[pyloop] and " "not test_mark_formdata_as_processed[pyloop] and "
"not test_receive_runtime_err[pyloop]"))) "not test_receive_runtime_err[pyloop] "
;; These tests fail for unknown reasons (see:
;; https://github.com/aio-libs/aiohttp/issues/7130)
"and not test_no_warnings "
"and not test_default_loop "
"and not test_ctor_global_loop "
"and not test_set_loop_default_loop ")))
(when tests? (when tests?
;; This tests requires the 'proxy.py' module, not yet ;; This tests requires the 'proxy.py' module, not yet
;; packaged. ;; packaged.
(delete-file "tests/test_proxy_functional.py") (delete-file "tests/test_proxy_functional.py")
;; Sometimes tests fail when run in parallel. ;; Sometimes tests fail when run in parallel.
(or (invoke "pytest" "-vv"
(invoke "pytest" "-vv" "-o" "addopts=''" "--ignore=aiohttp"
;; Disable loading the aiohttp coverage plugin ;; These tests cause errors (see:
;; to avoid a circular dependency (code coverage ;; https://github.com/aio-libs/aiohttp/issues/7130).
;; is not very interesting to us anyway). "--ignore" "tests/test_web_sendfile_functional.py"
"-o" "addopts=''" "--ignore=aiohttp" "--ignore" "tests/test_web_urldispatcher.py"
"-n" (number->string (parallel-job-count)) "-k" skipped-tests))))))))
"-k" skipped-tests)
(invoke "pytest" "-vv"
"-o" "addopts=''" "--ignore=aiohttp"
"-k" skipped-tests)))))))))
(propagated-inputs (propagated-inputs
(list python-aiodns (list python-aiodns
python-aiosignal python-aiosignal
python-attrs python-attrs
python-asynctest
python-async-timeout python-async-timeout
python-charset-normalizer python-charset-normalizer
python-frozenlist python-frozenlist
python-idna-ssl python-idna-ssl
python-multidict python-multidict
python-typing-extensions
python-yarl)) python-yarl))
(native-inputs (native-inputs
(list gunicorn-bootstrap (list gunicorn-bootstrap