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

Specify encoding. #578

Merged
merged 2 commits into from
Feb 9, 2023
Merged

Specify encoding. #578

merged 2 commits into from
Feb 9, 2023

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Feb 9, 2023

Fixes failures when PYTHONWARNDEFAULTENCODING=1. Fixes #577.

@jaraco jaraco changed the title Specify encoding. Fixes failures when PYTHONWARNDEFAULTENCODING=1. Fixes #577. Specify encoding. Feb 9, 2023
Copy link
Member

@layday layday left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

I though we had a static check for this - thanks!

Hmm, not seeing one in Ruff. Not sure to find one, then. I guess we can set the PYTHONWARNDEFAULTENCODING variable in the tests.

@jaraco
Copy link
Member Author

jaraco commented Feb 9, 2023

I recommend setting that var. that’s what I’ve done in other projects and how i found this one. I’ll update the PR.

@jaraco jaraco enabled auto-merge (squash) February 9, 2023 14:56
@layday
Copy link
Member

layday commented Feb 9, 2023

I would prefer if the env var was injected with pytest-env so that the tests behave identically when run directly with pytest. Can do that in a follow-up if you'd prefer not to spend more time on this.

@jaraco
Copy link
Member Author

jaraco commented Feb 9, 2023

I would prefer if the env var was injected with pytest-env so that the tests behave identically when run directly with pytest. Can do that in a follow-up if you'd prefer not to spend more time on this. You're welcome to push to my branch to include in this PR.

Please do. Since there's no prior art in this repo for it, I'd prefer if a maintainer took it on so it ends up in the preferred place with the preferred style.

I see some tests failing, and the failures don't appear to me to be related to the change. Please let me know if you need anything from me to handle that situation.

@jaraco jaraco merged commit 56a1224 into pypa:main Feb 9, 2023
@jaraco jaraco deleted the bugfix/577-encoding-warning branch February 23, 2023 00:33
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.

EncodingWarning when PYTHONWARNDEFAULTENCODING
3 participants