and others added 6 commits
by passing in an fp that is opened in "rb". This fixes problems seen on Windows where the source code is not decoded as utf-8 but as the code page default for the user, cp1252 for example. Add three new tests to test_modulefinder.py to excercise the decoding of source code. Always write the test source as bytes to avoid using locale.getpreferredencoding() as the encoding. test_coding_default_utf8 - designed to fail if decoded with cp1252 test_coding_explicit_utf8 - designed to fail if decoded with cp1252 test_coding_explicit_cp1252 - designed to fail if decoded with utf-8
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
(cherry picked from commit 9b0b5d2) Co-authored-by: Barry <barry@barrys-emacs.org>
miss-islington added a commit that referenced this pull request
(cherry picked from commit 9b0b5d2) Co-authored-by: Barry <barry@barrys-emacs.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters