debugpy 1.8.3__zip → 1.8.6__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {debugpy-1.8.3/src/debugpy.egg-info → debugpy-1.8.6}/PKG-INFO +1 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py +19 -21
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py +30 -30
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py +3 -1
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +43 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py +35 -32
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py +83 -84
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py +92 -99
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py +2 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py +51 -27
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py +11 -7
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py +6 -5
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py +34 -38
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +71 -69
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py +1 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py +0 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py +14 -16
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py +81 -93
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py +3 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py +9 -8
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py +33 -25
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py +183 -170
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py +33 -29
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py +6 -4
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py +19 -18
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py +3 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py +165 -138
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +77 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py +35 -36
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py +22 -23
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py +37 -57
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py +54 -52
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py +28 -37
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py +56 -53
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +604 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +551 -445
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py +25 -29
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +17458 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py +11 -12
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py +18 -19
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +41 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +327 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +263 -214
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py +7 -10
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py +187 -92
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py +105 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py +46 -51
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +239 -176
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +370 -297
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +78 -86
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py +55 -59
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py +194 -58
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py +2 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py +18 -23
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py +157 -127
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +10 -12
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +35217 -23106
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd +15 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +802 -511
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py +18 -7
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py +32 -24
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py +11 -13
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py +16 -16
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +27 -2
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py +1 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py +4 -5
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py +8 -10
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +50 -45
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py +462 -407
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py +63 -61
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py +14 -16
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +27 -25
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py +40 -42
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +200 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +20 -19
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +199 -108
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +121 -73
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +208 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +206 -159
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +346 -334
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py +75 -80
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py +35 -35
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py +116 -124
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py +44 -58
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py +51 -55
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py +4 -2
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py +24 -24
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py +19 -20
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py +45 -49
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +61 -58
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py +23 -13
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py +29 -31
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py +41 -11
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py +117 -55
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py +11 -14
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +90 -89
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py +106 -97
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +40 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py +56 -46
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py +5 -5
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +71 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +11165 -5326
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +5 -6
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py +53 -56
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py +1 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py +4 -6
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py +6 -26
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py +7 -21
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py +5 -24
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py +10 -34
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +1 -4
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +2 -6
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +3 -5
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +11 -31
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +2 -2
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +14 -41
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +2 -4
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +7 -18
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +6 -18
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +7 -18
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py +1 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py +14 -19
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py +1927 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c +43058 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd +46 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx +1934 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py +16 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py +12 -11
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_coverage.py +30 -32
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhook.py +58 -54
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py +20 -24
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py +8 -7
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py +8 -6
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py +11 -8
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py +21 -18
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py +17 -15
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py +17 -15
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py +6 -4
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py +14 -10
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py +30 -26
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +24 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py +37 -34
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py +86 -73
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/version.py +7 -7
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydev_pysrc.py +1 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_run_in_console.py +23 -24
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +267 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevconsole.py +55 -47
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd.py +732 -508
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +40 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py +1 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +11 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +75 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +130 -125
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +89 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py +41 -32
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp +1 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp +9 -1
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py +10 -9
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py +103 -119
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py +457 -516
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py +33 -15
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py +336 -281
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py +101 -131
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py +148 -153
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py +310 -302
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py +235 -208
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py +185 -218
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py +428 -564
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py +54 -53
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py +69 -73
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py +158 -170
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py +143 -213
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py +302 -333
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py +220 -239
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py +198 -177
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py +11 -11
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py +1191 -713
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py +248 -194
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py +132 -120
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py +450 -346
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py +305 -286
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +526 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py +1479 -1097
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +579 -0
- debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +3517 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py +54 -31
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py +170 -149
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py +190 -108
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py +542 -437
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py +489 -442
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py +83 -65
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py +70 -76
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp +17 -9
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat +1 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_file_utils.py +141 -120
- {debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types → debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_plugins}/__init__.py +1 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py +175 -149
- {debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_plugins → debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions}/__init__.py +1 -0
- {debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions → debugpy-1.8.6/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types}/__init__.py +1 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py +5 -5
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py +28 -28
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py +22 -30
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py +3 -2
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py +130 -108
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py +27 -14
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_tracing.py +85 -66
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/setup_pydevd_cython.py +96 -59
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_version.py +3 -3
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/messaging.py +2 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/server/cli.py +32 -17
- {debugpy-1.8.3 → debugpy-1.8.6/src/debugpy.egg-info}/PKG-INFO +1 -1
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy.egg-info/SOURCES.txt +6 -9
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +0 -41
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +0 -76
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +0 -592
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +0 -19514
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +0 -19
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +0 -153
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +0 -204
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +0 -91
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py +0 -62
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +0 -41
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +0 -48
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING +0 -21
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER +0 -1
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA +0 -77
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD +0 -42
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL +0 -5
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json +0 -1
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt +0 -1
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +0 -23
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydev_pysrc.py +0 -1
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +0 -237
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +0 -32
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +0 -9
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +0 -74
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +0 -79
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +0 -507
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +0 -539
- debugpy-1.8.3/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +0 -3435
- {debugpy-1.8.3 → debugpy-1.8.6}/DESCRIPTION.md +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/LICENSE +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/MANIFEST.in +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/README.md +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/pyproject.toml +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/setup.cfg +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/setup.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/ThirdPartyNotices.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/__main__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/_pydevd_packaging.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/_util.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/force_pydevd.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pyx +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/README +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_ipython/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/__main__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/clients.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/components.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/launchers.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/servers.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/adapter/sessions.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/json.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/log.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/singleton.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/sockets.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/stacks.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/timestamp.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/common/util.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/__main__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/debuggee.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/handlers.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/output.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/launcher/winapi.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/public_api.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/server/__init__.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/server/api.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy/server/attach_pid_injected.py +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy.egg-info/dependency_links.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy.egg-info/entry_points.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/src/debugpy.egg-info/top_level.txt +0 -0
- {debugpy-1.8.3 → debugpy-1.8.6}/versioneer.py +0 -0
|
@@ -4,22 +4,20 @@ import sys
|
|
|
4
4
|
from collections import namedtuple
|
|
5
5
|
|
|
6
6
|
from _pydev_bundle import pydev_log
|
|
7
|
-
from opcode import
|
|
8
|
-
hasfree, hasjrel, haslocal, hasname, opname)
|
|
7
|
+
from opcode import EXTENDED_ARG, HAVE_ARGUMENT, cmp_op, hascompare, hasconst, hasfree, hasjrel, haslocal, hasname, opname
|
|
9
8
|
|
|
10
9
|
from io import StringIO
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class TryExceptInfo(object):
|
|
14
|
-
|
|
15
13
|
def __init__(self, try_line, ignore=False):
|
|
16
|
-
|
|
14
|
+
"""
|
|
17
15
|
:param try_line:
|
|
18
16
|
:param ignore:
|
|
19
17
|
Usually we should ignore any block that's not a try..except
|
|
20
18
|
(this can happen for finally blocks, with statements, etc, for
|
|
21
19
|
which we create temporary entries).
|
|
22
|
-
|
|
20
|
+
"""
|
|
23
21
|
self.try_line = try_line
|
|
24
22
|
self.ignore = ignore
|
|
25
23
|
self.except_line = -1
|
|
@@ -38,29 +36,28 @@ class TryExceptInfo(object):
|
|
|
38
36
|
|
|
39
37
|
def __str__(self):
|
|
40
38
|
lst = [
|
|
41
|
-
|
|
39
|
+
"{try:",
|
|
42
40
|
str(self.try_line),
|
|
43
|
-
|
|
41
|
+
" except ",
|
|
44
42
|
str(self.except_line),
|
|
45
|
-
|
|
43
|
+
" end block ",
|
|
46
44
|
str(self.except_end_line),
|
|
47
45
|
]
|
|
48
46
|
if self.raise_lines_in_except:
|
|
49
|
-
lst.append(
|
|
47
|
+
lst.append(" raises: %s" % (", ".join(str(x) for x in self.raise_lines_in_except),))
|
|
50
48
|
|
|
51
|
-
lst.append(
|
|
52
|
-
return
|
|
49
|
+
lst.append("}")
|
|
50
|
+
return "".join(lst)
|
|
53
51
|
|
|
54
52
|
__repr__ = __str__
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
class ReturnInfo(object):
|
|
58
|
-
|
|
59
56
|
def __init__(self, return_line):
|
|
60
57
|
self.return_line = return_line
|
|
61
58
|
|
|
62
59
|
def __str__(self):
|
|
63
|
-
return
|
|
60
|
+
return "{return: %s}" % (self.return_line,)
|
|
64
61
|
|
|
65
62
|
__repr__ = __str__
|
|
66
63
|
|
|
@@ -75,15 +72,14 @@ def _get_line(op_offset_to_line, op_offset, firstlineno, search=False):
|
|
|
75
72
|
return ret
|
|
76
73
|
else:
|
|
77
74
|
op_offset -= 1
|
|
78
|
-
raise AssertionError(
|
|
79
|
-
op_offset_original, op_offset_to_line))
|
|
75
|
+
raise AssertionError("Unable to find line for offset: %s.Info: %s" % (op_offset_original, op_offset_to_line))
|
|
80
76
|
|
|
81
77
|
|
|
82
78
|
def debug(s):
|
|
83
79
|
pass
|
|
84
80
|
|
|
85
81
|
|
|
86
|
-
_Instruction = namedtuple(
|
|
82
|
+
_Instruction = namedtuple("_Instruction", "opname, opcode, starts_line, argval, is_jump_target, offset, argrepr")
|
|
87
83
|
|
|
88
84
|
|
|
89
85
|
def _iter_as_bytecode_as_instructions_py2(co):
|
|
@@ -107,7 +103,15 @@ def _iter_as_bytecode_as_instructions_py2(co):
|
|
|
107
103
|
|
|
108
104
|
i = i + 1
|
|
109
105
|
if op < HAVE_ARGUMENT:
|
|
110
|
-
yield _Instruction(
|
|
106
|
+
yield _Instruction(
|
|
107
|
+
curr_op_name,
|
|
108
|
+
op,
|
|
109
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
110
|
+
None,
|
|
111
|
+
is_jump_target,
|
|
112
|
+
initial_bytecode_offset,
|
|
113
|
+
"",
|
|
114
|
+
)
|
|
111
115
|
|
|
112
116
|
else:
|
|
113
117
|
oparg = ord(code[i]) + ord(code[i + 1]) * 256 + extended_arg
|
|
@@ -118,22 +122,78 @@ def _iter_as_bytecode_as_instructions_py2(co):
|
|
|
118
122
|
extended_arg = oparg * 65536
|
|
119
123
|
|
|
120
124
|
if op in hasconst:
|
|
121
|
-
yield _Instruction(
|
|
125
|
+
yield _Instruction(
|
|
126
|
+
curr_op_name,
|
|
127
|
+
op,
|
|
128
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
129
|
+
co.co_consts[oparg],
|
|
130
|
+
is_jump_target,
|
|
131
|
+
initial_bytecode_offset,
|
|
132
|
+
repr(co.co_consts[oparg]),
|
|
133
|
+
)
|
|
122
134
|
elif op in hasname:
|
|
123
|
-
yield _Instruction(
|
|
135
|
+
yield _Instruction(
|
|
136
|
+
curr_op_name,
|
|
137
|
+
op,
|
|
138
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
139
|
+
co.co_names[oparg],
|
|
140
|
+
is_jump_target,
|
|
141
|
+
initial_bytecode_offset,
|
|
142
|
+
str(co.co_names[oparg]),
|
|
143
|
+
)
|
|
124
144
|
elif op in hasjrel:
|
|
125
145
|
argval = i + oparg
|
|
126
|
-
yield _Instruction(
|
|
146
|
+
yield _Instruction(
|
|
147
|
+
curr_op_name,
|
|
148
|
+
op,
|
|
149
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
150
|
+
argval,
|
|
151
|
+
is_jump_target,
|
|
152
|
+
initial_bytecode_offset,
|
|
153
|
+
"to " + repr(argval),
|
|
154
|
+
)
|
|
127
155
|
elif op in haslocal:
|
|
128
|
-
yield _Instruction(
|
|
156
|
+
yield _Instruction(
|
|
157
|
+
curr_op_name,
|
|
158
|
+
op,
|
|
159
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
160
|
+
co.co_varnames[oparg],
|
|
161
|
+
is_jump_target,
|
|
162
|
+
initial_bytecode_offset,
|
|
163
|
+
str(co.co_varnames[oparg]),
|
|
164
|
+
)
|
|
129
165
|
elif op in hascompare:
|
|
130
|
-
yield _Instruction(
|
|
166
|
+
yield _Instruction(
|
|
167
|
+
curr_op_name,
|
|
168
|
+
op,
|
|
169
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
170
|
+
cmp_op[oparg],
|
|
171
|
+
is_jump_target,
|
|
172
|
+
initial_bytecode_offset,
|
|
173
|
+
cmp_op[oparg],
|
|
174
|
+
)
|
|
131
175
|
elif op in hasfree:
|
|
132
176
|
if free is None:
|
|
133
177
|
free = co.co_cellvars + co.co_freevars
|
|
134
|
-
yield _Instruction(
|
|
178
|
+
yield _Instruction(
|
|
179
|
+
curr_op_name,
|
|
180
|
+
op,
|
|
181
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
182
|
+
free[oparg],
|
|
183
|
+
is_jump_target,
|
|
184
|
+
initial_bytecode_offset,
|
|
185
|
+
str(free[oparg]),
|
|
186
|
+
)
|
|
135
187
|
else:
|
|
136
|
-
yield _Instruction(
|
|
188
|
+
yield _Instruction(
|
|
189
|
+
curr_op_name,
|
|
190
|
+
op,
|
|
191
|
+
_get_line(op_offset_to_line, initial_bytecode_offset, 0),
|
|
192
|
+
oparg,
|
|
193
|
+
is_jump_target,
|
|
194
|
+
initial_bytecode_offset,
|
|
195
|
+
str(oparg),
|
|
196
|
+
)
|
|
137
197
|
|
|
138
198
|
|
|
139
199
|
def iter_instructions(co):
|
|
@@ -153,7 +213,7 @@ def iter_instructions(co):
|
|
|
153
213
|
|
|
154
214
|
|
|
155
215
|
def collect_return_info(co, use_func_first_line=False):
|
|
156
|
-
if not hasattr(co,
|
|
216
|
+
if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"):
|
|
157
217
|
return []
|
|
158
218
|
|
|
159
219
|
if use_func_first_line:
|
|
@@ -165,7 +225,7 @@ def collect_return_info(co, use_func_first_line=False):
|
|
|
165
225
|
op_offset_to_line = dict(dis.findlinestarts(co))
|
|
166
226
|
for instruction in iter_instructions(co):
|
|
167
227
|
curr_op_name = instruction.opname
|
|
168
|
-
if curr_op_name
|
|
228
|
+
if curr_op_name in ("RETURN_VALUE", "RETURN_CONST"):
|
|
169
229
|
lst.append(ReturnInfo(_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True)))
|
|
170
230
|
|
|
171
231
|
return lst
|
|
@@ -174,35 +234,36 @@ def collect_return_info(co, use_func_first_line=False):
|
|
|
174
234
|
if sys.version_info[:2] <= (3, 9):
|
|
175
235
|
|
|
176
236
|
class _TargetInfo(object):
|
|
177
|
-
|
|
178
237
|
def __init__(self, except_end_instruction, jump_if_not_exc_instruction=None):
|
|
179
238
|
self.except_end_instruction = except_end_instruction
|
|
180
239
|
self.jump_if_not_exc_instruction = jump_if_not_exc_instruction
|
|
181
240
|
|
|
182
241
|
def __str__(self):
|
|
183
|
-
msg = [
|
|
242
|
+
msg = ["_TargetInfo("]
|
|
184
243
|
msg.append(self.except_end_instruction.opname)
|
|
185
244
|
if self.jump_if_not_exc_instruction:
|
|
186
|
-
msg.append(
|
|
245
|
+
msg.append(" - ")
|
|
187
246
|
msg.append(self.jump_if_not_exc_instruction.opname)
|
|
188
|
-
msg.append(
|
|
247
|
+
msg.append("(")
|
|
189
248
|
msg.append(str(self.jump_if_not_exc_instruction.argval))
|
|
190
|
-
msg.append(
|
|
191
|
-
msg.append(
|
|
192
|
-
return
|
|
249
|
+
msg.append(")")
|
|
250
|
+
msg.append(")")
|
|
251
|
+
return "".join(msg)
|
|
193
252
|
|
|
194
253
|
def _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx):
|
|
195
|
-
next_3 = [
|
|
254
|
+
next_3 = [
|
|
255
|
+
j_instruction.opname for j_instruction in instructions[exception_end_instruction_index : exception_end_instruction_index + 3]
|
|
256
|
+
]
|
|
196
257
|
# print('next_3:', [(j_instruction.opname, j_instruction.argval) for j_instruction in instructions[exception_end_instruction_index:exception_end_instruction_index + 3]])
|
|
197
|
-
if next_3 == [
|
|
258
|
+
if next_3 == ["POP_TOP", "POP_TOP", "POP_TOP"]: # try..except without checking exception.
|
|
198
259
|
try:
|
|
199
260
|
jump_instruction = instructions[exception_end_instruction_index - 1]
|
|
200
|
-
if jump_instruction.opname not in (
|
|
261
|
+
if jump_instruction.opname not in ("JUMP_FORWARD", "JUMP_ABSOLUTE"):
|
|
201
262
|
return None
|
|
202
263
|
except IndexError:
|
|
203
264
|
pass
|
|
204
265
|
|
|
205
|
-
if jump_instruction.opname ==
|
|
266
|
+
if jump_instruction.opname == "JUMP_ABSOLUTE":
|
|
206
267
|
# On latest versions of Python 3 the interpreter has a go-backwards step,
|
|
207
268
|
# used to show the initial line of a for/while, etc (which is this
|
|
208
269
|
# JUMP_ABSOLUTE)... we're not really interested in it, but rather on where
|
|
@@ -211,7 +272,7 @@ if sys.version_info[:2] <= (3, 9):
|
|
|
211
272
|
idx = offset_to_instruction_idx[except_end_instruction.argval]
|
|
212
273
|
# Search for the POP_EXCEPT which should be at the end of the block.
|
|
213
274
|
for pop_except_instruction in reversed(instructions[:idx]):
|
|
214
|
-
if pop_except_instruction.opname ==
|
|
275
|
+
if pop_except_instruction.opname == "POP_EXCEPT":
|
|
215
276
|
except_end_instruction = pop_except_instruction
|
|
216
277
|
return _TargetInfo(except_end_instruction)
|
|
217
278
|
else:
|
|
@@ -226,25 +287,25 @@ if sys.version_info[:2] <= (3, 9):
|
|
|
226
287
|
# block finishes).
|
|
227
288
|
except_end_instruction = instructions[i - 1]
|
|
228
289
|
except:
|
|
229
|
-
pydev_log.critical(
|
|
290
|
+
pydev_log.critical("Error when computing try..except block end.")
|
|
230
291
|
return None
|
|
231
292
|
return _TargetInfo(except_end_instruction)
|
|
232
293
|
|
|
233
|
-
elif next_3 and next_3[0] ==
|
|
234
|
-
iter_in = instructions[exception_end_instruction_index + 1:]
|
|
294
|
+
elif next_3 and next_3[0] == "DUP_TOP": # try..except AssertionError.
|
|
295
|
+
iter_in = instructions[exception_end_instruction_index + 1 :]
|
|
235
296
|
for j, jump_if_not_exc_instruction in enumerate(iter_in):
|
|
236
|
-
if jump_if_not_exc_instruction.opname ==
|
|
297
|
+
if jump_if_not_exc_instruction.opname == "JUMP_IF_NOT_EXC_MATCH":
|
|
237
298
|
# Python 3.9
|
|
238
299
|
except_end_instruction = instructions[offset_to_instruction_idx[jump_if_not_exc_instruction.argval]]
|
|
239
300
|
return _TargetInfo(except_end_instruction, jump_if_not_exc_instruction)
|
|
240
301
|
|
|
241
|
-
elif jump_if_not_exc_instruction.opname ==
|
|
302
|
+
elif jump_if_not_exc_instruction.opname == "COMPARE_OP" and jump_if_not_exc_instruction.argval == "exception match":
|
|
242
303
|
# Python 3.8 and before
|
|
243
304
|
try:
|
|
244
305
|
next_instruction = iter_in[j + 1]
|
|
245
306
|
except:
|
|
246
307
|
continue
|
|
247
|
-
if next_instruction.opname ==
|
|
308
|
+
if next_instruction.opname == "POP_JUMP_IF_FALSE":
|
|
248
309
|
except_end_instruction = instructions[offset_to_instruction_idx[next_instruction.argval]]
|
|
249
310
|
return _TargetInfo(except_end_instruction, next_instruction)
|
|
250
311
|
else:
|
|
@@ -256,7 +317,7 @@ if sys.version_info[:2] <= (3, 9):
|
|
|
256
317
|
|
|
257
318
|
def collect_try_except_info(co, use_func_first_line=False):
|
|
258
319
|
# We no longer have 'END_FINALLY', so, we need to do things differently in Python 3.9
|
|
259
|
-
if not hasattr(co,
|
|
320
|
+
if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"):
|
|
260
321
|
return []
|
|
261
322
|
|
|
262
323
|
if use_func_first_line:
|
|
@@ -277,11 +338,11 @@ if sys.version_info[:2] <= (3, 9):
|
|
|
277
338
|
|
|
278
339
|
for i, instruction in enumerate(instructions):
|
|
279
340
|
curr_op_name = instruction.opname
|
|
280
|
-
if curr_op_name in (
|
|
341
|
+
if curr_op_name in ("SETUP_FINALLY", "SETUP_EXCEPT"): # SETUP_EXCEPT before Python 3.8, SETUP_FINALLY Python 3.8 onwards.
|
|
281
342
|
exception_end_instruction_index = offset_to_instruction_idx[instruction.argval]
|
|
282
343
|
|
|
283
344
|
jump_instruction = instructions[exception_end_instruction_index - 1]
|
|
284
|
-
if jump_instruction.opname not in (
|
|
345
|
+
if jump_instruction.opname not in ("JUMP_FORWARD", "JUMP_ABSOLUTE"):
|
|
285
346
|
continue
|
|
286
347
|
|
|
287
348
|
except_end_instruction = None
|
|
@@ -304,66 +365,64 @@ if sys.version_info[:2] <= (3, 9):
|
|
|
304
365
|
|
|
305
366
|
if except_end_instruction is not None:
|
|
306
367
|
try_except_info = TryExceptInfo(
|
|
307
|
-
_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True),
|
|
308
|
-
ignore=False
|
|
368
|
+
_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True), ignore=False
|
|
309
369
|
)
|
|
310
370
|
try_except_info.except_bytecode_offset = instruction.argval
|
|
311
371
|
try_except_info.except_line = _get_line(
|
|
312
|
-
op_offset_to_line,
|
|
313
|
-
try_except_info.except_bytecode_offset,
|
|
314
|
-
firstlineno,
|
|
315
|
-
search=True
|
|
372
|
+
op_offset_to_line, try_except_info.except_bytecode_offset, firstlineno, search=True
|
|
316
373
|
)
|
|
317
374
|
|
|
318
375
|
try_except_info.except_end_bytecode_offset = except_end_instruction.offset
|
|
319
376
|
try_except_info.except_end_line = _get_line(op_offset_to_line, except_end_instruction.offset, firstlineno, search=True)
|
|
320
377
|
try_except_info_lst.append(try_except_info)
|
|
321
378
|
|
|
322
|
-
for raise_instruction in instructions[i:offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]:
|
|
323
|
-
if raise_instruction.opname ==
|
|
379
|
+
for raise_instruction in instructions[i : offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]:
|
|
380
|
+
if raise_instruction.opname == "RAISE_VARARGS":
|
|
324
381
|
if raise_instruction.argval == 0:
|
|
325
382
|
try_except_info.raise_lines_in_except.append(
|
|
326
|
-
_get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True)
|
|
383
|
+
_get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True)
|
|
384
|
+
)
|
|
327
385
|
|
|
328
386
|
return try_except_info_lst
|
|
329
387
|
|
|
330
388
|
elif sys.version_info[:2] == (3, 10):
|
|
331
389
|
|
|
332
390
|
class _TargetInfo(object):
|
|
333
|
-
|
|
334
391
|
def __init__(self, except_end_instruction, jump_if_not_exc_instruction=None):
|
|
335
392
|
self.except_end_instruction = except_end_instruction
|
|
336
393
|
self.jump_if_not_exc_instruction = jump_if_not_exc_instruction
|
|
337
394
|
|
|
338
395
|
def __str__(self):
|
|
339
|
-
msg = [
|
|
396
|
+
msg = ["_TargetInfo("]
|
|
340
397
|
msg.append(self.except_end_instruction.opname)
|
|
341
398
|
if self.jump_if_not_exc_instruction:
|
|
342
|
-
msg.append(
|
|
399
|
+
msg.append(" - ")
|
|
343
400
|
msg.append(self.jump_if_not_exc_instruction.opname)
|
|
344
|
-
msg.append(
|
|
401
|
+
msg.append("(")
|
|
345
402
|
msg.append(str(self.jump_if_not_exc_instruction.argval))
|
|
346
|
-
msg.append(
|
|
347
|
-
msg.append(
|
|
348
|
-
return
|
|
403
|
+
msg.append(")")
|
|
404
|
+
msg.append(")")
|
|
405
|
+
return "".join(msg)
|
|
349
406
|
|
|
350
407
|
def _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx):
|
|
351
|
-
next_3 = [
|
|
408
|
+
next_3 = [
|
|
409
|
+
j_instruction.opname for j_instruction in instructions[exception_end_instruction_index : exception_end_instruction_index + 3]
|
|
410
|
+
]
|
|
352
411
|
# print('next_3:', [(j_instruction.opname, j_instruction.argval) for j_instruction in instructions[exception_end_instruction_index:exception_end_instruction_index + 3]])
|
|
353
|
-
if next_3 == [
|
|
412
|
+
if next_3 == ["POP_TOP", "POP_TOP", "POP_TOP"]: # try..except without checking exception.
|
|
354
413
|
# Previously there was a jump which was able to point where the exception would end. This
|
|
355
414
|
# is no longer true, now a bare except doesn't really have any indication in the bytecode
|
|
356
415
|
# where the end would be expected if the exception wasn't raised, so, we just blindly
|
|
357
416
|
# search for a POP_EXCEPT from the current position.
|
|
358
|
-
for pop_except_instruction in instructions[exception_end_instruction_index + 3:]:
|
|
359
|
-
if pop_except_instruction.opname ==
|
|
417
|
+
for pop_except_instruction in instructions[exception_end_instruction_index + 3 :]:
|
|
418
|
+
if pop_except_instruction.opname == "POP_EXCEPT":
|
|
360
419
|
except_end_instruction = pop_except_instruction
|
|
361
420
|
return _TargetInfo(except_end_instruction)
|
|
362
421
|
|
|
363
|
-
elif next_3 and next_3[0] ==
|
|
364
|
-
iter_in = instructions[exception_end_instruction_index + 1:]
|
|
422
|
+
elif next_3 and next_3[0] == "DUP_TOP": # try..except AssertionError.
|
|
423
|
+
iter_in = instructions[exception_end_instruction_index + 1 :]
|
|
365
424
|
for jump_if_not_exc_instruction in iter_in:
|
|
366
|
-
if jump_if_not_exc_instruction.opname ==
|
|
425
|
+
if jump_if_not_exc_instruction.opname == "JUMP_IF_NOT_EXC_MATCH":
|
|
367
426
|
# Python 3.9
|
|
368
427
|
except_end_instruction = instructions[offset_to_instruction_idx[jump_if_not_exc_instruction.argval]]
|
|
369
428
|
return _TargetInfo(except_end_instruction, jump_if_not_exc_instruction)
|
|
@@ -376,7 +435,7 @@ elif sys.version_info[:2] == (3, 10):
|
|
|
376
435
|
|
|
377
436
|
def collect_try_except_info(co, use_func_first_line=False):
|
|
378
437
|
# We no longer have 'END_FINALLY', so, we need to do things differently in Python 3.9
|
|
379
|
-
if not hasattr(co,
|
|
438
|
+
if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"):
|
|
380
439
|
return []
|
|
381
440
|
|
|
382
441
|
if use_func_first_line:
|
|
@@ -397,11 +456,11 @@ elif sys.version_info[:2] == (3, 10):
|
|
|
397
456
|
|
|
398
457
|
for i, instruction in enumerate(instructions):
|
|
399
458
|
curr_op_name = instruction.opname
|
|
400
|
-
if curr_op_name ==
|
|
459
|
+
if curr_op_name == "SETUP_FINALLY":
|
|
401
460
|
exception_end_instruction_index = offset_to_instruction_idx[instruction.argval]
|
|
402
461
|
|
|
403
462
|
jump_instruction = instructions[exception_end_instruction_index]
|
|
404
|
-
if jump_instruction.opname !=
|
|
463
|
+
if jump_instruction.opname != "DUP_TOP":
|
|
405
464
|
continue
|
|
406
465
|
|
|
407
466
|
except_end_instruction = None
|
|
@@ -424,15 +483,11 @@ elif sys.version_info[:2] == (3, 10):
|
|
|
424
483
|
|
|
425
484
|
if except_end_instruction is not None:
|
|
426
485
|
try_except_info = TryExceptInfo(
|
|
427
|
-
_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True),
|
|
428
|
-
ignore=False
|
|
486
|
+
_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True), ignore=False
|
|
429
487
|
)
|
|
430
488
|
try_except_info.except_bytecode_offset = instruction.argval
|
|
431
489
|
try_except_info.except_line = _get_line(
|
|
432
|
-
op_offset_to_line,
|
|
433
|
-
try_except_info.except_bytecode_offset,
|
|
434
|
-
firstlineno,
|
|
435
|
-
search=True
|
|
490
|
+
op_offset_to_line, try_except_info.except_bytecode_offset, firstlineno, search=True
|
|
436
491
|
)
|
|
437
492
|
|
|
438
493
|
try_except_info.except_end_bytecode_offset = except_end_instruction.offset
|
|
@@ -444,7 +499,7 @@ elif sys.version_info[:2] == (3, 10):
|
|
|
444
499
|
except_end_line = -1
|
|
445
500
|
start_i = offset_to_instruction_idx[try_except_info.except_bytecode_offset]
|
|
446
501
|
end_i = offset_to_instruction_idx[except_end_instruction.offset]
|
|
447
|
-
for instruction in instructions[start_i: end_i + 1]:
|
|
502
|
+
for instruction in instructions[start_i : end_i + 1]:
|
|
448
503
|
found_at_line = op_offset_to_line.get(instruction.offset)
|
|
449
504
|
if found_at_line is not None and found_at_line > except_end_line:
|
|
450
505
|
except_end_line = found_at_line
|
|
@@ -452,29 +507,30 @@ elif sys.version_info[:2] == (3, 10):
|
|
|
452
507
|
|
|
453
508
|
try_except_info_lst.append(try_except_info)
|
|
454
509
|
|
|
455
|
-
for raise_instruction in instructions[i:offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]:
|
|
456
|
-
if raise_instruction.opname ==
|
|
510
|
+
for raise_instruction in instructions[i : offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]:
|
|
511
|
+
if raise_instruction.opname == "RAISE_VARARGS":
|
|
457
512
|
if raise_instruction.argval == 0:
|
|
458
513
|
try_except_info.raise_lines_in_except.append(
|
|
459
|
-
_get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True)
|
|
514
|
+
_get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True)
|
|
515
|
+
)
|
|
460
516
|
|
|
461
517
|
return try_except_info_lst
|
|
462
518
|
|
|
463
519
|
elif sys.version_info[:2] >= (3, 11):
|
|
464
520
|
|
|
465
521
|
def collect_try_except_info(co, use_func_first_line=False):
|
|
466
|
-
|
|
522
|
+
"""
|
|
467
523
|
Note: if the filename is available and we can get the source,
|
|
468
524
|
`collect_try_except_info_from_source` is preferred (this is kept as
|
|
469
525
|
a fallback for cases where sources aren't available).
|
|
470
|
-
|
|
526
|
+
"""
|
|
471
527
|
return []
|
|
472
528
|
|
|
529
|
+
|
|
473
530
|
import ast as ast_module
|
|
474
531
|
|
|
475
532
|
|
|
476
533
|
class _Visitor(ast_module.NodeVisitor):
|
|
477
|
-
|
|
478
534
|
def __init__(self):
|
|
479
535
|
self.try_except_infos = []
|
|
480
536
|
self._stack = []
|
|
@@ -482,7 +538,7 @@ class _Visitor(ast_module.NodeVisitor):
|
|
|
482
538
|
self.max_line = -1
|
|
483
539
|
|
|
484
540
|
def generic_visit(self, node):
|
|
485
|
-
if hasattr(node,
|
|
541
|
+
if hasattr(node, "lineno"):
|
|
486
542
|
if node.lineno > self.max_line:
|
|
487
543
|
self.max_line = node.lineno
|
|
488
544
|
return ast_module.NodeVisitor.generic_visit(self, node)
|
|
@@ -505,7 +561,7 @@ class _Visitor(ast_module.NodeVisitor):
|
|
|
505
561
|
info.except_line = node.lineno
|
|
506
562
|
self._in_except_stack.append(info)
|
|
507
563
|
self.generic_visit(node)
|
|
508
|
-
if hasattr(node,
|
|
564
|
+
if hasattr(node, "end_lineno"):
|
|
509
565
|
info.except_end_line = node.end_lineno
|
|
510
566
|
else:
|
|
511
567
|
info.except_end_line = self.max_line
|
|
@@ -515,26 +571,26 @@ class _Visitor(ast_module.NodeVisitor):
|
|
|
515
571
|
|
|
516
572
|
def visit_Raise(self, node):
|
|
517
573
|
for info in self._in_except_stack:
|
|
518
|
-
|
|
519
|
-
|
|
574
|
+
if node.exc is None:
|
|
575
|
+
info.raise_lines_in_except.append(node.lineno)
|
|
520
576
|
self.generic_visit(node)
|
|
521
577
|
|
|
522
578
|
else:
|
|
523
579
|
|
|
524
580
|
def visit_Raise(self, node):
|
|
525
581
|
for info in self._in_except_stack:
|
|
526
|
-
|
|
527
|
-
|
|
582
|
+
if node.type is None and node.tback is None:
|
|
583
|
+
info.raise_lines_in_except.append(node.lineno)
|
|
528
584
|
self.generic_visit(node)
|
|
529
585
|
|
|
530
586
|
|
|
531
587
|
def collect_try_except_info_from_source(filename):
|
|
532
|
-
with open(filename,
|
|
588
|
+
with open(filename, "rb") as stream:
|
|
533
589
|
contents = stream.read()
|
|
534
590
|
return collect_try_except_info_from_contents(contents, filename)
|
|
535
591
|
|
|
536
592
|
|
|
537
|
-
def collect_try_except_info_from_contents(contents, filename=
|
|
593
|
+
def collect_try_except_info_from_contents(contents, filename="<unknown>"):
|
|
538
594
|
ast = ast_module.parse(contents, filename)
|
|
539
595
|
visitor = _Visitor()
|
|
540
596
|
visitor.visit(ast)
|
|
@@ -546,12 +602,16 @@ SEPARATOR = object()
|
|
|
546
602
|
|
|
547
603
|
|
|
548
604
|
class _MsgPart(object):
|
|
549
|
-
|
|
550
605
|
def __init__(self, line, tok):
|
|
551
606
|
assert line >= 0
|
|
552
607
|
self.line = line
|
|
553
608
|
self.tok = tok
|
|
554
609
|
|
|
610
|
+
def __str__(self) -> str:
|
|
611
|
+
return "_MsgPart(line: %s tok: %s)" % (self.line, self.tok)
|
|
612
|
+
|
|
613
|
+
__repr__ = __str__
|
|
614
|
+
|
|
555
615
|
@classmethod
|
|
556
616
|
def add_to_line_to_contents(cls, obj, line_to_contents, line=None):
|
|
557
617
|
if isinstance(obj, (list, tuple)):
|
|
@@ -580,7 +640,6 @@ class _MsgPart(object):
|
|
|
580
640
|
|
|
581
641
|
|
|
582
642
|
class _Disassembler(object):
|
|
583
|
-
|
|
584
643
|
def __init__(self, co, firstlineno, level=0):
|
|
585
644
|
self.co = co
|
|
586
645
|
self.firstlineno = firstlineno
|
|
@@ -611,7 +670,7 @@ class _Disassembler(object):
|
|
|
611
670
|
elif isinstance(arg, _MsgPart):
|
|
612
671
|
m = min(m, arg.line)
|
|
613
672
|
|
|
614
|
-
elif hasattr(arg,
|
|
673
|
+
elif hasattr(arg, "offset"):
|
|
615
674
|
m = min(m, self.op_offset_to_line[arg.offset])
|
|
616
675
|
return m
|
|
617
676
|
|
|
@@ -624,23 +683,23 @@ class _Disassembler(object):
|
|
|
624
683
|
elif isinstance(arg, _MsgPart):
|
|
625
684
|
m = max(m, arg.line)
|
|
626
685
|
|
|
627
|
-
elif hasattr(arg,
|
|
686
|
+
elif hasattr(arg, "offset"):
|
|
628
687
|
m = max(m, self.op_offset_to_line[arg.offset])
|
|
629
688
|
return m
|
|
630
689
|
|
|
631
690
|
def _lookahead(self):
|
|
632
|
-
|
|
691
|
+
"""
|
|
633
692
|
This handles and converts some common constructs from bytecode to actual source code.
|
|
634
693
|
|
|
635
694
|
It may change the list of instructions.
|
|
636
|
-
|
|
695
|
+
"""
|
|
637
696
|
msg = self._create_msg_part
|
|
638
697
|
found = []
|
|
639
698
|
fullrepr = None
|
|
640
699
|
|
|
641
700
|
# Collect all the load instructions
|
|
642
701
|
for next_instruction in self.instructions:
|
|
643
|
-
if next_instruction.opname in (
|
|
702
|
+
if next_instruction.opname in ("LOAD_GLOBAL", "LOAD_FAST", "LOAD_CONST", "LOAD_NAME"):
|
|
644
703
|
found.append(next_instruction)
|
|
645
704
|
else:
|
|
646
705
|
break
|
|
@@ -648,7 +707,7 @@ class _Disassembler(object):
|
|
|
648
707
|
if not found:
|
|
649
708
|
return None
|
|
650
709
|
|
|
651
|
-
if next_instruction.opname ==
|
|
710
|
+
if next_instruction.opname == "LOAD_ATTR":
|
|
652
711
|
prev_instruction = found[-1]
|
|
653
712
|
# Remove the current LOAD_ATTR
|
|
654
713
|
assert self.instructions.pop(len(found)) is next_instruction
|
|
@@ -661,15 +720,11 @@ class _Disassembler(object):
|
|
|
661
720
|
prev_instruction.argval,
|
|
662
721
|
False, # prev_instruction.is_jump_target,
|
|
663
722
|
prev_instruction.offset,
|
|
664
|
-
(
|
|
665
|
-
msg(prev_instruction),
|
|
666
|
-
msg(prev_instruction, '.'),
|
|
667
|
-
msg(next_instruction)
|
|
668
|
-
),
|
|
723
|
+
(msg(prev_instruction), msg(prev_instruction, "."), msg(next_instruction)),
|
|
669
724
|
)
|
|
670
725
|
return RESTART_FROM_LOOKAHEAD
|
|
671
726
|
|
|
672
|
-
if next_instruction.opname in (
|
|
727
|
+
if next_instruction.opname in ("CALL_FUNCTION", "PRECALL", "CALL"):
|
|
673
728
|
if len(found) == next_instruction.argval + 1:
|
|
674
729
|
force_restart = False
|
|
675
730
|
delta = 0
|
|
@@ -681,7 +736,7 @@ class _Disassembler(object):
|
|
|
681
736
|
return None # This is odd
|
|
682
737
|
|
|
683
738
|
del_upto = delta + next_instruction.argval + 2 # +2 = NAME / CALL_FUNCTION
|
|
684
|
-
if next_instruction.opname ==
|
|
739
|
+
if next_instruction.opname == "PRECALL":
|
|
685
740
|
del_upto += 1 # Also remove the CALL right after the PRECALL.
|
|
686
741
|
del self.instructions[delta:del_upto]
|
|
687
742
|
|
|
@@ -690,31 +745,33 @@ class _Disassembler(object):
|
|
|
690
745
|
args = list(found)
|
|
691
746
|
fullrepr = [
|
|
692
747
|
msg(call_func),
|
|
693
|
-
msg(call_func,
|
|
748
|
+
msg(call_func, "("),
|
|
694
749
|
]
|
|
695
750
|
prev = call_func
|
|
696
751
|
for i, arg in enumerate(args):
|
|
697
752
|
if i > 0:
|
|
698
|
-
fullrepr.append(msg(prev,
|
|
753
|
+
fullrepr.append(msg(prev, ", "))
|
|
699
754
|
prev = arg
|
|
700
755
|
fullrepr.append(msg(arg))
|
|
701
756
|
|
|
702
|
-
fullrepr.append(msg(prev,
|
|
757
|
+
fullrepr.append(msg(prev, ")"))
|
|
703
758
|
|
|
704
759
|
if force_restart:
|
|
705
|
-
self.instructions.insert(
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
760
|
+
self.instructions.insert(
|
|
761
|
+
delta,
|
|
762
|
+
_Instruction(
|
|
763
|
+
call_func.opname,
|
|
764
|
+
call_func.opcode,
|
|
765
|
+
call_func.starts_line,
|
|
766
|
+
call_func.argval,
|
|
767
|
+
False, # call_func.is_jump_target,
|
|
768
|
+
call_func.offset,
|
|
769
|
+
tuple(fullrepr),
|
|
770
|
+
),
|
|
771
|
+
)
|
|
714
772
|
return RESTART_FROM_LOOKAHEAD
|
|
715
773
|
|
|
716
|
-
elif next_instruction.opname ==
|
|
717
|
-
|
|
774
|
+
elif next_instruction.opname == "BUILD_TUPLE":
|
|
718
775
|
if len(found) == next_instruction.argval:
|
|
719
776
|
force_restart = False
|
|
720
777
|
delta = 0
|
|
@@ -725,7 +782,7 @@ class _Disassembler(object):
|
|
|
725
782
|
else:
|
|
726
783
|
return None # This is odd
|
|
727
784
|
|
|
728
|
-
del self.instructions[delta:delta + next_instruction.argval + 1] # +1 = BUILD_TUPLE
|
|
785
|
+
del self.instructions[delta : delta + next_instruction.argval + 1] # +1 = BUILD_TUPLE
|
|
729
786
|
|
|
730
787
|
found = iter(found[delta:])
|
|
731
788
|
|
|
@@ -737,44 +794,47 @@ class _Disassembler(object):
|
|
|
737
794
|
prev = first_instruction
|
|
738
795
|
|
|
739
796
|
fullrepr = []
|
|
740
|
-
fullrepr.append(msg(prev,
|
|
797
|
+
fullrepr.append(msg(prev, "("))
|
|
741
798
|
for i, arg in enumerate(args):
|
|
742
799
|
if i > 0:
|
|
743
|
-
fullrepr.append(msg(prev,
|
|
800
|
+
fullrepr.append(msg(prev, ", "))
|
|
744
801
|
prev = arg
|
|
745
802
|
fullrepr.append(msg(arg))
|
|
746
803
|
|
|
747
|
-
fullrepr.append(msg(prev,
|
|
804
|
+
fullrepr.append(msg(prev, ")"))
|
|
748
805
|
|
|
749
806
|
if force_restart:
|
|
750
|
-
self.instructions.insert(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
807
|
+
self.instructions.insert(
|
|
808
|
+
delta,
|
|
809
|
+
_Instruction(
|
|
810
|
+
first_instruction.opname,
|
|
811
|
+
first_instruction.opcode,
|
|
812
|
+
first_instruction.starts_line,
|
|
813
|
+
first_instruction.argval,
|
|
814
|
+
False, # first_instruction.is_jump_target,
|
|
815
|
+
first_instruction.offset,
|
|
816
|
+
tuple(fullrepr),
|
|
817
|
+
),
|
|
818
|
+
)
|
|
759
819
|
return RESTART_FROM_LOOKAHEAD
|
|
760
820
|
|
|
761
821
|
if fullrepr is not None and self.instructions:
|
|
762
|
-
if self.instructions[0].opname ==
|
|
822
|
+
if self.instructions[0].opname == "POP_TOP":
|
|
763
823
|
self.instructions.pop(0)
|
|
764
824
|
|
|
765
|
-
if self.instructions[0].opname in (
|
|
825
|
+
if self.instructions[0].opname in ("STORE_FAST", "STORE_NAME"):
|
|
766
826
|
next_instruction = self.instructions.pop(0)
|
|
767
|
-
return msg(next_instruction), msg(next_instruction,
|
|
827
|
+
return msg(next_instruction), msg(next_instruction, " = "), fullrepr
|
|
768
828
|
|
|
769
|
-
if self.instructions[0].opname ==
|
|
829
|
+
if self.instructions[0].opname == "RETURN_VALUE":
|
|
770
830
|
next_instruction = self.instructions.pop(0)
|
|
771
|
-
return msg(next_instruction,
|
|
831
|
+
return msg(next_instruction, "return ", line=self.min_line(next_instruction, fullrepr)), fullrepr
|
|
772
832
|
|
|
773
833
|
return fullrepr
|
|
774
834
|
|
|
775
835
|
def _decorate_jump_target(self, instruction, instruction_repr):
|
|
776
836
|
if instruction.is_jump_target:
|
|
777
|
-
return (
|
|
837
|
+
return ("|", str(instruction.offset), "|", instruction_repr)
|
|
778
838
|
|
|
779
839
|
return instruction_repr
|
|
780
840
|
|
|
@@ -784,10 +844,9 @@ class _Disassembler(object):
|
|
|
784
844
|
line = self.op_offset_to_line[instruction.offset]
|
|
785
845
|
|
|
786
846
|
argrepr = instruction.argrepr
|
|
787
|
-
if isinstance(argrepr, str) and argrepr.startswith(
|
|
847
|
+
if isinstance(argrepr, str) and argrepr.startswith("NULL + "):
|
|
788
848
|
argrepr = argrepr[7:]
|
|
789
|
-
return _MsgPart(
|
|
790
|
-
line, tok if tok is not None else dec(instruction, argrepr))
|
|
849
|
+
return _MsgPart(line, tok if tok is not None else dec(instruction, argrepr))
|
|
791
850
|
|
|
792
851
|
def _next_instruction_to_str(self, line_to_contents):
|
|
793
852
|
# indent = ''
|
|
@@ -804,51 +863,55 @@ class _Disassembler(object):
|
|
|
804
863
|
|
|
805
864
|
instruction = self.instructions.pop(0)
|
|
806
865
|
|
|
807
|
-
if instruction.opname in
|
|
866
|
+
if instruction.opname in ("RESUME", "NULL"):
|
|
808
867
|
return None
|
|
809
868
|
|
|
810
|
-
if instruction.opname
|
|
869
|
+
if instruction.opname == "RETURN_CONST":
|
|
870
|
+
return (msg(instruction, "return ", line=self.min_line(instruction)), msg(instruction))
|
|
871
|
+
|
|
872
|
+
if instruction.opname in ("LOAD_GLOBAL", "LOAD_FAST", "LOAD_CONST", "LOAD_NAME"):
|
|
811
873
|
next_instruction = self.instructions[0]
|
|
812
|
-
if next_instruction.opname in (
|
|
874
|
+
if next_instruction.opname in ("STORE_FAST", "STORE_NAME"):
|
|
813
875
|
self.instructions.pop(0)
|
|
814
|
-
return (
|
|
815
|
-
msg(next_instruction),
|
|
816
|
-
msg(next_instruction, ' = '),
|
|
817
|
-
msg(instruction))
|
|
876
|
+
return (msg(next_instruction), msg(next_instruction, " = "), msg(instruction))
|
|
818
877
|
|
|
819
|
-
if next_instruction.opname ==
|
|
878
|
+
if next_instruction.opname == "RETURN_VALUE":
|
|
820
879
|
self.instructions.pop(0)
|
|
821
|
-
return (msg(instruction,
|
|
880
|
+
return (msg(instruction, "return ", line=self.min_line(instruction)), msg(instruction))
|
|
822
881
|
|
|
823
|
-
if next_instruction.opname ==
|
|
882
|
+
if next_instruction.opname == "RAISE_VARARGS" and next_instruction.argval == 1:
|
|
824
883
|
self.instructions.pop(0)
|
|
825
|
-
return (msg(instruction,
|
|
884
|
+
return (msg(instruction, "raise ", line=self.min_line(instruction)), msg(instruction))
|
|
826
885
|
|
|
827
|
-
if instruction.opname ==
|
|
886
|
+
if instruction.opname == "LOAD_CONST":
|
|
828
887
|
if inspect.iscode(instruction.argval):
|
|
829
|
-
|
|
830
|
-
code_line_to_contents = _Disassembler(
|
|
831
|
-
instruction.argval, self.firstlineno, self.level + 1
|
|
832
|
-
).build_line_to_contents()
|
|
888
|
+
code_line_to_contents = _Disassembler(instruction.argval, self.firstlineno, self.level + 1).build_line_to_contents()
|
|
833
889
|
|
|
834
890
|
for contents in code_line_to_contents.values():
|
|
835
|
-
contents.insert(0,
|
|
891
|
+
contents.insert(0, " ")
|
|
836
892
|
for line, contents in code_line_to_contents.items():
|
|
837
893
|
line_to_contents.setdefault(line, []).extend(contents)
|
|
838
|
-
return msg(instruction,
|
|
894
|
+
return msg(instruction, "LOAD_CONST(code)")
|
|
839
895
|
|
|
840
|
-
if instruction.opname ==
|
|
896
|
+
if instruction.opname == "RAISE_VARARGS":
|
|
841
897
|
if instruction.argval == 0:
|
|
842
|
-
return msg(instruction,
|
|
898
|
+
return msg(instruction, "raise")
|
|
843
899
|
|
|
844
|
-
if instruction.opname ==
|
|
845
|
-
return msg(instruction, (
|
|
900
|
+
if instruction.opname == "SETUP_FINALLY":
|
|
901
|
+
return msg(instruction, ("try(", instruction.argrepr, "):"))
|
|
846
902
|
|
|
847
903
|
if instruction.argrepr:
|
|
848
|
-
return msg(instruction, (instruction.opname,
|
|
904
|
+
return msg(instruction, (instruction.opname, "(", instruction.argrepr, ")"))
|
|
849
905
|
|
|
850
906
|
if instruction.argval:
|
|
851
|
-
return msg(
|
|
907
|
+
return msg(
|
|
908
|
+
instruction,
|
|
909
|
+
"%s{%s}"
|
|
910
|
+
% (
|
|
911
|
+
instruction.opname,
|
|
912
|
+
instruction.argval,
|
|
913
|
+
),
|
|
914
|
+
)
|
|
852
915
|
|
|
853
916
|
return msg(instruction, instruction.opname)
|
|
854
917
|
|
|
@@ -882,22 +945,22 @@ class _Disassembler(object):
|
|
|
882
945
|
for line, contents in sorted(line_to_contents.items()):
|
|
883
946
|
while last_line < line - 1:
|
|
884
947
|
if show_lines:
|
|
885
|
-
stream.write(
|
|
948
|
+
stream.write("%s.\n" % (last_line + 1,))
|
|
886
949
|
else:
|
|
887
|
-
stream.write(
|
|
950
|
+
stream.write("\n")
|
|
888
951
|
last_line += 1
|
|
889
952
|
|
|
890
953
|
if show_lines:
|
|
891
|
-
stream.write(
|
|
954
|
+
stream.write("%s. " % (line,))
|
|
892
955
|
|
|
893
956
|
for i, content in enumerate(contents):
|
|
894
957
|
if content == SEPARATOR:
|
|
895
958
|
if i != len(contents) - 1:
|
|
896
|
-
stream.write(
|
|
959
|
+
stream.write(", ")
|
|
897
960
|
else:
|
|
898
961
|
stream.write(content)
|
|
899
962
|
|
|
900
|
-
stream.write(
|
|
963
|
+
stream.write("\n")
|
|
901
964
|
|
|
902
965
|
last_line = line
|
|
903
966
|
|
|
@@ -905,7 +968,7 @@ class _Disassembler(object):
|
|
|
905
968
|
|
|
906
969
|
|
|
907
970
|
def code_to_bytecode_representation(co, use_func_first_line=False):
|
|
908
|
-
|
|
971
|
+
"""
|
|
909
972
|
A simple disassemble of bytecode.
|
|
910
973
|
|
|
911
974
|
It does not attempt to provide the full Python source code, rather, it provides a low-level
|
|
@@ -914,7 +977,7 @@ def code_to_bytecode_representation(co, use_func_first_line=False):
|
|
|
914
977
|
|
|
915
978
|
Note that it does show jump locations/targets and converts some common bytecode constructs to
|
|
916
979
|
Python code to make it a bit easier to understand.
|
|
917
|
-
|
|
980
|
+
"""
|
|
918
981
|
# Reference for bytecodes:
|
|
919
982
|
# https://docs.python.org/3/library/dis.html
|
|
920
983
|
if use_func_first_line:
|