debugpy 1.8.22__cp315-cp315-win32.whl

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.
Files changed (301) hide show
  1. debugpy/ThirdPartyNotices.txt +499 -0
  2. debugpy/__init__.py +40 -0
  3. debugpy/__main__.py +71 -0
  4. debugpy/_vendored/__init__.py +126 -0
  5. debugpy/_vendored/_pydevd_packaging.py +48 -0
  6. debugpy/_vendored/_util.py +59 -0
  7. debugpy/_vendored/force_pydevd.py +81 -0
  8. debugpy/_vendored/pydevd/_pydev_bundle/__init__.py +0 -0
  9. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py +154 -0
  10. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py +267 -0
  11. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py +16 -0
  12. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +43 -0
  13. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py +133 -0
  14. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py +372 -0
  15. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py +485 -0
  16. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py +23 -0
  17. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py +134 -0
  18. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py +77 -0
  19. debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py +53 -0
  20. debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py +350 -0
  21. debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +641 -0
  22. debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py +38 -0
  23. debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py +12 -0
  24. debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py +95 -0
  25. debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py +519 -0
  26. debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py +34 -0
  27. debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py +68 -0
  28. debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py +284 -0
  29. debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py +1312 -0
  30. debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py +220 -0
  31. debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py +37 -0
  32. debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py +181 -0
  33. debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py +16 -0
  34. debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py +0 -0
  35. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py +884 -0
  36. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +77 -0
  37. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py +206 -0
  38. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py +266 -0
  39. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py +194 -0
  40. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py +308 -0
  41. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py +141 -0
  42. debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py +260 -0
  43. debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py +0 -0
  44. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py +0 -0
  45. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +606 -0
  46. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +4190 -0
  47. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json +325 -0
  48. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py +143 -0
  49. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +17458 -0
  50. debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py +45 -0
  51. debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py +553 -0
  52. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +41 -0
  53. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +330 -0
  54. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +1203 -0
  55. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py +184 -0
  56. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py +938 -0
  57. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py +105 -0
  58. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py +605 -0
  59. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +884 -0
  60. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +1948 -0
  61. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +200 -0
  62. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py +181 -0
  63. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py +0 -0
  64. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py +482 -0
  65. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py +82 -0
  66. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py +265 -0
  67. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py +863 -0
  68. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +114 -0
  69. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +52134 -0
  70. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp315-win32.pyd +0 -0
  71. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd +43 -0
  72. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +2180 -0
  73. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py +63 -0
  74. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py +202 -0
  75. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py +64 -0
  76. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py +123 -0
  77. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +178 -0
  78. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py +5 -0
  79. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py +107 -0
  80. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py +65 -0
  81. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +339 -0
  82. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py +1313 -0
  83. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py +471 -0
  84. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py +91 -0
  85. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +70 -0
  86. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py +256 -0
  87. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +200 -0
  88. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +150 -0
  89. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +601 -0
  90. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +558 -0
  91. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +208 -0
  92. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +805 -0
  93. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +1427 -0
  94. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py +252 -0
  95. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py +436 -0
  96. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py +836 -0
  97. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py +339 -0
  98. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py +395 -0
  99. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py +130 -0
  100. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py +201 -0
  101. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py +152 -0
  102. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py +412 -0
  103. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +553 -0
  104. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py +115 -0
  105. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py +237 -0
  106. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py +92 -0
  107. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py +550 -0
  108. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py +89 -0
  109. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +517 -0
  110. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py +895 -0
  111. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +40 -0
  112. debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py +434 -0
  113. debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore +3 -0
  114. debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py +0 -0
  115. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py +43 -0
  116. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +71 -0
  117. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +25873 -0
  118. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd +131 -0
  119. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx +613 -0
  120. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +121 -0
  121. debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py +363 -0
  122. debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h +5 -0
  123. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt +18 -0
  124. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py +0 -0
  125. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py +131 -0
  126. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py +206 -0
  127. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py +443 -0
  128. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py +658 -0
  129. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py +160 -0
  130. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py +372 -0
  131. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +489 -0
  132. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +150 -0
  133. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +486 -0
  134. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +816 -0
  135. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +93 -0
  136. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +1486 -0
  137. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +157 -0
  138. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +351 -0
  139. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +258 -0
  140. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +974 -0
  141. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py +15 -0
  142. debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py +45 -0
  143. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py +2085 -0
  144. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c +42915 -0
  145. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.cp315-win32.pyd +0 -0
  146. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd +46 -0
  147. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx +2077 -0
  148. debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py +16 -0
  149. debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py +22 -0
  150. debugpy/_vendored/pydevd/pydev_coverage.py +92 -0
  151. debugpy/_vendored/pydevd/pydev_ipython/README +8 -0
  152. debugpy/_vendored/pydevd/pydev_ipython/__init__.py +0 -0
  153. debugpy/_vendored/pydevd/pydev_ipython/inputhook.py +614 -0
  154. debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py +150 -0
  155. debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py +37 -0
  156. debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py +37 -0
  157. debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py +95 -0
  158. debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py +198 -0
  159. debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py +201 -0
  160. debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py +201 -0
  161. debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py +25 -0
  162. debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py +173 -0
  163. debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py +189 -0
  164. debugpy/_vendored/pydevd/pydev_ipython/qt.py +24 -0
  165. debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py +135 -0
  166. debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py +381 -0
  167. debugpy/_vendored/pydevd/pydev_ipython/version.py +50 -0
  168. debugpy/_vendored/pydevd/pydev_pysrc.py +1 -0
  169. debugpy/_vendored/pydevd/pydev_run_in_console.py +152 -0
  170. debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt +1 -0
  171. debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +268 -0
  172. debugpy/_vendored/pydevd/pydevconsole.py +611 -0
  173. debugpy/_vendored/pydevd/pydevd.py +3852 -0
  174. debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt +27 -0
  175. debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +40 -0
  176. debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py +3 -0
  177. debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +11 -0
  178. debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +75 -0
  179. debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +632 -0
  180. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
  181. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
  182. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +89 -0
  183. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py +201 -0
  184. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
  185. debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
  186. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp +193 -0
  187. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp +113 -0
  188. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp +120 -0
  189. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp +62 -0
  190. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp +194 -0
  191. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp +85 -0
  192. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp +106 -0
  193. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h +704 -0
  194. debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp +63 -0
  195. debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
  196. debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
  197. debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe +0 -0
  198. debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
  199. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore +4 -0
  200. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp +111 -0
  201. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh +11 -0
  202. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh +14 -0
  203. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd +10 -0
  204. debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py +55 -0
  205. debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
  206. debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
  207. debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
  208. debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
  209. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py +247 -0
  210. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py +4763 -0
  211. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py +201 -0
  212. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py +1908 -0
  213. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py +1513 -0
  214. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py +715 -0
  215. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py +1877 -0
  216. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py +2269 -0
  217. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py +1983 -0
  218. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py +4885 -0
  219. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py +696 -0
  220. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py +661 -0
  221. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py +981 -0
  222. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py +1227 -0
  223. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py +1848 -0
  224. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py +2108 -0
  225. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py +1059 -0
  226. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py +72 -0
  227. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py +3687 -0
  228. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py +816 -0
  229. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py +461 -0
  230. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py +1381 -0
  231. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py +737 -0
  232. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +526 -0
  233. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py +5098 -0
  234. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +579 -0
  235. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +3517 -0
  236. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py +410 -0
  237. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py +403 -0
  238. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py +838 -0
  239. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py +1832 -0
  240. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py +1085 -0
  241. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py +355 -0
  242. debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py +753 -0
  243. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp +640 -0
  244. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h +57 -0
  245. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat +44 -0
  246. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp +134 -0
  247. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp +77 -0
  248. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp +116 -0
  249. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp +78 -0
  250. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp +22 -0
  251. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h +36 -0
  252. debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h +22 -0
  253. debugpy/_vendored/pydevd/pydevd_file_utils.py +990 -0
  254. debugpy/_vendored/pydevd/pydevd_plugins/__init__.py +3 -0
  255. debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py +640 -0
  256. debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md +30 -0
  257. debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py +3 -0
  258. debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py +3 -0
  259. debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py +26 -0
  260. debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py +90 -0
  261. debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py +178 -0
  262. debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py +17 -0
  263. debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py +528 -0
  264. debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py +120 -0
  265. debugpy/_vendored/pydevd/pydevd_tracing.py +410 -0
  266. debugpy/_vendored/pydevd/setup_pydevd_cython.py +319 -0
  267. debugpy/_version.py +21 -0
  268. debugpy/adapter/__init__.py +14 -0
  269. debugpy/adapter/__main__.py +242 -0
  270. debugpy/adapter/clients.py +818 -0
  271. debugpy/adapter/components.py +190 -0
  272. debugpy/adapter/launchers.py +222 -0
  273. debugpy/adapter/servers.py +646 -0
  274. debugpy/adapter/sessions.py +298 -0
  275. debugpy/common/__init__.py +18 -0
  276. debugpy/common/json.py +295 -0
  277. debugpy/common/log.py +422 -0
  278. debugpy/common/messaging.py +1565 -0
  279. debugpy/common/singleton.py +192 -0
  280. debugpy/common/sockets.py +183 -0
  281. debugpy/common/stacks.py +62 -0
  282. debugpy/common/timestamp.py +22 -0
  283. debugpy/common/util.py +169 -0
  284. debugpy/launcher/__init__.py +33 -0
  285. debugpy/launcher/__main__.py +92 -0
  286. debugpy/launcher/debuggee.py +257 -0
  287. debugpy/launcher/handlers.py +152 -0
  288. debugpy/launcher/output.py +114 -0
  289. debugpy/launcher/winapi.py +104 -0
  290. debugpy/public_api.py +286 -0
  291. debugpy/py.typed +0 -0
  292. debugpy/server/__init__.py +7 -0
  293. debugpy/server/api.py +422 -0
  294. debugpy/server/attach_pid_injected.py +92 -0
  295. debugpy/server/cli.py +572 -0
  296. debugpy-1.8.22.dist-info/METADATA +39 -0
  297. debugpy-1.8.22.dist-info/RECORD +301 -0
  298. debugpy-1.8.22.dist-info/WHEEL +5 -0
  299. debugpy-1.8.22.dist-info/entry_points.txt +3 -0
  300. debugpy-1.8.22.dist-info/licenses/LICENSE +24 -0
  301. debugpy-1.8.22.dist-info/top_level.txt +1 -0
@@ -0,0 +1,499 @@
1
+
2
+ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
3
+ Do Not Translate or Localize
4
+
5
+ debugpy incorporates third party material from the projects listed below.
6
+
7
+
8
+ 1. PyDev.Debugger (https://github.com/fabioz/PyDev.Debugger)
9
+ Includes:File copyright Brainwy Software Ltda.
10
+ Includes:File(s) related to Python, Cpython
11
+ Includes:File authored by Yuli Fitterman
12
+ Includes:File copyright Brainwy software Ltda
13
+ Includes:File with methods from Spyder
14
+ Includes:File(s) related to IPython
15
+ Includes:Files copyright Microsoft Corporation
16
+ Includes:six
17
+ Includes:WinAppDbg
18
+ Includes:XML-RPC client interface for Python
19
+
20
+
21
+ %% PyDev.Debugger NOTICES, INFORMATION, AND LICENSE BEGIN HERE
22
+ =========================================
23
+ The source code for the PyDev.Debugger files are provided with debugpy, or you may send a check or money order for US $5.00, including the product name (debugpy), the open source component name (PyDev.Debugger) and version number, to: Source Code Compliance Team, Microsoft Corporation, One Microsoft Way, Redmond, WA 98052, USA.
24
+
25
+ Eclipse Public License, Version 1.0 (EPL-1.0)
26
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
27
+ 1. DEFINITIONS
28
+ "Contribution" means:
29
+ a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
30
+ b) in the case of each subsequent Contributor:
31
+ i) changes to the Program, and
32
+ ii) additions to the Program;
33
+ where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
34
+ "Contributor" means any person or entity that distributes the Program.
35
+ "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
36
+ "Program" means the Contributions distributed in accordance with this Agreement.
37
+ "Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
38
+ 2. GRANT OF RIGHTS
39
+ a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
40
+ b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
41
+ c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
42
+ d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
43
+ 3. REQUIREMENTS
44
+ A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
45
+ a) it complies with the terms and conditions of this Agreement; and
46
+ b) its license agreement:
47
+ i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
48
+ ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
49
+ iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
50
+ iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
51
+ When the Program is made available in source code form:
52
+ a) it must be made available under this Agreement; and
53
+ b) a copy of this Agreement must be included with each copy of the Program.
54
+ Contributors may not remove or alter any copyright notices contained within the Program.
55
+ Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
56
+ 4. COMMERCIAL DISTRIBUTION
57
+ Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
58
+ For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
59
+ 5. NO WARRANTY
60
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
61
+ 6. DISCLAIMER OF LIABILITY
62
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
63
+ 7. GENERAL
64
+ If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
65
+ If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
66
+ All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
67
+ Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
68
+ This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
69
+ =========================================
70
+ Includes File copyright Brainwy Software Ltda.
71
+
72
+ File includes the following notice:
73
+
74
+ Copyright: Brainwy Software Ltda.
75
+
76
+ License: EPL.
77
+
78
+ =========================================
79
+ Includes file(s) from Python, Python xreload, Cpython and an ActiveState.com Recipe on "NULL OBJECT DESIGN PATTERN (PYTHON RECIPE)"
80
+
81
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
82
+ --------------------------------------------
83
+
84
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
85
+ ("PSF"), and the Individual or Organization ("Licensee") accessing and
86
+ otherwise using this software ("Python") in source or binary form and
87
+ its associated documentation.
88
+
89
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
90
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
91
+ analyze, test, perform and/or display publicly, prepare derivative works,
92
+ distribute, and otherwise use Python alone or in any derivative version,
93
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
94
+ i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
95
+ 2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights
96
+ Reserved" are retained in Python alone or in any derivative version prepared by
97
+ Licensee.
98
+
99
+ 3. In the event Licensee prepares a derivative work that is based on
100
+ or incorporates Python or any part thereof, and wants to make
101
+ the derivative work available to others as provided herein, then
102
+ Licensee hereby agrees to include in any such work a brief summary of
103
+ the changes made to Python.
104
+
105
+ 4. PSF is making Python available to Licensee on an "AS IS"
106
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
107
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
108
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
109
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
110
+ INFRINGE ANY THIRD PARTY RIGHTS.
111
+
112
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
113
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
114
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
115
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
116
+
117
+ 6. This License Agreement will automatically terminate upon a material
118
+ breach of its terms and conditions.
119
+
120
+ 7. Nothing in this License Agreement shall be deemed to create any
121
+ relationship of agency, partnership, or joint venture between PSF and
122
+ Licensee. This License Agreement does not grant permission to use PSF
123
+ trademarks or trade name in a trademark sense to endorse or promote
124
+ products or services of Licensee, or any third party.
125
+
126
+ 8. By copying, installing or otherwise using Python, Licensee
127
+ agrees to be bound by the terms and conditions of this License
128
+ Agreement.
129
+
130
+
131
+ BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
132
+ -------------------------------------------
133
+
134
+ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
135
+
136
+ 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
137
+ office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
138
+ Individual or Organization ("Licensee") accessing and otherwise using
139
+ this software in source or binary form and its associated
140
+ documentation ("the Software").
141
+
142
+ 2. Subject to the terms and conditions of this BeOpen Python License
143
+ Agreement, BeOpen hereby grants Licensee a non-exclusive,
144
+ royalty-free, world-wide license to reproduce, analyze, test, perform
145
+ and/or display publicly, prepare derivative works, distribute, and
146
+ otherwise use the Software alone or in any derivative version,
147
+ provided, however, that the BeOpen Python License is retained in the
148
+ Software, alone or in any derivative version prepared by Licensee.
149
+
150
+ 3. BeOpen is making the Software available to Licensee on an "AS IS"
151
+ basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
152
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
153
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
154
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
155
+ INFRINGE ANY THIRD PARTY RIGHTS.
156
+
157
+ 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
158
+ SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
159
+ AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
160
+ DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
161
+
162
+ 5. This License Agreement will automatically terminate upon a material
163
+ breach of its terms and conditions.
164
+
165
+ 6. This License Agreement shall be governed by and interpreted in all
166
+ respects by the law of the State of California, excluding conflict of
167
+ law provisions. Nothing in this License Agreement shall be deemed to
168
+ create any relationship of agency, partnership, or joint venture
169
+ between BeOpen and Licensee. This License Agreement does not grant
170
+ permission to use BeOpen trademarks or trade names in a trademark
171
+ sense to endorse or promote products or services of Licensee, or any
172
+ third party. As an exception, the "BeOpen Python" logos available at
173
+ http://www.pythonlabs.com/logos.html may be used according to the
174
+ permissions granted on that web page.
175
+
176
+ 7. By copying, installing or otherwise using the software, Licensee
177
+ agrees to be bound by the terms and conditions of this License
178
+ Agreement.
179
+
180
+
181
+ CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
182
+ ---------------------------------------
183
+
184
+ 1. This LICENSE AGREEMENT is between the Corporation for National
185
+ Research Initiatives, having an office at 1895 Preston White Drive,
186
+ Reston, VA 20191 ("CNRI"), and the Individual or Organization
187
+ ("Licensee") accessing and otherwise using Python 1.6.1 software in
188
+ source or binary form and its associated documentation.
189
+
190
+ 2. Subject to the terms and conditions of this License Agreement, CNRI
191
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide
192
+ license to reproduce, analyze, test, perform and/or display publicly,
193
+ prepare derivative works, distribute, and otherwise use Python 1.6.1
194
+ alone or in any derivative version, provided, however, that CNRI's
195
+ License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
196
+ 1995-2001 Corporation for National Research Initiatives; All Rights
197
+ Reserved" are retained in Python 1.6.1 alone or in any derivative
198
+ version prepared by Licensee. Alternately, in lieu of CNRI's License
199
+ Agreement, Licensee may substitute the following text (omitting the
200
+ quotes): "Python 1.6.1 is made available subject to the terms and
201
+ conditions in CNRI's License Agreement. This Agreement together with
202
+ Python 1.6.1 may be located on the Internet using the following
203
+ unique, persistent identifier (known as a handle): 1895.22/1013. This
204
+ Agreement may also be obtained from a proxy server on the Internet
205
+ using the following URL: http://hdl.handle.net/1895.22/1013".
206
+
207
+ 3. In the event Licensee prepares a derivative work that is based on
208
+ or incorporates Python 1.6.1 or any part thereof, and wants to make
209
+ the derivative work available to others as provided herein, then
210
+ Licensee hereby agrees to include in any such work a brief summary of
211
+ the changes made to Python 1.6.1.
212
+
213
+ 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
214
+ basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
215
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
216
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
217
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
218
+ INFRINGE ANY THIRD PARTY RIGHTS.
219
+
220
+ 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
221
+ 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
222
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
223
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
224
+
225
+ 6. This License Agreement will automatically terminate upon a material
226
+ breach of its terms and conditions.
227
+
228
+ 7. This License Agreement shall be governed by the federal
229
+ intellectual property law of the United States, including without
230
+ limitation the federal copyright law, and, to the extent such
231
+ U.S. federal law does not apply, by the law of the Commonwealth of
232
+ Virginia, excluding Virginia's conflict of law provisions.
233
+ Notwithstanding the foregoing, with regard to derivative works based
234
+ on Python 1.6.1 that incorporate non-separable material that was
235
+ previously distributed under the GNU General Public License (GPL), the
236
+ law of the Commonwealth of Virginia shall govern this License
237
+ Agreement only as to issues arising under or with respect to
238
+ Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
239
+ License Agreement shall be deemed to create any relationship of
240
+ agency, partnership, or joint venture between CNRI and Licensee. This
241
+ License Agreement does not grant permission to use CNRI trademarks or
242
+ trade name in a trademark sense to endorse or promote products or
243
+ services of Licensee, or any third party.
244
+
245
+ 8. By clicking on the "ACCEPT" button where indicated, or by copying,
246
+ installing or otherwise using Python 1.6.1, Licensee agrees to be
247
+ bound by the terms and conditions of this License Agreement.
248
+
249
+ ACCEPT
250
+
251
+
252
+ CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
253
+ --------------------------------------------------
254
+
255
+ Copyright (C) 2006-2010 Python Software Foundation
256
+
257
+ Permission to use, copy, modify, and distribute this software and its
258
+ documentation for any purpose and without fee is hereby granted,
259
+ provided that the above copyright notice appear in all copies and that
260
+ both that copyright notice and this permission notice appear in
261
+ supporting documentation, and that the name of Stichting Mathematisch
262
+ Centrum or CWI not be used in advertising or publicity pertaining to
263
+ distribution of the software without specific, written prior
264
+ permission.
265
+
266
+ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
267
+ THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
268
+ FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
269
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
270
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
271
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
272
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
273
+ =========================================
274
+ Includes File authored by Yuli Fitterman
275
+
276
+ Copyright (c) Yuli Fitterman
277
+
278
+ Licensed under the Apache License, Version 2.0 (the "License");
279
+ you may not use this file except in compliance with the License.
280
+ You may obtain a copy of the License at
281
+
282
+ http://www.apache.org/licenses/LICENSE-2.0
283
+
284
+ Unless required by applicable law or agreed to in writing, software
285
+ distributed under the License is distributed on an "AS IS" BASIS,
286
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
287
+ See the License for the specific language governing permissions and
288
+ limitations under the License.
289
+ =========================================
290
+ Includes file(s): * Copyright (c) Brainwy software Ltda.
291
+ *
292
+ * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
293
+ * copy of the license can be found in the License.html file at the root of this distribution. If
294
+ * you cannot locate the Apache License, Version 2.0, please send an email to
295
+ * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
296
+ * by the terms of the Apache License, Version 2.0.
297
+ *
298
+ * You must not remove this notice, or any other, from this software.
299
+ =========================================
300
+ Includes file(s): Copyright (c) 2009-2012 Pierre Raybaut
301
+
302
+ Permission is hereby granted, free of charge, to any person
303
+ obtaining a copy of this software and associated documentation
304
+ files (the "Software"), to deal in the Software without
305
+ restriction, including without limitation the rights to use,
306
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
307
+ copies of the Software, and to permit persons to whom the
308
+ Software is furnished to do so, subject to the following
309
+ conditions:
310
+
311
+ The above copyright notice and this permission notice shall be
312
+ included in all copies or substantial portions of the Software.
313
+
314
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
315
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
316
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
317
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
318
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
319
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
320
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
321
+ OTHER DEALINGS IN THE SOFTWARE.
322
+ =========================================
323
+ Includes file(s) from Ipython
324
+
325
+ Copyright (c) 2008-2010, IPython Development Team
326
+ Copyright (c) 2001-2007, Fernando Perez. <fernando.perez@colorado.edu>
327
+ Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
328
+ Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
329
+
330
+ All rights reserved.
331
+
332
+ Redistribution and use in source and binary forms, with or without
333
+ modification, are permitted provided that the following conditions are met:
334
+
335
+ Redistributions of source code must retain the above copyright notice, this
336
+ list of conditions and the following disclaimer.
337
+
338
+ Redistributions in binary form must reproduce the above copyright notice, this
339
+ list of conditions and the following disclaimer in the documentation and/or
340
+ other materials provided with the distribution.
341
+
342
+ Neither the name of the IPython Development Team nor the names of its
343
+ contributors may be used to endorse or promote products derived from this
344
+ software without specific prior written permission.
345
+
346
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
347
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
348
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
349
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
350
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
351
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
352
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
353
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
354
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
355
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
356
+ =========================================
357
+ Includes file(s): * Copyright (c) Microsoft Corporation.
358
+ *
359
+ * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
360
+ * copy of the license can be found in the License.html file at the root of this distribution. If
361
+ * you cannot locate the Apache License, Version 2.0, please send an email to
362
+ * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
363
+ * by the terms of the Apache License, Version 2.0.
364
+ *
365
+ * You must not remove this notice, or any other, from this software.
366
+ =========================================
367
+ Includes file(s) from https://pythonhosted.org/six/
368
+
369
+ Copyright (c) 2010-2018 Benjamin Peterson
370
+
371
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
372
+ this software and associated documentation files (the "Software"), to deal in
373
+ the Software without restriction, including without limitation the rights to
374
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
375
+ the Software, and to permit persons to whom the Software is furnished to do so,
376
+ subject to the following conditions:
377
+
378
+ The above copyright notice and this permission notice shall be included in all
379
+ copies or substantial portions of the Software.
380
+
381
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
382
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
383
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
384
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
385
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
386
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
387
+ =========================================
388
+ Includes WinAppDbg
389
+
390
+ # Copyright (c) 2009-2014, Mario Vilas
391
+ # All rights reserved.
392
+ #
393
+ # Redistribution and use in source and binary forms, with or without
394
+ # modification, are permitted provided that the following conditions are met:
395
+ #
396
+ # * Redistributions of source code must retain the above copyright notice,
397
+ # this list of conditions and the following disclaimer.
398
+ # * Redistributions in binary form must reproduce the above copyright
399
+ # notice,this list of conditions and the following disclaimer in the
400
+ # documentation and/or other materials provided with the distribution.
401
+ # * Neither the name of the copyright holder nor the names of its
402
+ # contributors may be used to endorse or promote products derived from
403
+ # this software without specific prior written permission.
404
+ #
405
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
406
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
407
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
408
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
409
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
410
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
411
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
412
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
413
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
414
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
415
+ # POSSIBILITY OF SUCH DAMAGE.
416
+ =========================================
417
+ Includes XML-RPC client interface for Python
418
+ # Copyright (c) 1999-2002 by Secret Labs AB
419
+ # Copyright (c) 1999-2002 by Fredrik Lundh
420
+ #
421
+ # By obtaining, using, and/or copying this software and/or its
422
+ # associated documentation, you agree that you have read, understood,
423
+ # and will comply with the following terms and conditions:
424
+ #
425
+ # Permission to use, copy, modify, and distribute this software and
426
+ # its associated documentation for any purpose and without fee is
427
+ # hereby granted, provided that the above copyright notice appears in
428
+ # all copies, and that both that copyright notice and this permission
429
+ # notice appear in supporting documentation, and that the name of
430
+ # Secret Labs AB or the author not be used in advertising or publicity
431
+ # pertaining to distribution of the software without specific, written
432
+ # prior permission.
433
+ #
434
+ # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
435
+ # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
436
+ # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
437
+ # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
438
+ # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
439
+ # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
440
+ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
441
+ # OF THIS SOFTWARE.
442
+ =========================================
443
+ Includes https://github.com/vstinner/bytecode e3e77fb690ed05ac171e15694e1c5d0e0dc34e86 - MIT
444
+
445
+ Copyright (c) 2016 Red Hat.
446
+
447
+ The MIT License (MIT)
448
+ Copyright (c) 2016 Red Hat.
449
+
450
+ Permission is hereby granted, free of charge, to any person obtaining a
451
+ copy of this software and associated documentation files (the
452
+ "Software"), to deal in the Software without restriction, including
453
+ without limitation the rights to use, copy, modify, merge, publish,
454
+ distribute, sublicense, and/or sell copies of the Software, and to
455
+ permit persons to whom the Software is furnished to do so, subject to
456
+ the following conditions:
457
+
458
+ The above copyright notice and this permission notice shall be included
459
+ in all copies or substantial portions of the Software.
460
+
461
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
462
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
463
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
464
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
465
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
466
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
467
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
468
+ =========================================
469
+ Includes https://github.com/benhoyt/scandir 6ed381881bc2fb9de05804e892eeeeb3601a3af2 - BSD 3-Clause "New" or "Revised" License
470
+
471
+ Copyright (c) 2012, Ben Hoyt
472
+ All rights reserved.
473
+
474
+ Redistribution and use in source and binary forms, with or without
475
+ modification, are permitted provided that the following conditions are met:
476
+
477
+ * Redistributions of source code must retain the above copyright notice, this
478
+ list of conditions and the following disclaimer.
479
+
480
+ * Redistributions in binary form must reproduce the above copyright notice,
481
+ this list of conditions and the following disclaimer in the documentation
482
+ and/or other materials provided with the distribution.
483
+
484
+ * Neither the name of Ben Hoyt nor the names of its contributors may be used
485
+ to endorse or promote products derived from this software without specific
486
+ prior written permission.
487
+
488
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
489
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
490
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
491
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
492
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
493
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
494
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
495
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
496
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
497
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
498
+ =========================================
499
+ END OF PyDev.Debugger NOTICES, INFORMATION, AND LICENSE
debugpy/__init__.py ADDED
@@ -0,0 +1,40 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License. See LICENSE in the project root
3
+ # for license information.
4
+
5
+ """An implementation of the Debug Adapter Protocol (DAP) for Python.
6
+
7
+ https://microsoft.github.io/debug-adapter-protocol/
8
+ """
9
+
10
+ # debugpy stable public API consists solely of members of this module that are
11
+ # enumerated below.
12
+ __all__ = [ # noqa
13
+ "__version__",
14
+ "breakpoint",
15
+ "configure",
16
+ "connect",
17
+ "debug_this_thread",
18
+ "get_cli_options",
19
+ "is_client_connected",
20
+ "listen",
21
+ "log_to",
22
+ "trace_this_thread",
23
+ "trigger_exception_handler",
24
+ "wait_for_client",
25
+ ]
26
+
27
+ import sys
28
+
29
+ assert sys.version_info >= (3, 7), (
30
+ "Python 3.6 and below is not supported by this version of debugpy; "
31
+ "use debugpy 1.5.1 or earlier."
32
+ )
33
+
34
+
35
+ # Actual definitions are in a separate file to work around parsing issues causing
36
+ # SyntaxError on Python 2 and preventing the above version check from executing.
37
+ from debugpy.public_api import * # noqa
38
+ from debugpy.public_api import __version__
39
+
40
+ del sys
debugpy/__main__.py ADDED
@@ -0,0 +1,71 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License. See LICENSE in the project root
3
+ # for license information.
4
+
5
+ import sys
6
+
7
+ if __name__ == "__main__":
8
+
9
+ # There are three ways to run debugpy:
10
+ #
11
+ # 1. Installed as a module in the current environment (python -m debugpy ...)
12
+ # 2. Run as a script from source code (python <repo_root>/src/debugpy ...)
13
+ # 3. Installed as a module in a random directory
14
+ #
15
+ # -----
16
+ #
17
+ # In the first case, no extra work is needed. Importing debugpy will work as expected.
18
+ # Also, running 'debugpy' instead of 'python -m debugpy' will work because of the entry point
19
+ # defined in setup.py.
20
+ #
21
+ # -----
22
+ #
23
+ # In the second case, sys.path[0] is the one added automatically by Python for the directory
24
+ # containing this file. 'import debugpy' will not work since we need the parent directory
25
+ # of debugpy/ to be in sys.path, rather than debugpy/ itself. So we need to modify sys.path[0].
26
+ # Running 'debugpy' will not work because the entry point is not defined in this case.
27
+ #
28
+ # -----
29
+ #
30
+ # In the third case, running 'python -m debugpy' will not work because the module is not installed
31
+ # in any environment. Running 'python <install_dir>/debugpy' will work, just like the second case.
32
+ # But running the entry point will not work because python doesn't know where to find the debugpy module.
33
+ #
34
+ # In this case, no changes to sys.path are required. You just have to do the following before calling
35
+ # the entry point:
36
+ # 1. Add <install_dir> to PYTHONPATH.
37
+ # On Windows, this is set PYTHONPATH=%PYTHONPATH%;<install_dir>
38
+ # 2. Add <install_dir>/bin to PATH. (OPTIONAL)
39
+ # On Windows, this is set PATH=%PATH%;<install_dir>\bin
40
+ # 3. Run the entry point from a command prompt
41
+ # On Windows, this is <install_dir>\bin\debugpy.exe, or just 'debugpy' if you did the previous step.
42
+ #
43
+ # -----
44
+ #
45
+ # If we modify sys.path, 'import debugpy' will work, but it will break other imports
46
+ # because they will be resolved relative to debugpy/ - e.g. `import debugger` will try
47
+ # to import debugpy/debugger.py.
48
+ #
49
+ # To fix both problems, we need to do the following steps:
50
+ # 1. Modify sys.path[0] to point at the parent directory of debugpy/ instead of debugpy/ itself.
51
+ # 2. Import debugpy.
52
+ # 3. Remove sys.path[0] so that it doesn't affect future imports.
53
+ #
54
+ # For example, suppose the user did:
55
+ #
56
+ # python /foo/bar/debugpy ...
57
+ #
58
+ # At the beginning of this script, sys.path[0] will contain "/foo/bar/debugpy".
59
+ # We want to replace it with "/foo/bar', then 'import debugpy', then remove the replaced entry.
60
+ # The imported debugpy module will remain in sys.modules, and thus all future imports of it
61
+ # or its submodules will resolve accordingly.
62
+ if "debugpy" not in sys.modules:
63
+
64
+ # Do not use dirname() to walk up - this can be a relative path, e.g. ".".
65
+ sys.path[0] = sys.path[0] + "/../"
66
+ import debugpy # noqa
67
+ del sys.path[0]
68
+
69
+ from debugpy.server import cli
70
+
71
+ cli.main()