[issue32900] Teach pdb to step through asyncio et al.

2018-02-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: The help for 'n' says: (Pdb) help n n(ext) Continue execution until the next line in the current function is reached or it returns. (And the docs [1] say essentially the same.) It sounds like if that were true, then you

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry
Change by ppperry : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs added the comment: Ah. Thank you for pointing me to that feature, I completely missed it. The proposed enhancement thus boils down to "implement a couple of pdb commands to display and modify this skip list". I'm +1 on keeping the default empty. When

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry
ppperry added the comment: Just to be clear, I'm not opposing having the default value for `skip` be something other than the empty set, but it should be overridable, and the default should include some other things this patch omits, like

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry
ppperry added the comment: This feature already exists and doesn't need to be reimplemented; use `pdb.Pdb(skip={"trio", "contextlib", ...}).run(...)`, and in any case should be disableable. I don't use asyncio, but happen to have a habit of running pdb through the

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs added the comment: *Sigh*. ... if you need Python 3.5 compatibility ... obviously. -- ___ Python tracker ___

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs added the comment: "Example of a problem"? Well, just single-step into, and then back out of, an @asynccontextmanager-decorated function. @asynccontextmanager async def gen(): yield 1234 async def foo(): import pdb;pdb.set_trace() async with

[issue32900] Teach pdb to step through asyncio et al.

2018-02-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: Can you back up a bit and give an example of the problem you're running into? -- ___ Python tracker

[issue32900] Teach pdb to step through asyncio et al.

2018-02-21 Thread Matthias Urlichs
Matthias Urlichs added the comment: File attachment failed, retrying … -- keywords: +patch Added file: https://bugs.python.org/file47456/pdb.diff ___ Python tracker

[issue32900] Teach pdb to step through asyncio et al.

2018-02-21 Thread Matthias Urlichs
New submission from Matthias Urlichs : The attached patch is a proof-of-concept implementation of a way to teach pdb to "single-step" through non-interesting code that you can't skip with "n". The prime example for this is asyncio, trio et al., though decorators like