From d0f81de46ec51687ac24ae9598eb2615010a4b44 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Sat, 9 Nov 2024 08:47:34 -0300 Subject: [PATCH] pydevd 3.2.3 --- build_tools/pydevd_release_process.txt | 4 ++-- pydevd.py | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/build_tools/pydevd_release_process.txt b/build_tools/pydevd_release_process.txt index 56d918ff..b7e8664c 100644 --- a/build_tools/pydevd_release_process.txt +++ b/build_tools/pydevd_release_process.txt @@ -7,8 +7,8 @@ Update cython-generated files (must update cython and then run build_tools/build Create tag: ----------- -git tag pydev_debugger_3_2_1 -a -m "PyDev.Debugger 3.2.1" -git push --tags +git tag pydev_debugger_3_2_3 -a -m "PyDev.Debugger 3.2.3" +git push origin pydev_debugger_3_2_3 (pushing the tag does the release to PyPi now) diff --git a/pydevd.py b/pydevd.py index 669f2b69..51f69be3 100644 --- a/pydevd.py +++ b/pydevd.py @@ -173,7 +173,7 @@ if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame -__version_info__ = (3, 2, 2) +__version_info__ = (3, 2, 3) __version_info_str__ = [] for v in __version_info__: __version_info_str__.append(str(v)) @@ -255,6 +255,7 @@ def pydevd_breakpointhook(*args, **kwargs): # PyDBCommandThread # ======================================================================================================================= class PyDBCommandThread(PyDBDaemonThread): + def __init__(self, py_db): PyDBDaemonThread.__init__(self, py_db) self._py_db_command_thread_event = py_db._py_db_command_thread_event @@ -299,6 +300,7 @@ def do_kill_pydev_thread(self): # Non-daemon thread: guarantees that all data is written even if program is finished # ======================================================================================================================= class CheckAliveThread(PyDBDaemonThread): + def __init__(self, py_db): PyDBDaemonThread.__init__(self, py_db) self.name = "pydevd.CheckAliveThread" @@ -731,6 +733,7 @@ def __init__(self, set_as_global=True): # in the namespace (and thus can't be relied upon unless the reference was previously # saved). if IS_IRONPYTHON: + # A partial() cannot be used in IronPython for sys.settrace. def new_trace_dispatch(frame, event, arg): return _trace_dispatch(self, frame, event, arg) @@ -1010,7 +1013,7 @@ def _internal_get_file_type(self, abs_real_path_and_basename): abs_path = abs_path[0:i] i = max(abs_path.rfind("/"), abs_path.rfind("\\")) if i: - dirname = abs_path[i + 1 :] + dirname = abs_path[i + 1:] # At this point, something as: # "my_path\_pydev_runfiles\__init__.py" # is now "_pydev_runfiles". @@ -1528,6 +1531,7 @@ def add_dap_messages_listener(self, listener): self._dap_messages_listeners.append(listener) class _WaitForConnectionThread(PyDBDaemonThread): + def __init__(self, py_db): PyDBDaemonThread.__init__(self, py_db) self._server_socket = None @@ -1581,7 +1585,7 @@ def get_internal_queue_and_event(self, thread_id) -> Tuple[_queue.Queue, Threadi """returns internal command queue for a given thread. if new queue is created, notify the RDB about it""" if thread_id.startswith("__frame__"): - thread_id = thread_id[thread_id.rfind("|") + 1 :] + thread_id = thread_id[thread_id.rfind("|") + 1:] return self._cmd_queue[thread_id], self._thread_events[thread_id] def post_method_as_internal_command(self, thread_id, method, *args, **kwargs): @@ -1758,7 +1762,7 @@ def set_enable_thread_notifications(self, enable): # (so, clear the cache related to that). self._running_thread_ids = {} - def process_internal_commands(self, process_thread_ids: Optional[tuple] = None): + def process_internal_commands(self, process_thread_ids: Optional[tuple]=None): """ This function processes internal commands. """ @@ -1917,10 +1921,10 @@ def set_suspend( self, thread, stop_reason: int, - suspend_other_threads: bool = False, + suspend_other_threads: bool=False, is_pause=False, - original_step_cmd: int = -1, - suspend_requested: bool = False, + original_step_cmd: int=-1, + suspend_requested: bool=False, ): """ :param thread: @@ -2731,6 +2735,7 @@ def wait_for_commands(self, globals): class IDAPMessagesListener(object): + def before_send(self, message_as_dict): """ Called just before a message is sent to the IDE. @@ -3216,6 +3221,7 @@ def stoptrace(): class Dispatcher(object): + def __init__(self): self.port = None @@ -3235,6 +3241,7 @@ def close(self): class DispatchReader(ReaderThread): + def __init__(self, dispatcher): self.dispatcher = dispatcher @@ -3435,7 +3442,6 @@ def getpass(*args, **kwargs): getpass_mod.getpass = getpass - # Dispatch on_debugger_modules_loaded here, after all primary py_db modules are loaded