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
pdb cannot find source code for frozen stdlib modules #93696
Comments
|
Likely duplicate of #60115 |
Definitely related inasmuch as # repro2.py
import os.path
os.path.basename("/foo/bar/baz.py") # implemented in PythonWith Python 3.10: With Python 3.11: |
|
Pinging this issue per the devguide in the hopes of getting review on the PR, which has been open for a little while. I understand if things are too busy for review because of the release issues with 3.11, though! |
I get the same behavior as in the initial report against the current tip of The |
|
Ah, thanks for checking. I missed that pdb wasn't using |
|
Yea, I'm not entirely sure what all goes into fixing the |
|
Yeah, it may be worth adding the stopgap fix in the meantime. |
|
FYI I am looking into this. I'll probably make deepfreeze generate the correct |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>


SnoopJ commentedJun 10, 2022
Bug report
Context: this issue came out of a discussion in #python on the Libera.chat IRC network, where a user wanted to peek into
importlib._bootstrapwithpdbwhile chasing a bug.pdbis capable of stepping into function calls into frozen modules, but thelistcommand cannot locate the source code necessary to display the source being stepped through.Note that executing
source importlib._bootstrapfrom the frame that calls into this module does successfully locate the source, but this isn't very useful to a user ofpdb.I believe that bringing the frame's
co_filenameinto agreement with the module's__file__would fix this issue without changes topdb(see #89815), but thought it would be good to track the issue withpdbin a separate ticket since that fix is more nuanced and I think I have an interim patch for the debugger.Your environment
The text was updated successfully, but these errors were encountered: