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

Always set encoding when reading setup.cfg #296

Merged
merged 1 commit into from Mar 13, 2024
Merged

Conversation

fsouza
Copy link
Collaborator

@fsouza fsouza commented Mar 13, 2024

This should fix an issue on Window where the setup.cfg can contain non-ascii characters, and Python is trying to use cp1252. This should be safe as utf-8 is compatible with cp1252.

It's possible I'll eat my words and some other platform breaks with this change, but let's try.

Closes #294.

@fsouza fsouza force-pushed the setup.cfg-set-encoding branch 2 times, most recently from cd47dce to ae5d358 Compare March 13, 2024 03:34
This should fix an issue on Window where the `setup.cfg` can contain
non-ascii characters, and Python is trying to use cp1252. This should be
safe as utf-8 is compatible with cp1252.

It's possible I'll eat my words and some other platform breaks with this
change, but let's try.

Closes #294.
@fsouza fsouza merged commit 2f53416 into main Mar 13, 2024
17 checks passed
@fsouza fsouza deleted the setup.cfg-set-encoding branch March 13, 2024 03:36
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.

UnicodeDecodeError when running pre-commit on Windows with v2.3.0
1 participant