Skip to content

Adapt test_response_decode_text_using_autodetect for chardet 6.0#3773

Merged
lovelydinosaur merged 1 commit into
encode:masterfrom
musicinmybrain:chardet6
Feb 23, 2026
Merged

Adapt test_response_decode_text_using_autodetect for chardet 6.0#3773
lovelydinosaur merged 1 commit into
encode:masterfrom
musicinmybrain:chardet6

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

Summary

See #3772. Version 6.0.0 of chardet detects this byte string as WINDOWS-1252, while previous versions detected ISO-8859-1. Since both are plausible (the encoded byte string decodes to the same Unicode string under either encoding), this PR adjusts the test to accept either claim.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. No new test required, as this fixes a test regression.
  • I've updated the documentation accordingly. No documentation changes required.

@lovelydinosaur lovelydinosaur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's more we could say about this, though... yep. Thanks

@lovelydinosaur lovelydinosaur merged commit b5addb6 into encode:master Feb 23, 2026
5 checks passed
musicinmybrain added a commit to musicinmybrain/httpx2 that referenced this pull request Jun 2, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants