Uh oh!
There was an error while loading. Please reload this page.
bpo-36778: fix test_startup_imports if default codepage is cp65001 - #13072
bpo-36778: fix test_startup_imports if default codepage is cp65001#13072paulmon wants to merge 4 commits into
Conversation
pasted the output of the test failure in the bug |
methane
commented
May 4, 2019
It's depends on languages. In Japanese, cp932 is used. Your patch seems unclear about it.
What "frozen" mean here? This error is caused by cp65001.py imports functools. |
paulmon
commented
May 6, 2019
Thanks for the feedback. Do the new comments make more sense? Ideally it would be better if the test passed without changes when using cp65001, but if not I would like to make an exception or skip the test so I can get the buildbot errors to zero. |
| }.difference(sys.builtin_module_names) | ||
| if sys.platform != 'darwin': | ||
| # http://bugs.python.org/issue19209 | ||
| self.assertNotIn('copyreg', modules, stderr) |
There was a problem hiding this comment.
I'm sorry. That wasn't intentional.
| 'weakref' | ||
| }.difference(sys.builtin_module_names) | ||
| else: | ||
| # http://bugs.python.org/issue19218> |
There was a problem hiding this comment.
this is typo at the end of the URL
There was a problem hiding this comment.
Victor fixed this in #13230
The test change is not needed
Windows desktop skus have a default ANSI codepage (returned by GetACP()) of 1252 (Western European). Windows IoT Core and Windows Nano Server have a default codepage of 65001 (UTF-8).
This causes test_site.StartupImportTests.test_startup_imports to fail on Windows IoT Core and Windows Nano Server because cp65001.py is loaded instead of the frozen cp1252.py at startup.
I tried changing the default codepage to 65001 on my dev machine and rebuilding Python and it had no effect that I could tell on the generated frozen importlibs.
The simplest solutions would be for the test_startup_imports test to be skipped or changed to pass when the locale.getpreferredencoding() returns 'cp65001'
@vstinner@methane@zooba
https://bugs.python.org/issue36778