-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Require specifying encoding when using "open" (re: PEP597) #1948
Labels
rule request
Adding a new rule
Milestone
Comments
Great idea, I will totally do this (either here or in Why not just implementing it here? Because |
I'd like to take this issue as well, pls 😌 |
#2082 Opened |
Is this still opened? |
There's a PR for it: #2082 I will merge it into |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rule request
Inspired by https://www.python.org/dev/peps/pep-0597
The PEP is still draft, but I think WPS can implement before adoption. Even if the PEP is rejected I think this is a good idea.
Required specifying "encoding" to
open
. Even if it's justNone
.Thesis
Not specifying the encoding could be considered a bug. Making the effort to choose which encoding is better. At the moment there is no builtin "locale" so we have to settle for
None
or calllocale.getpreferredencoding()
all the time. The second option is a bit clumbersome.Reasoning
Everything described in the PEP.
The text was updated successfully, but these errors were encountered: