FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-141376: Remove exceptions from `make smelly` by encukou · Pull Request #141392 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 0 additions & 11 deletions Tools/build/smelly.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
})

IGNORED_EXTENSION = "_ctypes_test"
# Ignore constructor and destructor functions
IGNORED_SYMBOLS = {'_init', '_fini'}


def is_local_symbol_type(symtype):
Expand All @@ -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')
Expand Down Expand Up @@ -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)

Expand Down
Loading

Back | FazBrowse Home | New Git URL