Title: _Py_DecodeUTF8_surrogateescape not exported from 3.10 framework build
Type: Stage:
Components: C API, macOS Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2021-09-10 08:40 by ronaldoussoren, last changed 2021-09-10 09:28 by ronaldoussoren.

Messages (2)
msg401564 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2021-09-10 08:40
The symbol _Py_DecodeUTF8_surrogateescape is not exported from Python.framework on macOS in Python 3.10.  The symbol was exported in earlier versions of 3.x.

I'm not sure if this was intentional, so far I haven't been able to find when this was changed.

This change breaks py2app which uses _Py_DecodeUTF8_surrogateescape to convert the C argv array to an array of 'wchar_t*' for use with Python's C API.
msg401566 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2021-09-10 09:28
I've switched py2app to Py_DecodeLocale, which is a public API introduced in 3.5 to accomplish the same task. 

I'm leaving the issue open in case hiding the symbol is unintentional.
Date User Action Args
2021-09-10 09:28:11ronaldoussorensetmessages: + msg401566
2021-09-10 08:40:03ronaldoussorencreate