[Python-checkins] Update stable ABI script for MacOS and update list of exported symbols (GH-23783)

pablogsal webhook-mailer at python.org
Tue Dec 15 13:16:28 EST 2020


https://github.com/python/cpython/commit/0911411e0cee4f2bd6906aeece83d2e6ba3c38c0
commit: 0911411e0cee4f2bd6906aeece83d2e6ba3c38c0
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2020-12-15T18:16:13Z
summary:

Update stable ABI script for MacOS and update list of exported symbols (GH-23783)

files:
M Doc/data/stable_abi.dat
M Tools/scripts/stable_abi.py

diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index 28cb50b12301b..c2c9c6e11e4ce 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -743,6 +743,7 @@ Py_FileSystemDefaultEncodeErrors
 Py_FileSystemDefaultEncoding
 Py_Finalize
 Py_FinalizeEx
+Py_FrozenMain
 Py_GenericAlias
 Py_GenericAliasType
 Py_GetBuildInfo
diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py
index b3a46f985e0a2..47547a97bfd31 100755
--- a/Tools/scripts/stable_abi.py
+++ b/Tools/scripts/stable_abi.py
@@ -31,6 +31,7 @@
     "ucnhash.h",
 }
 
+MACOS = (sys.platform == "darwin")
 
 def get_exported_symbols(library, dynamic=False):
     # Only look at dynamic symbols
@@ -57,7 +58,10 @@ def get_exported_symbols(library, dynamic=False):
             continue
 
         symbol = parts[-1]
-        yield symbol
+        if MACOS and symbol.startswith("_"):
+            yield symbol[1:]
+        else:
+            yield symbol
 
 
 def check_library(stable_abi_file, library, abi_funcs, dynamic=False):



More information about the Python-checkins mailing list