Skip to content

Commit df86fcf

Browse files
committed
Fix tests
1 parent 651e40e commit df86fcf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/inspect.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,7 @@ def getsourcefile(object):
857857
Return None if no way can be identified to get the source.
858858
"""
859859
filename = getfile(object)
860-
all_bytecode_suffixes = importlib.machinery.DEBUG_BYTECODE_SUFFIXES[:]
861-
all_bytecode_suffixes += importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES[:]
860+
all_bytecode_suffixes = importlib.machinery.BYTECODE_SUFFIXES[:]
862861
if any(filename.endswith(s) for s in all_bytecode_suffixes):
863862
filename = (os.path.splitext(filename)[0] +
864863
importlib.machinery.SOURCE_SUFFIXES[0])

0 commit comments

Comments
 (0)