[3.7] bpo-34403: Fix initfsencoding() for ASCII by vstinner · Pull Request #10233 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation6 Commits1 Checks0 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
- Add _Py_GetForceASCII(): check if Python forces the usage of ASCII
in Py_DecodeLocale() and Py_EncodeLocale(). - initfsencoding() now uses ASCII if _Py_GetForceASCII() is true.
https://bugs.python.org/issue34403
- Add _Py_GetForceASCII(): check if Python forces the usage of ASCII in Py_DecodeLocale() and Py_EncodeLocale().
- initfsencoding() now uses ASCII if _Py_GetForceASCII() is true.
vstinner changed the title
bpo-34403: Fix initfsencoding() for ASCII [3.7] bpo-34403: Fix initfsencoding() for ASCII
I added "skip news" label since in practice, this change should not impact anyway: Python forces the usage of ASCII on FreeBSD and OpenIndiana if nl_langinfo(CODESET) announces ASCII or an alias of ASCII whereas mbctowcs() uses a different encoding... Python uses nl_langinfo(CODESET) to initialize the filesystem encoding, so in practice, it already uses ASCII...
This change is more to make the 3.7 branch closer to the master branch.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot x86-64 High Sierra 3.7 has failed when building commit 21220bb.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/147/builds/399) and take a look at the build logs.
- Check if the failure is related to this commit (21220bb) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/147/builds/399
Click to see traceback logs
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.7dm.a(dynamic_annotations.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.7dm.a(pymath.o) has no symbols
gcc -L/usr/local/lib -L/opt/X11/lib -L/usr/local/opt/bison/lib -L/usr/local/opt/bzip2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/ncurses/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib -L/usr/local/lib -L/opt/X11/lib -L/usr/local/opt/bison/lib -L/usr/local/opt/bzip2/lib -L/usr/local/opt/expat/lib -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/ncurses/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib -Wl,-stack_size,1000000 -framework CoreFoundation -o python.exe Programs/python.o libpython3.7dm.a -ldl -framework CoreFoundation
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
Undefined symbols for architecture x86_64:
"__Py_GetForceASCII", referenced from:
_initfsencoding in libpython3.7dm.a(pylifecycle.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [python.exe] Error 1
Don't mind this last message, I restarted the buildbots and this was running this same commit again.
I fixed macOS compilation in PR #10235.