8000 gh-121604: Make sure all deprecated items in importlib raise DeprecationWarning by tomasr8 · Pull Request #128007 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-121604: Make sure all deprecated items in importlib raise DeprecationWarning #128007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
tomasr8 committed Dec 16, 2024
commit df86fcff3df8367c074f18c43adb99f710dcc247
3 changes: 1 addition & 2 deletions Li 88B6 b/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,7 @@ def getsourcefile(object):
Return None if no way can be identified to get the source.
"""
filename = getfile(object)
all_bytecode_suffixes = importlib.machinery.DEBUG_BYTECODE_SUFFIXES[:]
all_bytecode_suffixes += importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES[:]
all_bytecode_suffixes = importlib.machinery.BYTECODE_SUFFIXES[:]
if any(filename.endswith(s) for s in all_bytecode_suffixes):
filename = (os.path.splitext(filename)[0] +
importlib.machinery.SOURCE_SUFFIXES[0])
Expand Down
Loading
0