https://github.com/python/cpython/commit/5ac0b55ebc792936184f8e08697e60d5b3f8b946
commit: 5ac0b55ebc792936184f8e08697e60d5b3f8b946
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2025-11-14T11:22:18+01:00
summary:
gh-141376: Remove exceptions from `make smelly` (GH-141392)
* Don't ignore initialized data and BSS
* Remove exceptions for _init and _fini
files:
M Tools/build/smelly.py
diff --git a/Tools/build/smelly.py b/Tools/build/smelly.py
index 9a360412a73a4d..424fa6ad4a1371 100755
--- a/Tools/build/smelly.py
+++ b/Tools/build/smelly.py
@@ -21,8 +21,6 @@
})
IGNORED_EXTENSION = "_ctypes_test"
-# Ignore constructor and destructor functions
-IGNORED_SYMBOLS = {'_init', '_fini'}
def is_local_symbol_type(symtype):
@@ -34,19 +32,12 @@ def is_local_symbol_type(symtype):
if symtype.islower() and symtype not in "uvw":
return True
- # Ignore the initialized data section (d and D) and the BSS data
- # section. For example, ignore "__bss_start (type: B)"
- # and "_edata (type: D)".
- if symtype in "bBdD":
- return True
-
return False
def get_exported_symbols(library, dynamic=False):
print(f"Check that {library} only exports symbols starting with Py or _Py")
- # Only look at dynamic symbols
args = ['nm', '--no-sort']
if dynamic:
args.append('--dynamic')
@@ -89,8 +80,6 @@ def get_smelly_symbols(stdout, dynamic=False):
if is_local_symbol_type(symtype):
local_symbols.append(result)
- elif symbol in IGNORED_SYMBOLS:
- local_symbols.append(result)
else:
smelly_symbols.append(result)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]