New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vendored version of hyper
is not compatible with Python 3.10
#31315
Comments
see also #28784 about it being unmaintained; one option is that we just fork it and fix compatibility with Python 3.10 |
We only use hyper itself in unittests; I think we could trivially replace it with httpx. We use h2 and hyperframe on the server side, but I believe those are both still supported. |
I sent #33112 to fix this. |
This library is no longer maintained. Fixes #31315.
#33113 is an alternative, if that can be made to work. |
#31363 is also kinda related here, because it makes it easier to apply patches to what we're importing, but it's probably more worthwhile replacing 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 #28784. Fixes #31315.
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 #28784. Fixes #31315.
…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 web-platform-tests/wpt#28784. Fixes web-platform-tests/wpt#31315. -- wpt-commits: 05ae936451baacd34744c539ad34388617e12190 wpt-pr: 33113
…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 web-platform-tests/wpt#28784. Fixes web-platform-tests/wpt#31315. -- wpt-commits: 05ae936451baacd34744c539ad34388617e12190 wpt-pr: 33113
…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 web-platform-tests/wpt#28784. Fixes web-platform-tests/wpt#31315. -- wpt-commits: 05ae936451baacd34744c539ad34388617e12190 wpt-pr: 33113
…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 web-platform-tests/wpt#28784. Fixes web-platform-tests/wpt#31315. -- wpt-commits: 05ae936451baacd34744c539ad34388617e12190 wpt-pr: 33113
A bunch of classes were moved from
collections
tocollections.abc
. More details about that are documented here. In Python 3, the "compatibility" re-exports incollections
were removed, so obsolete imports are now causing errors.The current vendored
hyper
version isn't compatible with the new class location, as visible here, for example.Note that this isn't fixed upstream, and the project is no longer maintained.
Note: I'm not personally seeing errors from this, but I'm not running WPT locally. Perhaps
hyper
isn't used in a way where it runs the obsolete code, I'm not sure (though I'd be surprised if that was the case).The text was updated successfully, but these errors were encountered: