-
Notifications
You must be signed in to change notification settings - Fork 26
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
👷 Set PYTHONWARNDEFAULTENCODING
in GitHub Workflow
#93
Conversation
Fix pydantic#91 This merge request sets the `PYTHONWARNDEFAULTENCODING` variable in the GitHub workflow per the documentation at https://docs.github.com/en/actions/learn-github-actions/variables. I've chosen to set `PYTHONWARNDEFAULTENCODING` to the value `true` to ensure it is clear that this is enabling the feature. With that said, https://docs.python.org/3/library/io.html#opt-in-encodingwarning does not indicate that there is a value of the environment variable that would disable this, so I understand if a different value would be preferred.
PYTHONWARNDEFAULTENCODING
in GitHub Workflow
PYTHONWARNDEFAULTENCODING
in GitHub WorkflowPYTHONWARNDEFAULTENCODING
in GitHub Workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! This kind of PR helps me a lot. 🙇
Happy to help out 🙂 looks like there were two warnings in the tests, so shouldn't be too bad to get those addressed.
|
Wanna help? 👀 🙏 Oh, and it looks like we want to fail tests on warning! |
Happy to, it'll be later today before I can get to that but shouldn't be a problem at all. I'll need to read the docs on failing on warnings but I'd be surprised if pytest made that a difficult thing to configure. It seems like it'd be something many teams would want. |
I think those 2 lines need to be added for the tests to fail on warning: https://github.com/encode/starlette/blob/844220819f1cfcf2726d1628dd4ea597182d6f3e/pyproject.toml#L77-L79 |
Fix #91
This merge request sets the
PYTHONWARNDEFAULTENCODING
variable in the GitHub workflow per the documentation at https://docs.github.com/en/actions/learn-github-actions/variables.I've chosen to set
PYTHONWARNDEFAULTENCODING
to the valuetrue
to ensure it is clear that this is enabling the feature. With that said, https://docs.python.org/3/library/io.html#opt-in-encodingwarning does not indicate that there is a value of the environment variable that would disable this, so I understand if a different value would be preferred.