Issue36550
Created on 2019-04-07 19:15 by blueyed, last changed 2022-04-11 14:59 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4666 | open | blueyed, 2019-04-07 19:16 | |
| Messages (4) | |||
|---|---|---|---|
| msg339583 - (view) | Author: daniel hahler (blueyed) * | Date: 2019-04-07 19:15 | |
pdb should try (hard) to avoid creating unnecessary exceptions, e.g. ``AttributeError`` when looking up commands, since this will show up in exception chains then (as "'Pdb' object has no attribute 'do_foo'"). See https://github.com/python/cpython/pull/4666 for an older PR in this regard. My use case is to display the traceback for exceptions caused within/via Pdb.default(), to see more context when running code from pdb's prompt directly, where currently it would only display the exception itself. |
|||
| msg401237 - (view) | Author: Irit Katriel (iritkatriel) * ![]() |
Date: 2021-09-07 11:10 | |
Closing as the bug is not clear and the OP is not responding to requests on the PR to clarify it. Please create a new issue if you are still seeing a problem. |
|||
| msg401253 - (view) | Author: daniel hahler (blueyed) * | Date: 2021-09-07 12:22 | |
Given code like the following the try/except handling of Pdb (via `Cmd.onecmd`, see https://github.com/python/cpython/pull/4666) will mess with `sys.exc_info()`, which could be avoided: ``` try: raise ValueError() except Exception as exc: e = exc __import__('pdb').set_trace() ``` ``` % ./python t_issue36550.py --Return-- > …/t_issue36550.py(5)<module>()->None -> __import__('pdb').set_trace() (Pdb) import sys; sys.exc_info() (<class 'AttributeError'>, AttributeError("'Pdb' object has no attribute 'do_import'"), <traceback object at 0x7f92d2782500>) ``` The initial / better motivation was described in the original issue: with pdb++/pdbpp I want to display tracebacks/errors with errors that might occur via Pdb's prompt, where this then showed up as interfering with it. (Sorry for not responding on https://github.com/python/cpython/pull/4666 earlier, but I think it is only part of this issue, and therefore it should not get closed, and also creating a new one instead does not sound useful to me, so please consider to re-open it instead.) |
|||
| msg401260 - (view) | Author: Irit Katriel (iritkatriel) * ![]() |
Date: 2021-09-07 13:07 | |
Reopened. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:13 | admin | set | github: 80731 |
| 2021-09-07 13:07:17 | iritkatriel | set | status: closed -> open resolution: rejected -> messages: + msg401260 versions: - Python 3.6, Python 3.7, Python 3.8 |
| 2021-09-07 12:22:04 | blueyed | set | messages:
+ msg401253 versions: + Python 3.6, Python 3.7, Python 3.8, Python 3.10, Python 3.11 |
| 2021-09-07 11:10:23 | iritkatriel | set | status: open -> closed nosy:
+ iritkatriel resolution: rejected |
| 2019-04-07 19:16:02 | blueyed | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12643 |
| 2019-04-07 19:15:47 | blueyed | create | |
