Skip to content

Conversation

@maksverver
Copy link
Contributor

feedparser imports cchardet or chardet depending on what's installed:

try:
import cchardet as chardet # type: ignore[import]
except ImportError:
import chardet # type: ignore[no-redef]

Although these libraries are mostly equivalent, they return slightly different encoding strings, even though both are correct and lead to succesful decoding. This change allows the tests to be run with either library by accepting both encoding names as correct.

feedparser imports cchardet or chardet depending on what's installed:
https://github.com/kurtmckee/feedparser/blob/11990ea1d8791acc76c67781f1d2011daf0c3a99/feedparser/encodings.py#L37-L40

Although these libraries are mostly equivalent, they return slightly different
encoding strings, even though both are correct and lead to succesful decoding.
This change allows the tests to be run with either library by accepting both
encoding names as correct.
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.

1 participant