Compare commits

..

No commits in common. "rawhide" and "f28" have entirely different histories.

16 changed files with 97 additions and 2066 deletions

2
.gitignore vendored
View file

@ -1,4 +1,2 @@
winpdb-1.4.6.tar.gz
/winpdb-1.4.8.tar.gz
/WINPDB_1_5_0.tar.gz
/winpdb-reborn-2.0.0.1.tar.gz

View file

@ -1,51 +0,0 @@
From 215712d75cf89b0678d563237746be647d5f25e7 Mon Sep 17 00:00:00 2001
From: Philippe F <phil.fremy@free.fr>
Date: Tue, 17 Nov 2020 15:16:44 +0100
Subject: [PATCH] Fixes undefined variable
---
rpdb/session_manager.py | 9 +++++++++
rpdb2.py | 10 ----------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/rpdb/session_manager.py b/rpdb/session_manager.py
index 3d1701a..f9ef51c 100644
--- a/rpdb/session_manager.py
+++ b/rpdb/session_manager.py
@@ -29,6 +29,15 @@
g_fFirewallTest = True
+RPDBTERM = 'RPDBTERM'
+COLORTERM = 'COLORTERM'
+TERM = 'TERM'
+KDE_PREFIX = 'KDE'
+GNOME_PREFIX = 'GNOME'
+
+KDE_DEFAULT_TERM_QUERY = "kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole"
+XTERM = 'xterm'
+RXVT = 'rxvt'
GNOME_DEFAULT_TERM = 'gnome-terminal'
GNOME_DEFAULT_TERM_BEFORE_3_8 = 'gnome-terminal --disable-factory'
GNOME_DEFAULT_TERM_BEFORE_3_8_CHECK_FILE = "/../share/gnome-terminal/profile-manager.ui" #this glade-related file present for only gnome terminal versions 2.24-3.6
diff --git a/rpdb2.py b/rpdb2.py
index 015cfd9..d970fed 100644
--- a/rpdb2.py
+++ b/rpdb2.py
@@ -365,16 +365,6 @@ def is_py3k():
# According to PEP-8: "Use 4 spaces per indentation level."
#
-RPDBTERM = 'RPDBTERM'
-COLORTERM = 'COLORTERM'
-TERM = 'TERM'
-KDE_PREFIX = 'KDE'
-GNOME_PREFIX = 'GNOME'
-
-KDE_DEFAULT_TERM_QUERY = "kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole"
-XTERM = 'xterm'
-RXVT = 'rxvt'
-
FORK_CHILD = 'child'
FORK_PARENT = 'parent'
FORK_MANUAL = 'manual'

View file

@ -1,49 +0,0 @@
From 2a3ca49275ee8461009dbe5a4aefef4b57dec729 Mon Sep 17 00:00:00 2001
From: Johannes Wilde <git@jowil.de>
Date: Fri, 21 Feb 2025 15:48:08 +0100
Subject: [PATCH] Do not print if no file was provided.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The current Python 3.13.2 documentation states [https://docs.python.org/3/library/sys.html#sys.__stderr__]:
"Note: Under some conditions stdin, stdout and stderr as well as the original values __stdin__, __stdout__ and __stderr__ can be None. It is usually the case for Windows GUI apps that arent connected to a console and Python apps started with pythonw."
Using an integrated Python interpreter, I encountered sys.__stderr__ to be None - which prevented me from using rpdb as it crashed when printing debug information in print_debug().
In addition I like using a None file-handle to disable output to it. I find this to be pythonic.
---
rpdb/utils.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/rpdb/utils.py b/rpdb/utils.py
index e20e344..127b187 100644
--- a/rpdb/utils.py
+++ b/rpdb/utils.py
@@ -123,17 +123,18 @@ def winlower(path):
def _print(s, f = sys.stdout, feol = True):
- s = as_unicode(s)
+ if f is not None:
+ s = as_unicode(s)
- encoding = detect_encoding(f)
+ encoding = detect_encoding(f)
- s = as_bytes(s, encoding, fstrict = False)
- s = as_string(s, encoding)
+ s = as_bytes(s, encoding, fstrict = False)
+ s = as_string(s, encoding)
- if feol:
- f.write(s + '\n')
- else:
- f.write(s)
+ if feol:
+ f.write(s + '\n')
+ else:
+ f.write(s)
def print_exception(t, v, tb, fForce = False):

View file

@ -1,22 +0,0 @@
From 5c2f5232b95715c5e8efbd155dd38c262f5e79d0 Mon Sep 17 00:00:00 2001
From: Philippe F <phil.fremy@free.fr>
Date: Tue, 17 Nov 2020 15:11:06 +0100
Subject: [PATCH] Do not use deprecated function
---
winpdb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winpdb.py b/winpdb.py
index 1e27f88..18d0988 100644
--- a/winpdb.py
+++ b/winpdb.py
@@ -4178,7 +4178,7 @@ def init2(self):
return
pwd_dialog = CPwdDialog(self, pwd)
- pos = self.GetPositionTuple()
+ pos = self.GetPosition()
pwd_dialog.SetPosition((pos[0] + 50, pos[1] + 50))
r = pwd_dialog.ShowModal()
if r != wx.ID_OK:

View file

@ -1,347 +0,0 @@
From 613e4532d93b728bef7b2c8e529a431bbe6ecc19 Mon Sep 17 00:00:00 2001
From: Philippe F <phil.fremy@free.fr>
Date: Wed, 18 Nov 2020 09:45:24 +0100
Subject: [PATCH] Fix small typos
---
rpdb/breakinfo.py | 1 +
rpdb/const.py | 2 --
rpdb/crypto.py | 5 +++++
rpdb/debugee.py | 2 +-
rpdb/events.py | 4 ++--
rpdb/firewall_test.py | 6 ++---
rpdb/rpc.py | 4 +++-
rpdb/session_manager.py | 50 ++++++++++++++++++++++++++++-------------
rpdb/utils.py | 2 +-
rpdb2.py | 25 ---------------------
10 files changed, 50 insertions(+), 51 deletions(-)
diff --git a/rpdb/breakinfo.py b/rpdb/breakinfo.py
index 7eddb90..58a0fa1 100644
--- a/rpdb/breakinfo.py
+++ b/rpdb/breakinfo.py
@@ -24,6 +24,7 @@ def CalcScopeLine(self, lineno):
rvl = copy.copy(self.m_valid_lines)
rvl.reverse()
+ l = ''
for l in rvl:
if lineno >= l:
break
diff --git a/rpdb/const.py b/rpdb/const.py
index 9c01d86..3407af8 100644
--- a/rpdb/const.py
+++ b/rpdb/const.py
@@ -22,8 +22,6 @@
"""
-import os
-
COPYRIGHT_NOTICE = """Copyright (C) 2013-2017 Philippe Fremy, 2005-2009 Nir Aides"""
CREDITS_NOTICE = """Work on version 1.4.8 was sponsored by Investortools, Inc."""
LICENSE_NOTICE = """
diff --git a/rpdb/crypto.py b/rpdb/crypto.py
index 65c36ec..8482ae5 100644
--- a/rpdb/crypto.py
+++ b/rpdb/crypto.py
@@ -5,6 +5,11 @@
import time
import zlib
+try:
+ from Crypto.Cipher import DES
+except ImportError:
+ pass
+
from rpdb.compat import _md5, base64_encodestring, base64_decodestring
from rpdb.exceptions import EncryptionExpected, EncryptionNotSupported, DecryptionFailure, AuthenticationFailure, \
AuthenticationBadData, AuthenticationBadIndex
diff --git a/rpdb/debugee.py b/rpdb/debugee.py
index 1105257..683e810 100644
--- a/rpdb/debugee.py
+++ b/rpdb/debugee.py
@@ -193,7 +193,7 @@ def __StartXMLRPCServer(self):
while True:
try:
- server = CXMLRPCServer((host, port), logRequests = 0)
+ server = CXMLRPCServer((host, port), logRequests = False)
return (port, server)
except socket.error:
diff --git a/rpdb/events.py b/rpdb/events.py
index dcef346..6adeb7d 100644
--- a/rpdb/events.py
+++ b/rpdb/events.py
@@ -305,10 +305,10 @@ class CEventBreakpoint(CEvent):
REMOVE = as_unicode('remove')
SET = as_unicode('set')
- def __init__(self, bp, action = SET, id_list = [], fAll = False):
+ def __init__(self, bp, action = SET, id_list = None, fAll = False):
self.m_bp = breakpoint_copy(bp)
self.m_action = action
- self.m_id_list = id_list
+ self.m_id_list = id_list or []
self.m_fAll = fAll
diff --git a/rpdb/firewall_test.py b/rpdb/firewall_test.py
index 49ff48b..96c5476 100644
--- a/rpdb/firewall_test.py
+++ b/rpdb/firewall_test.py
@@ -97,7 +97,7 @@ def __client(self):
s.connect((LOOPBACK, CFirewallTest.m_port))
s.send(as_bytes('Hello, world'))
- data = self.__recv(s, 1024)
+ _data = self.__recv(s, 1024)
self.m_result = True
except socket.error:
@@ -140,9 +140,9 @@ def __server(self):
CFirewallTest.m_port = port
+ conn = None
try:
try:
- conn = None
s.listen(1)
conn, addr = s.accept()
@@ -163,7 +163,7 @@ def __server(self):
s.close()
- def __recv(self, s, len):
+ def __recv(self, s, _len):
t0 = time.time()
while True:
diff --git a/rpdb/rpc.py b/rpdb/rpc.py
index 2576e13..eed5406 100644
--- a/rpdb/rpc.py
+++ b/rpdb/rpc.py
@@ -196,7 +196,7 @@ def __marshaled_dispatch(self, data, dispatch_method = None):
response = self._dispatch(method, params)
# wrap response in a singleton tuple
response = (response,)
- response = xmlrpclib.dumps(response, methodresponse=1)
+ response = xmlrpclib.dumps(response, methodresponse=True)
except xmlrpclib.Fault:
fault = sys.exc_info()[1]
response = xmlrpclib.dumps(fault)
@@ -279,11 +279,13 @@ def __request(self, name, params):
except AuthenticationBadIndex:
e = sys.exc_info()[1]
+ print_debug("Caught AuthenticationBadIndex: %s" % str(e))
self.m_crypto.set_index(e.m_max_index, e.m_anchor)
continue
except xmlrpclib.Fault:
fault = sys.exc_info()[1]
+ print_debug("Caught xmlrpclib.Fault: %s" % fault.faultString)
if class_name(BadVersion) in fault.faultString:
s = fault.faultString.split("'")
version = ['', s[1]][len(s) > 0]
diff --git a/rpdb/session_manager.py b/rpdb/session_manager.py
index f9ef51c..cfba37f 100644
--- a/rpdb/session_manager.py
+++ b/rpdb/session_manager.py
@@ -8,19 +8,17 @@
import tempfile
import threading
import time
-import sys
+import stat
from rpdb.breakpoint import CBreakPointsManagerProxy
from rpdb.const import *
-from rpdb.const import POSIX, RPDB_BPL_FOLDER, BREAKPOINTS_FILE_EXT, RPDB_BPL_FOLDER_NT, LOCALHOST, LOOPBACK
from rpdb.compat import base64_encodestring, _md5
from rpdb.events import *
from rpdb.exceptions import *
-from rpdb.exceptions import CException, CConnectionException, NotAttached
from rpdb.globals import g_fDefaultStd, g_fScreen, g_fDebug, g_found_unicode_files
from rpdb.utils import as_unicode, _print, print_debug, is_unicode, as_bytes, ENCODING_AUTO, detect_locale, as_string, \
get_python_executable, print_debug_exception, print_exception, generate_rid, split_command_line_path_filename_args, \
- my_os_path_join, FindFile, g_safe_base64_to, getcwdu, calcURL, generate_random_char
+ my_os_path_join, FindFile, g_safe_base64_to, getcwdu, calcURL, generate_random_char, myisfile
from rpdb.state_manager import CStateManager
from rpdb.firewall_test import CFirewallTest
from rpdb.crypto import CCrypto
@@ -154,12 +152,12 @@ def set_printer(self, printer):
return self.__smi.set_printer(printer)
- def report_exception(self, type, value, tb):
+ def report_exception(self, etype, value, tb):
"""
Sends exception information to the printer.
"""
- return self.__smi.report_exception(type, value, tb)
+ return self.__smi.report_exception(etype, value, tb)
def register_callback(self, callback, event_type_dict, fSingleUse):
@@ -920,11 +918,11 @@ def script_terminated_callback(self):
# Private Methods
#
- def __unhandled_exception(self, event):
+ def __unhandled_exception(self, _event):
self.unhandled_exception_callback()
- def __termination_callback(self, event):
+ def __termination_callback(self, _event):
self.script_terminated_callback()
@@ -961,7 +959,7 @@ def __state_calback(self, event):
e = s[-1]
- function_name = e[2]
+ _function_name = e[2]
filename = os.path.basename(e[0])
if filename != DEBUGGER_FILENAME:
@@ -1099,10 +1097,9 @@ def __wait_for_debuggee(self, rid):
time.sleep(STARTUP_TIMEOUT / 2)
for i in range(STARTUP_RETRIES):
+ print_debug('Scanning for debuggee...')
+ t0 = time.time()
try:
- print_debug('Scanning for debuggee...')
-
- t0 = time.time()
return self.m_server_list_object.calcList(self.m_rpdb2_pwd, self.m_rid, rid)
except UnknownServer:
@@ -1226,7 +1223,7 @@ def _spawn_server(self, fchdir, ExpandedFilename, args, rid, interpreter):
try:
import terminalcommand
name = MAC
- except:
+ except ImportError:
name = os.name
if name == 'nt' and g_fDebug:
@@ -1523,7 +1520,7 @@ def on_event_signal_exception(self, event):
self.m_printer(STR_SIGNAL_EXCEPTION % (event.m_description, event.m_signame, event.m_signum))
- def on_event_embedded_sync(self, event):
+ def on_event_embedded_sync(self, _event):
#
# time.sleep() allows pending break requests to go through...
#
@@ -1531,7 +1528,7 @@ def on_event_embedded_sync(self, event):
self.getSession().getProxy().embedded_sync()
- def on_event_exit(self, event):
+ def on_event_exit(self, _event):
self.m_printer(STR_DEBUGGEE_TERMINATED)
threading.Thread(target = self.detach_job).start()
@@ -2402,7 +2399,7 @@ def CalcTerminalCommand():
return term
if IsPrefixInEnviron(KDE_PREFIX):
- (s, term) = commands.getstatusoutput(KDE_DEFAULT_TERM_QUERY)
+ (s, term) = subprocess.getstatusoutput(KDE_DEFAULT_TERM_QUERY)
if (s == 0) and IsFileInPath(term):
return term
@@ -2531,6 +2528,27 @@ def cleanup_bpl_folder(path):
pass
+def IsFileInPath(filename):
+ if filename == '':
+ return False
+
+ try:
+ FindFile(filename)
+ return True
+
+ except IOError:
+ return False
+
+
+def IsPrefixInEnviron(_str):
+ for e in os.environ.keys():
+ if e.startswith(_str):
+ return True
+
+ return False
+
+
+
def ControlRate(t_last_call, max_rate):
"""
Limits rate at which this function is called by sleeping.
diff --git a/rpdb/utils.py b/rpdb/utils.py
index ca83607..e20e344 100644
--- a/rpdb/utils.py
+++ b/rpdb/utils.py
@@ -286,8 +286,8 @@ def safe_wait(lock, timeout = None):
#
while True:
+ t0 = time.time()
try:
- t0 = time.time()
return lock.wait(timeout)
except:
diff --git a/rpdb2.py b/rpdb2.py
index d970fed..4bed551 100644
--- a/rpdb2.py
+++ b/rpdb2.py
@@ -79,11 +79,6 @@
print(STR_BAD_PYTHON_VERSION)
sys.exit(-1)
-try:
- from Crypto.Cipher import DES
-except ImportError:
- pass
-
import xmlrpc.client as xmlrpclib
import _thread as thread
import numbers
@@ -602,26 +597,6 @@ def IsPythonSourceFile(path):
# this is too complicated in Python 3
-def IsFileInPath(filename):
- if filename == '':
- return False
-
- try:
- FindFile(filename)
- return True
-
- except IOError:
- return False
-
-
-
-def IsPrefixInEnviron(_str):
- for e in os.environ.keys():
- if e.startswith(_str):
- return True
-
- return False
-
def get_file_encoding(filename):

View file

@ -1,22 +0,0 @@
From d1a4430ac8da69d3a1cd4a848c9135f093b90123 Mon Sep 17 00:00:00 2001
From: Philippe F <phil.fremy@free.fr>
Date: Tue, 17 Nov 2020 15:10:51 +0100
Subject: [PATCH] Fix typo preventing from launching winpdb debuggee
---
rpdb/session_manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpdb/session_manager.py b/rpdb/session_manager.py
index ca44fef..3d1701a 100644
--- a/rpdb/session_manager.py
+++ b/rpdb/session_manager.py
@@ -1246,7 +1246,7 @@ def _spawn_server(self, fchdir, ExpandedFilename, args, rid, interpreter):
# for .pyc files, strip the c
fpath, ext = os.path.splitext(__file__)
- debugger = os.path.join( os.path.basename(fpath), '..', 'rpdb2') + ext
+ debugger = os.path.join( os.path.dirname(fpath), '..', 'rpdb2') + ext
if debugger[-1:] == 'c':
debugger = debugger[:-1]

View file

@ -1,24 +0,0 @@
From ed617311de97300c1ce9de9ee6931dc7141cfd93 Mon Sep 17 00:00:00 2001
From: Johannes Wilde <git@jowil.de>
Date: Fri, 21 Feb 2025 15:56:16 +0100
Subject: [PATCH] Do not directly access "private" members, but prefer the
public equivalent.
[See also: https://stackoverflow.com/questions/74170883/python-sys-stdout-is-equal-to-none-by-default .]
---
rpdb/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpdb/utils.py b/rpdb/utils.py
index 127b187..3a0bb86 100644
--- a/rpdb/utils.py
+++ b/rpdb/utils.py
@@ -93,7 +93,7 @@ def print_debug(_str):
str = '%s %s:%d %s %s(): %s' % (s, filename, lineno, threadinfo, name, _str)
- _print(str, sys.__stderr__)
+ _print(str, sys.stderr)
def print_debug_exception(fForce = False):

View file

@ -1 +1 @@
SHA512 (winpdb-reborn-2.0.0.1.tar.gz) = 21e9c35e2c58d8f9a2bb762f3f4e916dbb4fee80cb8c52db6afa6a9eaec03f6dc85d62e1daace8c896b35f0e49cf7c34faefdc478466cb167b286b0301543ddb
e28049cc93c1614b9db20960d76b7ea3 winpdb-1.4.8.tar.gz

View file

@ -0,0 +1,12 @@
diff -up winpdb-1.4.8/rpdb2.py.gnomefix winpdb-1.4.8/rpdb2.py
--- winpdb-1.4.8/rpdb2.py.gnomefix 2014-12-04 15:19:38.972288993 -0500
+++ winpdb-1.4.8/rpdb2.py 2014-12-04 15:19:47.279229223 -0500
@@ -1780,7 +1780,7 @@ osSpawn = {
NT_DEBUG: 'start "rpdb2 - Version ' + get_version() + ' - Debuggee Console" cmd.exe /K ""%(exec)s" %(options)s"',
POSIX: "%(term)s -e %(shell)s -c '%(exec)s %(options)s; %(shell)s' &",
'Terminal': "Terminal --disable-server -x %(shell)s -c '%(exec)s %(options)s; %(shell)s' &",
- GNOME_DEFAULT_TERM: "gnome-terminal --disable-factory -x %(shell)s -c '%(exec)s %(options)s; %(shell)s' &",
+ GNOME_DEFAULT_TERM: "gnome-terminal -x %(shell)s -c '%(exec)s %(options)s; %(shell)s' &",
MAC: '%(exec)s %(options)s',
DARWIN: '%(exec)s %(options)s',
SCREEN: 'screen -t debuggee_console %(exec)s %(options)s'

View file

@ -0,0 +1,12 @@
diff -up winpdb-1.4.8/rpdb2.py.issue19 winpdb-1.4.8/rpdb2.py
--- winpdb-1.4.8/rpdb2.py.issue19 2015-04-01 08:47:34.601072072 -0400
+++ winpdb-1.4.8/rpdb2.py 2015-04-01 08:48:02.336901383 -0400
@@ -12056,7 +12056,7 @@ class CConsoleInternal(cmd.Cmd, threadin
def __parse_bp_arg(self, arg, fAllowExpr = True):
- _args = arg.split(BP_EVAL_SEP)
+ _args = arg.split(BP_EVAL_SEP, 1)
if (len(_args) > 1) and (not fAllowExpr):
raise BadArgument

View file

@ -1,39 +0,0 @@
diff -up winpdb-reborn-2.0.0.1/rpdb2.py.no-imp winpdb-reborn-2.0.0.1/rpdb2.py
--- winpdb-reborn-2.0.0.1/rpdb2.py.no-imp 2025-03-12 14:27:38.797538630 -0400
+++ winpdb-reborn-2.0.0.1/rpdb2.py 2025-03-12 14:29:17.837196358 -0400
@@ -72,7 +72,8 @@ import time
import copy
import sys
import cmd
-import imp
+import importlib.util
+import importlib.machinery
import os
if sys.version_info[:2] < (3,2):
@@ -84,6 +85,16 @@ import _thread as thread
import numbers
+def load_source(modname, filename):
+ loader = importlib.machinery.SourceFileLoader(modname, filename)
+ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
+ module = importlib.util.module_from_spec(spec)
+ # The module is always executed and not cached in sys.modules.
+ # Uncomment the following line to cache the module.
+ # sys.modules[module.__name__] = module
+ loader.exec_module(module)
+ return module
+
#
#-------------------------------- Design Notes -------------------------------
#
@@ -6768,7 +6779,7 @@ def StartServer(args, fchdir, _rpdb2_pwd
# there was a problem loading the debugged script.
#
- imp.load_source('__main__', _path)
+ load_source('__main__', _path)

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
diff -up winpdb-WINPDB_1_5_0/rpdb2.py.colorterm-fix winpdb-WINPDB_1_5_0/rpdb2.py
--- winpdb-WINPDB_1_5_0/rpdb2.py.colorterm-fix 2020-01-31 06:03:44.332995973 -0500
+++ winpdb-WINPDB_1_5_0/rpdb2.py 2020-01-31 06:04:09.522505827 -0500
@@ -3526,7 +3526,7 @@ def CalcTerminalCommand():
if COLORTERM in os.environ:
term = os.environ[COLORTERM]
- if IsFileInPath(term):
+ if term != 'yes' and IsFileInPath(term):
return term
if IsPrefixInEnviron(KDE_PREFIX):

View file

@ -1,21 +0,0 @@
diff -up winpdb-WINPDB_1_5_0/rpdb2.py.bytes-fix winpdb-WINPDB_1_5_0/rpdb2.py
--- winpdb-WINPDB_1_5_0/rpdb2.py.bytes-fix 2020-01-31 06:05:32.600889226 -0500
+++ winpdb-WINPDB_1_5_0/rpdb2.py 2020-01-31 06:06:38.376609312 -0500
@@ -4858,7 +4858,7 @@ class CCrypto:
s_padded = s + as_bytes('\x00') * (DES.block_size - (len(s) % DES.block_size))
key_padded = (self.m_key + as_bytes('0') * (DES.key_size - (len(self.m_key) % DES.key_size)))[:DES.key_size]
- iv = '0' * DES.block_size
+ iv = as_bytes('0') * DES.block_size
d = DES.new(key_padded, DES.MODE_CBC, iv)
r = d.encrypt(s_padded)
@@ -4869,7 +4869,7 @@ class CCrypto:
def __decrypt(self, s):
try:
key_padded = (self.m_key + as_bytes('0') * (DES.key_size - (len(self.m_key) % DES.key_size)))[:DES.key_size]
- iv = '0' * DES.block_size
+ iv = as_bytes('0') * DES.block_size
d = DES.new(key_padded, DES.MODE_CBC, iv)
_s = d.decrypt(s).strip(as_bytes('\x00'))

View file

@ -1,24 +1,22 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: winpdb
Version: 2.0.0.1
Release: 8%{?dist}
Version: 1.4.8
Release: 16%{?dist}
Summary: An advanced python debugger
License: GPL-2.0-or-later
URL: https://pypi.org/project/winpdb-reborn
Source0: https://files.pythonhosted.org/packages/d9/8f/c8033e1a075d8205a2f950a40644d363f63b11698655f620b5f4d6e7ace0/winpdb-reborn-2.0.0.1.tar.gz
Group: Development/Debuggers
License: GPLv2+
URL: http://www.winpdb.org/
Source0: http://winpdb.googlecode.com/files/winpdb-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.png
Patch0: https://github.com/bluebird75/winpdb/commit/d1a4430ac8da69d3a1cd4a848c9135f093b90123.patch
Patch1: https://github.com/bluebird75/winpdb/commit/5c2f5232b95715c5e8efbd155dd38c262f5e79d0.patch
Patch2: https://github.com/bluebird75/winpdb/commit/215712d75cf89b0678d563237746be647d5f25e7.patch
Patch3: https://github.com/bluebird75/winpdb/commit/613e4532d93b728bef7b2c8e529a431bbe6ecc19.patch
Patch4: https://github.com/bluebird75/winpdb/commit/2a3ca49275ee8461009dbe5a4aefef4b57dec729.patch
Patch5: https://github.com/bluebird75/winpdb/commit/ed617311de97300c1ce9de9ee6931dc7141cfd93.patch
Patch6: winpdb-2.0.0.1-no-imp.patch
Patch0: winpdb-1.4.8-gnome-fix.patch
Patch1: https://sources.debian.net/data/main/w/winpdb/1.4.8-2.1/debian/patches/wxpython3.0.patch
# https://code.google.com/p/winpdb/issues/detail?id=19
Patch2: winpdb-1.4.8-issue19-fix.patch
BuildArch: noarch
BuildRequires: python3-devel, desktop-file-utils
BuildRequires: python3-setuptools, dos2unix
Requires: python3-crypto, python3-wxpython4
Provides: winpdb-reborn = %{version}-%{release}
BuildRequires: python2-devel, wxPython-devel >= 2.6, desktop-file-utils
Requires: python2-crypto, python2-wxpython >= 2.6
%description
Winpdb is an advanced python debugger, with support for smart breakpoints,
@ -26,25 +24,18 @@ multiple threads, namespace modification, embedded debugging, encrypted
communication and speed of up to 20 times that of pdb.
%prep
%setup -q -n %{name}-reborn-%{version}
for i in *.py rpdb/*.py; do
dos2unix $i
done
%patch -P0 -p1 -b .typofix
%patch -P1 -p1 -b .deprecated-function
%patch -P2 -p1 -b .undefined
%patch -P3 -p1 -b .small-typo
%patch -P4 -p1 -b .no-print-if-no-file
%patch -P5 -p1 -b .use-public-stderr
%patch -P6 -p1 -b .no-imp
sed -i 's|/usr/bin/env python|/usr/bin/python3|g' rpdb2.py
sed -i 's|/usr/bin/env python|/usr/bin/python3|g' winpdb.py
%setup -q
%patch0 -p1 -b .gnomefix
%patch1 -p1 -b .wxpy3
%patch2 -p1 -b .issue19
sed -i 's/\r//g' README.txt
chmod -x README.txt
%build
%{__python3} setup.py build
%{__python} setup.py build
%install
%{__python3} setup.py install --skip-build --root=$RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m0644 -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
@ -54,120 +45,16 @@ desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
chmod +x $RPM_BUILD_ROOT%{python3_sitelib}/rpdb2.py $RPM_BUILD_ROOT%{python3_sitelib}/winpdb.py
chmod +x $RPM_BUILD_ROOT%{python_sitelib}/rpdb2.py $RPM_BUILD_ROOT%{python_sitelib}/winpdb.py
%files
%doc README.md
%doc README.txt
%{_bindir}/*
%{python3_sitelib}/*
%{python_sitelib}/*
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 2.0.0.1-7
- Rebuilt for Python 3.15
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.0.0.1-5
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.0.0.1-4
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 2.0.0.1-2
- Rebuilt for Python 3.14
* Wed Mar 12 2025 Tom Callaway <spot@fedoraproject.org> - 2.0.0.1-1
- update to 2.0.0.1 + latest commits
- apply fix for removed imp.load_source()
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.21.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 2.0.0-0.20.dev5
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.19.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2.0.0-0.18.dev5
- Rebuilt for Python 3.13
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.17.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.16.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.0.0-0.15.dev5
- Rebuilt for Python 3.12
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.14.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.13.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.0.0-0.12.dev5
- Rebuilt for Python 3.11
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.11.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.10.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.0-0.9.dev5
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.8.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.7.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-0.6.dev5
- Rebuilt for Python 3.9
* Fri Jan 31 2020 Tom Callaway <spot@fedoraproject.org> - 2.0.0-0.5.dev5
- add fixes from upstream
- remove unnecessary (and dead) dependency on wxPython-devel
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-0.4.dev5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-0.3.dev5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-0.2.dev5
- Rebuilt for Python 3.8
* Thu Aug 15 2019 Tom Callaway <spot@fedoraproject.org> - 2.0.0-0.1.dev5
- use winpdb-reborn sources, move to python3
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.8-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jun 04 2019 Tom Callaway <spot@fedoraproject.org> - 1.4.8-20
- make explicit python2
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.8-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 24 2018 Tom Callaway <spot@fedoraproject.org> - 1.4.8-18
- fix FTBFS
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.8-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.8-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

47
wxpython3.0.patch Normal file
View file

@ -0,0 +1,47 @@
Description: Fixes for wxPython 3.0
Retains compatibility with 2.8.
Author: Olly Betts <olly@survex.com>
Bug-Debian: https://bugs.debian.org/759093
Forwarded: no
Last-Update: 2014-09-20
Index: winpdb-1.4.8/winpdb.py
===================================================================
--- winpdb-1.4.8.orig/winpdb.py
+++ winpdb-1.4.8/winpdb.py
@@ -278,7 +278,7 @@ import sys
-WXVER = "2.6"
+WXVER = "2.8"
STR_WXPYTHON_ERROR_TITLE = 'Winpdb Error'
STR_WXPYTHON_ERROR_MSG = """wxPython was not found.
@@ -3870,7 +3870,7 @@ class CHTMLDialog(wx.Dialog):
self.m_html.SetPage(self.get_html_text(text))
ir = self.m_html.GetInternalRepresentation()
- self.m_html.SetSize((ir.GetWidth() + 25, min(500, ir.GetHeight() + 25)))
+ self.m_html.SetMinSize((ir.GetWidth() + 25, min(500, ir.GetHeight() + 25)))
btnsizer = wx.StdDialogButtonSizer()
sizerv.Add(btnsizer, 0, wx.ALIGN_CENTRE | wx.ALL, 5)
@@ -4465,7 +4465,7 @@ class COpenDialog(wx.Dialog):
(_path, filename, args) = rpdb2.split_command_line_path_filename_args(command_line)
_abs_path = os.path.abspath(_path)
- dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR)
+ dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
r = dlg.ShowModal()
if r == wx.ID_OK:
path = dlg.GetPaths()[0]
@@ -4563,7 +4563,7 @@ class CLaunchDialog(wx.Dialog):
cwd = rpdb2.getcwdu()
- dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR)
+ dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
r = dlg.ShowModal()
os.chdir(cwd)