Skip to content
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

added apparent_encoding to the decoding of pypi's json response #316

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matl4c
Copy link

@matl4c matl4c commented Jul 21, 2022

The json response from pypi is not guaranteed to be all of the expected default encoding. When characters in a pypi package information are not the default encoding, this line here will error out. By using response.apparent_encoding, the encoding type is taken from the request's response to allow for a proper decode.

There are a lot of repositories that cause issues like this, but here is an example:
https://pypi.org/project/imath/

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