winpdb不使用python 3.3

winpdb不使用python 3.3,python,debugging,remote-debugging,python-3.3,winpdb,Python,Debugging,Remote Debugging,Python 3.3,Winpdb,我无法让rpdb2与Python3.3一起运行,而根据几个来源,这应该是可能的 $ rpdb2 -d myscript.py A password should be set to secure debugger client-server communication. Please type a password:x Password has been set. Traceback (most recent call last): File "/usr/local/bin/rpdb2",

我无法让rpdb2与Python3.3一起运行,而根据几个来源,这应该是可能的

$ rpdb2 -d myscript.py
A password should be set to secure debugger client-server communication.
Please type a password:x
Password has been set.
Traceback (most recent call last):
  File "/usr/local/bin/rpdb2", line 31, in <module>
    rpdb2.main()
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 14470, in main
    StartServer(_rpdb2_args, fchdir, _rpdb2_pwd, fAllowUnencrypted, fAllowRemote, secret)
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 14212, in StartServer
    g_module_main = -1
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 14212, in StartServer
    g_module_main = -1
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 7324, in trace_dispatch_init
    self.__set_signal_handler()
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 7286, in __set_signal_handler
    handler = signal.getsignal(value)
  File "/usr/local/lib/python3.3/dist-packages/rpdb2.py", line 13682, in __getsignal
    handler = g_signal_handlers.get(signum, g_signal_getsignal(signum))
ValueError: signal number out of range
$rpdb2-d myscript.py
应设置密码以保护调试器客户端-服务器通信。
请键入密码:x
密码已设置。
回溯(最近一次呼叫最后一次):
文件“/usr/local/bin/rpdb2”,第31行,在
rpdb2.main()
文件“/usr/local/lib/python3.3/dist-packages/rpdb2.py”,第14470行,在main中
StartServer(_rpdb2_args、fchdir、_rpdb2_pwd、fAllowUnencrypted、fAllowRemote、secret)
StartServer中的文件“/usr/local/lib/python3.3/dist packages/rpdb2.py”,第14212行
g_模块_main=-1
StartServer中的文件“/usr/local/lib/python3.3/dist packages/rpdb2.py”,第14212行
g_模块_main=-1
文件“/usr/local/lib/python3.3/dist packages/rpdb2.py”,第7324行,在trace\u dispatch\u init中
self.\uuuu set\u signal\u handler()
文件“/usr/local/lib/python3.3/dist packages/rpdb2.py”,第7286行,位于信号处理程序中
handler=signal.getsignal(值)
文件“/usr/local/lib/python3.3/dist packages/rpdb2.py”,第13682行,在
handler=g\u signal\u handlers.get(signum,g\u signal\u getsignal(signum))
ValueError:信号号超出范围
rpdb2的版本是
rpdb2.4.8-Tychod
。 我通过运行
pip-3.3安装winpdb
安装了它


有什么线索吗?

今天也遇到了同样的问题,这是我为它的工作所做的。 我仍然不太确定这样做是否正确

发件人:

def\uu getsignal(信号):
handler=g\u signal\u handlers.get(signum,g\u signal\u getsignal(signum))
返回处理器
致:

def\uu getsignal(信号):
尝试:
#问题来自0的符号。
g_信号_获取信号(信号)
除值错误外:
一无所获
handler=g\u signal\u handlers.get(signum,g\u signal\u getsignal(signum))
返回处理器

此函数应位于第13681行或类似行。

问题的原因是rpdb2用于列出所有信号的
信号
模块中的属性扩展列表。新的python版本添加了诸如
SIG_BLOCK、SIG_UNBLOCK、SIG_SETMASK等属性

因此,过滤也应该扩展(补丁只更改一行):

不幸的是,目前还没有官方开发或winpdb分支,所以到目前为止,这个补丁只存储在so上

--- rpdb2.py
+++ rpdb2.py
@@ -7278,11 +7278,11 @@
     def __set_signal_handler(self):
         """
         Set rpdb2 to wrap all signal handlers.
         """
         for key, value in list(vars(signal).items()):
-            if not key.startswith('SIG') or key in ['SIGRTMIN', 'SIGRTMAX'] or key.startswith('SIG_'):
+            if not key.startswith('SIG') or key in ['SIG_IGN', 'SIG_DFL', 'SIGRTMIN', 'SIGRTMAX']:
             continue

         handler = signal.getsignal(value)
         if handler in [signal.SIG_IGN, signal.SIG_DFL]:
             continue