gh-63161: Fix tokenize.detect_encoding()#139446
gh-63161: Fix tokenize.detect_encoding()#139446serhiy-storchaka merged 2 commits intopython:mainfrom
Conversation
* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified. * Detect decoding error for non-UTF-8 encoding. * Detect null bytes in source code.
|
It is a draft until we fix the Python interpreter. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified. * Detect decoding error for non-UTF-8 encoding. * Detect null bytes in source code. (cherry picked from commit 38d4b43) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-140378 is a backport of this pull request to the 3.14 branch. |
* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified. * Detect decoding error for non-UTF-8 encoding. * Detect null bytes in source code. (cherry picked from commit 38d4b43) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
changing this regex to bytes appears to break code: asottile/pyupgrade#1038 |
|
This is not a public API. |
* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified. * Detect decoding error for non-UTF-8 encoding. * Detect null bytes in source code.
Uh oh!
There was an error while loading. Please reload this page.