-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Correct the documented default encoding #18429
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
Conversation
From the source for `PyUnicode_Decode`, the implementation is: ``` if (encoding == NULL) { return PyUnicode_DecodeUTF8Stateful(s, size, errors, NULL); } ``` which is pretty clearly not defaulting to ASCII.
At PyCascades Sprint, this seems reasonable. @willingc Please review. |
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.
I think it's fine without issue or news.
@eric-wieser: Status check is done, and it's a success ✅ . |
1 similar comment
@eric-wieser: Status check is done, and it's a success ✅ . |
Sorry, I can't merge this PR. Reason: |
1 similar comment
Sorry, I can't merge this PR. Reason: |
I think miss-islington got triggered multiple times. @eric-wieser I expect this could be backported to earlier versions (3.8, 3.7) -- but I would want you to do a little research to make sure that the default is the same in those branches. (You can browse the branches online in GitHub.) |
Even 3.5 defaults to utf-8: https://github.com/python/cpython/blob/3.5/Objects/unicodeobject.c#L2968-L2974 I suspect this was inherited from python 2 docs, and never updated. |
Probably, but we don't need to update ancient docs (3.6 and earlier can
only be updated by their release managers).
|
From the source for
PyUnicode_Decode
, the implementation is:which is pretty clearly not defaulting to ASCII.
I assume this needs neither a news entry nor bpo link.
Automerge-Triggered-By: @gvanrossum