Adapt two more tests for chardet 6.x compatibility#1016
Conversation
See encode/httpx#3773, which was merged into httpx before httpx2 was forked; this commit extends that approach to tests that were added in httpx2.
Merging this PR will not alter performance
Comparing Footnotes
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
We haven’t updated Fedora’s I did do a quick check in the virtualenv, and observed that testing with the latest
I therefore decided not to try to add |
|
I don't think we should have "in" in assertions. Can you bump chardet instead? That version is 3 years old anyway 😬 |
Sure, gladly. I’ve opened a new PR, #1017, with this approach. |
Summary
See encode/httpx#3773, which was merged into
httpxbeforehttpx2was forked; this extends that approach to similar tests that were added inhttpx2, allowing the entire test suite to pass withchardet6.x while preserving backwards-compatibility withchardet5.x. This is helpful in Fedora, where ourpython-chardetpackage is at6.0.0.post1.While this makes the tests compatible with both
chardet5.x and 6.x, I did not update the version ofchardetin thedevdependency group, which is still at==5.2.0.Checklist
Additional information
This fixes the following two test failures with
chardet==6.0.0.post1.