[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

hai shi report at bugs.python.org
Wed Feb 24 11:20:06 EST 2021


hai shi <shihai1991 at 126.com> added the comment:

> It would be great to have a tool to check that all symbols exported on Unix are also exported on Windows.

I write a demo in PR 24639(compare the stable_abi.dat to python3dll.c).
And the output result:
```
Some symbols from the limited API on windows are missing:
PyMarshal_WriteObjectToFile, PyThread_allocate_lock, PyObject_GC_IsFinalized, PyThread_ReInitTLS, PyThread_acquire_lock, PyThread_GetInfo, PyDictRevIterValue_Type, PyThread_get_thread_native_id, PyThread_start_new_thread, PyThread_set_stacksize, PyDictRevIterKey_Type, PyOS_AfterFork_Child, PyThread_create_key, PyThread_get_thread_ident, PyOS_BeforeFork, Py_BytesMain, PyThread_get_key_value, PyCodec_Unregister, PyInterpreterState_Get, PyMember_GetOne, PyThread_init_thread, PyInterpreterState_GetDict, PyThread_set_key_value, PyThread_delete_key, PyMarshal_WriteObjectToString, PyOS_AfterFork_Parent, PyThread_delete_key_value, PyObject_GC_IsTracked, PyMarshal_ReadObjectFromString, PyMarshal_WriteLongToFile, PyThread_exit_thread, PyThread_acquire_lock_timed, PyThread_get_stacksize, PyMember_SetOne, PyDictRevIterItem_Type, PyThread_free_lock, PyThread_release_lock

This error normally means that there are some missing symbols on windows.

Check if this was a mistake and if not, update the file containing the limited
API symbols. This file is located at:

PC/python3dll.c

You can read more about the limited API and its contracts at:

https://docs.python.org/3/c-api/stable.html

And in PEP 384:

https://www.python.org/dev/peps/pep-0384/

```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43235>
_______________________________________


More information about the Python-bugs-list mailing list