Xavier de Gaye added the comment:
Documentation update attached.
--
Added file: http://bugs.python.org/file34326/pdb_doc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Roundup Robot added the comment:
New changeset 5c6c96c82afb by R David Murray in branch 'default':
whatsnew: pdb works for debugging asyncio programs (#16596).
http://hg.python.org/cpython/rev/5c6c96c82afb
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
This commit created a reference leak:
./python -m test -R 3:2 test_trace
[1/1] test_trace
beginning 5 repetitions
12345
.
test_trace leaked [128, 128] references, sum=256
--
nosy: +pitrou
status: closed - open
Phil Connell added the comment:
It looks like call_exc_trace is leaking refs to Py_None.
I believe the attached patch fixes the issue (it certainly fixes Antoine's
failing invokation :)
--
Added file: http://bugs.python.org/file32794/issue16596_leak.diff
Phil Connell added the comment:
Full run of the test suite was clean, so the fix is ready to go.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Antoine Pitrou added the comment:
Yes, actually, 4f730c045f5f is the culprit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Roundup Robot added the comment:
New changeset 8f556ee0f6ba by Antoine Pitrou in branch 'default':
Fix refleak introduced by 4f730c045f5f (issue #18408) and unveiled by
95eea8624d05 (issue #16596).
http://hg.python.org/cpython/rev/8f556ee0f6ba
--
Antoine Pitrou added the comment:
I committed a simpler fix.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Changes by Guido van Rossum gu...@python.org:
--
assignee: - gvanrossum
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
Roundup Robot added the comment:
New changeset 95eea8624d05 by Guido van Rossum in branch 'default':
Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier de
Gaye.
http://hg.python.org/cpython/rev/95eea8624d05
--
nosy: +python-dev
Xavier de Gaye added the comment:
Hopefully issue16596_nostate_4.diff should fix this.
The patch issues a StopIteration debug event in ceval.c (similar to the change
made in the previous
patch for the for loop), when the subgenerator is exhausted. This debug event
is printed as
'Internal
Guido van Rossum added the comment:
This version works beautifully in that scenario!
Does anyone else reading this bug report object to this being committed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
Xavier de Gaye added the comment:
This is a consequence of the problem mentioned in msg 177059 above.
New patch 'issue16596_nostate_3.diff' fixes both problems by having the
interpreter
issue an exception debug event when processing a StopIteration in target
FOR_ITER:
* The same debug events
Xavier de Gaye added the comment:
Forgot to say that the only difference between this patch and the previous one
is in Python/ceval.c.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
Guido van Rossum added the comment:
It's not fixed. Let me paste in a session. This uses the latest Tulip repo
(simple_tcp_server.py was just added). I've added import pdb;
pdb.set_trace() to the top of the client() coroutine, to set a breakpoint (I'm
a very unsophisticated pdb user :-).
Xavier de Gaye added the comment:
A description of what goes wrong when stepping out of the generator
would be helpful.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Guido van Rossum added the comment:
Basically the debugger lost control and the program ran to completion after I
hit 'n' that returned from the coroutine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
Changes by Phil Connell pconn...@gmail.com:
--
nosy: +pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Python-bugs-list
Changes by Guido van Rossum gu...@python.org:
--
nosy: +larry
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Guido van Rossum added the comment:
I'd love it if someone could review this. This would be a great improvement to
debugging coroutines in asyncio.
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
Guido van Rossum added the comment:
I think this is not ready for inclusion. It works wonderfully when stepping
over a yield[from], but I can't seem to get it to step nicely *out* of a
generator. (Details on request -- basically I put a pdb.set_trace() call in
Tulip's fetch3.py example and
Xavier de Gaye added the comment:
The 'until' command is also broken (by xdegaye's patch) when issued at a return
debug event and not debugging a generator.
This new patch fixes both problems.
The patch also adds another test case to check that pdb stops after a 'next',
'until' or 'return'
Guido van Rossum added the comment:
It looks like xdegaye's patch breaks 'n' when not debugging a generator.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Xavier de Gaye added the comment:
In the test named 'test_pdb_return_command_for_generator' in the patch, the
return command does not cause pdb to stop at the StopIteration debug event as
expected. Instead the following step command steps into the generator.
With the patch applied, in the
Xavier de Gaye added the comment:
This new patch fixes the two problems described in my previous message.
The patch is different from Andrew's patch in that it does not use a new state
variable, and the test cases in the patch are a copy of Andrew's patch except
for
Xavier de Gaye added the comment:
When the generator is used in a for loop, the interpreter handles the
StopIteration in its eval loop, and the exception is not raised. So it may be
considered as confusing to have pdb behave differently with a generator
depending on its context. A way to fix
Changes by Xavier de Gaye xdeg...@gmail.com:
--
nosy: +xdegaye
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Python-bugs-list
Andrew Svetlov added the comment:
Rename skip_yield to skipyield
--
Added file: http://bugs.python.org/file28205/issue16596_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Guido van Rossum added the comment:
Thanks! I will try it out shortly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
___
Python-bugs-list
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
title: Skip stack unwinding when next, until and return pdb commands
executed - Skip stack unwinding when next, until and return pdb
commands executed in generator context
___
Python tracker
31 matches
Mail list logo