-
Notifications
You must be signed in to change notification settings - Fork 119
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
test_form failed with treq 20.4.1 #339
Comments
Here's the full test on trunk: klein/src/klein/test/test_form.py Lines 392 to 409 in c91085d
This looks like a behavioral change in treq. twisted/treq#265 made treq always parse URLs with hyperlink, rather than passing Hyperlink seems to be percent-encoding the >>> from hyperlink import parse
>>> u = parse(b"https://localhost/getme?name=hello,%20big+world&value=4321".decode('ascii'))
>>> u
DecodedURL(url=URL.from_text('https://localhost/getme?name=hello,%20big%2Bworld&value=4321'))
>>> u.to_uri().to_text().encode('ascii')
b'https://localhost/getme?name=hello,%20big%2Bworld&value=4321' This seems like a bug to me. u = new URL("https://localhost/getme?name=hello,%20big+world&value=4321");
console.log(u.searchParams.get("name"));
// outputs: hello, big world |
I can confirm this same error. But I am also getting a test fail at line 454 of test_customParameterValidation in test_form.py. The result is This sounds like the same hyperlink error |
Hrm. I wonder why |
There seems to be a bug in [1] https://github.com/twisted/treq/releases/tag/release-20.4.1 |
OK I can open a PR and manually update some things, but I have a queue of PRs open that need review before I want to throw more on the pile. |
OK #352 will update everything else, but we'll need a resolution on a fix to this before updating |
See python-hyper/hyperlink#129 for debate as to whether this test is correct. |
There was a Hyperlink release on Friday, so twisted/treq#304 is ready for review! I'll do a treq release as soon as that's in. |
Thanks for the update! I can confirm with hyperlink 21.0.0, all klein tests are green. |
Thanks! Closing. |
I'm the maintainer of Arch Linux package python-klein, and I run a periodic script to check compatibility among Python packages. Recently I notice tests in python-klein no longer work with python-treq 20.4.1.
Steps to reproduce:
Clone commit c91085d of this repo
Change the following line to
treq==20.4.1
klein/tox.ini
Line 46 in c91085d
Run
tox -e coverage-py38-twcurrent
Actual results:
Expected results: tests pass
The text was updated successfully, but these errors were encountered: