[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2014-07-19 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2014-05-27 Thread Richard Marko

Richard Marko added the comment:

Would be nice to have this commited as without this change

-if self.quitting:
-return # None
+if not self.botframe:
+self.botframe = frame

it's not possible to quit Bdb (and the code it's executing) as it just returns 
and doesn't raise BdbQuit.

--
nosy: +rmarko

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2014-05-27 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes the patch does change the semantics of the quit command:

* no change when pdb is run as a script or with 'python -m pdb 
script_name'. As stated in the doc, the 'quit command': Quit from the 
debugger. The program being executed is aborted.

* but when a set_trace() breakpoint is inserted, 'quit' just terminates the 
debugger and the program continues its execution. It is the purpose of the 
patch to prevent an inconvenient crash with BdbQuit in that case. The idea is 
that the hard-coded breakpoint was set to investigate a local problem and one 
may want to let it run afterwards (for example to check its behavior after 
having changed some its internal state with pdb).

Sorry, I should have documented that behavior change.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

There is an error in my patch (already fixed in pdb-clone) and in Jyrki's patch.
Running Jyrki's patch on quit.py produces the following output where the line
number in the last entry of the backtrace is incorrect (should be line 9 instead
of line 7):

$ python quit.py
--Return--
 /tmp/quit.py(4)bar()-None
- pdb.Pdb().set_trace()
(Pdb) quit
Traceback (most recent call last):
  File quit.py, line 11, in module
foo()
  File quit.py, line 7, in foo
bar()
ZeroDivisionError: integer division or modulo by zero

This problem does not occur when issue 17277 is fixed.
Meanwhile the attached patch, based on Jyrki's patch and based on the 2.7
branch, fixes this.

--
Added file: http://bugs.python.org/file29231/quit.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The patch changes the semantics of the quit command: quit behaves like the gdb
detach command when pdb is started with set_trace.

--
Added file: http://bugs.python.org/file29232/branch-27.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

I took Xavier's patch and ported in on the 2.7. It'll probably go as is for 
3.2. 

The functionality seems to be working and tests pass.

--
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file29208/issue16446.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I also bumped into this problem on both 2.7 and 3.3. It is very annoying.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2012-11-24 Thread Xavier de Gaye

Xavier de Gaye added the comment:

See how this is fixed at
http://code.google.com/p/pdb-clone/source/detail?r=8bbac1ffee749fcfd96ea3a2aaca1f240cafc2cc

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2012-11-15 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2012-11-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2012-11-08 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Also, the two oldest frames of the stack are identical (sic),
according to the printed traceback.

$ python3 foo.py
 /tmp/foo.py(3)module()
- x = 1
(Pdb) import sys; print(sys.version)
3.2.2 (default, Dec 27 2011, 17:35:55) 
[GCC 4.3.2]
(Pdb) list
  1 import pdb
  2 pdb.set_trace()
  3  - x = 1
  4
[EOF]
(Pdb) quit
Traceback (most recent call last):
  File foo.py, line 3, in module
x = 1
  File foo.py, line 3, in module
x = 1
  File /usr/local/lib/python3.2/bdb.py, line 46, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/local/lib/python3.2/bdb.py, line 65, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
$

--
components: Library (Lib)
messages: 175205
nosy: xdegaye
priority: normal
severity: normal
status: open
title: pdb raises BdbQuit on 'quit' when started with set_trace
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com