Skip to content

[3.7] bpo-34403: Fix initfsencoding() for ASCII - #10233

Merged
vstinner merged 1 commit into
python:3.7from
vstinner:force_ascii37
Oct 30, 2018
Merged

vstinner merged 1 commit into
python:3.7from
vstinner:force_ascii37

Conversation

@vstinner

@vstinner vstinner commented Oct 30, 2018 •

Copy link
Copy Markdown
Member
  • 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 vstinner changed the title bpo-34403: Fix initfsencoding() for ASCII Oct 30, 2018
@vstinner

Copy link
Copy Markdown
Member Author

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.

@vstinner
vstinner merged commit 21220bb into python:3.7 Oct 30, 2018
@vstinner
vstinner deleted the force_ascii37 branch October 30, 2018 11:59
@bedevere-bot

Copy link
Copy Markdown

Hi! The buildbot x86-64 High Sierra 3.7 has failed when building commit 21220bb.

You can take a look here:

https://buildbot.python.org/all/#builders/147/builds/397

@bedevere-bot

Copy link
Copy Markdown

Hi! The buildbot x86-64 El Capitan 3.7 has failed when building commit 21220bb.

You can take a look here:

https://buildbot.python.org/all/#builders/109/builds/756

@bedevere-bot

bedevere-bot commented Oct 30, 2018 •

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86-64 High Sierra 3.7 has failed when building commit 21220bb.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. 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.
  4. Check if the failure is related to this commit (21220bb) or if it is a false positive.
  5. 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
@pablogsal

Copy link
Copy Markdown
Member

Don't mind this last message, I restarted the buildbots and this was running this same commit again.

@vstinner

Copy link
Copy Markdown
Member Author

I fixed macOS compilation in PR #10235.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants