Author iritkatriel
Recipients iritkatriel, jaraco
Date 2021-06-28.13:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624886483.87.0.209967399186.issue44461@roundup.psfhosted.org>
In-reply-to
Content
The difference between Jason's two test cases is which stage of Pdb._runmodule() fails. 

In the case of `python -m pdb -m importlib` runpy._get_module_details(module_name) raises an exception because importlib is a package and it looks for its __main__, so self.run(code) is never called.

In the case of `python -m pdb -m foo` with foo that raises an exception,  foo is not a package so the __main__ check doesn't happen. The exception comes from within the self.run(code) call (when the module is executed). self.run() calls self.reset() before executing the code, and reset() calls Bdb.reset() which initializes self.botframe (to None).
History
Date User Action Args
2021-06-28 13:21:23iritkatrielsetrecipients: + iritkatriel, jaraco
2021-06-28 13:21:23iritkatrielsetmessageid: <1624886483.87.0.209967399186.issue44461@roundup.psfhosted.org>
2021-06-28 13:21:23iritkatriellinkissue44461 messages
2021-06-28 13:21:23iritkatrielcreate