agevole / rad2py

Automatically exported from code.google.com/p/rad2py
GNU General Public License v3.0
0 stars 0 forks source link

qdb on Python3 needs to use a byte-string for the multiprocessing authkey #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I ran qdb.py through 2to3 and then tried to use the set_trace() function in 
Python 3.2.3. When I do that, however, I get this:

---------------------------------------

Traceback (most recent call last):
  File "test.py", line 11, in <module>
    foo()
  File "test.py", line 5, in foo
    qdb.set_trace()
  File "/workspace/install/gerrit/rms/products/dotrox/MAIN/linux-amd64-gcc_4_4-release/lib/python3.2/site-packages/qdb.py", line 925, in set_trace
    listener = Listener(address, authkey=authkey)
  File "/workspace/install/gerrit/rms/products/dotrox/MAIN/linux-amd64-gcc_4_4-release/lib/python3.2/multiprocessing/connection.py", line 135, in __init__
    raise TypeError('authkey should be a byte string')
TypeError: authkey should be a byte string

-------------------------------

As a quick patch, I went through and changed all instances of 'secret password' 
to b'secret password', and this made the problem go away. That's probably not a 
complete fix, but it let me move ahead. (To which I'd should add that qdb 
seemed to work flawlessly afterwards...awesome!)

Original issue reported on code.google.com by austin.bingham on 16 Jul 2013 at 10:33