-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-36778: fix test_startup_imports if default codepage is cp65001 #13072
Conversation
pasted the output of the test failure in the bug |
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. |
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. |
Lib/test/test_site.py
Outdated
}.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't revert my change!
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'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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is typo at the end of the URL
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.
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