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