Bug 1758526 [wpt PR 33113] - Use httpx for wptserve tests instead of hyper, a=testonly
commitb4a21288b645872cd2d758f4d2106a92c34e1d09
authorPhilip Jägenstedt <philip@foolip.org>
Thu, 24 Mar 2022 12:10:16 +0000 (24 12:10 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 26 Mar 2022 10:35:01 +0000 (26 10:35 +0000)
treee1c774c89e06a91239e704650d62202aecb50ff7
parentab2b84b19c9a2587b979be206eb82f7f06df8425
Bug 1758526 [wpt PR 33113] - Use httpx for wptserve tests instead of hyper, a=testonly

Automatic update from web-platform-tests
Use httpx for wptserve tests instead of hyper

hyper is no longer maintained, and doesn't work with Python 3.10.

The vendored hyper is removed entirely, and replaced by httpx installed
using pip.

Tests are updated, mostly in trivial ways. A few cases are interesting:

 - When httpx is used to POST, `handle_data` ends up called two times
   instead of once, first with the data, and then with an empty byte
   string. Whether this is an httpx bug or not, test_h2_data.py and
   test_h2_headers_data.py are adapted to deal with this, and changed to
   case-swap the input instead so that no buffering is needed.

 - `test_encode` previously failed an assert in the handler, but the
   response wasn't checked at all, so this wasn't noticed.

 - `test_push` is dropped since it can't be tested using httpx.

 - `test_raw_header_frame_invalid` is dropped since it ends up testing
   the error handling of the client, and httpx doesn't treat this input
   as an error. A better test would just check what bytes were sent over
   the wire, but don't bother, it's more work than seems justified.

 - `test_http_version` is added to make sure these tests keep using
   HTTP/2 even if httpx behavior changes in the future.

Fixes https://github.com/web-platform-tests/wpt/issues/28784.
Fixes https://github.com/web-platform-tests/wpt/issues/31315.

--

wpt-commits: 05ae936451baacd34744c539ad34388617e12190
wpt-pr: 33113
66 files changed:
testing/web-platform/tests/fetch/api/resources/echo-content.h2.py
testing/web-platform/tests/tools/requirements_tests.txt
testing/web-platform/tests/tools/third_party/hyper/hyper/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/certs.pem [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/cli.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/bufsocket.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/connection.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/decoder.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/exceptions.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/common/util.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/contrib.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/config.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/connection.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/errors.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/events.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/exceptions.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/frame_buffer.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/stream.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/utilities.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/h2/windows.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http11/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http11/parser.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http11/response.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/connection.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/errors.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/exceptions.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/response.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/stream.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/util.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/http20/window.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/httplib_compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/exceptions.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/hpack.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/hpack_compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/huffman.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hpack/huffman_constants.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/frame.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/LICENSE [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/__init__.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/api.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/exceptions.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/misc.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/normalizers.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/parseresult.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/packages/rfc3986/uri.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/ssl_compat.py [deleted file]
testing/web-platform/tests/tools/third_party/hyper/hyper/tls.py [deleted file]
testing/web-platform/tests/tools/wptserve/tests/functional/base.py
testing/web-platform/tests/tools/wptserve/tests/functional/docroot/test_h2_data.py
testing/web-platform/tests/tools/wptserve/tests/functional/docroot/test_h2_headers_data.py
testing/web-platform/tests/tools/wptserve/tests/functional/test_handlers.py
testing/web-platform/tests/tools/wptserve/tests/functional/test_response.py
testing/web-platform/tests/tools/wptserve/tests/functional/test_server.py