Message396634
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). |
|
Date |
User |
Action |
Args |
2021-06-28 13:21:23 | iritkatriel | set | recipients:
+ iritkatriel, jaraco |
2021-06-28 13:21:23 | iritkatriel | set | messageid: <1624886483.87.0.209967399186.issue44461@roundup.psfhosted.org> |
2021-06-28 13:21:23 | iritkatriel | link | issue44461 messages |
2021-06-28 13:21:23 | iritkatriel | create | |
|