[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2014-03-10 Thread Xavier de Gaye
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2014-03-09 Thread Roundup Robot
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Antoine Pitrou
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Phil Connell
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Phil Connell
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, actually, 4f730c045f5f is the culprit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Roundup Robot
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 --

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed a simpler fix. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-21 Thread Guido van Rossum
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-21 Thread Roundup Robot
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-20 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-20 Thread Guido van Rossum
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-19 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-19 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-19 Thread Guido van Rossum
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 :-).

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-18 Thread Xavier de Gaye
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-18 Thread Guido van Rossum
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-16 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___ Python-bugs-list

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-15 Thread Guido van Rossum
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-15 Thread Guido van Rossum
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2013-11-15 Thread Guido van Rossum
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-11 Thread Xavier de Gaye
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'

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-10 Thread Guido van Rossum
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
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

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-05 Thread Xavier de Gaye
Changes by Xavier de Gaye xdeg...@gmail.com: -- nosy: +xdegaye ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___ Python-bugs-list

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-04 Thread Andrew Svetlov
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 ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! I will try it out shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___ ___ Python-bugs-list

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-02 Thread Andrew Svetlov
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