[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 5ca4fe04784fa278c319a3764c9a755f49cc0944 by Miss Islington (bot) 
in branch '3.7':
bpo-13120: fix typo with test_issue13120() method name (GH-12250)
https://github.com/python/cpython/commit/5ca4fe04784fa278c319a3764c9a755f49cc0944


--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12582

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-01 Thread miss-islington


miss-islington  added the comment:


New changeset 9139f926a8d8e5b71830cb7e10b0807836b5e9a4 by Miss Islington (bot) 
(Daniel Hahler) in branch 'master':
bpo-13120: fix typo with test_issue13120() method name (GH-12250)
https://github.com/python/cpython/commit/9139f926a8d8e5b71830cb7e10b0807836b5e9a4


--
nosy: +miss-islington

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-03-09 Thread daniel hahler


daniel hahler  added the comment:

Just for reference: there is a similar issue with `interaction`: 
https://bugs.python.org/issue36250.

--
nosy: +blueyed

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-03-09 Thread daniel hahler


Change by daniel hahler :


--
pull_requests: +12238

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Failed test is skipped if there are no threads.
Thanks for report, Stefan!

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 26056f8a0afe by Andrew Svetlov in branch '3.2':
Skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/26056f8a0afe

New changeset 328a8824c1a7 by Andrew Svetlov in branch '3.3':
Merge: skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/328a8824c1a7

New changeset 4cb84c0fbee2 by Andrew Svetlov in branch 'default':
Merge: skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/4cb84c0fbee2

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Will take a look.

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Stefan Krah

Stefan Krah added the comment:

I think this commit broke the --without-threads buildbot:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/3581/steps/test/logs/stdio

--
nosy: +skrah

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-04 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 708586792eec by Andrew Svetlov in branch '3.2':
Issue #13120: Allow to call pdb.set_trace() from thread.
http://hg.python.org/cpython/rev/708586792eec

New changeset 678dba60c12d by Andrew Svetlov in branch '3.3':
Merge issue #13120: Allow to call pdb.set_trace() from thread.
http://hg.python.org/cpython/rev/678dba60c12d

New changeset 4006c4ca0c1f by Andrew Svetlov in branch 'default':
Merge issue #13120: Allow to call pdb.set_trace() from thread.
http://hg.python.org/cpython/rev/4006c4ca0c1f

--
nosy: +python-dev

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-02 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Uploaded updated cumulative patch.

Can we apply the patch to 3.2 or at least to 3.3?

I see nothing wrong with it, but I'm ok with pushing to 3.4 only if we want to 
be extra careful.

--
assignee:  -> asvetlov
versions: +Python 3.4
Added file: http://bugs.python.org/file28190/issue13120.txt

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-02 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-02 Thread icemac

icemac added the comment:

This bug bites me when developing with Pyramid using Python 3.2.
I'd like to get it solved generally as the patch works for me (Python 3.2.3)).

What needs to be done to get this patch into the version control system?

--
nosy: +icemac

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-30 Thread Meador Inge

Meador Inge  added the comment:

Ilya, I agree.  Thanks for the test patch.  These two patches look OK to me.  
Georg OK with you?

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Ilya Sandler

Ilya Sandler  added the comment:

I think stuff like this can only be tested out-of-process.

So I added an out-of-process test to test_pdb.py. The test passes with the 
fixed pdb.py. (and fails with the original one).

Patch for the test attached.

--
Added file: http://bugs.python.org/file23796/test_pdb.py.patch

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Meador Inge

Meador Inge  added the comment:

Normally a test case is needed.  I tried the following:

diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -595,6 +595,25 @@ def test_pdb_run_with_code_object():
 (Pdb) continue
 """
 
+def test_pdb_continue_in_thread():
+"""Testing the ability to continue from a non-main thread.
+
+>>> import threading
+>>>
+>>> def start_pdb():
+... import pdb
+... pdb.Pdb().set_trace()
+... x = 1
+... y = 1
+...
+
+>>> with PdbTestInput(['continue']):
+...t = threading.Thread(target=start_pdb)
+...t.start()
+> (4)start_pdb()
+-> x = 1
+(Pdb) continue
+"""

but 'doctests' doesn't seem to play nicely with threading.  The pdb testsuite 
fails with:


[meadori@motherbrain cpython]$ ./python -m test test_pdb
[1/1] test_pdb
**
File "/home/meadori/code/python/cpython/Lib/test/test_pdb.py", line 610, in 
test.test_pdb.test_pdb_continue_in_thread
Failed example:
with PdbTestInput(['continue']):
   t = threading.Thread(target=start_pdb)
   t.start()
Expected:
> (4)start_pdb()
-> x = 1
(Pdb) continue
Got nothing
**
File "/home/meadori/code/python/cpython/Lib/test/test_pdb.py", line 34, in 
test.test_pdb.test_pdb_displayhook
Failed example:
def test_function(foo, bar):
import pdb; pdb.Pdb(nosigint=True).set_trace()
pass
Expected nothing
Got:
> (4)start_pdb()
Exception in thread Thread-1:

It looks like the output is going to the wrong test.

Anyone else have test ideas?  If not, then I guess it is OK to commit as is.

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Georg Brandl

Georg Brandl  added the comment:

Patch seems fine to me.

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +georg.brandl
stage:  -> patch review
versions: +Python 3.3

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-26 Thread Ilya Sandler

Ilya Sandler  added the comment:

I confirm the bug. But I don't think disabling Ctrl-C (SIGINT) handling by 
default is a good idea. Proper Ctrl-C support seems like a fundamental feature 
for a command line debugger. 

However, I think the bug is easily fixable w/o changing SIGINT handling. 
Basically, just put try/except around signal.signal, catch the ValueError and 
proceed. Would this approach solve your problem?

Patch attached.

PS. and here is a small program demonstrating the bug (just run it and execute 
"c" command at pdb prompt)

 import threading
 import pdb

 def start_pdb():
pdb.Pdb().set_trace()
x = 1
y = 1

 t = threading.Thread( target=start_pdb)
 t.start()

--
keywords: +patch
nosy: +isandler
Added file: http://bugs.python.org/file23791/thread_sigint.patch

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-10-06 Thread Ben Bass

Changes by Ben Bass :


--
title: Default nosigint optionto pdb.Pdb() prevents use in non-main thread -> 
Default nosigint option to pdb.Pdb() prevents use in non-main thread

___
Python tracker 

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