-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix encoding warnings with PEP 597 enabled #8893
Conversation
d4a1a67
to
5394e0b
Compare
d7ed6b0
to
84ad304
Compare
pre-commit.ci autofix |
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.
There are still some warnings we should address.
d2e5309
to
6242db4
Compare
We are down to 1 warning:
I'm not sure what to do about that one since it is a mocked out version of check_output. |
Actually 1 more as well:
I'm not sure how to apply encodings to a check_call. |
The warning comes from calling the original method so I suppose at least one
Probably, the same as for the other methods. According to the docs it supports the same kwargs as |
4761b79
to
7db4c0a
Compare
Hi @radoering, I rebased this on top of the main branch. Unfortunately mypy gives a |
If What surprises me a little is that I no longer see any encoding warnings in the test output in the CI. Am I overlooking something? Does enabling the default encoding warning does not work anymore after the rebase? |
af220c8
to
74de438
Compare
Hi @radoering, thanks again for the feedback. I created python/typeshed#12084 and added a type ignore. |
|
21578c9
to
023fae2
Compare
Is this one ready to merge now? |
We cannot do much about warnings in |
@danyeaw are you intending to pick off the remaining warnings? If not then I suggest that this is a case where three quarters of a fix is better than no fix at all, might as well merge anyway. |
@dimbleby, I'm probably done working on this one to be honest. I think this gets things most of the way there, and eventually Poetry could adopt the Ruff PLW1514 rule https://docs.astral.sh/ruff/rules/unspecified-encoding/, and remove the encoding warning environmental variable. |
I will take a look at it next week and probably either deactivate the warning only merging the fixes or fix the remaining warnings. |
023fae2
to
adffc08
Compare
adffc08
to
3cfca7e
Compare
I think all warnings in the poetry code base are fixed now. In other words, the only existing warnings are in site packages. @dimbleby Can you please take a look at the last commit? If you do not spot a bug I will merge this. |
Looks like that should resolve the warnings, without changing the behaviour - right? Seems sensible. I find it more than confusing to work out what the "correct" values are supposed to be! But I don't recall any recent issues relating to funky locales and non-ascii paths - so let's not disturb the balance. |
Hi @radoering, thanks for the teamwork on this. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #8892
This PR fixes Encoding Warnings with PEP 597 warnings enabled and enables the warnings in CI. There are also a few warnings with poetry-core and cleo, and I can submit PRs for those repos as well.