This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients iritkatriel, jaraco
Date 2021-06-28.13:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 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 call (when the module is executed). calls self.reset() before executing the code, and reset() calls Bdb.reset() which initializes self.botframe (to None).
Date User Action Args
2021-06-28 13:21:23iritkatrielsetrecipients: + iritkatriel, jaraco
2021-06-28 13:21:23iritkatrielsetmessageid: <>
2021-06-28 13:21:23iritkatriellinkissue44461 messages
2021-06-28 13:21:23iritkatrielcreate