@djlint/linux-arm64-musl 0.0.0 → 1.54.0

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 (1658) hide show
  1. package/LICENSE +675 -0
  2. package/README.md +3 -1
  3. package/package.json +20 -3
  4. package/python/bin/python3 +0 -0
  5. package/python/lib/python3.14/LICENSE.txt +277 -0
  6. package/python/lib/python3.14/__future__.py +147 -0
  7. package/python/lib/python3.14/__hello__.py +16 -0
  8. package/python/lib/python3.14/__phello__/__init__.py +7 -0
  9. package/python/lib/python3.14/__phello__/__pycache__/__init__.cpython-314.pyc +0 -0
  10. package/python/lib/python3.14/__phello__/__pycache__/spam.cpython-314.pyc +0 -0
  11. package/python/lib/python3.14/__phello__/spam.py +7 -0
  12. package/python/lib/python3.14/__pycache__/__future__.cpython-314.pyc +0 -0
  13. package/python/lib/python3.14/__pycache__/__hello__.cpython-314.pyc +0 -0
  14. package/python/lib/python3.14/__pycache__/_aix_support.cpython-314.pyc +0 -0
  15. package/python/lib/python3.14/__pycache__/_android_support.cpython-314.pyc +0 -0
  16. package/python/lib/python3.14/__pycache__/_apple_support.cpython-314.pyc +0 -0
  17. package/python/lib/python3.14/__pycache__/_ast_unparse.cpython-314.pyc +0 -0
  18. package/python/lib/python3.14/__pycache__/_collections_abc.cpython-314.pyc +0 -0
  19. package/python/lib/python3.14/__pycache__/_colorize.cpython-314.pyc +0 -0
  20. package/python/lib/python3.14/__pycache__/_compat_pickle.cpython-314.pyc +0 -0
  21. package/python/lib/python3.14/__pycache__/_ios_support.cpython-314.pyc +0 -0
  22. package/python/lib/python3.14/__pycache__/_markupbase.cpython-314.pyc +0 -0
  23. package/python/lib/python3.14/__pycache__/_opcode_metadata.cpython-314.pyc +0 -0
  24. package/python/lib/python3.14/__pycache__/_osx_support.cpython-314.pyc +0 -0
  25. package/python/lib/python3.14/__pycache__/_py_abc.cpython-314.pyc +0 -0
  26. package/python/lib/python3.14/__pycache__/_py_warnings.cpython-314.pyc +0 -0
  27. package/python/lib/python3.14/__pycache__/_pydatetime.cpython-314.pyc +0 -0
  28. package/python/lib/python3.14/__pycache__/_pydecimal.cpython-314.pyc +0 -0
  29. package/python/lib/python3.14/__pycache__/_pyio.cpython-314.pyc +0 -0
  30. package/python/lib/python3.14/__pycache__/_pylong.cpython-314.pyc +0 -0
  31. package/python/lib/python3.14/__pycache__/_sitebuiltins.cpython-314.pyc +0 -0
  32. package/python/lib/python3.14/__pycache__/_strptime.cpython-314.pyc +0 -0
  33. package/python/lib/python3.14/__pycache__/_sysconfigdata__linux_aarch64-linux-musl.cpython-314.pyc +0 -0
  34. package/python/lib/python3.14/__pycache__/_threading_local.cpython-314.pyc +0 -0
  35. package/python/lib/python3.14/__pycache__/_weakrefset.cpython-314.pyc +0 -0
  36. package/python/lib/python3.14/__pycache__/abc.cpython-314.pyc +0 -0
  37. package/python/lib/python3.14/__pycache__/annotationlib.cpython-314.pyc +0 -0
  38. package/python/lib/python3.14/__pycache__/antigravity.cpython-314.pyc +0 -0
  39. package/python/lib/python3.14/__pycache__/argparse.cpython-314.pyc +0 -0
  40. package/python/lib/python3.14/__pycache__/ast.cpython-314.pyc +0 -0
  41. package/python/lib/python3.14/__pycache__/base64.cpython-314.pyc +0 -0
  42. package/python/lib/python3.14/__pycache__/bdb.cpython-314.pyc +0 -0
  43. package/python/lib/python3.14/__pycache__/bisect.cpython-314.pyc +0 -0
  44. package/python/lib/python3.14/__pycache__/bz2.cpython-314.pyc +0 -0
  45. package/python/lib/python3.14/__pycache__/cProfile.cpython-314.pyc +0 -0
  46. package/python/lib/python3.14/__pycache__/calendar.cpython-314.pyc +0 -0
  47. package/python/lib/python3.14/__pycache__/cmd.cpython-314.pyc +0 -0
  48. package/python/lib/python3.14/__pycache__/code.cpython-314.pyc +0 -0
  49. package/python/lib/python3.14/__pycache__/codecs.cpython-314.pyc +0 -0
  50. package/python/lib/python3.14/__pycache__/codeop.cpython-314.pyc +0 -0
  51. package/python/lib/python3.14/__pycache__/colorsys.cpython-314.pyc +0 -0
  52. package/python/lib/python3.14/__pycache__/compileall.cpython-314.pyc +0 -0
  53. package/python/lib/python3.14/__pycache__/configparser.cpython-314.pyc +0 -0
  54. package/python/lib/python3.14/__pycache__/contextlib.cpython-314.pyc +0 -0
  55. package/python/lib/python3.14/__pycache__/contextvars.cpython-314.pyc +0 -0
  56. package/python/lib/python3.14/__pycache__/copy.cpython-314.pyc +0 -0
  57. package/python/lib/python3.14/__pycache__/copyreg.cpython-314.pyc +0 -0
  58. package/python/lib/python3.14/__pycache__/csv.cpython-314.pyc +0 -0
  59. package/python/lib/python3.14/__pycache__/dataclasses.cpython-314.pyc +0 -0
  60. package/python/lib/python3.14/__pycache__/datetime.cpython-314.pyc +0 -0
  61. package/python/lib/python3.14/__pycache__/decimal.cpython-314.pyc +0 -0
  62. package/python/lib/python3.14/__pycache__/difflib.cpython-314.pyc +0 -0
  63. package/python/lib/python3.14/__pycache__/dis.cpython-314.pyc +0 -0
  64. package/python/lib/python3.14/__pycache__/doctest.cpython-314.pyc +0 -0
  65. package/python/lib/python3.14/__pycache__/enum.cpython-314.pyc +0 -0
  66. package/python/lib/python3.14/__pycache__/filecmp.cpython-314.pyc +0 -0
  67. package/python/lib/python3.14/__pycache__/fileinput.cpython-314.pyc +0 -0
  68. package/python/lib/python3.14/__pycache__/fnmatch.cpython-314.pyc +0 -0
  69. package/python/lib/python3.14/__pycache__/fractions.cpython-314.pyc +0 -0
  70. package/python/lib/python3.14/__pycache__/ftplib.cpython-314.pyc +0 -0
  71. package/python/lib/python3.14/__pycache__/functools.cpython-314.pyc +0 -0
  72. package/python/lib/python3.14/__pycache__/genericpath.cpython-314.pyc +0 -0
  73. package/python/lib/python3.14/__pycache__/getopt.cpython-314.pyc +0 -0
  74. package/python/lib/python3.14/__pycache__/getpass.cpython-314.pyc +0 -0
  75. package/python/lib/python3.14/__pycache__/gettext.cpython-314.pyc +0 -0
  76. package/python/lib/python3.14/__pycache__/glob.cpython-314.pyc +0 -0
  77. package/python/lib/python3.14/__pycache__/graphlib.cpython-314.pyc +0 -0
  78. package/python/lib/python3.14/__pycache__/gzip.cpython-314.pyc +0 -0
  79. package/python/lib/python3.14/__pycache__/hashlib.cpython-314.pyc +0 -0
  80. package/python/lib/python3.14/__pycache__/heapq.cpython-314.pyc +0 -0
  81. package/python/lib/python3.14/__pycache__/hmac.cpython-314.pyc +0 -0
  82. package/python/lib/python3.14/__pycache__/imaplib.cpython-314.pyc +0 -0
  83. package/python/lib/python3.14/__pycache__/inspect.cpython-314.pyc +0 -0
  84. package/python/lib/python3.14/__pycache__/io.cpython-314.pyc +0 -0
  85. package/python/lib/python3.14/__pycache__/ipaddress.cpython-314.pyc +0 -0
  86. package/python/lib/python3.14/__pycache__/keyword.cpython-314.pyc +0 -0
  87. package/python/lib/python3.14/__pycache__/linecache.cpython-314.pyc +0 -0
  88. package/python/lib/python3.14/__pycache__/locale.cpython-314.pyc +0 -0
  89. package/python/lib/python3.14/__pycache__/lzma.cpython-314.pyc +0 -0
  90. package/python/lib/python3.14/__pycache__/mailbox.cpython-314.pyc +0 -0
  91. package/python/lib/python3.14/__pycache__/mimetypes.cpython-314.pyc +0 -0
  92. package/python/lib/python3.14/__pycache__/modulefinder.cpython-314.pyc +0 -0
  93. package/python/lib/python3.14/__pycache__/netrc.cpython-314.pyc +0 -0
  94. package/python/lib/python3.14/__pycache__/ntpath.cpython-314.pyc +0 -0
  95. package/python/lib/python3.14/__pycache__/nturl2path.cpython-314.pyc +0 -0
  96. package/python/lib/python3.14/__pycache__/numbers.cpython-314.pyc +0 -0
  97. package/python/lib/python3.14/__pycache__/opcode.cpython-314.pyc +0 -0
  98. package/python/lib/python3.14/__pycache__/operator.cpython-314.pyc +0 -0
  99. package/python/lib/python3.14/__pycache__/optparse.cpython-314.pyc +0 -0
  100. package/python/lib/python3.14/__pycache__/os.cpython-314.pyc +0 -0
  101. package/python/lib/python3.14/__pycache__/pdb.cpython-314.pyc +0 -0
  102. package/python/lib/python3.14/__pycache__/pickle.cpython-314.pyc +0 -0
  103. package/python/lib/python3.14/__pycache__/pickletools.cpython-314.pyc +0 -0
  104. package/python/lib/python3.14/__pycache__/pkgutil.cpython-314.pyc +0 -0
  105. package/python/lib/python3.14/__pycache__/platform.cpython-314.pyc +0 -0
  106. package/python/lib/python3.14/__pycache__/plistlib.cpython-314.pyc +0 -0
  107. package/python/lib/python3.14/__pycache__/poplib.cpython-314.pyc +0 -0
  108. package/python/lib/python3.14/__pycache__/posixpath.cpython-314.pyc +0 -0
  109. package/python/lib/python3.14/__pycache__/pprint.cpython-314.pyc +0 -0
  110. package/python/lib/python3.14/__pycache__/profile.cpython-314.pyc +0 -0
  111. package/python/lib/python3.14/__pycache__/pstats.cpython-314.pyc +0 -0
  112. package/python/lib/python3.14/__pycache__/pty.cpython-314.pyc +0 -0
  113. package/python/lib/python3.14/__pycache__/py_compile.cpython-314.pyc +0 -0
  114. package/python/lib/python3.14/__pycache__/pyclbr.cpython-314.pyc +0 -0
  115. package/python/lib/python3.14/__pycache__/pydoc.cpython-314.pyc +0 -0
  116. package/python/lib/python3.14/__pycache__/queue.cpython-314.pyc +0 -0
  117. package/python/lib/python3.14/__pycache__/quopri.cpython-314.pyc +0 -0
  118. package/python/lib/python3.14/__pycache__/random.cpython-314.pyc +0 -0
  119. package/python/lib/python3.14/__pycache__/reprlib.cpython-314.pyc +0 -0
  120. package/python/lib/python3.14/__pycache__/rlcompleter.cpython-314.pyc +0 -0
  121. package/python/lib/python3.14/__pycache__/runpy.cpython-314.pyc +0 -0
  122. package/python/lib/python3.14/__pycache__/sched.cpython-314.pyc +0 -0
  123. package/python/lib/python3.14/__pycache__/secrets.cpython-314.pyc +0 -0
  124. package/python/lib/python3.14/__pycache__/selectors.cpython-314.pyc +0 -0
  125. package/python/lib/python3.14/__pycache__/shelve.cpython-314.pyc +0 -0
  126. package/python/lib/python3.14/__pycache__/shlex.cpython-314.pyc +0 -0
  127. package/python/lib/python3.14/__pycache__/shutil.cpython-314.pyc +0 -0
  128. package/python/lib/python3.14/__pycache__/signal.cpython-314.pyc +0 -0
  129. package/python/lib/python3.14/__pycache__/site.cpython-314.pyc +0 -0
  130. package/python/lib/python3.14/__pycache__/smtplib.cpython-314.pyc +0 -0
  131. package/python/lib/python3.14/__pycache__/socket.cpython-314.pyc +0 -0
  132. package/python/lib/python3.14/__pycache__/socketserver.cpython-314.pyc +0 -0
  133. package/python/lib/python3.14/__pycache__/sre_compile.cpython-314.pyc +0 -0
  134. package/python/lib/python3.14/__pycache__/sre_constants.cpython-314.pyc +0 -0
  135. package/python/lib/python3.14/__pycache__/sre_parse.cpython-314.pyc +0 -0
  136. package/python/lib/python3.14/__pycache__/ssl.cpython-314.pyc +0 -0
  137. package/python/lib/python3.14/__pycache__/stat.cpython-314.pyc +0 -0
  138. package/python/lib/python3.14/__pycache__/statistics.cpython-314.pyc +0 -0
  139. package/python/lib/python3.14/__pycache__/stringprep.cpython-314.pyc +0 -0
  140. package/python/lib/python3.14/__pycache__/struct.cpython-314.pyc +0 -0
  141. package/python/lib/python3.14/__pycache__/subprocess.cpython-314.pyc +0 -0
  142. package/python/lib/python3.14/__pycache__/symtable.cpython-314.pyc +0 -0
  143. package/python/lib/python3.14/__pycache__/tabnanny.cpython-314.pyc +0 -0
  144. package/python/lib/python3.14/__pycache__/tarfile.cpython-314.pyc +0 -0
  145. package/python/lib/python3.14/__pycache__/tempfile.cpython-314.pyc +0 -0
  146. package/python/lib/python3.14/__pycache__/textwrap.cpython-314.pyc +0 -0
  147. package/python/lib/python3.14/__pycache__/this.cpython-314.pyc +0 -0
  148. package/python/lib/python3.14/__pycache__/threading.cpython-314.pyc +0 -0
  149. package/python/lib/python3.14/__pycache__/timeit.cpython-314.pyc +0 -0
  150. package/python/lib/python3.14/__pycache__/token.cpython-314.pyc +0 -0
  151. package/python/lib/python3.14/__pycache__/tokenize.cpython-314.pyc +0 -0
  152. package/python/lib/python3.14/__pycache__/trace.cpython-314.pyc +0 -0
  153. package/python/lib/python3.14/__pycache__/traceback.cpython-314.pyc +0 -0
  154. package/python/lib/python3.14/__pycache__/tracemalloc.cpython-314.pyc +0 -0
  155. package/python/lib/python3.14/__pycache__/tty.cpython-314.pyc +0 -0
  156. package/python/lib/python3.14/__pycache__/types.cpython-314.pyc +0 -0
  157. package/python/lib/python3.14/__pycache__/typing.cpython-314.pyc +0 -0
  158. package/python/lib/python3.14/__pycache__/uuid.cpython-314.pyc +0 -0
  159. package/python/lib/python3.14/__pycache__/warnings.cpython-314.pyc +0 -0
  160. package/python/lib/python3.14/__pycache__/wave.cpython-314.pyc +0 -0
  161. package/python/lib/python3.14/__pycache__/weakref.cpython-314.pyc +0 -0
  162. package/python/lib/python3.14/__pycache__/webbrowser.cpython-314.pyc +0 -0
  163. package/python/lib/python3.14/__pycache__/zipapp.cpython-314.pyc +0 -0
  164. package/python/lib/python3.14/__pycache__/zipimport.cpython-314.pyc +0 -0
  165. package/python/lib/python3.14/_aix_support.py +108 -0
  166. package/python/lib/python3.14/_android_support.py +192 -0
  167. package/python/lib/python3.14/_apple_support.py +66 -0
  168. package/python/lib/python3.14/_ast_unparse.py +1161 -0
  169. package/python/lib/python3.14/_collections_abc.py +1172 -0
  170. package/python/lib/python3.14/_colorize.py +355 -0
  171. package/python/lib/python3.14/_compat_pickle.py +251 -0
  172. package/python/lib/python3.14/_ios_support.py +74 -0
  173. package/python/lib/python3.14/_markupbase.py +396 -0
  174. package/python/lib/python3.14/_opcode_metadata.py +371 -0
  175. package/python/lib/python3.14/_osx_support.py +579 -0
  176. package/python/lib/python3.14/_py_abc.py +152 -0
  177. package/python/lib/python3.14/_py_warnings.py +869 -0
  178. package/python/lib/python3.14/_pydatetime.py +2734 -0
  179. package/python/lib/python3.14/_pydecimal.py +6503 -0
  180. package/python/lib/python3.14/_pyio.py +2764 -0
  181. package/python/lib/python3.14/_pylong.py +729 -0
  182. package/python/lib/python3.14/_pyrepl/__init__.py +19 -0
  183. package/python/lib/python3.14/_pyrepl/__main__.py +10 -0
  184. package/python/lib/python3.14/_pyrepl/__pycache__/__init__.cpython-314.pyc +0 -0
  185. package/python/lib/python3.14/_pyrepl/__pycache__/__main__.cpython-314.pyc +0 -0
  186. package/python/lib/python3.14/_pyrepl/__pycache__/_module_completer.cpython-314.pyc +0 -0
  187. package/python/lib/python3.14/_pyrepl/__pycache__/_threading_handler.cpython-314.pyc +0 -0
  188. package/python/lib/python3.14/_pyrepl/__pycache__/base_eventqueue.cpython-314.pyc +0 -0
  189. package/python/lib/python3.14/_pyrepl/__pycache__/commands.cpython-314.pyc +0 -0
  190. package/python/lib/python3.14/_pyrepl/__pycache__/completing_reader.cpython-314.pyc +0 -0
  191. package/python/lib/python3.14/_pyrepl/__pycache__/console.cpython-314.pyc +0 -0
  192. package/python/lib/python3.14/_pyrepl/__pycache__/fancy_termios.cpython-314.pyc +0 -0
  193. package/python/lib/python3.14/_pyrepl/__pycache__/historical_reader.cpython-314.pyc +0 -0
  194. package/python/lib/python3.14/_pyrepl/__pycache__/input.cpython-314.pyc +0 -0
  195. package/python/lib/python3.14/_pyrepl/__pycache__/keymap.cpython-314.pyc +0 -0
  196. package/python/lib/python3.14/_pyrepl/__pycache__/main.cpython-314.pyc +0 -0
  197. package/python/lib/python3.14/_pyrepl/__pycache__/pager.cpython-314.pyc +0 -0
  198. package/python/lib/python3.14/_pyrepl/__pycache__/reader.cpython-314.pyc +0 -0
  199. package/python/lib/python3.14/_pyrepl/__pycache__/readline.cpython-314.pyc +0 -0
  200. package/python/lib/python3.14/_pyrepl/__pycache__/simple_interact.cpython-314.pyc +0 -0
  201. package/python/lib/python3.14/_pyrepl/__pycache__/terminfo.cpython-314.pyc +0 -0
  202. package/python/lib/python3.14/_pyrepl/__pycache__/trace.cpython-314.pyc +0 -0
  203. package/python/lib/python3.14/_pyrepl/__pycache__/types.cpython-314.pyc +0 -0
  204. package/python/lib/python3.14/_pyrepl/__pycache__/unix_console.cpython-314.pyc +0 -0
  205. package/python/lib/python3.14/_pyrepl/__pycache__/unix_eventqueue.cpython-314.pyc +0 -0
  206. package/python/lib/python3.14/_pyrepl/__pycache__/utils.cpython-314.pyc +0 -0
  207. package/python/lib/python3.14/_pyrepl/__pycache__/windows_console.cpython-314.pyc +0 -0
  208. package/python/lib/python3.14/_pyrepl/__pycache__/windows_eventqueue.cpython-314.pyc +0 -0
  209. package/python/lib/python3.14/_pyrepl/_module_completer.py +426 -0
  210. package/python/lib/python3.14/_pyrepl/_threading_handler.py +74 -0
  211. package/python/lib/python3.14/_pyrepl/base_eventqueue.py +110 -0
  212. package/python/lib/python3.14/_pyrepl/commands.py +505 -0
  213. package/python/lib/python3.14/_pyrepl/completing_reader.py +299 -0
  214. package/python/lib/python3.14/_pyrepl/console.py +229 -0
  215. package/python/lib/python3.14/_pyrepl/fancy_termios.py +82 -0
  216. package/python/lib/python3.14/_pyrepl/historical_reader.py +424 -0
  217. package/python/lib/python3.14/_pyrepl/input.py +114 -0
  218. package/python/lib/python3.14/_pyrepl/keymap.py +213 -0
  219. package/python/lib/python3.14/_pyrepl/main.py +58 -0
  220. package/python/lib/python3.14/_pyrepl/mypy.ini +25 -0
  221. package/python/lib/python3.14/_pyrepl/pager.py +175 -0
  222. package/python/lib/python3.14/_pyrepl/reader.py +773 -0
  223. package/python/lib/python3.14/_pyrepl/readline.py +621 -0
  224. package/python/lib/python3.14/_pyrepl/simple_interact.py +186 -0
  225. package/python/lib/python3.14/_pyrepl/terminfo.py +488 -0
  226. package/python/lib/python3.14/_pyrepl/trace.py +34 -0
  227. package/python/lib/python3.14/_pyrepl/types.py +10 -0
  228. package/python/lib/python3.14/_pyrepl/unix_console.py +860 -0
  229. package/python/lib/python3.14/_pyrepl/unix_eventqueue.py +77 -0
  230. package/python/lib/python3.14/_pyrepl/utils.py +391 -0
  231. package/python/lib/python3.14/_pyrepl/windows_console.py +735 -0
  232. package/python/lib/python3.14/_pyrepl/windows_eventqueue.py +42 -0
  233. package/python/lib/python3.14/_sitebuiltins.py +91 -0
  234. package/python/lib/python3.14/_strptime.py +822 -0
  235. package/python/lib/python3.14/_sysconfig_vars__linux_aarch64-linux-musl.json +1166 -0
  236. package/python/lib/python3.14/_sysconfigdata__linux_aarch64-linux-musl.py +1152 -0
  237. package/python/lib/python3.14/_threading_local.py +120 -0
  238. package/python/lib/python3.14/_weakrefset.py +147 -0
  239. package/python/lib/python3.14/abc.py +188 -0
  240. package/python/lib/python3.14/annotationlib.py +1205 -0
  241. package/python/lib/python3.14/antigravity.py +17 -0
  242. package/python/lib/python3.14/argparse.py +2789 -0
  243. package/python/lib/python3.14/ast.py +680 -0
  244. package/python/lib/python3.14/asyncio/__init__.py +74 -0
  245. package/python/lib/python3.14/asyncio/__main__.py +248 -0
  246. package/python/lib/python3.14/asyncio/__pycache__/__init__.cpython-314.pyc +0 -0
  247. package/python/lib/python3.14/asyncio/__pycache__/__main__.cpython-314.pyc +0 -0
  248. package/python/lib/python3.14/asyncio/__pycache__/base_events.cpython-314.pyc +0 -0
  249. package/python/lib/python3.14/asyncio/__pycache__/base_futures.cpython-314.pyc +0 -0
  250. package/python/lib/python3.14/asyncio/__pycache__/base_subprocess.cpython-314.pyc +0 -0
  251. package/python/lib/python3.14/asyncio/__pycache__/base_tasks.cpython-314.pyc +0 -0
  252. package/python/lib/python3.14/asyncio/__pycache__/constants.cpython-314.pyc +0 -0
  253. package/python/lib/python3.14/asyncio/__pycache__/coroutines.cpython-314.pyc +0 -0
  254. package/python/lib/python3.14/asyncio/__pycache__/events.cpython-314.pyc +0 -0
  255. package/python/lib/python3.14/asyncio/__pycache__/exceptions.cpython-314.pyc +0 -0
  256. package/python/lib/python3.14/asyncio/__pycache__/format_helpers.cpython-314.pyc +0 -0
  257. package/python/lib/python3.14/asyncio/__pycache__/futures.cpython-314.pyc +0 -0
  258. package/python/lib/python3.14/asyncio/__pycache__/graph.cpython-314.pyc +0 -0
  259. package/python/lib/python3.14/asyncio/__pycache__/locks.cpython-314.pyc +0 -0
  260. package/python/lib/python3.14/asyncio/__pycache__/log.cpython-314.pyc +0 -0
  261. package/python/lib/python3.14/asyncio/__pycache__/mixins.cpython-314.pyc +0 -0
  262. package/python/lib/python3.14/asyncio/__pycache__/proactor_events.cpython-314.pyc +0 -0
  263. package/python/lib/python3.14/asyncio/__pycache__/protocols.cpython-314.pyc +0 -0
  264. package/python/lib/python3.14/asyncio/__pycache__/queues.cpython-314.pyc +0 -0
  265. package/python/lib/python3.14/asyncio/__pycache__/runners.cpython-314.pyc +0 -0
  266. package/python/lib/python3.14/asyncio/__pycache__/selector_events.cpython-314.pyc +0 -0
  267. package/python/lib/python3.14/asyncio/__pycache__/sslproto.cpython-314.pyc +0 -0
  268. package/python/lib/python3.14/asyncio/__pycache__/staggered.cpython-314.pyc +0 -0
  269. package/python/lib/python3.14/asyncio/__pycache__/streams.cpython-314.pyc +0 -0
  270. package/python/lib/python3.14/asyncio/__pycache__/subprocess.cpython-314.pyc +0 -0
  271. package/python/lib/python3.14/asyncio/__pycache__/taskgroups.cpython-314.pyc +0 -0
  272. package/python/lib/python3.14/asyncio/__pycache__/tasks.cpython-314.pyc +0 -0
  273. package/python/lib/python3.14/asyncio/__pycache__/threads.cpython-314.pyc +0 -0
  274. package/python/lib/python3.14/asyncio/__pycache__/timeouts.cpython-314.pyc +0 -0
  275. package/python/lib/python3.14/asyncio/__pycache__/tools.cpython-314.pyc +0 -0
  276. package/python/lib/python3.14/asyncio/__pycache__/transports.cpython-314.pyc +0 -0
  277. package/python/lib/python3.14/asyncio/__pycache__/trsock.cpython-314.pyc +0 -0
  278. package/python/lib/python3.14/asyncio/__pycache__/unix_events.cpython-314.pyc +0 -0
  279. package/python/lib/python3.14/asyncio/__pycache__/windows_events.cpython-314.pyc +0 -0
  280. package/python/lib/python3.14/asyncio/__pycache__/windows_utils.cpython-314.pyc +0 -0
  281. package/python/lib/python3.14/asyncio/base_events.py +2089 -0
  282. package/python/lib/python3.14/asyncio/base_futures.py +67 -0
  283. package/python/lib/python3.14/asyncio/base_subprocess.py +327 -0
  284. package/python/lib/python3.14/asyncio/base_tasks.py +94 -0
  285. package/python/lib/python3.14/asyncio/constants.py +41 -0
  286. package/python/lib/python3.14/asyncio/coroutines.py +118 -0
  287. package/python/lib/python3.14/asyncio/events.py +881 -0
  288. package/python/lib/python3.14/asyncio/exceptions.py +62 -0
  289. package/python/lib/python3.14/asyncio/format_helpers.py +84 -0
  290. package/python/lib/python3.14/asyncio/futures.py +481 -0
  291. package/python/lib/python3.14/asyncio/graph.py +279 -0
  292. package/python/lib/python3.14/asyncio/locks.py +617 -0
  293. package/python/lib/python3.14/asyncio/log.py +7 -0
  294. package/python/lib/python3.14/asyncio/mixins.py +21 -0
  295. package/python/lib/python3.14/asyncio/proactor_events.py +923 -0
  296. package/python/lib/python3.14/asyncio/protocols.py +216 -0
  297. package/python/lib/python3.14/asyncio/queues.py +309 -0
  298. package/python/lib/python3.14/asyncio/runners.py +226 -0
  299. package/python/lib/python3.14/asyncio/selector_events.py +1337 -0
  300. package/python/lib/python3.14/asyncio/sslproto.py +937 -0
  301. package/python/lib/python3.14/asyncio/staggered.py +179 -0
  302. package/python/lib/python3.14/asyncio/streams.py +804 -0
  303. package/python/lib/python3.14/asyncio/subprocess.py +229 -0
  304. package/python/lib/python3.14/asyncio/taskgroups.py +280 -0
  305. package/python/lib/python3.14/asyncio/tasks.py +1145 -0
  306. package/python/lib/python3.14/asyncio/threads.py +26 -0
  307. package/python/lib/python3.14/asyncio/timeouts.py +183 -0
  308. package/python/lib/python3.14/asyncio/tools.py +278 -0
  309. package/python/lib/python3.14/asyncio/transports.py +337 -0
  310. package/python/lib/python3.14/asyncio/trsock.py +98 -0
  311. package/python/lib/python3.14/asyncio/unix_events.py +1031 -0
  312. package/python/lib/python3.14/asyncio/windows_events.py +906 -0
  313. package/python/lib/python3.14/asyncio/windows_utils.py +181 -0
  314. package/python/lib/python3.14/base64.py +625 -0
  315. package/python/lib/python3.14/bdb.py +1214 -0
  316. package/python/lib/python3.14/bisect.py +118 -0
  317. package/python/lib/python3.14/build-details.json +58 -0
  318. package/python/lib/python3.14/bz2.py +352 -0
  319. package/python/lib/python3.14/cProfile.py +207 -0
  320. package/python/lib/python3.14/calendar.py +926 -0
  321. package/python/lib/python3.14/cmd.py +414 -0
  322. package/python/lib/python3.14/code.py +396 -0
  323. package/python/lib/python3.14/codecs.py +1125 -0
  324. package/python/lib/python3.14/codeop.py +154 -0
  325. package/python/lib/python3.14/collections/__init__.py +1612 -0
  326. package/python/lib/python3.14/collections/__pycache__/__init__.cpython-314.pyc +0 -0
  327. package/python/lib/python3.14/colorsys.py +166 -0
  328. package/python/lib/python3.14/compileall.py +472 -0
  329. package/python/lib/python3.14/compression/__init__.py +0 -0
  330. package/python/lib/python3.14/compression/__pycache__/__init__.cpython-314.pyc +0 -0
  331. package/python/lib/python3.14/compression/__pycache__/bz2.cpython-314.pyc +0 -0
  332. package/python/lib/python3.14/compression/__pycache__/gzip.cpython-314.pyc +0 -0
  333. package/python/lib/python3.14/compression/__pycache__/lzma.cpython-314.pyc +0 -0
  334. package/python/lib/python3.14/compression/__pycache__/zlib.cpython-314.pyc +0 -0
  335. package/python/lib/python3.14/compression/_common/__init__.py +0 -0
  336. package/python/lib/python3.14/compression/_common/__pycache__/__init__.cpython-314.pyc +0 -0
  337. package/python/lib/python3.14/compression/_common/__pycache__/_streams.cpython-314.pyc +0 -0
  338. package/python/lib/python3.14/compression/_common/_streams.py +162 -0
  339. package/python/lib/python3.14/compression/bz2.py +5 -0
  340. package/python/lib/python3.14/compression/gzip.py +5 -0
  341. package/python/lib/python3.14/compression/lzma.py +5 -0
  342. package/python/lib/python3.14/compression/zlib.py +5 -0
  343. package/python/lib/python3.14/compression/zstd/__init__.py +244 -0
  344. package/python/lib/python3.14/compression/zstd/__pycache__/__init__.cpython-314.pyc +0 -0
  345. package/python/lib/python3.14/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc +0 -0
  346. package/python/lib/python3.14/compression/zstd/_zstdfile.py +347 -0
  347. package/python/lib/python3.14/concurrent/__init__.py +1 -0
  348. package/python/lib/python3.14/concurrent/__pycache__/__init__.cpython-314.pyc +0 -0
  349. package/python/lib/python3.14/concurrent/futures/__init__.py +65 -0
  350. package/python/lib/python3.14/concurrent/futures/__pycache__/__init__.cpython-314.pyc +0 -0
  351. package/python/lib/python3.14/concurrent/futures/__pycache__/_base.cpython-314.pyc +0 -0
  352. package/python/lib/python3.14/concurrent/futures/__pycache__/interpreter.cpython-314.pyc +0 -0
  353. package/python/lib/python3.14/concurrent/futures/__pycache__/process.cpython-314.pyc +0 -0
  354. package/python/lib/python3.14/concurrent/futures/__pycache__/thread.cpython-314.pyc +0 -0
  355. package/python/lib/python3.14/concurrent/futures/_base.py +680 -0
  356. package/python/lib/python3.14/concurrent/futures/interpreter.py +123 -0
  357. package/python/lib/python3.14/concurrent/futures/process.py +1047 -0
  358. package/python/lib/python3.14/concurrent/futures/thread.py +274 -0
  359. package/python/lib/python3.14/concurrent/interpreters/__init__.py +253 -0
  360. package/python/lib/python3.14/concurrent/interpreters/__pycache__/__init__.cpython-314.pyc +0 -0
  361. package/python/lib/python3.14/concurrent/interpreters/__pycache__/_crossinterp.cpython-314.pyc +0 -0
  362. package/python/lib/python3.14/concurrent/interpreters/__pycache__/_queues.cpython-314.pyc +0 -0
  363. package/python/lib/python3.14/concurrent/interpreters/_crossinterp.py +107 -0
  364. package/python/lib/python3.14/concurrent/interpreters/_queues.py +290 -0
  365. package/python/lib/python3.14/configparser.py +1426 -0
  366. package/python/lib/python3.14/contextlib.py +814 -0
  367. package/python/lib/python3.14/contextvars.py +8 -0
  368. package/python/lib/python3.14/copy.py +286 -0
  369. package/python/lib/python3.14/copyreg.py +222 -0
  370. package/python/lib/python3.14/csv.py +527 -0
  371. package/python/lib/python3.14/ctypes/__init__.py +686 -0
  372. package/python/lib/python3.14/ctypes/__pycache__/__init__.cpython-314.pyc +0 -0
  373. package/python/lib/python3.14/ctypes/__pycache__/_aix.cpython-314.pyc +0 -0
  374. package/python/lib/python3.14/ctypes/__pycache__/_endian.cpython-314.pyc +0 -0
  375. package/python/lib/python3.14/ctypes/__pycache__/_layout.cpython-314.pyc +0 -0
  376. package/python/lib/python3.14/ctypes/__pycache__/util.cpython-314.pyc +0 -0
  377. package/python/lib/python3.14/ctypes/__pycache__/wintypes.cpython-314.pyc +0 -0
  378. package/python/lib/python3.14/ctypes/_aix.py +327 -0
  379. package/python/lib/python3.14/ctypes/_endian.py +78 -0
  380. package/python/lib/python3.14/ctypes/_layout.py +330 -0
  381. package/python/lib/python3.14/ctypes/macholib/README.ctypes +7 -0
  382. package/python/lib/python3.14/ctypes/macholib/__init__.py +9 -0
  383. package/python/lib/python3.14/ctypes/macholib/__pycache__/__init__.cpython-314.pyc +0 -0
  384. package/python/lib/python3.14/ctypes/macholib/__pycache__/dyld.cpython-314.pyc +0 -0
  385. package/python/lib/python3.14/ctypes/macholib/__pycache__/dylib.cpython-314.pyc +0 -0
  386. package/python/lib/python3.14/ctypes/macholib/__pycache__/framework.cpython-314.pyc +0 -0
  387. package/python/lib/python3.14/ctypes/macholib/dyld.py +165 -0
  388. package/python/lib/python3.14/ctypes/macholib/dylib.py +42 -0
  389. package/python/lib/python3.14/ctypes/macholib/fetch_macholib +2 -0
  390. package/python/lib/python3.14/ctypes/macholib/fetch_macholib.bat +1 -0
  391. package/python/lib/python3.14/ctypes/macholib/framework.py +42 -0
  392. package/python/lib/python3.14/ctypes/util.py +502 -0
  393. package/python/lib/python3.14/ctypes/wintypes.py +210 -0
  394. package/python/lib/python3.14/curses/__init__.py +101 -0
  395. package/python/lib/python3.14/curses/__pycache__/__init__.cpython-314.pyc +0 -0
  396. package/python/lib/python3.14/curses/__pycache__/ascii.cpython-314.pyc +0 -0
  397. package/python/lib/python3.14/curses/__pycache__/has_key.cpython-314.pyc +0 -0
  398. package/python/lib/python3.14/curses/__pycache__/panel.cpython-314.pyc +0 -0
  399. package/python/lib/python3.14/curses/__pycache__/textpad.cpython-314.pyc +0 -0
  400. package/python/lib/python3.14/curses/ascii.py +99 -0
  401. package/python/lib/python3.14/curses/has_key.py +192 -0
  402. package/python/lib/python3.14/curses/panel.py +6 -0
  403. package/python/lib/python3.14/curses/textpad.py +236 -0
  404. package/python/lib/python3.14/dataclasses.py +1813 -0
  405. package/python/lib/python3.14/datetime.py +13 -0
  406. package/python/lib/python3.14/dbm/__init__.py +194 -0
  407. package/python/lib/python3.14/dbm/__pycache__/__init__.cpython-314.pyc +0 -0
  408. package/python/lib/python3.14/dbm/__pycache__/dumb.cpython-314.pyc +0 -0
  409. package/python/lib/python3.14/dbm/__pycache__/gnu.cpython-314.pyc +0 -0
  410. package/python/lib/python3.14/dbm/__pycache__/ndbm.cpython-314.pyc +0 -0
  411. package/python/lib/python3.14/dbm/__pycache__/sqlite3.cpython-314.pyc +0 -0
  412. package/python/lib/python3.14/dbm/dumb.py +319 -0
  413. package/python/lib/python3.14/dbm/gnu.py +3 -0
  414. package/python/lib/python3.14/dbm/ndbm.py +3 -0
  415. package/python/lib/python3.14/dbm/sqlite3.py +144 -0
  416. package/python/lib/python3.14/decimal.py +109 -0
  417. package/python/lib/python3.14/difflib.py +2066 -0
  418. package/python/lib/python3.14/dis.py +1157 -0
  419. package/python/lib/python3.14/doctest.py +2922 -0
  420. package/python/lib/python3.14/email/__init__.py +61 -0
  421. package/python/lib/python3.14/email/__pycache__/__init__.cpython-314.pyc +0 -0
  422. package/python/lib/python3.14/email/__pycache__/_encoded_words.cpython-314.pyc +0 -0
  423. package/python/lib/python3.14/email/__pycache__/_header_value_parser.cpython-314.pyc +0 -0
  424. package/python/lib/python3.14/email/__pycache__/_parseaddr.cpython-314.pyc +0 -0
  425. package/python/lib/python3.14/email/__pycache__/_policybase.cpython-314.pyc +0 -0
  426. package/python/lib/python3.14/email/__pycache__/base64mime.cpython-314.pyc +0 -0
  427. package/python/lib/python3.14/email/__pycache__/charset.cpython-314.pyc +0 -0
  428. package/python/lib/python3.14/email/__pycache__/contentmanager.cpython-314.pyc +0 -0
  429. package/python/lib/python3.14/email/__pycache__/encoders.cpython-314.pyc +0 -0
  430. package/python/lib/python3.14/email/__pycache__/errors.cpython-314.pyc +0 -0
  431. package/python/lib/python3.14/email/__pycache__/feedparser.cpython-314.pyc +0 -0
  432. package/python/lib/python3.14/email/__pycache__/generator.cpython-314.pyc +0 -0
  433. package/python/lib/python3.14/email/__pycache__/header.cpython-314.pyc +0 -0
  434. package/python/lib/python3.14/email/__pycache__/headerregistry.cpython-314.pyc +0 -0
  435. package/python/lib/python3.14/email/__pycache__/iterators.cpython-314.pyc +0 -0
  436. package/python/lib/python3.14/email/__pycache__/message.cpython-314.pyc +0 -0
  437. package/python/lib/python3.14/email/__pycache__/parser.cpython-314.pyc +0 -0
  438. package/python/lib/python3.14/email/__pycache__/policy.cpython-314.pyc +0 -0
  439. package/python/lib/python3.14/email/__pycache__/quoprimime.cpython-314.pyc +0 -0
  440. package/python/lib/python3.14/email/__pycache__/utils.cpython-314.pyc +0 -0
  441. package/python/lib/python3.14/email/_encoded_words.py +233 -0
  442. package/python/lib/python3.14/email/_header_value_parser.py +3164 -0
  443. package/python/lib/python3.14/email/_parseaddr.py +563 -0
  444. package/python/lib/python3.14/email/_policybase.py +392 -0
  445. package/python/lib/python3.14/email/architecture.rst +216 -0
  446. package/python/lib/python3.14/email/base64mime.py +115 -0
  447. package/python/lib/python3.14/email/charset.py +396 -0
  448. package/python/lib/python3.14/email/contentmanager.py +254 -0
  449. package/python/lib/python3.14/email/encoders.py +65 -0
  450. package/python/lib/python3.14/email/errors.py +117 -0
  451. package/python/lib/python3.14/email/feedparser.py +536 -0
  452. package/python/lib/python3.14/email/generator.py +530 -0
  453. package/python/lib/python3.14/email/header.py +582 -0
  454. package/python/lib/python3.14/email/headerregistry.py +618 -0
  455. package/python/lib/python3.14/email/iterators.py +68 -0
  456. package/python/lib/python3.14/email/message.py +1217 -0
  457. package/python/lib/python3.14/email/mime/__init__.py +0 -0
  458. package/python/lib/python3.14/email/mime/__pycache__/__init__.cpython-314.pyc +0 -0
  459. package/python/lib/python3.14/email/mime/__pycache__/application.cpython-314.pyc +0 -0
  460. package/python/lib/python3.14/email/mime/__pycache__/audio.cpython-314.pyc +0 -0
  461. package/python/lib/python3.14/email/mime/__pycache__/base.cpython-314.pyc +0 -0
  462. package/python/lib/python3.14/email/mime/__pycache__/image.cpython-314.pyc +0 -0
  463. package/python/lib/python3.14/email/mime/__pycache__/message.cpython-314.pyc +0 -0
  464. package/python/lib/python3.14/email/mime/__pycache__/multipart.cpython-314.pyc +0 -0
  465. package/python/lib/python3.14/email/mime/__pycache__/nonmultipart.cpython-314.pyc +0 -0
  466. package/python/lib/python3.14/email/mime/__pycache__/text.cpython-314.pyc +0 -0
  467. package/python/lib/python3.14/email/mime/application.py +37 -0
  468. package/python/lib/python3.14/email/mime/audio.py +97 -0
  469. package/python/lib/python3.14/email/mime/base.py +29 -0
  470. package/python/lib/python3.14/email/mime/image.py +152 -0
  471. package/python/lib/python3.14/email/mime/message.py +33 -0
  472. package/python/lib/python3.14/email/mime/multipart.py +47 -0
  473. package/python/lib/python3.14/email/mime/nonmultipart.py +21 -0
  474. package/python/lib/python3.14/email/mime/text.py +40 -0
  475. package/python/lib/python3.14/email/parser.py +127 -0
  476. package/python/lib/python3.14/email/policy.py +239 -0
  477. package/python/lib/python3.14/email/quoprimime.py +300 -0
  478. package/python/lib/python3.14/email/utils.py +489 -0
  479. package/python/lib/python3.14/encodings/__init__.py +182 -0
  480. package/python/lib/python3.14/encodings/__pycache__/__init__.cpython-314.pyc +0 -0
  481. package/python/lib/python3.14/encodings/__pycache__/_win_cp_codecs.cpython-314.pyc +0 -0
  482. package/python/lib/python3.14/encodings/__pycache__/aliases.cpython-314.pyc +0 -0
  483. package/python/lib/python3.14/encodings/__pycache__/ascii.cpython-314.pyc +0 -0
  484. package/python/lib/python3.14/encodings/__pycache__/base64_codec.cpython-314.pyc +0 -0
  485. package/python/lib/python3.14/encodings/__pycache__/big5.cpython-314.pyc +0 -0
  486. package/python/lib/python3.14/encodings/__pycache__/big5hkscs.cpython-314.pyc +0 -0
  487. package/python/lib/python3.14/encodings/__pycache__/bz2_codec.cpython-314.pyc +0 -0
  488. package/python/lib/python3.14/encodings/__pycache__/charmap.cpython-314.pyc +0 -0
  489. package/python/lib/python3.14/encodings/__pycache__/cp037.cpython-314.pyc +0 -0
  490. package/python/lib/python3.14/encodings/__pycache__/cp1006.cpython-314.pyc +0 -0
  491. package/python/lib/python3.14/encodings/__pycache__/cp1026.cpython-314.pyc +0 -0
  492. package/python/lib/python3.14/encodings/__pycache__/cp1125.cpython-314.pyc +0 -0
  493. package/python/lib/python3.14/encodings/__pycache__/cp1140.cpython-314.pyc +0 -0
  494. package/python/lib/python3.14/encodings/__pycache__/cp1250.cpython-314.pyc +0 -0
  495. package/python/lib/python3.14/encodings/__pycache__/cp1251.cpython-314.pyc +0 -0
  496. package/python/lib/python3.14/encodings/__pycache__/cp1252.cpython-314.pyc +0 -0
  497. package/python/lib/python3.14/encodings/__pycache__/cp1253.cpython-314.pyc +0 -0
  498. package/python/lib/python3.14/encodings/__pycache__/cp1254.cpython-314.pyc +0 -0
  499. package/python/lib/python3.14/encodings/__pycache__/cp1255.cpython-314.pyc +0 -0
  500. package/python/lib/python3.14/encodings/__pycache__/cp1256.cpython-314.pyc +0 -0
  501. package/python/lib/python3.14/encodings/__pycache__/cp1257.cpython-314.pyc +0 -0
  502. package/python/lib/python3.14/encodings/__pycache__/cp1258.cpython-314.pyc +0 -0
  503. package/python/lib/python3.14/encodings/__pycache__/cp273.cpython-314.pyc +0 -0
  504. package/python/lib/python3.14/encodings/__pycache__/cp424.cpython-314.pyc +0 -0
  505. package/python/lib/python3.14/encodings/__pycache__/cp437.cpython-314.pyc +0 -0
  506. package/python/lib/python3.14/encodings/__pycache__/cp500.cpython-314.pyc +0 -0
  507. package/python/lib/python3.14/encodings/__pycache__/cp720.cpython-314.pyc +0 -0
  508. package/python/lib/python3.14/encodings/__pycache__/cp737.cpython-314.pyc +0 -0
  509. package/python/lib/python3.14/encodings/__pycache__/cp775.cpython-314.pyc +0 -0
  510. package/python/lib/python3.14/encodings/__pycache__/cp850.cpython-314.pyc +0 -0
  511. package/python/lib/python3.14/encodings/__pycache__/cp852.cpython-314.pyc +0 -0
  512. package/python/lib/python3.14/encodings/__pycache__/cp855.cpython-314.pyc +0 -0
  513. package/python/lib/python3.14/encodings/__pycache__/cp856.cpython-314.pyc +0 -0
  514. package/python/lib/python3.14/encodings/__pycache__/cp857.cpython-314.pyc +0 -0
  515. package/python/lib/python3.14/encodings/__pycache__/cp858.cpython-314.pyc +0 -0
  516. package/python/lib/python3.14/encodings/__pycache__/cp860.cpython-314.pyc +0 -0
  517. package/python/lib/python3.14/encodings/__pycache__/cp861.cpython-314.pyc +0 -0
  518. package/python/lib/python3.14/encodings/__pycache__/cp862.cpython-314.pyc +0 -0
  519. package/python/lib/python3.14/encodings/__pycache__/cp863.cpython-314.pyc +0 -0
  520. package/python/lib/python3.14/encodings/__pycache__/cp864.cpython-314.pyc +0 -0
  521. package/python/lib/python3.14/encodings/__pycache__/cp865.cpython-314.pyc +0 -0
  522. package/python/lib/python3.14/encodings/__pycache__/cp866.cpython-314.pyc +0 -0
  523. package/python/lib/python3.14/encodings/__pycache__/cp869.cpython-314.pyc +0 -0
  524. package/python/lib/python3.14/encodings/__pycache__/cp874.cpython-314.pyc +0 -0
  525. package/python/lib/python3.14/encodings/__pycache__/cp875.cpython-314.pyc +0 -0
  526. package/python/lib/python3.14/encodings/__pycache__/cp932.cpython-314.pyc +0 -0
  527. package/python/lib/python3.14/encodings/__pycache__/cp949.cpython-314.pyc +0 -0
  528. package/python/lib/python3.14/encodings/__pycache__/cp950.cpython-314.pyc +0 -0
  529. package/python/lib/python3.14/encodings/__pycache__/euc_jis_2004.cpython-314.pyc +0 -0
  530. package/python/lib/python3.14/encodings/__pycache__/euc_jisx0213.cpython-314.pyc +0 -0
  531. package/python/lib/python3.14/encodings/__pycache__/euc_jp.cpython-314.pyc +0 -0
  532. package/python/lib/python3.14/encodings/__pycache__/euc_kr.cpython-314.pyc +0 -0
  533. package/python/lib/python3.14/encodings/__pycache__/gb18030.cpython-314.pyc +0 -0
  534. package/python/lib/python3.14/encodings/__pycache__/gb2312.cpython-314.pyc +0 -0
  535. package/python/lib/python3.14/encodings/__pycache__/gbk.cpython-314.pyc +0 -0
  536. package/python/lib/python3.14/encodings/__pycache__/hex_codec.cpython-314.pyc +0 -0
  537. package/python/lib/python3.14/encodings/__pycache__/hp_roman8.cpython-314.pyc +0 -0
  538. package/python/lib/python3.14/encodings/__pycache__/hz.cpython-314.pyc +0 -0
  539. package/python/lib/python3.14/encodings/__pycache__/idna.cpython-314.pyc +0 -0
  540. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp.cpython-314.pyc +0 -0
  541. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp_1.cpython-314.pyc +0 -0
  542. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp_2.cpython-314.pyc +0 -0
  543. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp_2004.cpython-314.pyc +0 -0
  544. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp_3.cpython-314.pyc +0 -0
  545. package/python/lib/python3.14/encodings/__pycache__/iso2022_jp_ext.cpython-314.pyc +0 -0
  546. package/python/lib/python3.14/encodings/__pycache__/iso2022_kr.cpython-314.pyc +0 -0
  547. package/python/lib/python3.14/encodings/__pycache__/iso8859_1.cpython-314.pyc +0 -0
  548. package/python/lib/python3.14/encodings/__pycache__/iso8859_10.cpython-314.pyc +0 -0
  549. package/python/lib/python3.14/encodings/__pycache__/iso8859_11.cpython-314.pyc +0 -0
  550. package/python/lib/python3.14/encodings/__pycache__/iso8859_13.cpython-314.pyc +0 -0
  551. package/python/lib/python3.14/encodings/__pycache__/iso8859_14.cpython-314.pyc +0 -0
  552. package/python/lib/python3.14/encodings/__pycache__/iso8859_15.cpython-314.pyc +0 -0
  553. package/python/lib/python3.14/encodings/__pycache__/iso8859_16.cpython-314.pyc +0 -0
  554. package/python/lib/python3.14/encodings/__pycache__/iso8859_2.cpython-314.pyc +0 -0
  555. package/python/lib/python3.14/encodings/__pycache__/iso8859_3.cpython-314.pyc +0 -0
  556. package/python/lib/python3.14/encodings/__pycache__/iso8859_4.cpython-314.pyc +0 -0
  557. package/python/lib/python3.14/encodings/__pycache__/iso8859_5.cpython-314.pyc +0 -0
  558. package/python/lib/python3.14/encodings/__pycache__/iso8859_6.cpython-314.pyc +0 -0
  559. package/python/lib/python3.14/encodings/__pycache__/iso8859_7.cpython-314.pyc +0 -0
  560. package/python/lib/python3.14/encodings/__pycache__/iso8859_8.cpython-314.pyc +0 -0
  561. package/python/lib/python3.14/encodings/__pycache__/iso8859_9.cpython-314.pyc +0 -0
  562. package/python/lib/python3.14/encodings/__pycache__/johab.cpython-314.pyc +0 -0
  563. package/python/lib/python3.14/encodings/__pycache__/koi8_r.cpython-314.pyc +0 -0
  564. package/python/lib/python3.14/encodings/__pycache__/koi8_t.cpython-314.pyc +0 -0
  565. package/python/lib/python3.14/encodings/__pycache__/koi8_u.cpython-314.pyc +0 -0
  566. package/python/lib/python3.14/encodings/__pycache__/kz1048.cpython-314.pyc +0 -0
  567. package/python/lib/python3.14/encodings/__pycache__/latin_1.cpython-314.pyc +0 -0
  568. package/python/lib/python3.14/encodings/__pycache__/mac_arabic.cpython-314.pyc +0 -0
  569. package/python/lib/python3.14/encodings/__pycache__/mac_croatian.cpython-314.pyc +0 -0
  570. package/python/lib/python3.14/encodings/__pycache__/mac_cyrillic.cpython-314.pyc +0 -0
  571. package/python/lib/python3.14/encodings/__pycache__/mac_farsi.cpython-314.pyc +0 -0
  572. package/python/lib/python3.14/encodings/__pycache__/mac_greek.cpython-314.pyc +0 -0
  573. package/python/lib/python3.14/encodings/__pycache__/mac_iceland.cpython-314.pyc +0 -0
  574. package/python/lib/python3.14/encodings/__pycache__/mac_latin2.cpython-314.pyc +0 -0
  575. package/python/lib/python3.14/encodings/__pycache__/mac_roman.cpython-314.pyc +0 -0
  576. package/python/lib/python3.14/encodings/__pycache__/mac_romanian.cpython-314.pyc +0 -0
  577. package/python/lib/python3.14/encodings/__pycache__/mac_turkish.cpython-314.pyc +0 -0
  578. package/python/lib/python3.14/encodings/__pycache__/mbcs.cpython-314.pyc +0 -0
  579. package/python/lib/python3.14/encodings/__pycache__/oem.cpython-314.pyc +0 -0
  580. package/python/lib/python3.14/encodings/__pycache__/palmos.cpython-314.pyc +0 -0
  581. package/python/lib/python3.14/encodings/__pycache__/ptcp154.cpython-314.pyc +0 -0
  582. package/python/lib/python3.14/encodings/__pycache__/punycode.cpython-314.pyc +0 -0
  583. package/python/lib/python3.14/encodings/__pycache__/quopri_codec.cpython-314.pyc +0 -0
  584. package/python/lib/python3.14/encodings/__pycache__/raw_unicode_escape.cpython-314.pyc +0 -0
  585. package/python/lib/python3.14/encodings/__pycache__/rot_13.cpython-314.pyc +0 -0
  586. package/python/lib/python3.14/encodings/__pycache__/shift_jis.cpython-314.pyc +0 -0
  587. package/python/lib/python3.14/encodings/__pycache__/shift_jis_2004.cpython-314.pyc +0 -0
  588. package/python/lib/python3.14/encodings/__pycache__/shift_jisx0213.cpython-314.pyc +0 -0
  589. package/python/lib/python3.14/encodings/__pycache__/tis_620.cpython-314.pyc +0 -0
  590. package/python/lib/python3.14/encodings/__pycache__/undefined.cpython-314.pyc +0 -0
  591. package/python/lib/python3.14/encodings/__pycache__/unicode_escape.cpython-314.pyc +0 -0
  592. package/python/lib/python3.14/encodings/__pycache__/utf_16.cpython-314.pyc +0 -0
  593. package/python/lib/python3.14/encodings/__pycache__/utf_16_be.cpython-314.pyc +0 -0
  594. package/python/lib/python3.14/encodings/__pycache__/utf_16_le.cpython-314.pyc +0 -0
  595. package/python/lib/python3.14/encodings/__pycache__/utf_32.cpython-314.pyc +0 -0
  596. package/python/lib/python3.14/encodings/__pycache__/utf_32_be.cpython-314.pyc +0 -0
  597. package/python/lib/python3.14/encodings/__pycache__/utf_32_le.cpython-314.pyc +0 -0
  598. package/python/lib/python3.14/encodings/__pycache__/utf_7.cpython-314.pyc +0 -0
  599. package/python/lib/python3.14/encodings/__pycache__/utf_8.cpython-314.pyc +0 -0
  600. package/python/lib/python3.14/encodings/__pycache__/utf_8_sig.cpython-314.pyc +0 -0
  601. package/python/lib/python3.14/encodings/__pycache__/uu_codec.cpython-314.pyc +0 -0
  602. package/python/lib/python3.14/encodings/__pycache__/zlib_codec.cpython-314.pyc +0 -0
  603. package/python/lib/python3.14/encodings/_win_cp_codecs.py +36 -0
  604. package/python/lib/python3.14/encodings/aliases.py +568 -0
  605. package/python/lib/python3.14/encodings/ascii.py +50 -0
  606. package/python/lib/python3.14/encodings/base64_codec.py +55 -0
  607. package/python/lib/python3.14/encodings/big5.py +39 -0
  608. package/python/lib/python3.14/encodings/big5hkscs.py +39 -0
  609. package/python/lib/python3.14/encodings/bz2_codec.py +78 -0
  610. package/python/lib/python3.14/encodings/charmap.py +69 -0
  611. package/python/lib/python3.14/encodings/cp037.py +307 -0
  612. package/python/lib/python3.14/encodings/cp1006.py +307 -0
  613. package/python/lib/python3.14/encodings/cp1026.py +307 -0
  614. package/python/lib/python3.14/encodings/cp1125.py +698 -0
  615. package/python/lib/python3.14/encodings/cp1140.py +307 -0
  616. package/python/lib/python3.14/encodings/cp1250.py +307 -0
  617. package/python/lib/python3.14/encodings/cp1251.py +307 -0
  618. package/python/lib/python3.14/encodings/cp1252.py +307 -0
  619. package/python/lib/python3.14/encodings/cp1253.py +307 -0
  620. package/python/lib/python3.14/encodings/cp1254.py +307 -0
  621. package/python/lib/python3.14/encodings/cp1255.py +307 -0
  622. package/python/lib/python3.14/encodings/cp1256.py +307 -0
  623. package/python/lib/python3.14/encodings/cp1257.py +307 -0
  624. package/python/lib/python3.14/encodings/cp1258.py +307 -0
  625. package/python/lib/python3.14/encodings/cp273.py +307 -0
  626. package/python/lib/python3.14/encodings/cp424.py +307 -0
  627. package/python/lib/python3.14/encodings/cp437.py +698 -0
  628. package/python/lib/python3.14/encodings/cp500.py +307 -0
  629. package/python/lib/python3.14/encodings/cp720.py +309 -0
  630. package/python/lib/python3.14/encodings/cp737.py +698 -0
  631. package/python/lib/python3.14/encodings/cp775.py +697 -0
  632. package/python/lib/python3.14/encodings/cp850.py +698 -0
  633. package/python/lib/python3.14/encodings/cp852.py +698 -0
  634. package/python/lib/python3.14/encodings/cp855.py +698 -0
  635. package/python/lib/python3.14/encodings/cp856.py +307 -0
  636. package/python/lib/python3.14/encodings/cp857.py +694 -0
  637. package/python/lib/python3.14/encodings/cp858.py +698 -0
  638. package/python/lib/python3.14/encodings/cp860.py +698 -0
  639. package/python/lib/python3.14/encodings/cp861.py +698 -0
  640. package/python/lib/python3.14/encodings/cp862.py +698 -0
  641. package/python/lib/python3.14/encodings/cp863.py +698 -0
  642. package/python/lib/python3.14/encodings/cp864.py +690 -0
  643. package/python/lib/python3.14/encodings/cp865.py +698 -0
  644. package/python/lib/python3.14/encodings/cp866.py +698 -0
  645. package/python/lib/python3.14/encodings/cp869.py +689 -0
  646. package/python/lib/python3.14/encodings/cp874.py +307 -0
  647. package/python/lib/python3.14/encodings/cp875.py +307 -0
  648. package/python/lib/python3.14/encodings/cp932.py +39 -0
  649. package/python/lib/python3.14/encodings/cp949.py +39 -0
  650. package/python/lib/python3.14/encodings/cp950.py +39 -0
  651. package/python/lib/python3.14/encodings/euc_jis_2004.py +39 -0
  652. package/python/lib/python3.14/encodings/euc_jisx0213.py +39 -0
  653. package/python/lib/python3.14/encodings/euc_jp.py +39 -0
  654. package/python/lib/python3.14/encodings/euc_kr.py +39 -0
  655. package/python/lib/python3.14/encodings/gb18030.py +39 -0
  656. package/python/lib/python3.14/encodings/gb2312.py +39 -0
  657. package/python/lib/python3.14/encodings/gbk.py +39 -0
  658. package/python/lib/python3.14/encodings/hex_codec.py +55 -0
  659. package/python/lib/python3.14/encodings/hp_roman8.py +314 -0
  660. package/python/lib/python3.14/encodings/hz.py +39 -0
  661. package/python/lib/python3.14/encodings/idna.py +387 -0
  662. package/python/lib/python3.14/encodings/iso2022_jp.py +39 -0
  663. package/python/lib/python3.14/encodings/iso2022_jp_1.py +39 -0
  664. package/python/lib/python3.14/encodings/iso2022_jp_2.py +39 -0
  665. package/python/lib/python3.14/encodings/iso2022_jp_2004.py +39 -0
  666. package/python/lib/python3.14/encodings/iso2022_jp_3.py +39 -0
  667. package/python/lib/python3.14/encodings/iso2022_jp_ext.py +39 -0
  668. package/python/lib/python3.14/encodings/iso2022_kr.py +39 -0
  669. package/python/lib/python3.14/encodings/iso8859_1.py +307 -0
  670. package/python/lib/python3.14/encodings/iso8859_10.py +307 -0
  671. package/python/lib/python3.14/encodings/iso8859_11.py +307 -0
  672. package/python/lib/python3.14/encodings/iso8859_13.py +307 -0
  673. package/python/lib/python3.14/encodings/iso8859_14.py +307 -0
  674. package/python/lib/python3.14/encodings/iso8859_15.py +307 -0
  675. package/python/lib/python3.14/encodings/iso8859_16.py +307 -0
  676. package/python/lib/python3.14/encodings/iso8859_2.py +307 -0
  677. package/python/lib/python3.14/encodings/iso8859_3.py +307 -0
  678. package/python/lib/python3.14/encodings/iso8859_4.py +307 -0
  679. package/python/lib/python3.14/encodings/iso8859_5.py +307 -0
  680. package/python/lib/python3.14/encodings/iso8859_6.py +307 -0
  681. package/python/lib/python3.14/encodings/iso8859_7.py +307 -0
  682. package/python/lib/python3.14/encodings/iso8859_8.py +307 -0
  683. package/python/lib/python3.14/encodings/iso8859_9.py +307 -0
  684. package/python/lib/python3.14/encodings/johab.py +39 -0
  685. package/python/lib/python3.14/encodings/koi8_r.py +307 -0
  686. package/python/lib/python3.14/encodings/koi8_t.py +308 -0
  687. package/python/lib/python3.14/encodings/koi8_u.py +307 -0
  688. package/python/lib/python3.14/encodings/kz1048.py +307 -0
  689. package/python/lib/python3.14/encodings/latin_1.py +50 -0
  690. package/python/lib/python3.14/encodings/mac_arabic.py +698 -0
  691. package/python/lib/python3.14/encodings/mac_croatian.py +307 -0
  692. package/python/lib/python3.14/encodings/mac_cyrillic.py +307 -0
  693. package/python/lib/python3.14/encodings/mac_farsi.py +307 -0
  694. package/python/lib/python3.14/encodings/mac_greek.py +307 -0
  695. package/python/lib/python3.14/encodings/mac_iceland.py +307 -0
  696. package/python/lib/python3.14/encodings/mac_latin2.py +312 -0
  697. package/python/lib/python3.14/encodings/mac_roman.py +307 -0
  698. package/python/lib/python3.14/encodings/mac_romanian.py +307 -0
  699. package/python/lib/python3.14/encodings/mac_turkish.py +307 -0
  700. package/python/lib/python3.14/encodings/mbcs.py +47 -0
  701. package/python/lib/python3.14/encodings/oem.py +41 -0
  702. package/python/lib/python3.14/encodings/palmos.py +308 -0
  703. package/python/lib/python3.14/encodings/ptcp154.py +312 -0
  704. package/python/lib/python3.14/encodings/punycode.py +253 -0
  705. package/python/lib/python3.14/encodings/quopri_codec.py +56 -0
  706. package/python/lib/python3.14/encodings/raw_unicode_escape.py +46 -0
  707. package/python/lib/python3.14/encodings/rot_13.py +113 -0
  708. package/python/lib/python3.14/encodings/shift_jis.py +39 -0
  709. package/python/lib/python3.14/encodings/shift_jis_2004.py +39 -0
  710. package/python/lib/python3.14/encodings/shift_jisx0213.py +39 -0
  711. package/python/lib/python3.14/encodings/tis_620.py +307 -0
  712. package/python/lib/python3.14/encodings/undefined.py +49 -0
  713. package/python/lib/python3.14/encodings/unicode_escape.py +46 -0
  714. package/python/lib/python3.14/encodings/utf_16.py +155 -0
  715. package/python/lib/python3.14/encodings/utf_16_be.py +42 -0
  716. package/python/lib/python3.14/encodings/utf_16_le.py +42 -0
  717. package/python/lib/python3.14/encodings/utf_32.py +150 -0
  718. package/python/lib/python3.14/encodings/utf_32_be.py +37 -0
  719. package/python/lib/python3.14/encodings/utf_32_le.py +37 -0
  720. package/python/lib/python3.14/encodings/utf_7.py +38 -0
  721. package/python/lib/python3.14/encodings/utf_8.py +42 -0
  722. package/python/lib/python3.14/encodings/utf_8_sig.py +130 -0
  723. package/python/lib/python3.14/encodings/uu_codec.py +103 -0
  724. package/python/lib/python3.14/encodings/zlib_codec.py +77 -0
  725. package/python/lib/python3.14/enum.py +2169 -0
  726. package/python/lib/python3.14/filecmp.py +320 -0
  727. package/python/lib/python3.14/fileinput.py +442 -0
  728. package/python/lib/python3.14/fnmatch.py +209 -0
  729. package/python/lib/python3.14/fractions.py +1078 -0
  730. package/python/lib/python3.14/ftplib.py +975 -0
  731. package/python/lib/python3.14/functools.py +1165 -0
  732. package/python/lib/python3.14/genericpath.py +200 -0
  733. package/python/lib/python3.14/getopt.py +232 -0
  734. package/python/lib/python3.14/getpass.py +256 -0
  735. package/python/lib/python3.14/gettext.py +660 -0
  736. package/python/lib/python3.14/glob.py +574 -0
  737. package/python/lib/python3.14/graphlib.py +254 -0
  738. package/python/lib/python3.14/gzip.py +724 -0
  739. package/python/lib/python3.14/hashlib.py +255 -0
  740. package/python/lib/python3.14/heapq.py +611 -0
  741. package/python/lib/python3.14/hmac.py +279 -0
  742. package/python/lib/python3.14/html/__init__.py +132 -0
  743. package/python/lib/python3.14/html/__pycache__/__init__.cpython-314.pyc +0 -0
  744. package/python/lib/python3.14/html/__pycache__/entities.cpython-314.pyc +0 -0
  745. package/python/lib/python3.14/html/__pycache__/parser.cpython-314.pyc +0 -0
  746. package/python/lib/python3.14/html/entities.py +2513 -0
  747. package/python/lib/python3.14/html/parser.py +583 -0
  748. package/python/lib/python3.14/http/__init__.py +213 -0
  749. package/python/lib/python3.14/http/__pycache__/__init__.cpython-314.pyc +0 -0
  750. package/python/lib/python3.14/http/__pycache__/client.cpython-314.pyc +0 -0
  751. package/python/lib/python3.14/http/__pycache__/cookiejar.cpython-314.pyc +0 -0
  752. package/python/lib/python3.14/http/__pycache__/cookies.cpython-314.pyc +0 -0
  753. package/python/lib/python3.14/http/__pycache__/server.cpython-314.pyc +0 -0
  754. package/python/lib/python3.14/http/client.py +1598 -0
  755. package/python/lib/python3.14/http/cookiejar.py +2135 -0
  756. package/python/lib/python3.14/http/cookies.py +637 -0
  757. package/python/lib/python3.14/http/server.py +1445 -0
  758. package/python/lib/python3.14/imaplib.py +2090 -0
  759. package/python/lib/python3.14/importlib/__init__.py +136 -0
  760. package/python/lib/python3.14/importlib/__pycache__/__init__.cpython-314.pyc +0 -0
  761. package/python/lib/python3.14/importlib/__pycache__/_abc.cpython-314.pyc +0 -0
  762. package/python/lib/python3.14/importlib/__pycache__/_bootstrap.cpython-314.pyc +0 -0
  763. package/python/lib/python3.14/importlib/__pycache__/_bootstrap_external.cpython-314.pyc +0 -0
  764. package/python/lib/python3.14/importlib/__pycache__/abc.cpython-314.pyc +0 -0
  765. package/python/lib/python3.14/importlib/__pycache__/machinery.cpython-314.pyc +0 -0
  766. package/python/lib/python3.14/importlib/__pycache__/readers.cpython-314.pyc +0 -0
  767. package/python/lib/python3.14/importlib/__pycache__/simple.cpython-314.pyc +0 -0
  768. package/python/lib/python3.14/importlib/__pycache__/util.cpython-314.pyc +0 -0
  769. package/python/lib/python3.14/importlib/_abc.py +39 -0
  770. package/python/lib/python3.14/importlib/_bootstrap.py +1570 -0
  771. package/python/lib/python3.14/importlib/_bootstrap_external.py +1566 -0
  772. package/python/lib/python3.14/importlib/abc.py +234 -0
  773. package/python/lib/python3.14/importlib/machinery.py +50 -0
  774. package/python/lib/python3.14/importlib/metadata/__init__.py +1093 -0
  775. package/python/lib/python3.14/importlib/metadata/__pycache__/__init__.cpython-314.pyc +0 -0
  776. package/python/lib/python3.14/importlib/metadata/__pycache__/_adapters.cpython-314.pyc +0 -0
  777. package/python/lib/python3.14/importlib/metadata/__pycache__/_collections.cpython-314.pyc +0 -0
  778. package/python/lib/python3.14/importlib/metadata/__pycache__/_functools.cpython-314.pyc +0 -0
  779. package/python/lib/python3.14/importlib/metadata/__pycache__/_itertools.cpython-314.pyc +0 -0
  780. package/python/lib/python3.14/importlib/metadata/__pycache__/_meta.cpython-314.pyc +0 -0
  781. package/python/lib/python3.14/importlib/metadata/__pycache__/_text.cpython-314.pyc +0 -0
  782. package/python/lib/python3.14/importlib/metadata/__pycache__/diagnose.cpython-314.pyc +0 -0
  783. package/python/lib/python3.14/importlib/metadata/_adapters.py +89 -0
  784. package/python/lib/python3.14/importlib/metadata/_collections.py +30 -0
  785. package/python/lib/python3.14/importlib/metadata/_functools.py +104 -0
  786. package/python/lib/python3.14/importlib/metadata/_itertools.py +73 -0
  787. package/python/lib/python3.14/importlib/metadata/_meta.py +67 -0
  788. package/python/lib/python3.14/importlib/metadata/_text.py +99 -0
  789. package/python/lib/python3.14/importlib/metadata/diagnose.py +21 -0
  790. package/python/lib/python3.14/importlib/readers.py +12 -0
  791. package/python/lib/python3.14/importlib/resources/__init__.py +43 -0
  792. package/python/lib/python3.14/importlib/resources/__pycache__/__init__.cpython-314.pyc +0 -0
  793. package/python/lib/python3.14/importlib/resources/__pycache__/_adapters.cpython-314.pyc +0 -0
  794. package/python/lib/python3.14/importlib/resources/__pycache__/_common.cpython-314.pyc +0 -0
  795. package/python/lib/python3.14/importlib/resources/__pycache__/_functional.cpython-314.pyc +0 -0
  796. package/python/lib/python3.14/importlib/resources/__pycache__/_itertools.cpython-314.pyc +0 -0
  797. package/python/lib/python3.14/importlib/resources/__pycache__/abc.cpython-314.pyc +0 -0
  798. package/python/lib/python3.14/importlib/resources/__pycache__/readers.cpython-314.pyc +0 -0
  799. package/python/lib/python3.14/importlib/resources/__pycache__/simple.cpython-314.pyc +0 -0
  800. package/python/lib/python3.14/importlib/resources/_adapters.py +168 -0
  801. package/python/lib/python3.14/importlib/resources/_common.py +211 -0
  802. package/python/lib/python3.14/importlib/resources/_functional.py +81 -0
  803. package/python/lib/python3.14/importlib/resources/_itertools.py +38 -0
  804. package/python/lib/python3.14/importlib/resources/abc.py +173 -0
  805. package/python/lib/python3.14/importlib/resources/readers.py +203 -0
  806. package/python/lib/python3.14/importlib/resources/simple.py +106 -0
  807. package/python/lib/python3.14/importlib/simple.py +14 -0
  808. package/python/lib/python3.14/importlib/util.py +279 -0
  809. package/python/lib/python3.14/inspect.py +3425 -0
  810. package/python/lib/python3.14/io.py +150 -0
  811. package/python/lib/python3.14/ipaddress.py +2421 -0
  812. package/python/lib/python3.14/json/__init__.py +365 -0
  813. package/python/lib/python3.14/json/__main__.py +20 -0
  814. package/python/lib/python3.14/json/__pycache__/__init__.cpython-314.pyc +0 -0
  815. package/python/lib/python3.14/json/__pycache__/__main__.cpython-314.pyc +0 -0
  816. package/python/lib/python3.14/json/__pycache__/decoder.cpython-314.pyc +0 -0
  817. package/python/lib/python3.14/json/__pycache__/encoder.cpython-314.pyc +0 -0
  818. package/python/lib/python3.14/json/__pycache__/scanner.cpython-314.pyc +0 -0
  819. package/python/lib/python3.14/json/__pycache__/tool.cpython-314.pyc +0 -0
  820. package/python/lib/python3.14/json/decoder.py +364 -0
  821. package/python/lib/python3.14/json/encoder.py +461 -0
  822. package/python/lib/python3.14/json/scanner.py +73 -0
  823. package/python/lib/python3.14/json/tool.py +122 -0
  824. package/python/lib/python3.14/keyword.py +64 -0
  825. package/python/lib/python3.14/lib-dynload/.empty +0 -0
  826. package/python/lib/python3.14/lib-dynload/_dbm.cpython-314-aarch64-linux-musl.so +0 -0
  827. package/python/lib/python3.14/linecache.py +302 -0
  828. package/python/lib/python3.14/locale.py +1992 -0
  829. package/python/lib/python3.14/logging/__init__.py +2335 -0
  830. package/python/lib/python3.14/logging/__pycache__/__init__.cpython-314.pyc +0 -0
  831. package/python/lib/python3.14/logging/__pycache__/config.cpython-314.pyc +0 -0
  832. package/python/lib/python3.14/logging/__pycache__/handlers.cpython-314.pyc +0 -0
  833. package/python/lib/python3.14/logging/config.py +1093 -0
  834. package/python/lib/python3.14/logging/handlers.py +1654 -0
  835. package/python/lib/python3.14/lzma.py +364 -0
  836. package/python/lib/python3.14/mailbox.py +2220 -0
  837. package/python/lib/python3.14/mimetypes.py +755 -0
  838. package/python/lib/python3.14/modulefinder.py +671 -0
  839. package/python/lib/python3.14/multiprocessing/__init__.py +37 -0
  840. package/python/lib/python3.14/multiprocessing/__pycache__/__init__.cpython-314.pyc +0 -0
  841. package/python/lib/python3.14/multiprocessing/__pycache__/connection.cpython-314.pyc +0 -0
  842. package/python/lib/python3.14/multiprocessing/__pycache__/context.cpython-314.pyc +0 -0
  843. package/python/lib/python3.14/multiprocessing/__pycache__/forkserver.cpython-314.pyc +0 -0
  844. package/python/lib/python3.14/multiprocessing/__pycache__/heap.cpython-314.pyc +0 -0
  845. package/python/lib/python3.14/multiprocessing/__pycache__/managers.cpython-314.pyc +0 -0
  846. package/python/lib/python3.14/multiprocessing/__pycache__/pool.cpython-314.pyc +0 -0
  847. package/python/lib/python3.14/multiprocessing/__pycache__/popen_fork.cpython-314.pyc +0 -0
  848. package/python/lib/python3.14/multiprocessing/__pycache__/popen_forkserver.cpython-314.pyc +0 -0
  849. package/python/lib/python3.14/multiprocessing/__pycache__/popen_spawn_posix.cpython-314.pyc +0 -0
  850. package/python/lib/python3.14/multiprocessing/__pycache__/popen_spawn_win32.cpython-314.pyc +0 -0
  851. package/python/lib/python3.14/multiprocessing/__pycache__/process.cpython-314.pyc +0 -0
  852. package/python/lib/python3.14/multiprocessing/__pycache__/queues.cpython-314.pyc +0 -0
  853. package/python/lib/python3.14/multiprocessing/__pycache__/reduction.cpython-314.pyc +0 -0
  854. package/python/lib/python3.14/multiprocessing/__pycache__/resource_sharer.cpython-314.pyc +0 -0
  855. package/python/lib/python3.14/multiprocessing/__pycache__/resource_tracker.cpython-314.pyc +0 -0
  856. package/python/lib/python3.14/multiprocessing/__pycache__/shared_memory.cpython-314.pyc +0 -0
  857. package/python/lib/python3.14/multiprocessing/__pycache__/sharedctypes.cpython-314.pyc +0 -0
  858. package/python/lib/python3.14/multiprocessing/__pycache__/spawn.cpython-314.pyc +0 -0
  859. package/python/lib/python3.14/multiprocessing/__pycache__/synchronize.cpython-314.pyc +0 -0
  860. package/python/lib/python3.14/multiprocessing/__pycache__/util.cpython-314.pyc +0 -0
  861. package/python/lib/python3.14/multiprocessing/connection.py +1233 -0
  862. package/python/lib/python3.14/multiprocessing/context.py +405 -0
  863. package/python/lib/python3.14/multiprocessing/dummy/__init__.py +126 -0
  864. package/python/lib/python3.14/multiprocessing/dummy/__pycache__/__init__.cpython-314.pyc +0 -0
  865. package/python/lib/python3.14/multiprocessing/dummy/__pycache__/connection.cpython-314.pyc +0 -0
  866. package/python/lib/python3.14/multiprocessing/dummy/connection.py +75 -0
  867. package/python/lib/python3.14/multiprocessing/forkserver.py +429 -0
  868. package/python/lib/python3.14/multiprocessing/heap.py +337 -0
  869. package/python/lib/python3.14/multiprocessing/managers.py +1438 -0
  870. package/python/lib/python3.14/multiprocessing/pool.py +957 -0
  871. package/python/lib/python3.14/multiprocessing/popen_fork.py +100 -0
  872. package/python/lib/python3.14/multiprocessing/popen_forkserver.py +74 -0
  873. package/python/lib/python3.14/multiprocessing/popen_spawn_posix.py +76 -0
  874. package/python/lib/python3.14/multiprocessing/popen_spawn_win32.py +147 -0
  875. package/python/lib/python3.14/multiprocessing/process.py +443 -0
  876. package/python/lib/python3.14/multiprocessing/queues.py +399 -0
  877. package/python/lib/python3.14/multiprocessing/reduction.py +281 -0
  878. package/python/lib/python3.14/multiprocessing/resource_sharer.py +154 -0
  879. package/python/lib/python3.14/multiprocessing/resource_tracker.py +495 -0
  880. package/python/lib/python3.14/multiprocessing/shared_memory.py +544 -0
  881. package/python/lib/python3.14/multiprocessing/sharedctypes.py +240 -0
  882. package/python/lib/python3.14/multiprocessing/spawn.py +307 -0
  883. package/python/lib/python3.14/multiprocessing/synchronize.py +411 -0
  884. package/python/lib/python3.14/multiprocessing/util.py +619 -0
  885. package/python/lib/python3.14/netrc.py +200 -0
  886. package/python/lib/python3.14/ntpath.py +889 -0
  887. package/python/lib/python3.14/nturl2path.py +82 -0
  888. package/python/lib/python3.14/numbers.py +427 -0
  889. package/python/lib/python3.14/opcode.py +122 -0
  890. package/python/lib/python3.14/operator.py +475 -0
  891. package/python/lib/python3.14/optparse.py +1664 -0
  892. package/python/lib/python3.14/os.py +1191 -0
  893. package/python/lib/python3.14/pathlib/__init__.py +1307 -0
  894. package/python/lib/python3.14/pathlib/__pycache__/__init__.cpython-314.pyc +0 -0
  895. package/python/lib/python3.14/pathlib/__pycache__/_local.cpython-314.pyc +0 -0
  896. package/python/lib/python3.14/pathlib/__pycache__/_os.cpython-314.pyc +0 -0
  897. package/python/lib/python3.14/pathlib/__pycache__/types.cpython-314.pyc +0 -0
  898. package/python/lib/python3.14/pathlib/_local.py +12 -0
  899. package/python/lib/python3.14/pathlib/_os.py +530 -0
  900. package/python/lib/python3.14/pathlib/types.py +430 -0
  901. package/python/lib/python3.14/pdb.py +3682 -0
  902. package/python/lib/python3.14/pickle.py +1925 -0
  903. package/python/lib/python3.14/pickletools.py +2887 -0
  904. package/python/lib/python3.14/pkgutil.py +474 -0
  905. package/python/lib/python3.14/platform.py +1515 -0
  906. package/python/lib/python3.14/plistlib.py +956 -0
  907. package/python/lib/python3.14/poplib.py +477 -0
  908. package/python/lib/python3.14/posixpath.py +592 -0
  909. package/python/lib/python3.14/pprint.py +675 -0
  910. package/python/lib/python3.14/profile.py +615 -0
  911. package/python/lib/python3.14/pstats.py +777 -0
  912. package/python/lib/python3.14/pty.py +182 -0
  913. package/python/lib/python3.14/py_compile.py +212 -0
  914. package/python/lib/python3.14/pyclbr.py +314 -0
  915. package/python/lib/python3.14/pydoc.py +2890 -0
  916. package/python/lib/python3.14/queue.py +385 -0
  917. package/python/lib/python3.14/quopri.py +235 -0
  918. package/python/lib/python3.14/random.py +1087 -0
  919. package/python/lib/python3.14/re/__init__.py +428 -0
  920. package/python/lib/python3.14/re/__pycache__/__init__.cpython-314.pyc +0 -0
  921. package/python/lib/python3.14/re/__pycache__/_casefix.cpython-314.pyc +0 -0
  922. package/python/lib/python3.14/re/__pycache__/_compiler.cpython-314.pyc +0 -0
  923. package/python/lib/python3.14/re/__pycache__/_constants.cpython-314.pyc +0 -0
  924. package/python/lib/python3.14/re/__pycache__/_parser.cpython-314.pyc +0 -0
  925. package/python/lib/python3.14/re/_casefix.py +106 -0
  926. package/python/lib/python3.14/re/_compiler.py +782 -0
  927. package/python/lib/python3.14/re/_constants.py +224 -0
  928. package/python/lib/python3.14/re/_parser.py +1066 -0
  929. package/python/lib/python3.14/reprlib.py +230 -0
  930. package/python/lib/python3.14/rlcompleter.py +222 -0
  931. package/python/lib/python3.14/runpy.py +326 -0
  932. package/python/lib/python3.14/sched.py +167 -0
  933. package/python/lib/python3.14/secrets.py +71 -0
  934. package/python/lib/python3.14/selectors.py +603 -0
  935. package/python/lib/python3.14/shelve.py +250 -0
  936. package/python/lib/python3.14/shlex.py +351 -0
  937. package/python/lib/python3.14/shutil.py +1660 -0
  938. package/python/lib/python3.14/signal.py +94 -0
  939. package/python/lib/python3.14/site-packages/_yaml/__init__.py +33 -0
  940. package/python/lib/python3.14/site-packages/_yaml/__pycache__/__init__.cpython-314.pyc +0 -0
  941. package/python/lib/python3.14/site-packages/click/__init__.py +144 -0
  942. package/python/lib/python3.14/site-packages/click/__pycache__/__init__.cpython-314.pyc +0 -0
  943. package/python/lib/python3.14/site-packages/click/__pycache__/_compat.cpython-314.pyc +0 -0
  944. package/python/lib/python3.14/site-packages/click/__pycache__/_termui_impl.cpython-314.pyc +0 -0
  945. package/python/lib/python3.14/site-packages/click/__pycache__/_textwrap.cpython-314.pyc +0 -0
  946. package/python/lib/python3.14/site-packages/click/__pycache__/_utils.cpython-314.pyc +0 -0
  947. package/python/lib/python3.14/site-packages/click/__pycache__/_winconsole.cpython-314.pyc +0 -0
  948. package/python/lib/python3.14/site-packages/click/__pycache__/core.cpython-314.pyc +0 -0
  949. package/python/lib/python3.14/site-packages/click/__pycache__/decorators.cpython-314.pyc +0 -0
  950. package/python/lib/python3.14/site-packages/click/__pycache__/exceptions.cpython-314.pyc +0 -0
  951. package/python/lib/python3.14/site-packages/click/__pycache__/formatting.cpython-314.pyc +0 -0
  952. package/python/lib/python3.14/site-packages/click/__pycache__/globals.cpython-314.pyc +0 -0
  953. package/python/lib/python3.14/site-packages/click/__pycache__/parser.cpython-314.pyc +0 -0
  954. package/python/lib/python3.14/site-packages/click/__pycache__/shell_completion.cpython-314.pyc +0 -0
  955. package/python/lib/python3.14/site-packages/click/__pycache__/termui.cpython-314.pyc +0 -0
  956. package/python/lib/python3.14/site-packages/click/__pycache__/testing.cpython-314.pyc +0 -0
  957. package/python/lib/python3.14/site-packages/click/__pycache__/types.cpython-314.pyc +0 -0
  958. package/python/lib/python3.14/site-packages/click/__pycache__/utils.cpython-314.pyc +0 -0
  959. package/python/lib/python3.14/site-packages/click/_compat.py +590 -0
  960. package/python/lib/python3.14/site-packages/click/_termui_impl.py +970 -0
  961. package/python/lib/python3.14/site-packages/click/_textwrap.py +188 -0
  962. package/python/lib/python3.14/site-packages/click/_utils.py +45 -0
  963. package/python/lib/python3.14/site-packages/click/_winconsole.py +292 -0
  964. package/python/lib/python3.14/site-packages/click/core.py +3825 -0
  965. package/python/lib/python3.14/site-packages/click/decorators.py +625 -0
  966. package/python/lib/python3.14/site-packages/click/exceptions.py +378 -0
  967. package/python/lib/python3.14/site-packages/click/formatting.py +320 -0
  968. package/python/lib/python3.14/site-packages/click/globals.py +67 -0
  969. package/python/lib/python3.14/site-packages/click/parser.py +533 -0
  970. package/python/lib/python3.14/site-packages/click/py.typed +0 -0
  971. package/python/lib/python3.14/site-packages/click/shell_completion.py +796 -0
  972. package/python/lib/python3.14/site-packages/click/termui.py +1024 -0
  973. package/python/lib/python3.14/site-packages/click/testing.py +796 -0
  974. package/python/lib/python3.14/site-packages/click/types.py +1437 -0
  975. package/python/lib/python3.14/site-packages/click/utils.py +676 -0
  976. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/INSTALLER +1 -0
  977. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/METADATA +83 -0
  978. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/RECORD +24 -0
  979. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/REQUESTED +0 -0
  980. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/WHEEL +4 -0
  981. package/python/lib/python3.14/site-packages/click-8.5.1.dist-info/licenses/LICENSE.txt +28 -0
  982. package/python/lib/python3.14/site-packages/cssbeautifier/__init__.py +51 -0
  983. package/python/lib/python3.14/site-packages/cssbeautifier/__pycache__/__init__.cpython-314.pyc +0 -0
  984. package/python/lib/python3.14/site-packages/cssbeautifier/__pycache__/__version__.cpython-314.pyc +0 -0
  985. package/python/lib/python3.14/site-packages/cssbeautifier/__pycache__/_main.cpython-314.pyc +0 -0
  986. package/python/lib/python3.14/site-packages/cssbeautifier/__version__.py +1 -0
  987. package/python/lib/python3.14/site-packages/cssbeautifier/_main.py +208 -0
  988. package/python/lib/python3.14/site-packages/cssbeautifier/css/__init__.py +1 -0
  989. package/python/lib/python3.14/site-packages/cssbeautifier/css/__pycache__/__init__.cpython-314.pyc +0 -0
  990. package/python/lib/python3.14/site-packages/cssbeautifier/css/__pycache__/beautifier.cpython-314.pyc +0 -0
  991. package/python/lib/python3.14/site-packages/cssbeautifier/css/__pycache__/options.cpython-314.pyc +0 -0
  992. package/python/lib/python3.14/site-packages/cssbeautifier/css/beautifier.py +559 -0
  993. package/python/lib/python3.14/site-packages/cssbeautifier/css/options.py +60 -0
  994. package/python/lib/python3.14/site-packages/cssbeautifier/tests/__init__.py +1 -0
  995. package/python/lib/python3.14/site-packages/cssbeautifier/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  996. package/python/lib/python3.14/site-packages/cssbeautifier/tests/generated/__init__.py +1 -0
  997. package/python/lib/python3.14/site-packages/cssbeautifier/tests/generated/__pycache__/__init__.cpython-314.pyc +0 -0
  998. package/python/lib/python3.14/site-packages/cssbeautifier/tests/generated/__pycache__/tests.cpython-314.pyc +0 -0
  999. package/python/lib/python3.14/site-packages/cssbeautifier/tests/generated/tests.py +11333 -0
  1000. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/INSTALLER +1 -0
  1001. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/METADATA +19 -0
  1002. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/RECORD +51 -0
  1003. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/REQUESTED +0 -0
  1004. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/WHEEL +5 -0
  1005. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/entry_points.txt +2 -0
  1006. package/python/lib/python3.14/site-packages/cssbeautifier-2.0.3.dist-info/top_level.txt +1 -0
  1007. package/python/lib/python3.14/site-packages/djlint/__init__.py +27 -0
  1008. package/python/lib/python3.14/site-packages/djlint/__main__.py +8 -0
  1009. package/python/lib/python3.14/site-packages/djlint/__pycache__/__init__.cpython-314.pyc +0 -0
  1010. package/python/lib/python3.14/site-packages/djlint/__pycache__/__main__.cpython-314.pyc +0 -0
  1011. package/python/lib/python3.14/site-packages/djlint/__pycache__/_cli.cpython-314.pyc +0 -0
  1012. package/python/lib/python3.14/site-packages/djlint/__pycache__/api.cpython-314.pyc +0 -0
  1013. package/python/lib/python3.14/site-packages/djlint/__pycache__/const.cpython-314.pyc +0 -0
  1014. package/python/lib/python3.14/site-packages/djlint/__pycache__/github_output.cpython-314.pyc +0 -0
  1015. package/python/lib/python3.14/site-packages/djlint/__pycache__/helpers.cpython-314.pyc +0 -0
  1016. package/python/lib/python3.14/site-packages/djlint/__pycache__/lint.cpython-314.pyc +0 -0
  1017. package/python/lib/python3.14/site-packages/djlint/__pycache__/output.cpython-314.pyc +0 -0
  1018. package/python/lib/python3.14/site-packages/djlint/__pycache__/reformat.cpython-314.pyc +0 -0
  1019. package/python/lib/python3.14/site-packages/djlint/__pycache__/sarif_output.cpython-314.pyc +0 -0
  1020. package/python/lib/python3.14/site-packages/djlint/__pycache__/server.cpython-314.pyc +0 -0
  1021. package/python/lib/python3.14/site-packages/djlint/__pycache__/settings.cpython-314.pyc +0 -0
  1022. package/python/lib/python3.14/site-packages/djlint/__pycache__/src.cpython-314.pyc +0 -0
  1023. package/python/lib/python3.14/site-packages/djlint/_cli.cpython-314-aarch64-linux-musl.so +0 -0
  1024. package/python/lib/python3.14/site-packages/djlint/_cli.py +1006 -0
  1025. package/python/lib/python3.14/site-packages/djlint/api.cpython-314-aarch64-linux-musl.so +0 -0
  1026. package/python/lib/python3.14/site-packages/djlint/api.py +106 -0
  1027. package/python/lib/python3.14/site-packages/djlint/const.cpython-314-aarch64-linux-musl.so +0 -0
  1028. package/python/lib/python3.14/site-packages/djlint/const.py +506 -0
  1029. package/python/lib/python3.14/site-packages/djlint/formatter/__init__.cpython-314-aarch64-linux-musl.so +0 -0
  1030. package/python/lib/python3.14/site-packages/djlint/formatter/__init__.py +0 -0
  1031. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/__init__.cpython-314.pyc +0 -0
  1032. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/attribute_values.cpython-314.pyc +0 -0
  1033. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/attributes.cpython-314.pyc +0 -0
  1034. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/beautifier.cpython-314.pyc +0 -0
  1035. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/class_attributes.cpython-314.pyc +0 -0
  1036. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/compress.cpython-314.pyc +0 -0
  1037. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/condense.cpython-314.pyc +0 -0
  1038. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/css.cpython-314.pyc +0 -0
  1039. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/endblocks.cpython-314.pyc +0 -0
  1040. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/entities.cpython-314.pyc +0 -0
  1041. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/expand.cpython-314.pyc +0 -0
  1042. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/indent.cpython-314.pyc +0 -0
  1043. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/js.cpython-314.pyc +0 -0
  1044. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/load_tags.cpython-314.pyc +0 -0
  1045. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/mako.cpython-314.pyc +0 -0
  1046. package/python/lib/python3.14/site-packages/djlint/formatter/__pycache__/tokenizer.cpython-314.pyc +0 -0
  1047. package/python/lib/python3.14/site-packages/djlint/formatter/attribute_values.cpython-314-aarch64-linux-musl.so +0 -0
  1048. package/python/lib/python3.14/site-packages/djlint/formatter/attribute_values.py +152 -0
  1049. package/python/lib/python3.14/site-packages/djlint/formatter/attributes.cpython-314-aarch64-linux-musl.so +0 -0
  1050. package/python/lib/python3.14/site-packages/djlint/formatter/attributes.py +580 -0
  1051. package/python/lib/python3.14/site-packages/djlint/formatter/beautifier.cpython-314-aarch64-linux-musl.so +0 -0
  1052. package/python/lib/python3.14/site-packages/djlint/formatter/beautifier.py +144 -0
  1053. package/python/lib/python3.14/site-packages/djlint/formatter/class_attributes.cpython-314-aarch64-linux-musl.so +0 -0
  1054. package/python/lib/python3.14/site-packages/djlint/formatter/class_attributes.py +318 -0
  1055. package/python/lib/python3.14/site-packages/djlint/formatter/compress.cpython-314-aarch64-linux-musl.so +0 -0
  1056. package/python/lib/python3.14/site-packages/djlint/formatter/compress.py +158 -0
  1057. package/python/lib/python3.14/site-packages/djlint/formatter/condense.cpython-314-aarch64-linux-musl.so +0 -0
  1058. package/python/lib/python3.14/site-packages/djlint/formatter/condense.py +503 -0
  1059. package/python/lib/python3.14/site-packages/djlint/formatter/css.cpython-314-aarch64-linux-musl.so +0 -0
  1060. package/python/lib/python3.14/site-packages/djlint/formatter/css.py +28 -0
  1061. package/python/lib/python3.14/site-packages/djlint/formatter/endblocks.cpython-314-aarch64-linux-musl.so +0 -0
  1062. package/python/lib/python3.14/site-packages/djlint/formatter/endblocks.py +68 -0
  1063. package/python/lib/python3.14/site-packages/djlint/formatter/entities.cpython-314-aarch64-linux-musl.so +0 -0
  1064. package/python/lib/python3.14/site-packages/djlint/formatter/entities.py +39 -0
  1065. package/python/lib/python3.14/site-packages/djlint/formatter/expand.cpython-314-aarch64-linux-musl.so +0 -0
  1066. package/python/lib/python3.14/site-packages/djlint/formatter/expand.py +576 -0
  1067. package/python/lib/python3.14/site-packages/djlint/formatter/indent.cpython-314-aarch64-linux-musl.so +0 -0
  1068. package/python/lib/python3.14/site-packages/djlint/formatter/indent.py +1239 -0
  1069. package/python/lib/python3.14/site-packages/djlint/formatter/js.cpython-314-aarch64-linux-musl.so +0 -0
  1070. package/python/lib/python3.14/site-packages/djlint/formatter/js.py +82 -0
  1071. package/python/lib/python3.14/site-packages/djlint/formatter/load_tags.cpython-314-aarch64-linux-musl.so +0 -0
  1072. package/python/lib/python3.14/site-packages/djlint/formatter/load_tags.py +60 -0
  1073. package/python/lib/python3.14/site-packages/djlint/formatter/mako.cpython-314-aarch64-linux-musl.so +0 -0
  1074. package/python/lib/python3.14/site-packages/djlint/formatter/mako.py +501 -0
  1075. package/python/lib/python3.14/site-packages/djlint/formatter/tokenizer.cpython-314-aarch64-linux-musl.so +0 -0
  1076. package/python/lib/python3.14/site-packages/djlint/formatter/tokenizer.py +359 -0
  1077. package/python/lib/python3.14/site-packages/djlint/github_output.cpython-314-aarch64-linux-musl.so +0 -0
  1078. package/python/lib/python3.14/site-packages/djlint/github_output.py +117 -0
  1079. package/python/lib/python3.14/site-packages/djlint/helpers.cpython-314-aarch64-linux-musl.so +0 -0
  1080. package/python/lib/python3.14/site-packages/djlint/helpers.py +979 -0
  1081. package/python/lib/python3.14/site-packages/djlint/lint.cpython-314-aarch64-linux-musl.so +0 -0
  1082. package/python/lib/python3.14/site-packages/djlint/lint.py +246 -0
  1083. package/python/lib/python3.14/site-packages/djlint/output.cpython-314-aarch64-linux-musl.so +0 -0
  1084. package/python/lib/python3.14/site-packages/djlint/output.py +250 -0
  1085. package/python/lib/python3.14/site-packages/djlint/py.typed +0 -0
  1086. package/python/lib/python3.14/site-packages/djlint/reformat.cpython-314-aarch64-linux-musl.so +0 -0
  1087. package/python/lib/python3.14/site-packages/djlint/reformat.py +130 -0
  1088. package/python/lib/python3.14/site-packages/djlint/rules/D058.cpython-314-aarch64-linux-musl.so +0 -0
  1089. package/python/lib/python3.14/site-packages/djlint/rules/D058.py +78 -0
  1090. package/python/lib/python3.14/site-packages/djlint/rules/D059.cpython-314-aarch64-linux-musl.so +0 -0
  1091. package/python/lib/python3.14/site-packages/djlint/rules/D059.py +139 -0
  1092. package/python/lib/python3.14/site-packages/djlint/rules/H009.cpython-314-aarch64-linux-musl.so +0 -0
  1093. package/python/lib/python3.14/site-packages/djlint/rules/H009.py +54 -0
  1094. package/python/lib/python3.14/site-packages/djlint/rules/H012.cpython-314-aarch64-linux-musl.so +0 -0
  1095. package/python/lib/python3.14/site-packages/djlint/rules/H012.py +240 -0
  1096. package/python/lib/python3.14/site-packages/djlint/rules/H014.cpython-314-aarch64-linux-musl.so +0 -0
  1097. package/python/lib/python3.14/site-packages/djlint/rules/H014.py +68 -0
  1098. package/python/lib/python3.14/site-packages/djlint/rules/H016.cpython-314-aarch64-linux-musl.so +0 -0
  1099. package/python/lib/python3.14/site-packages/djlint/rules/H016.py +83 -0
  1100. package/python/lib/python3.14/site-packages/djlint/rules/H022.cpython-314-aarch64-linux-musl.so +0 -0
  1101. package/python/lib/python3.14/site-packages/djlint/rules/H022.py +161 -0
  1102. package/python/lib/python3.14/site-packages/djlint/rules/H025.cpython-314-aarch64-linux-musl.so +0 -0
  1103. package/python/lib/python3.14/site-packages/djlint/rules/H025.py +141 -0
  1104. package/python/lib/python3.14/site-packages/djlint/rules/H036.cpython-314-aarch64-linux-musl.so +0 -0
  1105. package/python/lib/python3.14/site-packages/djlint/rules/H036.py +183 -0
  1106. package/python/lib/python3.14/site-packages/djlint/rules/H037.cpython-314-aarch64-linux-musl.so +0 -0
  1107. package/python/lib/python3.14/site-packages/djlint/rules/H037.py +138 -0
  1108. package/python/lib/python3.14/site-packages/djlint/rules/H041.cpython-314-aarch64-linux-musl.so +0 -0
  1109. package/python/lib/python3.14/site-packages/djlint/rules/H041.py +113 -0
  1110. package/python/lib/python3.14/site-packages/djlint/rules/H042.cpython-314-aarch64-linux-musl.so +0 -0
  1111. package/python/lib/python3.14/site-packages/djlint/rules/H042.py +199 -0
  1112. package/python/lib/python3.14/site-packages/djlint/rules/H044.cpython-314-aarch64-linux-musl.so +0 -0
  1113. package/python/lib/python3.14/site-packages/djlint/rules/H044.py +119 -0
  1114. package/python/lib/python3.14/site-packages/djlint/rules/H047.cpython-314-aarch64-linux-musl.so +0 -0
  1115. package/python/lib/python3.14/site-packages/djlint/rules/H047.py +118 -0
  1116. package/python/lib/python3.14/site-packages/djlint/rules/H048.cpython-314-aarch64-linux-musl.so +0 -0
  1117. package/python/lib/python3.14/site-packages/djlint/rules/H048.py +82 -0
  1118. package/python/lib/python3.14/site-packages/djlint/rules/H051.cpython-314-aarch64-linux-musl.so +0 -0
  1119. package/python/lib/python3.14/site-packages/djlint/rules/H051.py +98 -0
  1120. package/python/lib/python3.14/site-packages/djlint/rules/H053.cpython-314-aarch64-linux-musl.so +0 -0
  1121. package/python/lib/python3.14/site-packages/djlint/rules/H053.py +361 -0
  1122. package/python/lib/python3.14/site-packages/djlint/rules/H054.cpython-314-aarch64-linux-musl.so +0 -0
  1123. package/python/lib/python3.14/site-packages/djlint/rules/H054.py +264 -0
  1124. package/python/lib/python3.14/site-packages/djlint/rules/H057.cpython-314-aarch64-linux-musl.so +0 -0
  1125. package/python/lib/python3.14/site-packages/djlint/rules/H057.py +235 -0
  1126. package/python/lib/python3.14/site-packages/djlint/rules/T001.cpython-314-aarch64-linux-musl.so +0 -0
  1127. package/python/lib/python3.14/site-packages/djlint/rules/T001.py +103 -0
  1128. package/python/lib/python3.14/site-packages/djlint/rules/T002.cpython-314-aarch64-linux-musl.so +0 -0
  1129. package/python/lib/python3.14/site-packages/djlint/rules/T002.py +75 -0
  1130. package/python/lib/python3.14/site-packages/djlint/rules/T003.cpython-314-aarch64-linux-musl.so +0 -0
  1131. package/python/lib/python3.14/site-packages/djlint/rules/T003.py +93 -0
  1132. package/python/lib/python3.14/site-packages/djlint/rules/T027.cpython-314-aarch64-linux-musl.so +0 -0
  1133. package/python/lib/python3.14/site-packages/djlint/rules/T027.py +183 -0
  1134. package/python/lib/python3.14/site-packages/djlint/rules/T038.cpython-314-aarch64-linux-musl.so +0 -0
  1135. package/python/lib/python3.14/site-packages/djlint/rules/T038.py +152 -0
  1136. package/python/lib/python3.14/site-packages/djlint/rules/T039.cpython-314-aarch64-linux-musl.so +0 -0
  1137. package/python/lib/python3.14/site-packages/djlint/rules/T039.py +167 -0
  1138. package/python/lib/python3.14/site-packages/djlint/rules/T041.cpython-314-aarch64-linux-musl.so +0 -0
  1139. package/python/lib/python3.14/site-packages/djlint/rules/T041.py +307 -0
  1140. package/python/lib/python3.14/site-packages/djlint/rules/T042.cpython-314-aarch64-linux-musl.so +0 -0
  1141. package/python/lib/python3.14/site-packages/djlint/rules/T042.py +219 -0
  1142. package/python/lib/python3.14/site-packages/djlint/rules/T043.cpython-314-aarch64-linux-musl.so +0 -0
  1143. package/python/lib/python3.14/site-packages/djlint/rules/T043.py +154 -0
  1144. package/python/lib/python3.14/site-packages/djlint/rules/T044.cpython-314-aarch64-linux-musl.so +0 -0
  1145. package/python/lib/python3.14/site-packages/djlint/rules/T044.py +189 -0
  1146. package/python/lib/python3.14/site-packages/djlint/rules/T045.cpython-314-aarch64-linux-musl.so +0 -0
  1147. package/python/lib/python3.14/site-packages/djlint/rules/T045.py +281 -0
  1148. package/python/lib/python3.14/site-packages/djlint/rules/__init__.cpython-314-aarch64-linux-musl.so +0 -0
  1149. package/python/lib/python3.14/site-packages/djlint/rules/__init__.py +0 -0
  1150. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/D058.cpython-314.pyc +0 -0
  1151. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/D059.cpython-314.pyc +0 -0
  1152. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H009.cpython-314.pyc +0 -0
  1153. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H012.cpython-314.pyc +0 -0
  1154. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H014.cpython-314.pyc +0 -0
  1155. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H016.cpython-314.pyc +0 -0
  1156. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H022.cpython-314.pyc +0 -0
  1157. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H025.cpython-314.pyc +0 -0
  1158. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H036.cpython-314.pyc +0 -0
  1159. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H037.cpython-314.pyc +0 -0
  1160. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H041.cpython-314.pyc +0 -0
  1161. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H042.cpython-314.pyc +0 -0
  1162. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H044.cpython-314.pyc +0 -0
  1163. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H047.cpython-314.pyc +0 -0
  1164. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H048.cpython-314.pyc +0 -0
  1165. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H051.cpython-314.pyc +0 -0
  1166. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H053.cpython-314.pyc +0 -0
  1167. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H054.cpython-314.pyc +0 -0
  1168. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/H057.cpython-314.pyc +0 -0
  1169. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T001.cpython-314.pyc +0 -0
  1170. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T002.cpython-314.pyc +0 -0
  1171. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T003.cpython-314.pyc +0 -0
  1172. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T027.cpython-314.pyc +0 -0
  1173. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T038.cpython-314.pyc +0 -0
  1174. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T039.cpython-314.pyc +0 -0
  1175. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T041.cpython-314.pyc +0 -0
  1176. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T042.cpython-314.pyc +0 -0
  1177. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T043.cpython-314.pyc +0 -0
  1178. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T044.cpython-314.pyc +0 -0
  1179. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/T045.cpython-314.pyc +0 -0
  1180. package/python/lib/python3.14/site-packages/djlint/rules/__pycache__/__init__.cpython-314.pyc +0 -0
  1181. package/python/lib/python3.14/site-packages/djlint/rules.yaml +482 -0
  1182. package/python/lib/python3.14/site-packages/djlint/sarif_output.cpython-314-aarch64-linux-musl.so +0 -0
  1183. package/python/lib/python3.14/site-packages/djlint/sarif_output.py +171 -0
  1184. package/python/lib/python3.14/site-packages/djlint/server.cpython-314-aarch64-linux-musl.so +0 -0
  1185. package/python/lib/python3.14/site-packages/djlint/server.py +983 -0
  1186. package/python/lib/python3.14/site-packages/djlint/settings.cpython-314-aarch64-linux-musl.so +0 -0
  1187. package/python/lib/python3.14/site-packages/djlint/settings.py +2381 -0
  1188. package/python/lib/python3.14/site-packages/djlint/src.cpython-314-aarch64-linux-musl.so +0 -0
  1189. package/python/lib/python3.14/site-packages/djlint/src.py +192 -0
  1190. package/python/lib/python3.14/site-packages/djlint/types.pyi +20 -0
  1191. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/INSTALLER +1 -0
  1192. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/METADATA +236 -0
  1193. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/RECORD +133 -0
  1194. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/REQUESTED +0 -0
  1195. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/WHEEL +5 -0
  1196. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/entry_points.txt +2 -0
  1197. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/licenses/LICENSE +675 -0
  1198. package/python/lib/python3.14/site-packages/djlint-1.54.0.dist-info/licenses/LICENSE-THIRD-PARTY +271 -0
  1199. package/python/lib/python3.14/site-packages/ed0510dfe26979f3c42b__mypyc.cpython-314-aarch64-linux-musl.so +0 -0
  1200. package/python/lib/python3.14/site-packages/editorconfig/__init__.py +20 -0
  1201. package/python/lib/python3.14/site-packages/editorconfig/__main__.py +83 -0
  1202. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/__init__.cpython-314.pyc +0 -0
  1203. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/__main__.cpython-314.pyc +0 -0
  1204. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/exceptions.cpython-314.pyc +0 -0
  1205. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/fnmatch.cpython-314.pyc +0 -0
  1206. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/handler.cpython-314.pyc +0 -0
  1207. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/ini.cpython-314.pyc +0 -0
  1208. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/version.cpython-314.pyc +0 -0
  1209. package/python/lib/python3.14/site-packages/editorconfig/__pycache__/versiontools.cpython-314.pyc +0 -0
  1210. package/python/lib/python3.14/site-packages/editorconfig/exceptions.py +24 -0
  1211. package/python/lib/python3.14/site-packages/editorconfig/fnmatch.py +224 -0
  1212. package/python/lib/python3.14/site-packages/editorconfig/handler.py +128 -0
  1213. package/python/lib/python3.14/site-packages/editorconfig/ini.py +173 -0
  1214. package/python/lib/python3.14/site-packages/editorconfig/py.typed +0 -0
  1215. package/python/lib/python3.14/site-packages/editorconfig/version.py +1 -0
  1216. package/python/lib/python3.14/site-packages/editorconfig/versiontools.py +36 -0
  1217. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/INSTALLER +1 -0
  1218. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/METADATA +116 -0
  1219. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/RECORD +20 -0
  1220. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/REQUESTED +0 -0
  1221. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/WHEEL +5 -0
  1222. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/entry_points.txt +2 -0
  1223. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/licenses/COPYING +11 -0
  1224. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/licenses/LICENSE.BSD +22 -0
  1225. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/licenses/LICENSE.PSF +192 -0
  1226. package/python/lib/python3.14/site-packages/editorconfig-0.17.1.dist-info/top_level.txt +1 -0
  1227. package/python/lib/python3.14/site-packages/jsbeautifier/__init__.py +309 -0
  1228. package/python/lib/python3.14/site-packages/jsbeautifier/__pycache__/__init__.cpython-314.pyc +0 -0
  1229. package/python/lib/python3.14/site-packages/jsbeautifier/__pycache__/__version__.cpython-314.pyc +0 -0
  1230. package/python/lib/python3.14/site-packages/jsbeautifier/__version__.py +1 -0
  1231. package/python/lib/python3.14/site-packages/jsbeautifier/cli/__init__.py +210 -0
  1232. package/python/lib/python3.14/site-packages/jsbeautifier/cli/__pycache__/__init__.cpython-314.pyc +0 -0
  1233. package/python/lib/python3.14/site-packages/jsbeautifier/core/__init__.py +1 -0
  1234. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/__init__.cpython-314.pyc +0 -0
  1235. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/directives.cpython-314.pyc +0 -0
  1236. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/inputscanner.cpython-314.pyc +0 -0
  1237. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/options.cpython-314.pyc +0 -0
  1238. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/output.cpython-314.pyc +0 -0
  1239. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/pattern.cpython-314.pyc +0 -0
  1240. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/templatablepattern.cpython-314.pyc +0 -0
  1241. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/token.cpython-314.pyc +0 -0
  1242. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/tokenizer.cpython-314.pyc +0 -0
  1243. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/tokenstream.cpython-314.pyc +0 -0
  1244. package/python/lib/python3.14/site-packages/jsbeautifier/core/__pycache__/whitespacepattern.cpython-314.pyc +0 -0
  1245. package/python/lib/python3.14/site-packages/jsbeautifier/core/directives.py +55 -0
  1246. package/python/lib/python3.14/site-packages/jsbeautifier/core/inputscanner.py +139 -0
  1247. package/python/lib/python3.14/site-packages/jsbeautifier/core/options.py +230 -0
  1248. package/python/lib/python3.14/site-packages/jsbeautifier/core/output.py +352 -0
  1249. package/python/lib/python3.14/site-packages/jsbeautifier/core/pattern.py +83 -0
  1250. package/python/lib/python3.14/site-packages/jsbeautifier/core/templatablepattern.py +192 -0
  1251. package/python/lib/python3.14/site-packages/jsbeautifier/core/token.py +38 -0
  1252. package/python/lib/python3.14/site-packages/jsbeautifier/core/tokenizer.py +138 -0
  1253. package/python/lib/python3.14/site-packages/jsbeautifier/core/tokenstream.py +74 -0
  1254. package/python/lib/python3.14/site-packages/jsbeautifier/core/whitespacepattern.py +73 -0
  1255. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__init__.py +1 -0
  1256. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__pycache__/__init__.cpython-314.pyc +0 -0
  1257. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__pycache__/acorn.cpython-314.pyc +0 -0
  1258. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__pycache__/beautifier.cpython-314.pyc +0 -0
  1259. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__pycache__/options.cpython-314.pyc +0 -0
  1260. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/__pycache__/tokenizer.cpython-314.pyc +0 -0
  1261. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/acorn.py +81 -0
  1262. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/beautifier.py +1647 -0
  1263. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/options.py +102 -0
  1264. package/python/lib/python3.14/site-packages/jsbeautifier/javascript/tokenizer.py +628 -0
  1265. package/python/lib/python3.14/site-packages/jsbeautifier/tests/__init__.py +1 -0
  1266. package/python/lib/python3.14/site-packages/jsbeautifier/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  1267. package/python/lib/python3.14/site-packages/jsbeautifier/tests/__pycache__/testindentation.cpython-314.pyc +0 -0
  1268. package/python/lib/python3.14/site-packages/jsbeautifier/tests/generated/__init__.py +1 -0
  1269. package/python/lib/python3.14/site-packages/jsbeautifier/tests/generated/__pycache__/__init__.cpython-314.pyc +0 -0
  1270. package/python/lib/python3.14/site-packages/jsbeautifier/tests/generated/__pycache__/tests.cpython-314.pyc +0 -0
  1271. package/python/lib/python3.14/site-packages/jsbeautifier/tests/generated/tests.py +10470 -0
  1272. package/python/lib/python3.14/site-packages/jsbeautifier/tests/testindentation.py +49 -0
  1273. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__init__.py +73 -0
  1274. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/__init__.cpython-314.pyc +0 -0
  1275. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/evalbased.cpython-314.pyc +0 -0
  1276. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/javascriptobfuscator.cpython-314.pyc +0 -0
  1277. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/myobfuscate.cpython-314.pyc +0 -0
  1278. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/packer.cpython-314.pyc +0 -0
  1279. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/__pycache__/urlencode.cpython-314.pyc +0 -0
  1280. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/evalbased.py +44 -0
  1281. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/javascriptobfuscator.py +61 -0
  1282. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/myobfuscate.py +83 -0
  1283. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/packer.py +158 -0
  1284. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__init__.py +2 -0
  1285. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  1286. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__pycache__/testjavascriptobfuscator.cpython-314.pyc +0 -0
  1287. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__pycache__/testmyobfuscate.cpython-314.pyc +0 -0
  1288. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__pycache__/testpacker.cpython-314.pyc +0 -0
  1289. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/__pycache__/testurlencode.cpython-314.pyc +0 -0
  1290. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/testjavascriptobfuscator.py +59 -0
  1291. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/testmyobfuscate.py +48 -0
  1292. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/testpacker.py +72 -0
  1293. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/tests/testurlencode.py +46 -0
  1294. package/python/lib/python3.14/site-packages/jsbeautifier/unpackers/urlencode.py +32 -0
  1295. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/INSTALLER +1 -0
  1296. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/METADATA +18 -0
  1297. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/RECORD +42 -0
  1298. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/REQUESTED +0 -0
  1299. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/WHEEL +5 -0
  1300. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/entry_points.txt +2 -0
  1301. package/python/lib/python3.14/site-packages/jsbeautifier-2.0.3.dist-info/top_level.txt +1 -0
  1302. package/python/lib/python3.14/site-packages/json5/__init__.py +30 -0
  1303. package/python/lib/python3.14/site-packages/json5/__main__.py +22 -0
  1304. package/python/lib/python3.14/site-packages/json5/__pycache__/__init__.cpython-314.pyc +0 -0
  1305. package/python/lib/python3.14/site-packages/json5/__pycache__/__main__.cpython-314.pyc +0 -0
  1306. package/python/lib/python3.14/site-packages/json5/__pycache__/host.cpython-314.pyc +0 -0
  1307. package/python/lib/python3.14/site-packages/json5/__pycache__/lib.cpython-314.pyc +0 -0
  1308. package/python/lib/python3.14/site-packages/json5/__pycache__/parser.cpython-314.pyc +0 -0
  1309. package/python/lib/python3.14/site-packages/json5/__pycache__/tool.cpython-314.pyc +0 -0
  1310. package/python/lib/python3.14/site-packages/json5/__pycache__/version.cpython-314.pyc +0 -0
  1311. package/python/lib/python3.14/site-packages/json5/host.py +53 -0
  1312. package/python/lib/python3.14/site-packages/json5/lib.py +1007 -0
  1313. package/python/lib/python3.14/site-packages/json5/parser.py +1376 -0
  1314. package/python/lib/python3.14/site-packages/json5/py.typed +0 -0
  1315. package/python/lib/python3.14/site-packages/json5/tool.py +198 -0
  1316. package/python/lib/python3.14/site-packages/json5/version.py +18 -0
  1317. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/INSTALLER +1 -0
  1318. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/METADATA +585 -0
  1319. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/RECORD +17 -0
  1320. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/REQUESTED +0 -0
  1321. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/WHEEL +5 -0
  1322. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/entry_points.txt +2 -0
  1323. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/licenses/LICENSE +281 -0
  1324. package/python/lib/python3.14/site-packages/json5-0.17.3.dist-info/top_level.txt +1 -0
  1325. package/python/lib/python3.14/site-packages/pathspec/__init__.py +68 -0
  1326. package/python/lib/python3.14/site-packages/pathspec/__pycache__/__init__.cpython-314.pyc +0 -0
  1327. package/python/lib/python3.14/site-packages/pathspec/__pycache__/_meta.cpython-314.pyc +0 -0
  1328. package/python/lib/python3.14/site-packages/pathspec/__pycache__/_typing.cpython-314.pyc +0 -0
  1329. package/python/lib/python3.14/site-packages/pathspec/__pycache__/_version.cpython-314.pyc +0 -0
  1330. package/python/lib/python3.14/site-packages/pathspec/__pycache__/backend.cpython-314.pyc +0 -0
  1331. package/python/lib/python3.14/site-packages/pathspec/__pycache__/gitignore.cpython-314.pyc +0 -0
  1332. package/python/lib/python3.14/site-packages/pathspec/__pycache__/pathspec.cpython-314.pyc +0 -0
  1333. package/python/lib/python3.14/site-packages/pathspec/__pycache__/pattern.cpython-314.pyc +0 -0
  1334. package/python/lib/python3.14/site-packages/pathspec/__pycache__/util.cpython-314.pyc +0 -0
  1335. package/python/lib/python3.14/site-packages/pathspec/_backends/__init__.py +4 -0
  1336. package/python/lib/python3.14/site-packages/pathspec/_backends/__pycache__/__init__.cpython-314.pyc +0 -0
  1337. package/python/lib/python3.14/site-packages/pathspec/_backends/__pycache__/_utils.cpython-314.pyc +0 -0
  1338. package/python/lib/python3.14/site-packages/pathspec/_backends/__pycache__/agg.cpython-314.pyc +0 -0
  1339. package/python/lib/python3.14/site-packages/pathspec/_backends/_utils.py +45 -0
  1340. package/python/lib/python3.14/site-packages/pathspec/_backends/agg.py +104 -0
  1341. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__init__.py +0 -0
  1342. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__pycache__/__init__.cpython-314.pyc +0 -0
  1343. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__pycache__/_base.cpython-314.pyc +0 -0
  1344. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__pycache__/base.cpython-314.pyc +0 -0
  1345. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__pycache__/gitignore.cpython-314.pyc +0 -0
  1346. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/__pycache__/pathspec.cpython-314.pyc +0 -0
  1347. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/_base.py +78 -0
  1348. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/base.py +24 -0
  1349. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/gitignore.py +250 -0
  1350. package/python/lib/python3.14/site-packages/pathspec/_backends/hyperscan/pathspec.py +257 -0
  1351. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__init__.py +0 -0
  1352. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__pycache__/__init__.cpython-314.pyc +0 -0
  1353. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__pycache__/_base.cpython-314.pyc +0 -0
  1354. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__pycache__/base.cpython-314.pyc +0 -0
  1355. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__pycache__/gitignore.cpython-314.pyc +0 -0
  1356. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/__pycache__/pathspec.cpython-314.pyc +0 -0
  1357. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/_base.py +95 -0
  1358. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/base.py +18 -0
  1359. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/gitignore.py +180 -0
  1360. package/python/lib/python3.14/site-packages/pathspec/_backends/re2/pathspec.py +189 -0
  1361. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/__init__.py +0 -0
  1362. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/__pycache__/__init__.cpython-314.pyc +0 -0
  1363. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/__pycache__/gitignore.cpython-314.pyc +0 -0
  1364. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/__pycache__/pathspec.cpython-314.pyc +0 -0
  1365. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/gitignore.py +104 -0
  1366. package/python/lib/python3.14/site-packages/pathspec/_backends/simple/pathspec.py +76 -0
  1367. package/python/lib/python3.14/site-packages/pathspec/_meta.py +70 -0
  1368. package/python/lib/python3.14/site-packages/pathspec/_typing.py +64 -0
  1369. package/python/lib/python3.14/site-packages/pathspec/_version.py +5 -0
  1370. package/python/lib/python3.14/site-packages/pathspec/backend.py +51 -0
  1371. package/python/lib/python3.14/site-packages/pathspec/gitignore.py +172 -0
  1372. package/python/lib/python3.14/site-packages/pathspec/pathspec.py +527 -0
  1373. package/python/lib/python3.14/site-packages/pathspec/pattern.py +259 -0
  1374. package/python/lib/python3.14/site-packages/pathspec/patterns/__init__.py +12 -0
  1375. package/python/lib/python3.14/site-packages/pathspec/patterns/__pycache__/__init__.cpython-314.pyc +0 -0
  1376. package/python/lib/python3.14/site-packages/pathspec/patterns/__pycache__/gitwildmatch.cpython-314.pyc +0 -0
  1377. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/__init__.py +17 -0
  1378. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/__pycache__/__init__.cpython-314.pyc +0 -0
  1379. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/__pycache__/base.cpython-314.pyc +0 -0
  1380. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/__pycache__/basic.cpython-314.pyc +0 -0
  1381. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/__pycache__/spec.cpython-314.pyc +0 -0
  1382. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/base.py +210 -0
  1383. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/basic.py +320 -0
  1384. package/python/lib/python3.14/site-packages/pathspec/patterns/gitignore/spec.py +344 -0
  1385. package/python/lib/python3.14/site-packages/pathspec/patterns/gitwildmatch.py +52 -0
  1386. package/python/lib/python3.14/site-packages/pathspec/py.typed +1 -0
  1387. package/python/lib/python3.14/site-packages/pathspec/util.py +864 -0
  1388. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/INSTALLER +1 -0
  1389. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/METADATA +392 -0
  1390. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/RECORD +38 -0
  1391. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/REQUESTED +0 -0
  1392. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/WHEEL +4 -0
  1393. package/python/lib/python3.14/site-packages/pathspec-1.1.1.dist-info/licenses/LICENSE +373 -0
  1394. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/INSTALLER +1 -0
  1395. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/METADATA +59 -0
  1396. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/RECORD +26 -0
  1397. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/REQUESTED +0 -0
  1398. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/WHEEL +5 -0
  1399. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/licenses/LICENSE +20 -0
  1400. package/python/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/top_level.txt +2 -0
  1401. package/python/lib/python3.14/site-packages/regex/__init__.py +3 -0
  1402. package/python/lib/python3.14/site-packages/regex/__pycache__/__init__.cpython-314.pyc +0 -0
  1403. package/python/lib/python3.14/site-packages/regex/__pycache__/_main.cpython-314.pyc +0 -0
  1404. package/python/lib/python3.14/site-packages/regex/__pycache__/_regex_core.cpython-314.pyc +0 -0
  1405. package/python/lib/python3.14/site-packages/regex/_main.py +759 -0
  1406. package/python/lib/python3.14/site-packages/regex/_regex.cpython-314-aarch64-linux-musl.so +0 -0
  1407. package/python/lib/python3.14/site-packages/regex/_regex_core.py +4689 -0
  1408. package/python/lib/python3.14/site-packages/regex/tests/__pycache__/test_regex.cpython-314.pyc +0 -0
  1409. package/python/lib/python3.14/site-packages/regex/tests/test_regex.py +4557 -0
  1410. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/INSTALLER +1 -0
  1411. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/METADATA +1060 -0
  1412. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/RECORD +12 -0
  1413. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/REQUESTED +0 -0
  1414. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/WHEEL +5 -0
  1415. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/licenses/LICENSE.txt +208 -0
  1416. package/python/lib/python3.14/site-packages/regex-2026.11.9.dist-info/top_level.txt +1 -0
  1417. package/python/lib/python3.14/site-packages/yaml/__init__.py +390 -0
  1418. package/python/lib/python3.14/site-packages/yaml/__pycache__/__init__.cpython-314.pyc +0 -0
  1419. package/python/lib/python3.14/site-packages/yaml/__pycache__/composer.cpython-314.pyc +0 -0
  1420. package/python/lib/python3.14/site-packages/yaml/__pycache__/constructor.cpython-314.pyc +0 -0
  1421. package/python/lib/python3.14/site-packages/yaml/__pycache__/cyaml.cpython-314.pyc +0 -0
  1422. package/python/lib/python3.14/site-packages/yaml/__pycache__/dumper.cpython-314.pyc +0 -0
  1423. package/python/lib/python3.14/site-packages/yaml/__pycache__/emitter.cpython-314.pyc +0 -0
  1424. package/python/lib/python3.14/site-packages/yaml/__pycache__/error.cpython-314.pyc +0 -0
  1425. package/python/lib/python3.14/site-packages/yaml/__pycache__/events.cpython-314.pyc +0 -0
  1426. package/python/lib/python3.14/site-packages/yaml/__pycache__/loader.cpython-314.pyc +0 -0
  1427. package/python/lib/python3.14/site-packages/yaml/__pycache__/nodes.cpython-314.pyc +0 -0
  1428. package/python/lib/python3.14/site-packages/yaml/__pycache__/parser.cpython-314.pyc +0 -0
  1429. package/python/lib/python3.14/site-packages/yaml/__pycache__/reader.cpython-314.pyc +0 -0
  1430. package/python/lib/python3.14/site-packages/yaml/__pycache__/representer.cpython-314.pyc +0 -0
  1431. package/python/lib/python3.14/site-packages/yaml/__pycache__/resolver.cpython-314.pyc +0 -0
  1432. package/python/lib/python3.14/site-packages/yaml/__pycache__/scanner.cpython-314.pyc +0 -0
  1433. package/python/lib/python3.14/site-packages/yaml/__pycache__/serializer.cpython-314.pyc +0 -0
  1434. package/python/lib/python3.14/site-packages/yaml/__pycache__/tokens.cpython-314.pyc +0 -0
  1435. package/python/lib/python3.14/site-packages/yaml/_yaml.cpython-314-aarch64-linux-musl.so +0 -0
  1436. package/python/lib/python3.14/site-packages/yaml/composer.py +139 -0
  1437. package/python/lib/python3.14/site-packages/yaml/constructor.py +748 -0
  1438. package/python/lib/python3.14/site-packages/yaml/cyaml.py +101 -0
  1439. package/python/lib/python3.14/site-packages/yaml/dumper.py +62 -0
  1440. package/python/lib/python3.14/site-packages/yaml/emitter.py +1137 -0
  1441. package/python/lib/python3.14/site-packages/yaml/error.py +75 -0
  1442. package/python/lib/python3.14/site-packages/yaml/events.py +86 -0
  1443. package/python/lib/python3.14/site-packages/yaml/loader.py +63 -0
  1444. package/python/lib/python3.14/site-packages/yaml/nodes.py +49 -0
  1445. package/python/lib/python3.14/site-packages/yaml/parser.py +589 -0
  1446. package/python/lib/python3.14/site-packages/yaml/reader.py +185 -0
  1447. package/python/lib/python3.14/site-packages/yaml/representer.py +389 -0
  1448. package/python/lib/python3.14/site-packages/yaml/resolver.py +227 -0
  1449. package/python/lib/python3.14/site-packages/yaml/scanner.py +1435 -0
  1450. package/python/lib/python3.14/site-packages/yaml/serializer.py +111 -0
  1451. package/python/lib/python3.14/site-packages/yaml/tokens.py +104 -0
  1452. package/python/lib/python3.14/site.py +779 -0
  1453. package/python/lib/python3.14/smtplib.py +1121 -0
  1454. package/python/lib/python3.14/socket.py +994 -0
  1455. package/python/lib/python3.14/socketserver.py +863 -0
  1456. package/python/lib/python3.14/sqlite3/__init__.py +57 -0
  1457. package/python/lib/python3.14/sqlite3/__main__.py +139 -0
  1458. package/python/lib/python3.14/sqlite3/__pycache__/__init__.cpython-314.pyc +0 -0
  1459. package/python/lib/python3.14/sqlite3/__pycache__/__main__.cpython-314.pyc +0 -0
  1460. package/python/lib/python3.14/sqlite3/__pycache__/dbapi2.cpython-314.pyc +0 -0
  1461. package/python/lib/python3.14/sqlite3/__pycache__/dump.cpython-314.pyc +0 -0
  1462. package/python/lib/python3.14/sqlite3/dbapi2.py +96 -0
  1463. package/python/lib/python3.14/sqlite3/dump.py +118 -0
  1464. package/python/lib/python3.14/sre_compile.py +7 -0
  1465. package/python/lib/python3.14/sre_constants.py +7 -0
  1466. package/python/lib/python3.14/sre_parse.py +7 -0
  1467. package/python/lib/python3.14/ssl.py +1552 -0
  1468. package/python/lib/python3.14/stat.py +212 -0
  1469. package/python/lib/python3.14/statistics.py +1879 -0
  1470. package/python/lib/python3.14/string/__init__.py +332 -0
  1471. package/python/lib/python3.14/string/__pycache__/__init__.cpython-314.pyc +0 -0
  1472. package/python/lib/python3.14/string/__pycache__/templatelib.cpython-314.pyc +0 -0
  1473. package/python/lib/python3.14/string/templatelib.py +33 -0
  1474. package/python/lib/python3.14/stringprep.py +456 -0
  1475. package/python/lib/python3.14/struct.py +15 -0
  1476. package/python/lib/python3.14/subprocess.py +2257 -0
  1477. package/python/lib/python3.14/symtable.py +451 -0
  1478. package/python/lib/python3.14/sysconfig/__init__.py +798 -0
  1479. package/python/lib/python3.14/sysconfig/__main__.py +276 -0
  1480. package/python/lib/python3.14/sysconfig/__pycache__/__init__.cpython-314.pyc +0 -0
  1481. package/python/lib/python3.14/sysconfig/__pycache__/__main__.cpython-314.pyc +0 -0
  1482. package/python/lib/python3.14/tabnanny.py +338 -0
  1483. package/python/lib/python3.14/tarfile.py +3228 -0
  1484. package/python/lib/python3.14/tempfile.py +1057 -0
  1485. package/python/lib/python3.14/textwrap.py +475 -0
  1486. package/python/lib/python3.14/this.py +28 -0
  1487. package/python/lib/python3.14/threading.py +1643 -0
  1488. package/python/lib/python3.14/timeit.py +378 -0
  1489. package/python/lib/python3.14/token.py +144 -0
  1490. package/python/lib/python3.14/tokenize.py +598 -0
  1491. package/python/lib/python3.14/tomllib/__init__.py +10 -0
  1492. package/python/lib/python3.14/tomllib/__pycache__/__init__.cpython-314.pyc +0 -0
  1493. package/python/lib/python3.14/tomllib/__pycache__/_parser.cpython-314.pyc +0 -0
  1494. package/python/lib/python3.14/tomllib/__pycache__/_re.cpython-314.pyc +0 -0
  1495. package/python/lib/python3.14/tomllib/__pycache__/_types.cpython-314.pyc +0 -0
  1496. package/python/lib/python3.14/tomllib/_parser.py +765 -0
  1497. package/python/lib/python3.14/tomllib/_re.py +113 -0
  1498. package/python/lib/python3.14/tomllib/_types.py +10 -0
  1499. package/python/lib/python3.14/tomllib/mypy.ini +15 -0
  1500. package/python/lib/python3.14/trace.py +751 -0
  1501. package/python/lib/python3.14/traceback.py +1751 -0
  1502. package/python/lib/python3.14/tracemalloc.py +560 -0
  1503. package/python/lib/python3.14/tty.py +73 -0
  1504. package/python/lib/python3.14/types.py +345 -0
  1505. package/python/lib/python3.14/typing.py +3866 -0
  1506. package/python/lib/python3.14/unittest/__init__.py +80 -0
  1507. package/python/lib/python3.14/unittest/__main__.py +18 -0
  1508. package/python/lib/python3.14/unittest/__pycache__/__init__.cpython-314.pyc +0 -0
  1509. package/python/lib/python3.14/unittest/__pycache__/__main__.cpython-314.pyc +0 -0
  1510. package/python/lib/python3.14/unittest/__pycache__/_log.cpython-314.pyc +0 -0
  1511. package/python/lib/python3.14/unittest/__pycache__/async_case.cpython-314.pyc +0 -0
  1512. package/python/lib/python3.14/unittest/__pycache__/case.cpython-314.pyc +0 -0
  1513. package/python/lib/python3.14/unittest/__pycache__/loader.cpython-314.pyc +0 -0
  1514. package/python/lib/python3.14/unittest/__pycache__/main.cpython-314.pyc +0 -0
  1515. package/python/lib/python3.14/unittest/__pycache__/mock.cpython-314.pyc +0 -0
  1516. package/python/lib/python3.14/unittest/__pycache__/result.cpython-314.pyc +0 -0
  1517. package/python/lib/python3.14/unittest/__pycache__/runner.cpython-314.pyc +0 -0
  1518. package/python/lib/python3.14/unittest/__pycache__/signals.cpython-314.pyc +0 -0
  1519. package/python/lib/python3.14/unittest/__pycache__/suite.cpython-314.pyc +0 -0
  1520. package/python/lib/python3.14/unittest/__pycache__/util.cpython-314.pyc +0 -0
  1521. package/python/lib/python3.14/unittest/_log.py +86 -0
  1522. package/python/lib/python3.14/unittest/async_case.py +158 -0
  1523. package/python/lib/python3.14/unittest/case.py +1628 -0
  1524. package/python/lib/python3.14/unittest/loader.py +491 -0
  1525. package/python/lib/python3.14/unittest/main.py +280 -0
  1526. package/python/lib/python3.14/unittest/mock.py +3208 -0
  1527. package/python/lib/python3.14/unittest/result.py +259 -0
  1528. package/python/lib/python3.14/unittest/runner.py +313 -0
  1529. package/python/lib/python3.14/unittest/signals.py +71 -0
  1530. package/python/lib/python3.14/unittest/suite.py +379 -0
  1531. package/python/lib/python3.14/unittest/util.py +170 -0
  1532. package/python/lib/python3.14/urllib/__init__.py +0 -0
  1533. package/python/lib/python3.14/urllib/__pycache__/__init__.cpython-314.pyc +0 -0
  1534. package/python/lib/python3.14/urllib/__pycache__/error.cpython-314.pyc +0 -0
  1535. package/python/lib/python3.14/urllib/__pycache__/parse.cpython-314.pyc +0 -0
  1536. package/python/lib/python3.14/urllib/__pycache__/request.cpython-314.pyc +0 -0
  1537. package/python/lib/python3.14/urllib/__pycache__/response.cpython-314.pyc +0 -0
  1538. package/python/lib/python3.14/urllib/__pycache__/robotparser.cpython-314.pyc +0 -0
  1539. package/python/lib/python3.14/urllib/error.py +74 -0
  1540. package/python/lib/python3.14/urllib/parse.py +1289 -0
  1541. package/python/lib/python3.14/urllib/request.py +2175 -0
  1542. package/python/lib/python3.14/urllib/response.py +84 -0
  1543. package/python/lib/python3.14/urllib/robotparser.py +363 -0
  1544. package/python/lib/python3.14/uuid.py +1013 -0
  1545. package/python/lib/python3.14/venv/__init__.py +700 -0
  1546. package/python/lib/python3.14/venv/__main__.py +10 -0
  1547. package/python/lib/python3.14/venv/__pycache__/__init__.cpython-314.pyc +0 -0
  1548. package/python/lib/python3.14/venv/__pycache__/__main__.cpython-314.pyc +0 -0
  1549. package/python/lib/python3.14/venv/scripts/common/Activate.ps1 +248 -0
  1550. package/python/lib/python3.14/venv/scripts/common/activate +76 -0
  1551. package/python/lib/python3.14/venv/scripts/common/activate.fish +69 -0
  1552. package/python/lib/python3.14/venv/scripts/posix/activate.csh +29 -0
  1553. package/python/lib/python3.14/warnings.py +99 -0
  1554. package/python/lib/python3.14/wave.py +665 -0
  1555. package/python/lib/python3.14/weakref.py +574 -0
  1556. package/python/lib/python3.14/webbrowser.py +763 -0
  1557. package/python/lib/python3.14/wsgiref/__init__.py +25 -0
  1558. package/python/lib/python3.14/wsgiref/__pycache__/__init__.cpython-314.pyc +0 -0
  1559. package/python/lib/python3.14/wsgiref/__pycache__/handlers.cpython-314.pyc +0 -0
  1560. package/python/lib/python3.14/wsgiref/__pycache__/headers.cpython-314.pyc +0 -0
  1561. package/python/lib/python3.14/wsgiref/__pycache__/simple_server.cpython-314.pyc +0 -0
  1562. package/python/lib/python3.14/wsgiref/__pycache__/types.cpython-314.pyc +0 -0
  1563. package/python/lib/python3.14/wsgiref/__pycache__/util.cpython-314.pyc +0 -0
  1564. package/python/lib/python3.14/wsgiref/__pycache__/validate.cpython-314.pyc +0 -0
  1565. package/python/lib/python3.14/wsgiref/handlers.py +575 -0
  1566. package/python/lib/python3.14/wsgiref/headers.py +192 -0
  1567. package/python/lib/python3.14/wsgiref/simple_server.py +161 -0
  1568. package/python/lib/python3.14/wsgiref/types.py +54 -0
  1569. package/python/lib/python3.14/wsgiref/util.py +159 -0
  1570. package/python/lib/python3.14/wsgiref/validate.py +438 -0
  1571. package/python/lib/python3.14/xml/__init__.py +20 -0
  1572. package/python/lib/python3.14/xml/__pycache__/__init__.cpython-314.pyc +0 -0
  1573. package/python/lib/python3.14/xml/dom/NodeFilter.py +27 -0
  1574. package/python/lib/python3.14/xml/dom/__init__.py +140 -0
  1575. package/python/lib/python3.14/xml/dom/__pycache__/NodeFilter.cpython-314.pyc +0 -0
  1576. package/python/lib/python3.14/xml/dom/__pycache__/__init__.cpython-314.pyc +0 -0
  1577. package/python/lib/python3.14/xml/dom/__pycache__/domreg.cpython-314.pyc +0 -0
  1578. package/python/lib/python3.14/xml/dom/__pycache__/expatbuilder.cpython-314.pyc +0 -0
  1579. package/python/lib/python3.14/xml/dom/__pycache__/minicompat.cpython-314.pyc +0 -0
  1580. package/python/lib/python3.14/xml/dom/__pycache__/minidom.cpython-314.pyc +0 -0
  1581. package/python/lib/python3.14/xml/dom/__pycache__/pulldom.cpython-314.pyc +0 -0
  1582. package/python/lib/python3.14/xml/dom/__pycache__/xmlbuilder.cpython-314.pyc +0 -0
  1583. package/python/lib/python3.14/xml/dom/domreg.py +99 -0
  1584. package/python/lib/python3.14/xml/dom/expatbuilder.py +964 -0
  1585. package/python/lib/python3.14/xml/dom/minicompat.py +109 -0
  1586. package/python/lib/python3.14/xml/dom/minidom.py +2027 -0
  1587. package/python/lib/python3.14/xml/dom/pulldom.py +350 -0
  1588. package/python/lib/python3.14/xml/dom/xmlbuilder.py +389 -0
  1589. package/python/lib/python3.14/xml/etree/ElementInclude.py +186 -0
  1590. package/python/lib/python3.14/xml/etree/ElementPath.py +430 -0
  1591. package/python/lib/python3.14/xml/etree/ElementTree.py +2093 -0
  1592. package/python/lib/python3.14/xml/etree/__init__.py +33 -0
  1593. package/python/lib/python3.14/xml/etree/__pycache__/ElementInclude.cpython-314.pyc +0 -0
  1594. package/python/lib/python3.14/xml/etree/__pycache__/ElementPath.cpython-314.pyc +0 -0
  1595. package/python/lib/python3.14/xml/etree/__pycache__/ElementTree.cpython-314.pyc +0 -0
  1596. package/python/lib/python3.14/xml/etree/__pycache__/__init__.cpython-314.pyc +0 -0
  1597. package/python/lib/python3.14/xml/etree/__pycache__/cElementTree.cpython-314.pyc +0 -0
  1598. package/python/lib/python3.14/xml/etree/cElementTree.py +3 -0
  1599. package/python/lib/python3.14/xml/parsers/__init__.py +8 -0
  1600. package/python/lib/python3.14/xml/parsers/__pycache__/__init__.cpython-314.pyc +0 -0
  1601. package/python/lib/python3.14/xml/parsers/__pycache__/expat.cpython-314.pyc +0 -0
  1602. package/python/lib/python3.14/xml/parsers/expat.py +8 -0
  1603. package/python/lib/python3.14/xml/sax/__init__.py +109 -0
  1604. package/python/lib/python3.14/xml/sax/__pycache__/__init__.cpython-314.pyc +0 -0
  1605. package/python/lib/python3.14/xml/sax/__pycache__/_exceptions.cpython-314.pyc +0 -0
  1606. package/python/lib/python3.14/xml/sax/__pycache__/expatreader.cpython-314.pyc +0 -0
  1607. package/python/lib/python3.14/xml/sax/__pycache__/handler.cpython-314.pyc +0 -0
  1608. package/python/lib/python3.14/xml/sax/__pycache__/saxutils.cpython-314.pyc +0 -0
  1609. package/python/lib/python3.14/xml/sax/__pycache__/xmlreader.cpython-314.pyc +0 -0
  1610. package/python/lib/python3.14/xml/sax/_exceptions.py +127 -0
  1611. package/python/lib/python3.14/xml/sax/expatreader.py +454 -0
  1612. package/python/lib/python3.14/xml/sax/handler.py +387 -0
  1613. package/python/lib/python3.14/xml/sax/saxutils.py +370 -0
  1614. package/python/lib/python3.14/xml/sax/xmlreader.py +379 -0
  1615. package/python/lib/python3.14/xmlrpc/__init__.py +1 -0
  1616. package/python/lib/python3.14/xmlrpc/__pycache__/__init__.cpython-314.pyc +0 -0
  1617. package/python/lib/python3.14/xmlrpc/__pycache__/client.cpython-314.pyc +0 -0
  1618. package/python/lib/python3.14/xmlrpc/__pycache__/server.cpython-314.pyc +0 -0
  1619. package/python/lib/python3.14/xmlrpc/client.py +1503 -0
  1620. package/python/lib/python3.14/xmlrpc/server.py +1003 -0
  1621. package/python/lib/python3.14/zipapp.py +231 -0
  1622. package/python/lib/python3.14/zipfile/__init__.py +2488 -0
  1623. package/python/lib/python3.14/zipfile/__main__.py +4 -0
  1624. package/python/lib/python3.14/zipfile/__pycache__/__init__.cpython-314.pyc +0 -0
  1625. package/python/lib/python3.14/zipfile/__pycache__/__main__.cpython-314.pyc +0 -0
  1626. package/python/lib/python3.14/zipfile/_path/__init__.py +455 -0
  1627. package/python/lib/python3.14/zipfile/_path/__pycache__/__init__.cpython-314.pyc +0 -0
  1628. package/python/lib/python3.14/zipfile/_path/__pycache__/glob.cpython-314.pyc +0 -0
  1629. package/python/lib/python3.14/zipfile/_path/glob.py +113 -0
  1630. package/python/lib/python3.14/zipimport.py +827 -0
  1631. package/python/lib/python3.14/zoneinfo/__init__.py +34 -0
  1632. package/python/lib/python3.14/zoneinfo/__pycache__/__init__.cpython-314.pyc +0 -0
  1633. package/python/lib/python3.14/zoneinfo/__pycache__/_common.cpython-314.pyc +0 -0
  1634. package/python/lib/python3.14/zoneinfo/__pycache__/_tzpath.cpython-314.pyc +0 -0
  1635. package/python/lib/python3.14/zoneinfo/__pycache__/_zoneinfo.cpython-314.pyc +0 -0
  1636. package/python/lib/python3.14/zoneinfo/_common.py +172 -0
  1637. package/python/lib/python3.14/zoneinfo/_tzpath.py +189 -0
  1638. package/python/lib/python3.14/zoneinfo/_zoneinfo.py +779 -0
  1639. package/python/licenses/LICENSE.bdb.txt +126 -0
  1640. package/python/licenses/LICENSE.bzip2.txt +37 -0
  1641. package/python/licenses/LICENSE.cpython.txt +771 -0
  1642. package/python/licenses/LICENSE.expat.txt +21 -0
  1643. package/python/licenses/LICENSE.libX11.txt +942 -0
  1644. package/python/licenses/LICENSE.libXau.txt +21 -0
  1645. package/python/licenses/LICENSE.libedit.txt +29 -0
  1646. package/python/licenses/LICENSE.libffi.txt +21 -0
  1647. package/python/licenses/LICENSE.liblzma.txt +13 -0
  1648. package/python/licenses/LICENSE.libuuid.txt +27 -0
  1649. package/python/licenses/LICENSE.libxcb.txt +30 -0
  1650. package/python/licenses/LICENSE.mpdecimal.txt +24 -0
  1651. package/python/licenses/LICENSE.ncurses.txt +29 -0
  1652. package/python/licenses/LICENSE.openssl-3.txt +177 -0
  1653. package/python/licenses/LICENSE.sqlite.txt +23 -0
  1654. package/python/licenses/LICENSE.tcl.txt +40 -0
  1655. package/python/licenses/LICENSE.tix.txt +54 -0
  1656. package/python/licenses/LICENSE.zlib-ng.txt +19 -0
  1657. package/python/licenses/LICENSE.zlib.txt +22 -0
  1658. package/python/licenses/LICENSE.zstd.txt +30 -0
@@ -0,0 +1,3682 @@
1
+ """
2
+ The Python Debugger Pdb
3
+ =======================
4
+
5
+ To use the debugger in its simplest form:
6
+
7
+ >>> import pdb
8
+ >>> pdb.run('<a statement>')
9
+
10
+ The debugger's prompt is '(Pdb) '. This will stop in the first
11
+ function call in <a statement>.
12
+
13
+ Alternatively, if a statement terminated with an unhandled exception,
14
+ you can use pdb's post-mortem facility to inspect the contents of the
15
+ traceback:
16
+
17
+ >>> <a statement>
18
+ <exception traceback>
19
+ >>> import pdb
20
+ >>> pdb.pm()
21
+
22
+ The commands recognized by the debugger are listed in the next
23
+ section. Most can be abbreviated as indicated; e.g., h(elp) means
24
+ that 'help' can be typed as 'h' or 'help' (but not as 'he' or 'hel',
25
+ nor as 'H' or 'Help' or 'HELP'). Optional arguments are enclosed in
26
+ square brackets. Alternatives in the command syntax are separated
27
+ by a vertical bar (|).
28
+
29
+ A blank line repeats the previous command literally, except for
30
+ 'list', where it lists the next 11 lines.
31
+
32
+ Commands that the debugger doesn't recognize are assumed to be Python
33
+ statements and are executed in the context of the program being
34
+ debugged. Python statements can also be prefixed with an exclamation
35
+ point ('!'). This is a powerful way to inspect the program being
36
+ debugged; it is even possible to change variables or call functions.
37
+ When an exception occurs in such a statement, the exception name is
38
+ printed but the debugger's state is not changed.
39
+
40
+ The debugger supports aliases, which can save typing. And aliases can
41
+ have parameters (see the alias help entry) which allows one a certain
42
+ level of adaptability to the context under examination.
43
+
44
+ Multiple commands may be entered on a single line, separated by the
45
+ pair ';;'. No intelligence is applied to separating the commands; the
46
+ input is split at the first ';;', even if it is in the middle of a
47
+ quoted string.
48
+
49
+ If a file ".pdbrc" exists in your home directory or in the current
50
+ directory, it is read in and executed as if it had been typed at the
51
+ debugger prompt. This is particularly useful for aliases. If both
52
+ files exist, the one in the home directory is read first and aliases
53
+ defined there can be overridden by the local file. This behavior can be
54
+ disabled by passing the "readrc=False" argument to the Pdb constructor.
55
+
56
+ Aside from aliases, the debugger is not directly programmable; but it
57
+ is implemented as a class from which you can derive your own debugger
58
+ class, which you can make as fancy as you like.
59
+
60
+
61
+ Debugger commands
62
+ =================
63
+
64
+ """
65
+ # NOTE: the actual command documentation is collected from docstrings of the
66
+ # commands and is appended to __doc__ after the class has been defined.
67
+
68
+ import os
69
+ import io
70
+ import re
71
+ import sys
72
+ import cmd
73
+ import bdb
74
+ import dis
75
+ import code
76
+ import glob
77
+ import json
78
+ import stat
79
+ import token
80
+ import types
81
+ import atexit
82
+ import codeop
83
+ import pprint
84
+ import signal
85
+ import socket
86
+ import typing
87
+ import asyncio
88
+ import inspect
89
+ import weakref
90
+ import builtins
91
+ import tempfile
92
+ import textwrap
93
+ import tokenize
94
+ import itertools
95
+ import traceback
96
+ import linecache
97
+ import selectors
98
+ import threading
99
+ import _colorize
100
+ import _pyrepl.utils
101
+
102
+ from contextlib import ExitStack, closing, contextmanager
103
+ from types import CodeType
104
+ from warnings import deprecated
105
+
106
+
107
+ class Restart(Exception):
108
+ """Causes a debugger to be restarted for the debugged python program."""
109
+ pass
110
+
111
+ __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
112
+ "post_mortem", "set_default_backend", "get_default_backend", "help"]
113
+
114
+
115
+ def find_first_executable_line(code):
116
+ """ Try to find the first executable line of the code object.
117
+
118
+ Equivalently, find the line number of the instruction that's
119
+ after RESUME
120
+
121
+ Return code.co_firstlineno if no executable line is found.
122
+ """
123
+ prev = None
124
+ for instr in dis.get_instructions(code):
125
+ if prev is not None and prev.opname == 'RESUME':
126
+ if instr.positions.lineno is not None:
127
+ return instr.positions.lineno
128
+ return code.co_firstlineno
129
+ prev = instr
130
+ return code.co_firstlineno
131
+
132
+ def find_function(funcname, filename):
133
+ cre = re.compile(r'def\s+%s(\s*\[.+\])?\s*[(]' % re.escape(funcname))
134
+ try:
135
+ fp = tokenize.open(filename)
136
+ except OSError:
137
+ lines = linecache.getlines(filename)
138
+ if not lines:
139
+ return None
140
+ fp = io.StringIO(''.join(lines))
141
+ funcdef = ""
142
+ funcstart = 0
143
+ # consumer of this info expects the first line to be 1
144
+ with fp:
145
+ for lineno, line in enumerate(fp, start=1):
146
+ if cre.match(line):
147
+ funcstart, funcdef = lineno, line
148
+ elif funcdef:
149
+ funcdef += line
150
+
151
+ if funcdef:
152
+ try:
153
+ code = compile(funcdef, filename, 'exec')
154
+ except Exception:
155
+ continue
156
+ # We should always be able to find the code object here
157
+ funccode = next(c for c in code.co_consts if
158
+ isinstance(c, CodeType) and c.co_name == funcname)
159
+ lineno_offset = find_first_executable_line(funccode)
160
+ return funcname, filename, funcstart + lineno_offset - 1
161
+ return None
162
+
163
+ def lasti2lineno(code, lasti):
164
+ linestarts = list(dis.findlinestarts(code))
165
+ linestarts.reverse()
166
+ for i, lineno in linestarts:
167
+ if lasti >= i:
168
+ return lineno
169
+ return 0
170
+
171
+
172
+ class _rstr(str):
173
+ """String that doesn't quote its repr."""
174
+ def __repr__(self):
175
+ return self
176
+
177
+
178
+ class _ExecutableTarget:
179
+ filename: str
180
+ code: CodeType | str
181
+ namespace: dict
182
+
183
+
184
+ class _ScriptTarget(_ExecutableTarget):
185
+ def __init__(self, target):
186
+ self._check(target)
187
+ self._target = self._safe_realpath(target)
188
+
189
+ # If PYTHONSAFEPATH (-P) is not set, sys.path[0] is the directory
190
+ # of pdb, and we should replace it with the directory of the script
191
+ if not sys.flags.safe_path:
192
+ sys.path[0] = os.path.dirname(self._target)
193
+
194
+ @staticmethod
195
+ def _check(target):
196
+ """
197
+ Check that target is plausibly a script.
198
+ """
199
+ if not os.path.exists(target):
200
+ print(f'Error: {target} does not exist')
201
+ sys.exit(1)
202
+ if os.path.isdir(target):
203
+ print(f'Error: {target} is a directory')
204
+ sys.exit(1)
205
+
206
+ @staticmethod
207
+ def _safe_realpath(path):
208
+ """
209
+ Return the canonical path (realpath) if it is accessible from the userspace.
210
+ Otherwise (for example, if the path is a symlink to an anonymous pipe),
211
+ return the original path.
212
+
213
+ See GH-142315.
214
+ """
215
+ realpath = os.path.realpath(path)
216
+ return realpath if os.path.exists(realpath) else path
217
+
218
+ def __repr__(self):
219
+ return self._target
220
+
221
+ @property
222
+ def filename(self):
223
+ return self._target
224
+
225
+ @property
226
+ def code(self):
227
+ # Open the file each time because the file may be modified
228
+ with io.open_code(self._target) as fp:
229
+ return f"exec(compile({fp.read()!r}, {self._target!r}, 'exec'))"
230
+
231
+ @property
232
+ def namespace(self):
233
+ return dict(
234
+ __name__='__main__',
235
+ __file__=self._target,
236
+ __builtins__=__builtins__,
237
+ __spec__=None,
238
+ )
239
+
240
+
241
+ class _ModuleTarget(_ExecutableTarget):
242
+ def __init__(self, target):
243
+ self._target = target
244
+
245
+ import runpy
246
+ try:
247
+ _, self._spec, self._code = runpy._get_module_details(self._target)
248
+ except ImportError as e:
249
+ print(f"ImportError: {e}")
250
+ sys.exit(1)
251
+ except Exception:
252
+ traceback.print_exc()
253
+ sys.exit(1)
254
+
255
+ def __repr__(self):
256
+ return self._target
257
+
258
+ @property
259
+ def filename(self):
260
+ return self._code.co_filename
261
+
262
+ @property
263
+ def code(self):
264
+ return self._code
265
+
266
+ @property
267
+ def namespace(self):
268
+ return dict(
269
+ __name__='__main__',
270
+ __file__=os.path.normcase(os.path.abspath(self.filename)),
271
+ __package__=self._spec.parent,
272
+ __loader__=self._spec.loader,
273
+ __spec__=self._spec,
274
+ __builtins__=__builtins__,
275
+ )
276
+
277
+
278
+ class _ZipTarget(_ExecutableTarget):
279
+ def __init__(self, target):
280
+ import runpy
281
+
282
+ self._target = os.path.realpath(target)
283
+ sys.path.insert(0, self._target)
284
+ try:
285
+ _, self._spec, self._code = runpy._get_main_module_details()
286
+ except ImportError as e:
287
+ print(f"ImportError: {e}")
288
+ sys.exit(1)
289
+ except Exception:
290
+ traceback.print_exc()
291
+ sys.exit(1)
292
+
293
+ def __repr__(self):
294
+ return self._target
295
+
296
+ @property
297
+ def filename(self):
298
+ return self._code.co_filename
299
+
300
+ @property
301
+ def code(self):
302
+ return self._code
303
+
304
+ @property
305
+ def namespace(self):
306
+ return dict(
307
+ __name__='__main__',
308
+ __file__=os.path.normcase(os.path.abspath(self.filename)),
309
+ __package__=self._spec.parent,
310
+ __loader__=self._spec.loader,
311
+ __spec__=self._spec,
312
+ __builtins__=__builtins__,
313
+ )
314
+
315
+
316
+ class _PdbInteractiveConsole(code.InteractiveConsole):
317
+ def __init__(self, ns, message):
318
+ self._message = message
319
+ super().__init__(locals=ns, local_exit=True)
320
+
321
+ def write(self, data):
322
+ self._message(data, end='')
323
+
324
+
325
+ # Interaction prompt line will separate file and call info from code
326
+ # text using value of line_prefix string. A newline and arrow may
327
+ # be to your liking. You can set it once pdb is imported using the
328
+ # command "pdb.line_prefix = '\n% '".
329
+ # line_prefix = ': ' # Use this to get the old situation back
330
+ line_prefix = '\n-> ' # Probably a better default
331
+
332
+
333
+ # The default backend to use for Pdb instances if not specified
334
+ # Should be either 'settrace' or 'monitoring'
335
+ _default_backend = 'settrace'
336
+
337
+
338
+ def set_default_backend(backend):
339
+ """Set the default backend to use for Pdb instances."""
340
+ global _default_backend
341
+ if backend not in ('settrace', 'monitoring'):
342
+ raise ValueError("Invalid backend: %s" % backend)
343
+ _default_backend = backend
344
+
345
+
346
+ def get_default_backend():
347
+ """Get the default backend to use for Pdb instances."""
348
+ return _default_backend
349
+
350
+
351
+ class Pdb(bdb.Bdb, cmd.Cmd):
352
+ _previous_sigint_handler = None
353
+
354
+ # Limit the maximum depth of chained exceptions, we should be handling cycles,
355
+ # but in case there are recursions, we stop at 999.
356
+ MAX_CHAINED_EXCEPTION_DEPTH = 999
357
+
358
+ _file_mtime_table = {}
359
+
360
+ _last_pdb_instance = None
361
+
362
+ def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None,
363
+ nosigint=False, readrc=True, mode=None, backend=None, colorize=False):
364
+ bdb.Bdb.__init__(self, skip=skip, backend=backend if backend else get_default_backend())
365
+ cmd.Cmd.__init__(self, completekey, stdin, stdout)
366
+ sys.audit("pdb.Pdb")
367
+ if stdout:
368
+ self.use_rawinput = 0
369
+ self.prompt = '(Pdb) '
370
+ self.aliases = {}
371
+ self.displaying = {}
372
+ self.mainpyfile = ''
373
+ self._wait_for_mainpyfile = False
374
+ self.tb_lineno = {}
375
+ self.mode = mode
376
+ self.colorize = colorize and _colorize.can_colorize(file=stdout or sys.stdout)
377
+ # Try to load readline if it exists
378
+ try:
379
+ import readline
380
+ # remove some common file name delimiters
381
+ readline.set_completer_delims(' \t\n`@#%^&*()=+[{]}\\|;:\'",<>?')
382
+ except ImportError:
383
+ pass
384
+
385
+ self.allow_kbdint = False
386
+ self.nosigint = nosigint
387
+ # Consider these characters as part of the command so when the users type
388
+ # c.a or c['a'], it won't be recognized as a c(ontinue) command
389
+ self.identchars = cmd.Cmd.identchars + '=.[](),"\'+-*/%@&|<>~^'
390
+
391
+ # Read ~/.pdbrc and ./.pdbrc
392
+ self.rcLines = []
393
+ if readrc:
394
+ try:
395
+ with open(os.path.expanduser('~/.pdbrc'), encoding='utf-8') as rcFile:
396
+ self.rcLines.extend(rcFile)
397
+ except OSError:
398
+ pass
399
+ try:
400
+ with open(".pdbrc", encoding='utf-8') as rcFile:
401
+ self.rcLines.extend(rcFile)
402
+ except OSError:
403
+ pass
404
+
405
+ self.commands = {} # associates a command list to breakpoint numbers
406
+ self.commands_defining = False # True while in the process of defining
407
+ # a command list
408
+ self.commands_bnum = None # The breakpoint number for which we are
409
+ # defining a list
410
+
411
+ self.async_shim_frame = None
412
+ self.async_awaitable = None
413
+
414
+ self._chained_exceptions = tuple()
415
+ self._chained_exception_index = 0
416
+
417
+ self._current_task = None
418
+
419
+ def set_trace(self, frame=None, *, commands=None):
420
+ Pdb._last_pdb_instance = self
421
+ if frame is None:
422
+ frame = sys._getframe().f_back
423
+
424
+ if commands is not None:
425
+ self.rcLines.extend(commands)
426
+
427
+ super().set_trace(frame)
428
+
429
+ async def set_trace_async(self, frame=None, *, commands=None):
430
+ if self.async_awaitable is not None:
431
+ # We are already in a set_trace_async call, do not mess with it
432
+ return
433
+
434
+ if frame is None:
435
+ frame = sys._getframe().f_back
436
+
437
+ # We need set_trace to set up the basics, however, this will call
438
+ # set_stepinstr() will we need to compensate for, because we don't
439
+ # want to trigger on calls
440
+ self.set_trace(frame, commands=commands)
441
+ # Changing the stopframe will disable trace dispatch on calls
442
+ self.stopframe = frame
443
+ # We need to stop tracing because we don't have the privilege to avoid
444
+ # triggering tracing functions as normal, as we are not already in
445
+ # tracing functions
446
+ self.stop_trace()
447
+
448
+ self.async_shim_frame = sys._getframe()
449
+ self.async_awaitable = None
450
+
451
+ while True:
452
+ self.async_awaitable = None
453
+ # Simulate a trace event
454
+ # This should bring up pdb and make pdb believe it's debugging the
455
+ # caller frame
456
+ self.trace_dispatch(frame, "opcode", None)
457
+ if self.async_awaitable is not None:
458
+ try:
459
+ if self.breaks:
460
+ with self.set_enterframe(frame):
461
+ # set_continue requires enterframe to work
462
+ self.set_continue()
463
+ self.start_trace()
464
+ await self.async_awaitable
465
+ except Exception:
466
+ self._error_exc()
467
+ else:
468
+ break
469
+
470
+ self.async_shim_frame = None
471
+
472
+ # start the trace (the actual command is already set by set_* calls)
473
+ if self.returnframe is None and self.stoplineno == -1 and not self.breaks:
474
+ # This means we did a continue without any breakpoints, we should not
475
+ # start the trace
476
+ return
477
+
478
+ self.start_trace()
479
+
480
+ def sigint_handler(self, signum, frame):
481
+ if self.allow_kbdint:
482
+ raise KeyboardInterrupt
483
+ self.message("\nProgram interrupted. (Use 'cont' to resume).")
484
+ self.set_step()
485
+ self.set_trace(frame)
486
+
487
+ def reset(self):
488
+ bdb.Bdb.reset(self)
489
+ self.forget()
490
+
491
+ def forget(self):
492
+ self.lineno = None
493
+ self.stack = []
494
+ self.curindex = 0
495
+ if hasattr(self, 'curframe') and self.curframe:
496
+ self.curframe.f_globals.pop('__pdb_convenience_variables', None)
497
+ self.curframe = None
498
+ self.tb_lineno.clear()
499
+
500
+ def setup(self, f, tb):
501
+ self.forget()
502
+ self.stack, self.curindex = self.get_stack(f, tb)
503
+ while tb:
504
+ # when setting up post-mortem debugging with a traceback, save all
505
+ # the original line numbers to be displayed along the current line
506
+ # numbers (which can be different, e.g. due to finally clauses)
507
+ lineno = lasti2lineno(tb.tb_frame.f_code, tb.tb_lasti)
508
+ self.tb_lineno[tb.tb_frame] = lineno
509
+ tb = tb.tb_next
510
+ self.curframe = self.stack[self.curindex][0]
511
+ self.set_convenience_variable(self.curframe, '_frame', self.curframe)
512
+ if self._current_task:
513
+ self.set_convenience_variable(self.curframe, '_asynctask', self._current_task)
514
+ self._save_initial_file_mtime(self.curframe)
515
+
516
+ if self._chained_exceptions:
517
+ self.set_convenience_variable(
518
+ self.curframe,
519
+ '_exception',
520
+ self._chained_exceptions[self._chained_exception_index],
521
+ )
522
+
523
+ if self.rcLines:
524
+ self.cmdqueue = [
525
+ line for line in self.rcLines
526
+ if line.strip() and not line.strip().startswith("#")
527
+ ]
528
+ self.rcLines = []
529
+
530
+ @property
531
+ @deprecated("The frame locals reference is no longer cached. Use 'curframe.f_locals' instead.")
532
+ def curframe_locals(self):
533
+ return self.curframe.f_locals
534
+
535
+ @curframe_locals.setter
536
+ @deprecated("Setting 'curframe_locals' no longer has any effect. Update the contents of 'curframe.f_locals' instead.")
537
+ def curframe_locals(self, value):
538
+ pass
539
+
540
+ # Override Bdb methods
541
+
542
+ def user_call(self, frame, argument_list):
543
+ """This method is called when there is the remote possibility
544
+ that we ever need to stop in this function."""
545
+ if self._wait_for_mainpyfile:
546
+ return
547
+ if self.stop_here(frame):
548
+ self.message('--Call--')
549
+ self.interaction(frame, None)
550
+
551
+ def user_line(self, frame):
552
+ """This function is called when we stop or break at this line."""
553
+ if self._wait_for_mainpyfile:
554
+ if (self.mainpyfile != self.canonic(frame.f_code.co_filename)):
555
+ return
556
+ self._wait_for_mainpyfile = False
557
+ if self.trace_opcodes:
558
+ # GH-127321
559
+ # We want to avoid stopping at an opcode that does not have
560
+ # an associated line number because pdb does not like it
561
+ if frame.f_lineno is None:
562
+ self.set_stepinstr()
563
+ return
564
+ self.bp_commands(frame)
565
+ self.interaction(frame, None)
566
+
567
+ user_opcode = user_line
568
+
569
+ def bp_commands(self, frame):
570
+ """Call every command that was set for the current active breakpoint
571
+ (if there is one).
572
+
573
+ Returns True if the normal interaction function must be called,
574
+ False otherwise."""
575
+ # self.currentbp is set in bdb in Bdb.break_here if a breakpoint was hit
576
+ if getattr(self, "currentbp", False) and \
577
+ self.currentbp in self.commands:
578
+ currentbp = self.currentbp
579
+ self.currentbp = 0
580
+ for line in self.commands[currentbp]:
581
+ self.cmdqueue.append(line)
582
+ self.cmdqueue.append(f'_pdbcmd_restore_lastcmd {self.lastcmd}')
583
+
584
+ def user_return(self, frame, return_value):
585
+ """This function is called when a return trap is set here."""
586
+ if self._wait_for_mainpyfile:
587
+ return
588
+ frame.f_locals['__return__'] = return_value
589
+ self.set_convenience_variable(frame, '_retval', return_value)
590
+ self.message('--Return--')
591
+ self.interaction(frame, None)
592
+
593
+ def user_exception(self, frame, exc_info):
594
+ """This function is called if an exception occurs,
595
+ but only if we are to stop at or just below this level."""
596
+ if self._wait_for_mainpyfile:
597
+ return
598
+ exc_type, exc_value, exc_traceback = exc_info
599
+ frame.f_locals['__exception__'] = exc_type, exc_value
600
+ self.set_convenience_variable(frame, '_exception', exc_value)
601
+
602
+ # An 'Internal StopIteration' exception is an exception debug event
603
+ # issued by the interpreter when handling a subgenerator run with
604
+ # 'yield from' or a generator controlled by a for loop. No exception has
605
+ # actually occurred in this case. The debugger uses this debug event to
606
+ # stop when the debuggee is returning from such generators.
607
+ prefix = 'Internal ' if (not exc_traceback
608
+ and exc_type is StopIteration) else ''
609
+ self.message('%s%s' % (prefix, self._format_exc(exc_value)))
610
+ self.interaction(frame, exc_traceback)
611
+
612
+ # General interaction function
613
+ def _cmdloop(self):
614
+ while True:
615
+ try:
616
+ # keyboard interrupts allow for an easy way to cancel
617
+ # the current command, so allow them during interactive input
618
+ self.allow_kbdint = True
619
+ self.cmdloop()
620
+ self.allow_kbdint = False
621
+ break
622
+ except KeyboardInterrupt:
623
+ self.message('--KeyboardInterrupt--')
624
+
625
+ def _save_initial_file_mtime(self, frame):
626
+ """save the mtime of the all the files in the frame stack in the file mtime table
627
+ if they haven't been saved yet."""
628
+ while frame:
629
+ filename = frame.f_code.co_filename
630
+ if filename not in self._file_mtime_table:
631
+ try:
632
+ self._file_mtime_table[filename] = os.path.getmtime(filename)
633
+ except Exception:
634
+ pass
635
+ frame = frame.f_back
636
+
637
+ def _validate_file_mtime(self):
638
+ """Check if the source file of the current frame has been modified.
639
+ If so, give a warning and reset the modify time to current."""
640
+ try:
641
+ filename = self.curframe.f_code.co_filename
642
+ mtime = os.path.getmtime(filename)
643
+ except Exception:
644
+ return
645
+ if (filename in self._file_mtime_table and
646
+ mtime != self._file_mtime_table[filename]):
647
+ self.message(f"*** WARNING: file '{filename}' was edited, "
648
+ "running stale code until the program is rerun")
649
+ self._file_mtime_table[filename] = mtime
650
+
651
+ # Called before loop, handles display expressions
652
+ # Set up convenience variable containers
653
+ def _show_display(self):
654
+ displaying = self.displaying.get(self.curframe)
655
+ if displaying:
656
+ for expr, oldvalue in displaying.items():
657
+ newvalue = self._getval_except(expr)
658
+ # check for identity first; this prevents custom __eq__ to
659
+ # be called at every loop, and also prevents instances whose
660
+ # fields are changed to be displayed
661
+ if newvalue is not oldvalue and newvalue != oldvalue:
662
+ displaying[expr] = newvalue
663
+ self.message('display %s: %s [old: %s]' %
664
+ (expr, self._safe_repr(newvalue, expr),
665
+ self._safe_repr(oldvalue, expr)))
666
+
667
+ def _get_tb_and_exceptions(self, tb_or_exc):
668
+ """
669
+ Given a tracecack or an exception, return a tuple of chained exceptions
670
+ and current traceback to inspect.
671
+
672
+ This will deal with selecting the right ``__cause__`` or ``__context__``
673
+ as well as handling cycles, and return a flattened list of exceptions we
674
+ can jump to with do_exceptions.
675
+
676
+ """
677
+ _exceptions = []
678
+ if isinstance(tb_or_exc, BaseException):
679
+ traceback, current = tb_or_exc.__traceback__, tb_or_exc
680
+
681
+ while current is not None:
682
+ if current in _exceptions:
683
+ break
684
+ _exceptions.append(current)
685
+ if current.__cause__ is not None:
686
+ current = current.__cause__
687
+ elif (
688
+ current.__context__ is not None and not current.__suppress_context__
689
+ ):
690
+ current = current.__context__
691
+
692
+ if len(_exceptions) >= self.MAX_CHAINED_EXCEPTION_DEPTH:
693
+ self.message(
694
+ f"More than {self.MAX_CHAINED_EXCEPTION_DEPTH}"
695
+ " chained exceptions found, not all exceptions"
696
+ "will be browsable with `exceptions`."
697
+ )
698
+ break
699
+ else:
700
+ traceback = tb_or_exc
701
+ return tuple(reversed(_exceptions)), traceback
702
+
703
+ @contextmanager
704
+ def _hold_exceptions(self, exceptions):
705
+ """
706
+ Context manager to ensure proper cleaning of exceptions references
707
+
708
+ When given a chained exception instead of a traceback,
709
+ pdb may hold references to many objects which may leak memory.
710
+
711
+ We use this context manager to make sure everything is properly cleaned
712
+
713
+ """
714
+ try:
715
+ self._chained_exceptions = exceptions
716
+ self._chained_exception_index = len(exceptions) - 1
717
+ yield
718
+ finally:
719
+ # we can't put those in forget as otherwise they would
720
+ # be cleared on exception change
721
+ self._chained_exceptions = tuple()
722
+ self._chained_exception_index = 0
723
+
724
+ def _get_asyncio_task(self):
725
+ try:
726
+ task = asyncio.current_task()
727
+ except RuntimeError:
728
+ task = None
729
+ return task
730
+
731
+ def interaction(self, frame, tb_or_exc):
732
+ # Restore the previous signal handler at the Pdb prompt.
733
+ if Pdb._previous_sigint_handler:
734
+ try:
735
+ signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
736
+ except ValueError: # ValueError: signal only works in main thread
737
+ pass
738
+ else:
739
+ Pdb._previous_sigint_handler = None
740
+
741
+ self._current_task = self._get_asyncio_task()
742
+
743
+ _chained_exceptions, tb = self._get_tb_and_exceptions(tb_or_exc)
744
+ if isinstance(tb_or_exc, BaseException):
745
+ assert tb is not None, "main exception must have a traceback"
746
+ with self._hold_exceptions(_chained_exceptions):
747
+ self.setup(frame, tb)
748
+ # We should print the stack entry if and only if the user input
749
+ # is expected, and we should print it right before the user input.
750
+ # We achieve this by appending _pdbcmd_print_frame_status to the
751
+ # command queue. If cmdqueue is not exhausted, the user input is
752
+ # not expected and we will not print the stack entry.
753
+ self.cmdqueue.append('_pdbcmd_print_frame_status')
754
+ self._cmdloop()
755
+ # If _pdbcmd_print_frame_status is not used, pop it out
756
+ if self.cmdqueue and self.cmdqueue[-1] == '_pdbcmd_print_frame_status':
757
+ self.cmdqueue.pop()
758
+ self.forget()
759
+
760
+ def displayhook(self, obj):
761
+ """Custom displayhook for the exec in default(), which prevents
762
+ assignment of the _ variable in the builtins.
763
+ """
764
+ # reproduce the behavior of the standard displayhook, not printing None
765
+ if obj is not None:
766
+ self.message(repr(obj))
767
+
768
+ @contextmanager
769
+ def _enable_multiline_input(self):
770
+ try:
771
+ import readline
772
+ except ImportError:
773
+ yield
774
+ return
775
+
776
+ def input_auto_indent():
777
+ last_index = readline.get_current_history_length()
778
+ last_line = readline.get_history_item(last_index)
779
+ if last_line:
780
+ if last_line.isspace():
781
+ # If the last line is empty, we don't need to indent
782
+ return
783
+
784
+ last_line = last_line.rstrip('\r\n')
785
+ indent = len(last_line) - len(last_line.lstrip())
786
+ if last_line.endswith(":"):
787
+ indent += 4
788
+ readline.insert_text(' ' * indent)
789
+
790
+ completenames = self.completenames
791
+ try:
792
+ self.completenames = self.complete_multiline_names
793
+ readline.set_startup_hook(input_auto_indent)
794
+ yield
795
+ finally:
796
+ readline.set_startup_hook()
797
+ self.completenames = completenames
798
+ return
799
+
800
+ def _exec_in_closure(self, source, globals, locals):
801
+ """ Run source code in closure so code object created within source
802
+ can find variables in locals correctly
803
+
804
+ returns True if the source is executed, False otherwise
805
+ """
806
+
807
+ # Determine if the source should be executed in closure. Only when the
808
+ # source compiled to multiple code objects, we should use this feature.
809
+ # Otherwise, we can just raise an exception and normal exec will be used.
810
+
811
+ code = compile(source, "<string>", "exec")
812
+ if not any(isinstance(const, CodeType) for const in code.co_consts):
813
+ return False
814
+
815
+ # locals could be a proxy which does not support pop
816
+ # copy it first to avoid modifying the original locals
817
+ locals_copy = dict(locals)
818
+
819
+ locals_copy["__pdb_eval__"] = {
820
+ "result": None,
821
+ "write_back": {}
822
+ }
823
+
824
+ # If the source is an expression, we need to print its value
825
+ try:
826
+ compile(source, "<string>", "eval")
827
+ except SyntaxError:
828
+ pass
829
+ else:
830
+ source = "__pdb_eval__['result'] = " + source
831
+
832
+ # Add write-back to update the locals
833
+ source = ("try:\n" +
834
+ textwrap.indent(source, " ") + "\n" +
835
+ "finally:\n" +
836
+ " __pdb_eval__['write_back'] = locals()")
837
+
838
+ # Build a closure source code with freevars from locals like:
839
+ # def __pdb_outer():
840
+ # var = None
841
+ # def __pdb_scope(): # This is the code object we want to execute
842
+ # nonlocal var
843
+ # <source>
844
+ # return __pdb_scope.__code__
845
+ source_with_closure = ("def __pdb_outer():\n" +
846
+ "\n".join(f" {var} = None" for var in locals_copy) + "\n" +
847
+ " def __pdb_scope():\n" +
848
+ "\n".join(f" nonlocal {var}" for var in locals_copy) + "\n" +
849
+ textwrap.indent(source, " ") + "\n" +
850
+ " return __pdb_scope.__code__"
851
+ )
852
+
853
+ # Get the code object of __pdb_scope()
854
+ # The exec fills locals_copy with the __pdb_outer() function and we can call
855
+ # that to get the code object of __pdb_scope()
856
+ ns = {}
857
+ try:
858
+ exec(source_with_closure, {}, ns)
859
+ except Exception:
860
+ return False
861
+ code = ns["__pdb_outer"]()
862
+
863
+ cells = tuple(types.CellType(locals_copy.get(var)) for var in code.co_freevars)
864
+
865
+ try:
866
+ exec(code, globals, locals_copy, closure=cells)
867
+ except Exception:
868
+ return False
869
+
870
+ # get the data we need from the statement
871
+ pdb_eval = locals_copy["__pdb_eval__"]
872
+
873
+ # __pdb_eval__ should not be updated back to locals
874
+ pdb_eval["write_back"].pop("__pdb_eval__")
875
+
876
+ # Write all local variables back to locals
877
+ locals.update(pdb_eval["write_back"])
878
+ eval_result = pdb_eval["result"]
879
+ if eval_result is not None:
880
+ self.message(repr(eval_result))
881
+
882
+ return True
883
+
884
+ def _exec_await(self, source, globals, locals):
885
+ """ Run source code that contains await by playing with async shim frame"""
886
+ # Put the source in an async function
887
+ source_async = (
888
+ "async def __pdb_await():\n" +
889
+ textwrap.indent(source, " ") + '\n' +
890
+ " __pdb_locals.update(locals())"
891
+ )
892
+ ns = globals | locals
893
+ # We use __pdb_locals to do write back
894
+ ns["__pdb_locals"] = locals
895
+ exec(source_async, ns)
896
+ self.async_awaitable = ns["__pdb_await"]()
897
+
898
+ def _read_code(self, line):
899
+ buffer = line
900
+ is_await_code = False
901
+ code = None
902
+ try:
903
+ if (code := codeop.compile_command(line + '\n', '<stdin>', 'single')) is None:
904
+ # Multi-line mode
905
+ with self._enable_multiline_input():
906
+ buffer = line
907
+ continue_prompt = "... "
908
+ while (code := codeop.compile_command(buffer, '<stdin>', 'single')) is None:
909
+ if self.use_rawinput:
910
+ try:
911
+ line = input(continue_prompt)
912
+ except (EOFError, KeyboardInterrupt):
913
+ self.lastcmd = ""
914
+ print('\n')
915
+ return None, None, False
916
+ else:
917
+ self.stdout.write(continue_prompt)
918
+ self.stdout.flush()
919
+ line = self.stdin.readline()
920
+ if not len(line):
921
+ self.lastcmd = ""
922
+ self.stdout.write('\n')
923
+ self.stdout.flush()
924
+ return None, None, False
925
+ else:
926
+ line = line.rstrip('\r\n')
927
+ if line.isspace():
928
+ # empty line, just continue
929
+ buffer += '\n'
930
+ else:
931
+ buffer += '\n' + line
932
+ self.lastcmd = buffer
933
+ except SyntaxError as e:
934
+ # Maybe it's an await expression/statement
935
+ if (
936
+ self.async_shim_frame is not None
937
+ and e.msg == "'await' outside function"
938
+ ):
939
+ is_await_code = True
940
+ else:
941
+ raise
942
+
943
+ return code, buffer, is_await_code
944
+
945
+ def default(self, line):
946
+ if line[:1] == '!': line = line[1:].strip()
947
+ locals = self.curframe.f_locals
948
+ globals = self.curframe.f_globals
949
+ try:
950
+ code, buffer, is_await_code = self._read_code(line)
951
+ if buffer is None:
952
+ return
953
+ save_stdout = sys.stdout
954
+ save_stdin = sys.stdin
955
+ save_displayhook = sys.displayhook
956
+ try:
957
+ sys.stdin = self.stdin
958
+ sys.stdout = self.stdout
959
+ sys.displayhook = self.displayhook
960
+ if is_await_code:
961
+ self._exec_await(buffer, globals, locals)
962
+ return True
963
+ else:
964
+ if not self._exec_in_closure(buffer, globals, locals):
965
+ exec(code, globals, locals)
966
+ finally:
967
+ sys.stdout = save_stdout
968
+ sys.stdin = save_stdin
969
+ sys.displayhook = save_displayhook
970
+ except:
971
+ self._error_exc()
972
+
973
+ def _replace_convenience_variables(self, line):
974
+ """Replace the convenience variables in 'line' with their values.
975
+ e.g. $foo is replaced by __pdb_convenience_variables["foo"].
976
+ Note: such pattern in string literals will be skipped"""
977
+
978
+ if "$" not in line:
979
+ return line
980
+
981
+ dollar_start = dollar_end = (-1, -1)
982
+ replace_variables = []
983
+ try:
984
+ for t in tokenize.generate_tokens(io.StringIO(line).readline):
985
+ token_type, token_string, start, end, _ = t
986
+ if token_type == token.OP and token_string == '$':
987
+ dollar_start, dollar_end = start, end
988
+ elif start == dollar_end and token_type == token.NAME:
989
+ # line is a one-line command so we only care about column
990
+ replace_variables.append((dollar_start[1], end[1], token_string))
991
+ except tokenize.TokenError:
992
+ return line
993
+
994
+ if not replace_variables:
995
+ return line
996
+
997
+ last_end = 0
998
+ line_pieces = []
999
+ for start, end, name in replace_variables:
1000
+ line_pieces.append(line[last_end:start] + f'__pdb_convenience_variables["{name}"]')
1001
+ last_end = end
1002
+ line_pieces.append(line[last_end:])
1003
+
1004
+ return ''.join(line_pieces)
1005
+
1006
+ def precmd(self, line):
1007
+ """Handle alias expansion and ';;' separator."""
1008
+ if not line.strip():
1009
+ return line
1010
+ args = line.split()
1011
+ while args[0] in self.aliases:
1012
+ line = self.aliases[args[0]]
1013
+ for idx in range(1, 10):
1014
+ if f'%{idx}' in line:
1015
+ if idx >= len(args):
1016
+ self.error(f"Not enough arguments for alias '{args[0]}'")
1017
+ # This is a no-op
1018
+ return "!"
1019
+ line = line.replace(f'%{idx}', args[idx])
1020
+ elif '%*' not in line:
1021
+ if idx < len(args):
1022
+ self.error(f"Too many arguments for alias '{args[0]}'")
1023
+ # This is a no-op
1024
+ return "!"
1025
+ break
1026
+
1027
+ line = line.replace("%*", ' '.join(args[1:]))
1028
+ args = line.split()
1029
+ # split into ';;' separated commands
1030
+ # unless it's an alias command
1031
+ if args[0] != 'alias':
1032
+ marker = line.find(';;')
1033
+ if marker >= 0:
1034
+ # queue up everything after marker
1035
+ next = line[marker+2:].lstrip()
1036
+ self.cmdqueue.insert(0, next)
1037
+ line = line[:marker].rstrip()
1038
+
1039
+ # Replace all the convenience variables
1040
+ line = self._replace_convenience_variables(line)
1041
+
1042
+ return line
1043
+
1044
+ def onecmd(self, line):
1045
+ """Interpret the argument as though it had been typed in response
1046
+ to the prompt.
1047
+
1048
+ Checks whether this line is typed at the normal prompt or in
1049
+ a breakpoint command list definition.
1050
+ """
1051
+ if not self.commands_defining:
1052
+ if line.startswith('_pdbcmd'):
1053
+ command, arg, line = self.parseline(line)
1054
+ if hasattr(self, command):
1055
+ return getattr(self, command)(arg)
1056
+ return cmd.Cmd.onecmd(self, line)
1057
+ else:
1058
+ return self.handle_command_def(line)
1059
+
1060
+ def handle_command_def(self, line):
1061
+ """Handles one command line during command list definition."""
1062
+ cmd, arg, line = self.parseline(line)
1063
+ if not cmd:
1064
+ return False
1065
+ if cmd == 'end':
1066
+ return True # end of cmd list
1067
+ elif cmd == 'EOF':
1068
+ self.message('')
1069
+ return True # end of cmd list
1070
+ cmdlist = self.commands[self.commands_bnum]
1071
+ if cmd == 'silent':
1072
+ cmdlist.append('_pdbcmd_silence_frame_status')
1073
+ return False # continue to handle other cmd def in the cmd list
1074
+ if arg:
1075
+ cmdlist.append(cmd+' '+arg)
1076
+ else:
1077
+ cmdlist.append(cmd)
1078
+ # Determine if we must stop
1079
+ try:
1080
+ func = getattr(self, 'do_' + cmd)
1081
+ except AttributeError:
1082
+ func = self.default
1083
+ # one of the resuming commands
1084
+ if func.__name__ in self.commands_resuming:
1085
+ return True
1086
+ return False
1087
+
1088
+ def _colorize_code(self, code):
1089
+ if self.colorize:
1090
+ colors = list(_pyrepl.utils.gen_colors(code))
1091
+ chars, _ = _pyrepl.utils.disp_str(code, colors=colors, force_color=True)
1092
+ code = "".join(chars)
1093
+ return code
1094
+
1095
+ # interface abstraction functions
1096
+
1097
+ def message(self, msg, end='\n'):
1098
+ print(msg, end=end, file=self.stdout)
1099
+
1100
+ def error(self, msg):
1101
+ print('***', msg, file=self.stdout)
1102
+
1103
+ # convenience variables
1104
+
1105
+ def set_convenience_variable(self, frame, name, value):
1106
+ if '__pdb_convenience_variables' not in frame.f_globals:
1107
+ frame.f_globals['__pdb_convenience_variables'] = {}
1108
+ frame.f_globals['__pdb_convenience_variables'][name] = value
1109
+
1110
+ # Generic completion functions. Individual complete_foo methods can be
1111
+ # assigned below to one of these functions.
1112
+
1113
+ @property
1114
+ def rlcompleter(self):
1115
+ """Return the `Completer` class from `rlcompleter`, while avoiding the
1116
+ side effects of changing the completer from `import rlcompleter`.
1117
+
1118
+ This is a compromise between GH-138860 and GH-139289. If GH-139289 is
1119
+ fixed, then we don't need this and we can just `import rlcompleter` in
1120
+ `Pdb.__init__`.
1121
+ """
1122
+ if not hasattr(self, "_rlcompleter"):
1123
+ try:
1124
+ import readline
1125
+ except ImportError:
1126
+ # readline is not available, just get the Completer
1127
+ from rlcompleter import Completer
1128
+ self._rlcompleter = Completer
1129
+ else:
1130
+ # importing rlcompleter could have side effect of changing
1131
+ # the current completer, we need to restore it
1132
+ prev_completer = readline.get_completer()
1133
+ from rlcompleter import Completer
1134
+ self._rlcompleter = Completer
1135
+ readline.set_completer(prev_completer)
1136
+ return self._rlcompleter
1137
+
1138
+ def completenames(self, text, line, begidx, endidx):
1139
+ # Overwrite completenames() of cmd so for the command completion,
1140
+ # if no current command matches, check for expressions as well
1141
+ commands = super().completenames(text, line, begidx, endidx)
1142
+ for alias in self.aliases:
1143
+ if alias.startswith(text):
1144
+ commands.append(alias)
1145
+ if commands:
1146
+ return commands
1147
+ else:
1148
+ expressions = self._complete_expression(text, line, begidx, endidx)
1149
+ if expressions:
1150
+ return expressions
1151
+ return self.completedefault(text, line, begidx, endidx)
1152
+
1153
+ def _complete_location(self, text, line, begidx, endidx):
1154
+ # Complete a file/module/function location for break/tbreak/clear.
1155
+ if line.strip().endswith((':', ',')):
1156
+ # Here comes a line number or a condition which we can't complete.
1157
+ return []
1158
+ # First, try to find matching functions (i.e. expressions).
1159
+ try:
1160
+ ret = self._complete_expression(text, line, begidx, endidx)
1161
+ except Exception:
1162
+ ret = []
1163
+ # Then, try to complete file names as well.
1164
+ globs = glob.glob(glob.escape(text) + '*')
1165
+ for fn in globs:
1166
+ if os.path.isdir(fn):
1167
+ ret.append(fn + '/')
1168
+ elif os.path.isfile(fn) and fn.lower().endswith(('.py', '.pyw')):
1169
+ ret.append(fn + ':')
1170
+ return ret
1171
+
1172
+ def _complete_bpnumber(self, text, line, begidx, endidx):
1173
+ # Complete a breakpoint number. (This would be more helpful if we could
1174
+ # display additional info along with the completions, such as file/line
1175
+ # of the breakpoint.)
1176
+ return [str(i) for i, bp in enumerate(bdb.Breakpoint.bpbynumber)
1177
+ if bp is not None and str(i).startswith(text)]
1178
+
1179
+ def _complete_expression(self, text, line, begidx, endidx):
1180
+ # Complete an arbitrary expression.
1181
+ if not self.curframe:
1182
+ return []
1183
+ # Collect globals and locals. It is usually not really sensible to also
1184
+ # complete builtins, and they clutter the namespace quite heavily, so we
1185
+ # leave them out.
1186
+ ns = {**self.curframe.f_globals, **self.curframe.f_locals}
1187
+ if '.' in text:
1188
+ # Walk an attribute chain up to the last part, similar to what
1189
+ # rlcompleter does. This will bail if any of the parts are not
1190
+ # simple attribute access, which is what we want.
1191
+ dotted = text.split('.')
1192
+ try:
1193
+ if dotted[0].startswith('$'):
1194
+ obj = self.curframe.f_globals['__pdb_convenience_variables'][dotted[0][1:]]
1195
+ else:
1196
+ obj = ns[dotted[0]]
1197
+ for part in dotted[1:-1]:
1198
+ obj = getattr(obj, part)
1199
+ except (KeyError, AttributeError):
1200
+ return []
1201
+ prefix = '.'.join(dotted[:-1]) + '.'
1202
+ return [prefix + n for n in dir(obj) if n.startswith(dotted[-1])]
1203
+ else:
1204
+ if text.startswith("$"):
1205
+ # Complete convenience variables
1206
+ conv_vars = self.curframe.f_globals.get('__pdb_convenience_variables', {})
1207
+ return [f"${name}" for name in conv_vars if name.startswith(text[1:])]
1208
+ # Complete a simple name.
1209
+ return [n for n in ns.keys() if n.startswith(text)]
1210
+
1211
+ def _complete_indentation(self, text, line, begidx, endidx):
1212
+ try:
1213
+ import readline
1214
+ except ImportError:
1215
+ return []
1216
+ # Fill in spaces to form a 4-space indent
1217
+ return [' ' * (4 - readline.get_begidx() % 4)]
1218
+
1219
+ def complete_multiline_names(self, text, line, begidx, endidx):
1220
+ # If text is space-only, the user entered <tab> before any text.
1221
+ # That normally means they want to indent the current line.
1222
+ if not text.strip():
1223
+ return self._complete_indentation(text, line, begidx, endidx)
1224
+ return self.completedefault(text, line, begidx, endidx)
1225
+
1226
+ def completedefault(self, text, line, begidx, endidx):
1227
+ if text.startswith("$"):
1228
+ # Complete convenience variables
1229
+ conv_vars = self.curframe.f_globals.get('__pdb_convenience_variables', {})
1230
+ return [f"${name}" for name in conv_vars if name.startswith(text[1:])]
1231
+
1232
+ state = 0
1233
+ matches = []
1234
+ completer = self.rlcompleter(self.curframe.f_globals | self.curframe.f_locals)
1235
+ while (match := completer.complete(text, state)) is not None:
1236
+ matches.append(match)
1237
+ state += 1
1238
+ return matches
1239
+
1240
+ @contextmanager
1241
+ def _enable_rlcompleter(self, ns):
1242
+ try:
1243
+ import readline
1244
+ except ImportError:
1245
+ yield
1246
+ return
1247
+
1248
+ try:
1249
+ completer = self.rlcompleter(ns)
1250
+ old_completer = readline.get_completer()
1251
+ readline.set_completer(completer.complete)
1252
+ yield
1253
+ finally:
1254
+ readline.set_completer(old_completer)
1255
+
1256
+ # Pdb meta commands, only intended to be used internally by pdb
1257
+
1258
+ def _pdbcmd_print_frame_status(self, arg):
1259
+ self.print_stack_trace(0)
1260
+ self._validate_file_mtime()
1261
+ self._show_display()
1262
+
1263
+ def _pdbcmd_silence_frame_status(self, arg):
1264
+ if self.cmdqueue and self.cmdqueue[-1] == '_pdbcmd_print_frame_status':
1265
+ self.cmdqueue.pop()
1266
+
1267
+ def _pdbcmd_restore_lastcmd(self, arg):
1268
+ self.lastcmd = arg
1269
+
1270
+ # Command definitions, called by cmdloop()
1271
+ # The argument is the remaining string on the command line
1272
+ # Return true to exit from the command loop
1273
+
1274
+ def do_commands(self, arg):
1275
+ """(Pdb) commands [bpnumber]
1276
+ (com) ...
1277
+ (com) end
1278
+ (Pdb)
1279
+
1280
+ Specify a list of commands for breakpoint number bpnumber.
1281
+ The commands themselves are entered on the following lines.
1282
+ Type a line containing just 'end' to terminate the commands.
1283
+ The commands are executed when the breakpoint is hit.
1284
+
1285
+ To remove all commands from a breakpoint, type commands and
1286
+ follow it immediately with end; that is, give no commands.
1287
+
1288
+ With no bpnumber argument, commands refers to the last
1289
+ breakpoint set.
1290
+
1291
+ You can use breakpoint commands to start your program up
1292
+ again. Simply use the continue command, or step, or any other
1293
+ command that resumes execution.
1294
+
1295
+ Specifying any command resuming execution (currently continue,
1296
+ step, next, return, jump, quit and their abbreviations)
1297
+ terminates the command list (as if that command was
1298
+ immediately followed by end). This is because any time you
1299
+ resume execution (even with a simple next or step), you may
1300
+ encounter another breakpoint -- which could have its own
1301
+ command list, leading to ambiguities about which list to
1302
+ execute.
1303
+
1304
+ If you use the 'silent' command in the command list, the usual
1305
+ message about stopping at a breakpoint is not printed. This
1306
+ may be desirable for breakpoints that are to print a specific
1307
+ message and then continue. If none of the other commands
1308
+ print anything, you will see no sign that the breakpoint was
1309
+ reached.
1310
+ """
1311
+ if not arg:
1312
+ bnum = len(bdb.Breakpoint.bpbynumber) - 1
1313
+ else:
1314
+ try:
1315
+ bnum = int(arg)
1316
+ except:
1317
+ self._print_invalid_arg(arg)
1318
+ return
1319
+ try:
1320
+ self.get_bpbynumber(bnum)
1321
+ except ValueError as err:
1322
+ self.error('cannot set commands: %s' % err)
1323
+ return
1324
+
1325
+ self.commands_bnum = bnum
1326
+ # Save old definitions for the case of a keyboard interrupt.
1327
+ if bnum in self.commands:
1328
+ old_commands = self.commands[bnum]
1329
+ else:
1330
+ old_commands = None
1331
+ self.commands[bnum] = []
1332
+
1333
+ prompt_back = self.prompt
1334
+ self.prompt = '(com) '
1335
+ self.commands_defining = True
1336
+ try:
1337
+ self.cmdloop()
1338
+ except KeyboardInterrupt:
1339
+ # Restore old definitions.
1340
+ if old_commands:
1341
+ self.commands[bnum] = old_commands
1342
+ else:
1343
+ del self.commands[bnum]
1344
+ self.error('command definition aborted, old commands restored')
1345
+ finally:
1346
+ self.commands_defining = False
1347
+ self.prompt = prompt_back
1348
+
1349
+ complete_commands = _complete_bpnumber
1350
+
1351
+ def do_break(self, arg, temporary=False):
1352
+ """b(reak) [ ([filename:]lineno | function) [, condition] ]
1353
+
1354
+ Without argument, list all breaks.
1355
+
1356
+ With a line number argument, set a break at this line in the
1357
+ current file. With a function name, set a break at the first
1358
+ executable line of that function. If a second argument is
1359
+ present, it is a string specifying an expression which must
1360
+ evaluate to true before the breakpoint is honored.
1361
+
1362
+ The line number may be prefixed with a filename and a colon,
1363
+ to specify a breakpoint in another file (probably one that
1364
+ hasn't been loaded yet). The file is searched for on
1365
+ sys.path; the .py suffix may be omitted.
1366
+ """
1367
+ if not arg:
1368
+ if self.breaks: # There's at least one
1369
+ self.message("Num Type Disp Enb Where")
1370
+ for bp in bdb.Breakpoint.bpbynumber:
1371
+ if bp:
1372
+ self.message(bp.bpformat())
1373
+ return
1374
+ # parse arguments; comma has lowest precedence
1375
+ # and cannot occur in filename
1376
+ filename = None
1377
+ lineno = None
1378
+ cond = None
1379
+ module_globals = None
1380
+ comma = arg.find(',')
1381
+ if comma > 0:
1382
+ # parse stuff after comma: "condition"
1383
+ cond = arg[comma+1:].lstrip()
1384
+ if err := self._compile_error_message(cond):
1385
+ self.error('Invalid condition %s: %r' % (cond, err))
1386
+ return
1387
+ arg = arg[:comma].rstrip()
1388
+ # parse stuff before comma: [filename:]lineno | function
1389
+ colon = arg.rfind(':')
1390
+ funcname = None
1391
+ if colon >= 0:
1392
+ filename = arg[:colon].rstrip()
1393
+ f = self.lookupmodule(filename)
1394
+ if not f:
1395
+ self.error('%r not found from sys.path' % filename)
1396
+ return
1397
+ else:
1398
+ filename = f
1399
+ arg = arg[colon+1:].lstrip()
1400
+ try:
1401
+ lineno = int(arg)
1402
+ except ValueError:
1403
+ self.error('Bad lineno: %s' % arg)
1404
+ return
1405
+ else:
1406
+ # no colon; can be lineno or function
1407
+ try:
1408
+ lineno = int(arg)
1409
+ except ValueError:
1410
+ try:
1411
+ func = eval(arg,
1412
+ self.curframe.f_globals,
1413
+ self.curframe.f_locals)
1414
+ except:
1415
+ func = arg
1416
+ try:
1417
+ if hasattr(func, '__func__'):
1418
+ func = func.__func__
1419
+ code = func.__code__
1420
+ #use co_name to identify the bkpt (function names
1421
+ #could be aliased, but co_name is invariant)
1422
+ funcname = code.co_name
1423
+ lineno = find_first_executable_line(code)
1424
+ filename = code.co_filename
1425
+ module_globals = func.__globals__
1426
+ except:
1427
+ # last thing to try
1428
+ (ok, filename, ln) = self.lineinfo(arg)
1429
+ if not ok:
1430
+ self.error('The specified object %r is not a function '
1431
+ 'or was not found along sys.path.' % arg)
1432
+ return
1433
+ funcname = ok # ok contains a function name
1434
+ lineno = int(ln)
1435
+ if not filename:
1436
+ filename = self.defaultFile()
1437
+ filename = self.canonic(filename)
1438
+ # Check for reasonable breakpoint
1439
+ line = self.checkline(filename, lineno, module_globals)
1440
+ if line:
1441
+ # now set the break point
1442
+ err = self.set_break(filename, line, temporary, cond, funcname)
1443
+ if err:
1444
+ self.error(err)
1445
+ else:
1446
+ bp = self.get_breaks(filename, line)[-1]
1447
+ self.message("Breakpoint %d at %s:%d" %
1448
+ (bp.number, bp.file, bp.line))
1449
+
1450
+ # To be overridden in derived debuggers
1451
+ def defaultFile(self):
1452
+ """Produce a reasonable default."""
1453
+ filename = self.curframe.f_code.co_filename
1454
+ if filename == '<string>' and self.mainpyfile:
1455
+ filename = self.mainpyfile
1456
+ return filename
1457
+
1458
+ do_b = do_break
1459
+
1460
+ complete_break = _complete_location
1461
+ complete_b = _complete_location
1462
+
1463
+ def do_tbreak(self, arg):
1464
+ """tbreak [ ([filename:]lineno | function) [, condition] ]
1465
+
1466
+ Same arguments as break, but sets a temporary breakpoint: it
1467
+ is automatically deleted when first hit.
1468
+ """
1469
+ self.do_break(arg, True)
1470
+
1471
+ complete_tbreak = _complete_location
1472
+
1473
+ def lineinfo(self, identifier):
1474
+ failed = (None, None, None)
1475
+ # Input is identifier, may be in single quotes
1476
+ idstring = identifier.split("'")
1477
+ if len(idstring) == 1:
1478
+ # not in single quotes
1479
+ id = idstring[0].strip()
1480
+ elif len(idstring) == 3:
1481
+ # quoted
1482
+ id = idstring[1].strip()
1483
+ else:
1484
+ return failed
1485
+ if id == '': return failed
1486
+ parts = id.split('.')
1487
+ # Protection for derived debuggers
1488
+ if parts[0] == 'self':
1489
+ del parts[0]
1490
+ if len(parts) == 0:
1491
+ return failed
1492
+ # Best first guess at file to look at
1493
+ fname = self.defaultFile()
1494
+ if len(parts) == 1:
1495
+ item = parts[0]
1496
+ else:
1497
+ # More than one part.
1498
+ # First is module, second is method/class
1499
+ f = self.lookupmodule(parts[0])
1500
+ if f:
1501
+ fname = f
1502
+ item = parts[1]
1503
+ else:
1504
+ return failed
1505
+ answer = find_function(item, self.canonic(fname))
1506
+ return answer or failed
1507
+
1508
+ def checkline(self, filename, lineno, module_globals=None):
1509
+ """Check whether specified line seems to be executable.
1510
+
1511
+ Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
1512
+ line or EOF). Warning: testing is not comprehensive.
1513
+ """
1514
+ # this method should be callable before starting debugging, so default
1515
+ # to "no globals" if there is no current frame
1516
+ frame = getattr(self, 'curframe', None)
1517
+ if module_globals is None:
1518
+ module_globals = frame.f_globals if frame else None
1519
+ line = linecache.getline(filename, lineno, module_globals)
1520
+ if not line:
1521
+ self.message('End of file')
1522
+ return 0
1523
+ line = line.strip()
1524
+ # Don't allow setting breakpoint at a blank line
1525
+ if (not line or (line[0] == '#') or
1526
+ (line[:3] == '"""') or line[:3] == "'''"):
1527
+ self.error('Blank or comment')
1528
+ return 0
1529
+ return lineno
1530
+
1531
+ def do_enable(self, arg):
1532
+ """enable bpnumber [bpnumber ...]
1533
+
1534
+ Enables the breakpoints given as a space separated list of
1535
+ breakpoint numbers.
1536
+ """
1537
+ if not arg:
1538
+ self._print_invalid_arg(arg)
1539
+ return
1540
+ args = arg.split()
1541
+ for i in args:
1542
+ try:
1543
+ bp = self.get_bpbynumber(i)
1544
+ except ValueError as err:
1545
+ self.error(err)
1546
+ else:
1547
+ bp.enable()
1548
+ self.message('Enabled %s' % bp)
1549
+
1550
+ complete_enable = _complete_bpnumber
1551
+
1552
+ def do_disable(self, arg):
1553
+ """disable bpnumber [bpnumber ...]
1554
+
1555
+ Disables the breakpoints given as a space separated list of
1556
+ breakpoint numbers. Disabling a breakpoint means it cannot
1557
+ cause the program to stop execution, but unlike clearing a
1558
+ breakpoint, it remains in the list of breakpoints and can be
1559
+ (re-)enabled.
1560
+ """
1561
+ if not arg:
1562
+ self._print_invalid_arg(arg)
1563
+ return
1564
+ args = arg.split()
1565
+ for i in args:
1566
+ try:
1567
+ bp = self.get_bpbynumber(i)
1568
+ except ValueError as err:
1569
+ self.error(err)
1570
+ else:
1571
+ bp.disable()
1572
+ self.message('Disabled %s' % bp)
1573
+
1574
+ complete_disable = _complete_bpnumber
1575
+
1576
+ def do_condition(self, arg):
1577
+ """condition bpnumber [condition]
1578
+
1579
+ Set a new condition for the breakpoint, an expression which
1580
+ must evaluate to true before the breakpoint is honored. If
1581
+ condition is absent, any existing condition is removed; i.e.,
1582
+ the breakpoint is made unconditional.
1583
+ """
1584
+ if not arg:
1585
+ self._print_invalid_arg(arg)
1586
+ return
1587
+ args = arg.split(' ', 1)
1588
+ try:
1589
+ cond = args[1]
1590
+ if err := self._compile_error_message(cond):
1591
+ self.error('Invalid condition %s: %r' % (cond, err))
1592
+ return
1593
+ except IndexError:
1594
+ cond = None
1595
+ try:
1596
+ bp = self.get_bpbynumber(args[0].strip())
1597
+ except IndexError:
1598
+ self.error('Breakpoint number expected')
1599
+ except ValueError as err:
1600
+ self.error(err)
1601
+ else:
1602
+ bp.cond = cond
1603
+ if not cond:
1604
+ self.message('Breakpoint %d is now unconditional.' % bp.number)
1605
+ else:
1606
+ self.message('New condition set for breakpoint %d.' % bp.number)
1607
+
1608
+ complete_condition = _complete_bpnumber
1609
+
1610
+ def do_ignore(self, arg):
1611
+ """ignore bpnumber [count]
1612
+
1613
+ Set the ignore count for the given breakpoint number. If
1614
+ count is omitted, the ignore count is set to 0. A breakpoint
1615
+ becomes active when the ignore count is zero. When non-zero,
1616
+ the count is decremented each time the breakpoint is reached
1617
+ and the breakpoint is not disabled and any associated
1618
+ condition evaluates to true.
1619
+ """
1620
+ if not arg:
1621
+ self._print_invalid_arg(arg)
1622
+ return
1623
+ args = arg.split()
1624
+ if not args:
1625
+ self.error('Breakpoint number expected')
1626
+ return
1627
+ if len(args) == 1:
1628
+ count = 0
1629
+ elif len(args) == 2:
1630
+ try:
1631
+ count = int(args[1])
1632
+ except ValueError:
1633
+ self._print_invalid_arg(arg)
1634
+ return
1635
+ else:
1636
+ self._print_invalid_arg(arg)
1637
+ return
1638
+ try:
1639
+ bp = self.get_bpbynumber(args[0].strip())
1640
+ except ValueError as err:
1641
+ self.error(err)
1642
+ else:
1643
+ bp.ignore = count
1644
+ if count > 0:
1645
+ if count > 1:
1646
+ countstr = '%d crossings' % count
1647
+ else:
1648
+ countstr = '1 crossing'
1649
+ self.message('Will ignore next %s of breakpoint %d.' %
1650
+ (countstr, bp.number))
1651
+ else:
1652
+ self.message('Will stop next time breakpoint %d is reached.'
1653
+ % bp.number)
1654
+
1655
+ complete_ignore = _complete_bpnumber
1656
+
1657
+ def _prompt_for_confirmation(self, prompt, default):
1658
+ try:
1659
+ reply = input(prompt)
1660
+ except EOFError:
1661
+ reply = default
1662
+ return reply.strip().lower()
1663
+
1664
+ def do_clear(self, arg):
1665
+ """cl(ear) [filename:lineno | bpnumber ...]
1666
+
1667
+ With a space separated list of breakpoint numbers, clear
1668
+ those breakpoints. Without argument, clear all breaks (but
1669
+ first ask confirmation). With a filename:lineno argument,
1670
+ clear all breaks at that line in that file.
1671
+ """
1672
+ if not arg:
1673
+ reply = self._prompt_for_confirmation(
1674
+ 'Clear all breaks? ',
1675
+ default='no',
1676
+ )
1677
+ if reply in ('y', 'yes'):
1678
+ bplist = [bp for bp in bdb.Breakpoint.bpbynumber if bp]
1679
+ self.clear_all_breaks()
1680
+ for bp in bplist:
1681
+ self.message('Deleted %s' % bp)
1682
+ return
1683
+ if ':' in arg:
1684
+ # Make sure it works for "clear C:\foo\bar.py:12"
1685
+ i = arg.rfind(':')
1686
+ filename = arg[:i]
1687
+ arg = arg[i+1:]
1688
+ try:
1689
+ lineno = int(arg)
1690
+ except ValueError:
1691
+ err = "Invalid line number (%s)" % arg
1692
+ else:
1693
+ bplist = self.get_breaks(filename, lineno)[:]
1694
+ err = self.clear_break(filename, lineno)
1695
+ if err:
1696
+ self.error(err)
1697
+ else:
1698
+ for bp in bplist:
1699
+ self.message('Deleted %s' % bp)
1700
+ return
1701
+ numberlist = arg.split()
1702
+ for i in numberlist:
1703
+ try:
1704
+ bp = self.get_bpbynumber(i)
1705
+ except ValueError as err:
1706
+ self.error(err)
1707
+ else:
1708
+ self.clear_bpbynumber(i)
1709
+ self.message('Deleted %s' % bp)
1710
+ do_cl = do_clear # 'c' is already an abbreviation for 'continue'
1711
+
1712
+ complete_clear = _complete_location
1713
+ complete_cl = _complete_location
1714
+
1715
+ def do_where(self, arg):
1716
+ """w(here) [count]
1717
+
1718
+ Print a stack trace. If count is not specified, print the full stack.
1719
+ If count is 0, print the current frame entry. If count is positive,
1720
+ print count entries from the most recent frame. If count is negative,
1721
+ print -count entries from the least recent frame.
1722
+ An arrow indicates the "current frame", which determines the
1723
+ context of most commands. 'bt' is an alias for this command.
1724
+ """
1725
+ if not arg:
1726
+ count = None
1727
+ else:
1728
+ try:
1729
+ count = int(arg)
1730
+ except ValueError:
1731
+ self.error('Invalid count (%s)' % arg)
1732
+ return
1733
+ self.print_stack_trace(count)
1734
+ do_w = do_where
1735
+ do_bt = do_where
1736
+
1737
+ def _select_frame(self, number):
1738
+ assert 0 <= number < len(self.stack)
1739
+ self.curindex = number
1740
+ self.curframe = self.stack[self.curindex][0]
1741
+ self.set_convenience_variable(self.curframe, '_frame', self.curframe)
1742
+ self.print_stack_entry(self.stack[self.curindex])
1743
+ self.lineno = None
1744
+
1745
+ def do_exceptions(self, arg):
1746
+ """exceptions [number]
1747
+
1748
+ List or change current exception in an exception chain.
1749
+
1750
+ Without arguments, list all the current exception in the exception
1751
+ chain. Exceptions will be numbered, with the current exception indicated
1752
+ with an arrow.
1753
+
1754
+ If given an integer as argument, switch to the exception at that index.
1755
+ """
1756
+ if not self._chained_exceptions:
1757
+ self.message(
1758
+ "Did not find chained exceptions. To move between"
1759
+ " exceptions, pdb/post_mortem must be given an exception"
1760
+ " object rather than a traceback."
1761
+ )
1762
+ return
1763
+ if not arg:
1764
+ for ix, exc in enumerate(self._chained_exceptions):
1765
+ prompt = ">" if ix == self._chained_exception_index else " "
1766
+ rep = repr(exc)
1767
+ if len(rep) > 80:
1768
+ rep = rep[:77] + "..."
1769
+ indicator = (
1770
+ " -"
1771
+ if self._chained_exceptions[ix].__traceback__ is None
1772
+ else f"{ix:>3}"
1773
+ )
1774
+ self.message(f"{prompt} {indicator} {rep}")
1775
+ else:
1776
+ try:
1777
+ number = int(arg)
1778
+ except ValueError:
1779
+ self.error("Argument must be an integer")
1780
+ return
1781
+ if 0 <= number < len(self._chained_exceptions):
1782
+ if self._chained_exceptions[number].__traceback__ is None:
1783
+ self.error("This exception does not have a traceback, cannot jump to it")
1784
+ return
1785
+
1786
+ self._chained_exception_index = number
1787
+ self.setup(None, self._chained_exceptions[number].__traceback__)
1788
+ self.print_stack_entry(self.stack[self.curindex])
1789
+ else:
1790
+ self.error("No exception with that number")
1791
+
1792
+ def do_up(self, arg):
1793
+ """u(p) [count]
1794
+
1795
+ Move the current frame count (default one) levels up in the
1796
+ stack trace (to an older frame).
1797
+ """
1798
+ if self.curindex == 0:
1799
+ self.error('Oldest frame')
1800
+ return
1801
+ try:
1802
+ count = int(arg or 1)
1803
+ except ValueError:
1804
+ self.error('Invalid frame count (%s)' % arg)
1805
+ return
1806
+ if count < 0:
1807
+ newframe = 0
1808
+ else:
1809
+ newframe = max(0, self.curindex - count)
1810
+ self._select_frame(newframe)
1811
+ do_u = do_up
1812
+
1813
+ def do_down(self, arg):
1814
+ """d(own) [count]
1815
+
1816
+ Move the current frame count (default one) levels down in the
1817
+ stack trace (to a newer frame).
1818
+ """
1819
+ if self.curindex + 1 == len(self.stack):
1820
+ self.error('Newest frame')
1821
+ return
1822
+ try:
1823
+ count = int(arg or 1)
1824
+ except ValueError:
1825
+ self.error('Invalid frame count (%s)' % arg)
1826
+ return
1827
+ if count < 0:
1828
+ newframe = len(self.stack) - 1
1829
+ else:
1830
+ newframe = min(len(self.stack) - 1, self.curindex + count)
1831
+ self._select_frame(newframe)
1832
+ do_d = do_down
1833
+
1834
+ def do_until(self, arg):
1835
+ """unt(il) [lineno]
1836
+
1837
+ Without argument, continue execution until the line with a
1838
+ number greater than the current one is reached. With a line
1839
+ number, continue execution until a line with a number greater
1840
+ or equal to that is reached. In both cases, also stop when
1841
+ the current frame returns.
1842
+ """
1843
+ if arg:
1844
+ try:
1845
+ lineno = int(arg)
1846
+ except ValueError:
1847
+ self.error('Error in argument: %r' % arg)
1848
+ return
1849
+ if lineno <= self.curframe.f_lineno:
1850
+ self.error('"until" line number is smaller than current '
1851
+ 'line number')
1852
+ return
1853
+ else:
1854
+ lineno = None
1855
+ self.set_until(self.curframe, lineno)
1856
+ return 1
1857
+ do_unt = do_until
1858
+
1859
+ def do_step(self, arg):
1860
+ """s(tep)
1861
+
1862
+ Execute the current line, stop at the first possible occasion
1863
+ (either in a function that is called or in the current
1864
+ function).
1865
+ """
1866
+ if arg:
1867
+ self._print_invalid_arg(arg)
1868
+ return
1869
+ self.set_step()
1870
+ return 1
1871
+ do_s = do_step
1872
+
1873
+ def do_next(self, arg):
1874
+ """n(ext)
1875
+
1876
+ Continue execution until the next line in the current function
1877
+ is reached or it returns.
1878
+ """
1879
+ if arg:
1880
+ self._print_invalid_arg(arg)
1881
+ return
1882
+ self.set_next(self.curframe)
1883
+ return 1
1884
+ do_n = do_next
1885
+
1886
+ def do_run(self, arg):
1887
+ """run [args...]
1888
+
1889
+ Restart the debugged python program. If a string is supplied
1890
+ it is split with "shlex", and the result is used as the new
1891
+ sys.argv. History, breakpoints, actions and debugger options
1892
+ are preserved. "restart" is an alias for "run".
1893
+ """
1894
+ if self.mode == 'inline':
1895
+ self.error('run/restart command is disabled when pdb is running in inline mode.\n'
1896
+ 'Use the command line interface to enable restarting your program\n'
1897
+ 'e.g. "python -m pdb myscript.py"')
1898
+ return
1899
+ if arg:
1900
+ import shlex
1901
+ argv0 = sys.argv[0:1]
1902
+ try:
1903
+ sys.argv = shlex.split(arg)
1904
+ except ValueError as e:
1905
+ self.error('Cannot run %s: %s' % (arg, e))
1906
+ return
1907
+ sys.argv[:0] = argv0
1908
+ # this is caught in the main debugger loop
1909
+ raise Restart
1910
+
1911
+ do_restart = do_run
1912
+
1913
+ def do_return(self, arg):
1914
+ """r(eturn)
1915
+
1916
+ Continue execution until the current function returns.
1917
+ """
1918
+ if arg:
1919
+ self._print_invalid_arg(arg)
1920
+ return
1921
+ self.set_return(self.curframe)
1922
+ return 1
1923
+ do_r = do_return
1924
+
1925
+ def do_continue(self, arg):
1926
+ """c(ont(inue))
1927
+
1928
+ Continue execution, only stop when a breakpoint is encountered.
1929
+ """
1930
+ if arg:
1931
+ self._print_invalid_arg(arg)
1932
+ return
1933
+ if not self.nosigint:
1934
+ try:
1935
+ Pdb._previous_sigint_handler = \
1936
+ signal.signal(signal.SIGINT, self.sigint_handler)
1937
+ except ValueError:
1938
+ # ValueError happens when do_continue() is invoked from
1939
+ # a non-main thread in which case we just continue without
1940
+ # SIGINT set. Would printing a message here (once) make
1941
+ # sense?
1942
+ pass
1943
+ self.set_continue()
1944
+ return 1
1945
+ do_c = do_cont = do_continue
1946
+
1947
+ def do_jump(self, arg):
1948
+ """j(ump) lineno
1949
+
1950
+ Set the next line that will be executed. Only available in
1951
+ the bottom-most frame. This lets you jump back and execute
1952
+ code again, or jump forward to skip code that you don't want
1953
+ to run.
1954
+
1955
+ It should be noted that not all jumps are allowed -- for
1956
+ instance it is not possible to jump into the middle of a
1957
+ for loop or out of a finally clause.
1958
+ """
1959
+ if not arg:
1960
+ self._print_invalid_arg(arg)
1961
+ return
1962
+ if self.curindex + 1 != len(self.stack):
1963
+ self.error('You can only jump within the bottom frame')
1964
+ return
1965
+ try:
1966
+ arg = int(arg)
1967
+ except ValueError:
1968
+ self.error("The 'jump' command requires a line number")
1969
+ else:
1970
+ try:
1971
+ # Do the jump, fix up our copy of the stack, and display the
1972
+ # new position
1973
+ self.curframe.f_lineno = arg
1974
+ self.stack[self.curindex] = self.stack[self.curindex][0], arg
1975
+ self.print_stack_entry(self.stack[self.curindex])
1976
+ except ValueError as e:
1977
+ self.error('Jump failed: %s' % e)
1978
+ do_j = do_jump
1979
+
1980
+ def _create_recursive_debugger(self):
1981
+ return Pdb(self.completekey, self.stdin, self.stdout)
1982
+
1983
+ def do_debug(self, arg):
1984
+ """debug code
1985
+
1986
+ Enter a recursive debugger that steps through the code
1987
+ argument (which is an arbitrary expression or statement to be
1988
+ executed in the current environment).
1989
+ """
1990
+ if not arg:
1991
+ self._print_invalid_arg(arg)
1992
+ return
1993
+ self.stop_trace()
1994
+ globals = self.curframe.f_globals
1995
+ locals = self.curframe.f_locals
1996
+ p = self._create_recursive_debugger()
1997
+ p.prompt = "(%s) " % self.prompt.strip()
1998
+ self.message("ENTERING RECURSIVE DEBUGGER")
1999
+ try:
2000
+ sys.call_tracing(p.run, (arg, globals, locals))
2001
+ except Exception:
2002
+ self._error_exc()
2003
+ self.message("LEAVING RECURSIVE DEBUGGER")
2004
+ self.start_trace()
2005
+ self.lastcmd = p.lastcmd
2006
+
2007
+ complete_debug = _complete_expression
2008
+
2009
+ def do_quit(self, arg):
2010
+ """q(uit) | exit
2011
+
2012
+ Quit from the debugger. The program being executed is aborted.
2013
+ """
2014
+ # Show prompt to kill process when in 'inline' mode and if pdb was not
2015
+ # started from an interactive console. The attribute sys.ps1 is only
2016
+ # defined if the interpreter is in interactive mode.
2017
+ if self.mode == 'inline' and not hasattr(sys, 'ps1'):
2018
+ while True:
2019
+ try:
2020
+ reply = input('Quitting pdb will kill the process. Quit anyway? [y/n] ')
2021
+ reply = reply.lower().strip()
2022
+ except EOFError:
2023
+ reply = 'y'
2024
+ self.message('')
2025
+ if reply == 'y' or reply == '':
2026
+ sys.exit(1)
2027
+ elif reply.lower() == 'n':
2028
+ return
2029
+
2030
+ self._user_requested_quit = True
2031
+ self.set_quit()
2032
+ return 1
2033
+
2034
+ do_q = do_quit
2035
+ do_exit = do_quit
2036
+
2037
+ def do_EOF(self, arg):
2038
+ """EOF
2039
+
2040
+ Handles the receipt of EOF as a command.
2041
+ """
2042
+ self.message('')
2043
+ return self.do_quit(arg)
2044
+
2045
+ def do_args(self, arg):
2046
+ """a(rgs)
2047
+
2048
+ Print the argument list of the current function.
2049
+ """
2050
+ if arg:
2051
+ self._print_invalid_arg(arg)
2052
+ return
2053
+ co = self.curframe.f_code
2054
+ dict = self.curframe.f_locals
2055
+ n = co.co_argcount + co.co_kwonlyargcount
2056
+ if co.co_flags & inspect.CO_VARARGS: n = n+1
2057
+ if co.co_flags & inspect.CO_VARKEYWORDS: n = n+1
2058
+ for i in range(n):
2059
+ name = co.co_varnames[i]
2060
+ if name in dict:
2061
+ self.message('%s = %s' % (name, self._safe_repr(dict[name], name)))
2062
+ else:
2063
+ self.message('%s = *** undefined ***' % (name,))
2064
+ do_a = do_args
2065
+
2066
+ def do_retval(self, arg):
2067
+ """retval
2068
+
2069
+ Print the return value for the last return of a function.
2070
+ """
2071
+ if arg:
2072
+ self._print_invalid_arg(arg)
2073
+ return
2074
+ if '__return__' in self.curframe.f_locals:
2075
+ self.message(self._safe_repr(self.curframe.f_locals['__return__'], "retval"))
2076
+ else:
2077
+ self.error('Not yet returned!')
2078
+ do_rv = do_retval
2079
+
2080
+ def _getval(self, arg):
2081
+ try:
2082
+ return eval(arg, self.curframe.f_globals, self.curframe.f_locals)
2083
+ except:
2084
+ self._error_exc()
2085
+ raise
2086
+
2087
+ def _getval_except(self, arg, frame=None):
2088
+ try:
2089
+ if frame is None:
2090
+ return eval(arg, self.curframe.f_globals, self.curframe.f_locals)
2091
+ else:
2092
+ return eval(arg, frame.f_globals, frame.f_locals)
2093
+ except BaseException as exc:
2094
+ return _rstr('** raised %s **' % self._format_exc(exc))
2095
+
2096
+ def _error_exc(self):
2097
+ exc = sys.exception()
2098
+ self.error(self._format_exc(exc))
2099
+
2100
+ def _msg_val_func(self, arg, func):
2101
+ try:
2102
+ val = self._getval(arg)
2103
+ except:
2104
+ return # _getval() has displayed the error
2105
+ try:
2106
+ self.message(func(val))
2107
+ except:
2108
+ self._error_exc()
2109
+
2110
+ def _safe_repr(self, obj, expr):
2111
+ try:
2112
+ return repr(obj)
2113
+ except Exception as e:
2114
+ return _rstr(f"*** repr({expr}) failed: {self._format_exc(e)} ***")
2115
+
2116
+ def do_p(self, arg):
2117
+ """p expression
2118
+
2119
+ Print the value of the expression.
2120
+ """
2121
+ if not arg:
2122
+ self._print_invalid_arg(arg)
2123
+ return
2124
+ self._msg_val_func(arg, repr)
2125
+
2126
+ def do_pp(self, arg):
2127
+ """pp expression
2128
+
2129
+ Pretty-print the value of the expression.
2130
+ """
2131
+ if not arg:
2132
+ self._print_invalid_arg(arg)
2133
+ return
2134
+ self._msg_val_func(arg, pprint.pformat)
2135
+
2136
+ complete_print = _complete_expression
2137
+ complete_p = _complete_expression
2138
+ complete_pp = _complete_expression
2139
+
2140
+ def do_list(self, arg):
2141
+ """l(ist) [first[, last] | .]
2142
+
2143
+ List source code for the current file. Without arguments,
2144
+ list 11 lines around the current line or continue the previous
2145
+ listing. With . as argument, list 11 lines around the current
2146
+ line. With one argument, list 11 lines starting at that line.
2147
+ With two arguments, list the given range; if the second
2148
+ argument is less than the first, it is a count.
2149
+
2150
+ The current line in the current frame is indicated by "->".
2151
+ If an exception is being debugged, the line where the
2152
+ exception was originally raised or propagated is indicated by
2153
+ ">>", if it differs from the current line.
2154
+ """
2155
+ self.lastcmd = 'list'
2156
+ last = None
2157
+ if arg and arg != '.':
2158
+ try:
2159
+ if ',' in arg:
2160
+ first, last = arg.split(',')
2161
+ first = int(first.strip())
2162
+ last = int(last.strip())
2163
+ if last < first:
2164
+ # assume it's a count
2165
+ last = first + last
2166
+ else:
2167
+ first = int(arg.strip())
2168
+ first = max(1, first - 5)
2169
+ except ValueError:
2170
+ self.error('Error in argument: %r' % arg)
2171
+ return
2172
+ elif self.lineno is None or arg == '.':
2173
+ first = max(1, self.curframe.f_lineno - 5)
2174
+ else:
2175
+ first = self.lineno + 1
2176
+ if last is None:
2177
+ last = first + 10
2178
+ filename = self.curframe.f_code.co_filename
2179
+ breaklist = self.get_file_breaks(filename)
2180
+ try:
2181
+ lines = linecache.getlines(filename, self.curframe.f_globals)
2182
+ self._print_lines(lines[first-1:last], first, breaklist,
2183
+ self.curframe)
2184
+ self.lineno = min(last, len(lines))
2185
+ if len(lines) < last:
2186
+ self.message('[EOF]')
2187
+ except KeyboardInterrupt:
2188
+ pass
2189
+ self._validate_file_mtime()
2190
+ do_l = do_list
2191
+
2192
+ def do_longlist(self, arg):
2193
+ """ll | longlist
2194
+
2195
+ List the whole source code for the current function or frame.
2196
+ """
2197
+ if arg:
2198
+ self._print_invalid_arg(arg)
2199
+ return
2200
+ filename = self.curframe.f_code.co_filename
2201
+ breaklist = self.get_file_breaks(filename)
2202
+ try:
2203
+ lines, lineno = self._getsourcelines(self.curframe)
2204
+ except OSError as err:
2205
+ self.error(err)
2206
+ return
2207
+ self._print_lines(lines, lineno, breaklist, self.curframe)
2208
+ self._validate_file_mtime()
2209
+ do_ll = do_longlist
2210
+
2211
+ def do_source(self, arg):
2212
+ """source expression
2213
+
2214
+ Try to get source code for the given object and display it.
2215
+ """
2216
+ if not arg:
2217
+ self._print_invalid_arg(arg)
2218
+ return
2219
+ try:
2220
+ obj = self._getval(arg)
2221
+ except:
2222
+ return
2223
+ try:
2224
+ lines, lineno = self._getsourcelines(obj)
2225
+ except (OSError, TypeError) as err:
2226
+ self.error(err)
2227
+ return
2228
+ self._print_lines(lines, lineno)
2229
+
2230
+ complete_source = _complete_expression
2231
+
2232
+ def _print_lines(self, lines, start, breaks=(), frame=None):
2233
+ """Print a range of lines."""
2234
+ if frame:
2235
+ current_lineno = frame.f_lineno
2236
+ exc_lineno = self.tb_lineno.get(frame, -1)
2237
+ else:
2238
+ current_lineno = exc_lineno = -1
2239
+ for lineno, line in enumerate(lines, start):
2240
+ s = str(lineno).rjust(3)
2241
+ if len(s) < 4:
2242
+ s += ' '
2243
+ if lineno in breaks:
2244
+ s += 'B'
2245
+ else:
2246
+ s += ' '
2247
+ if lineno == current_lineno:
2248
+ s += '->'
2249
+ elif lineno == exc_lineno:
2250
+ s += '>>'
2251
+ if self.colorize:
2252
+ line = self._colorize_code(line)
2253
+ self.message(s + '\t' + line.rstrip())
2254
+
2255
+ def do_whatis(self, arg):
2256
+ """whatis expression
2257
+
2258
+ Print the type of the argument.
2259
+ """
2260
+ if not arg:
2261
+ self._print_invalid_arg(arg)
2262
+ return
2263
+ try:
2264
+ value = self._getval(arg)
2265
+ except:
2266
+ # _getval() already printed the error
2267
+ return
2268
+ code = None
2269
+ # Is it an instance method?
2270
+ try:
2271
+ code = value.__func__.__code__
2272
+ except Exception:
2273
+ pass
2274
+ if code:
2275
+ self.message('Method %s' % code.co_name)
2276
+ return
2277
+ # Is it a function?
2278
+ try:
2279
+ code = value.__code__
2280
+ except Exception:
2281
+ pass
2282
+ if code:
2283
+ self.message('Function %s' % code.co_name)
2284
+ return
2285
+ # Is it a class?
2286
+ if value.__class__ is type:
2287
+ self.message('Class %s.%s' % (value.__module__, value.__qualname__))
2288
+ return
2289
+ # None of the above...
2290
+ self.message(type(value))
2291
+
2292
+ complete_whatis = _complete_expression
2293
+
2294
+ def do_display(self, arg):
2295
+ """display [expression]
2296
+
2297
+ Display the value of the expression if it changed, each time execution
2298
+ stops in the current frame.
2299
+
2300
+ Without expression, list all display expressions for the current frame.
2301
+ """
2302
+ if not arg:
2303
+ if self.displaying:
2304
+ self.message('Currently displaying:')
2305
+ for key, val in self.displaying.get(self.curframe, {}).items():
2306
+ self.message('%s: %s' % (key, self._safe_repr(val, key)))
2307
+ else:
2308
+ self.message('No expression is being displayed')
2309
+ else:
2310
+ if err := self._compile_error_message(arg):
2311
+ self.error('Unable to display %s: %r' % (arg, err))
2312
+ else:
2313
+ val = self._getval_except(arg)
2314
+ self.displaying.setdefault(self.curframe, {})[arg] = val
2315
+ self.message('display %s: %s' % (arg, self._safe_repr(val, arg)))
2316
+
2317
+ complete_display = _complete_expression
2318
+
2319
+ def do_undisplay(self, arg):
2320
+ """undisplay [expression]
2321
+
2322
+ Do not display the expression any more in the current frame.
2323
+
2324
+ Without expression, clear all display expressions for the current frame.
2325
+ """
2326
+ if arg:
2327
+ try:
2328
+ del self.displaying.get(self.curframe, {})[arg]
2329
+ except KeyError:
2330
+ self.error('not displaying %s' % arg)
2331
+ else:
2332
+ self.displaying.pop(self.curframe, None)
2333
+
2334
+ def complete_undisplay(self, text, line, begidx, endidx):
2335
+ return [e for e in self.displaying.get(self.curframe, {})
2336
+ if e.startswith(text)]
2337
+
2338
+ def do_interact(self, arg):
2339
+ """interact
2340
+
2341
+ Start an interactive interpreter whose global namespace
2342
+ contains all the (global and local) names found in the current scope.
2343
+ """
2344
+ ns = {**self.curframe.f_globals, **self.curframe.f_locals}
2345
+ with self._enable_rlcompleter(ns):
2346
+ console = _PdbInteractiveConsole(ns, message=self.message)
2347
+ console.interact(banner="*pdb interact start*",
2348
+ exitmsg="*exit from pdb interact command*")
2349
+
2350
+ def do_alias(self, arg):
2351
+ """alias [name [command]]
2352
+
2353
+ Create an alias called 'name' that executes 'command'. The
2354
+ command must *not* be enclosed in quotes. Replaceable
2355
+ parameters can be indicated by %1, %2, and so on, while %* is
2356
+ replaced by all the parameters. If no command is given, the
2357
+ current alias for name is shown. If no name is given, all
2358
+ aliases are listed.
2359
+
2360
+ Aliases may be nested and can contain anything that can be
2361
+ legally typed at the pdb prompt. Note! You *can* override
2362
+ internal pdb commands with aliases! Those internal commands
2363
+ are then hidden until the alias is removed. Aliasing is
2364
+ recursively applied to the first word of the command line; all
2365
+ other words in the line are left alone.
2366
+
2367
+ As an example, here are two useful aliases (especially when
2368
+ placed in the .pdbrc file):
2369
+
2370
+ # Print instance variables (usage "pi classInst")
2371
+ alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])
2372
+ # Print instance variables in self
2373
+ alias ps pi self
2374
+ """
2375
+ args = arg.split()
2376
+ if len(args) == 0:
2377
+ keys = sorted(self.aliases.keys())
2378
+ for alias in keys:
2379
+ self.message("%s = %s" % (alias, self.aliases[alias]))
2380
+ return
2381
+ if len(args) == 1:
2382
+ if args[0] in self.aliases:
2383
+ self.message("%s = %s" % (args[0], self.aliases[args[0]]))
2384
+ else:
2385
+ self.error(f"Unknown alias '{args[0]}'")
2386
+ else:
2387
+ # Do a validation check to make sure no replaceable parameters
2388
+ # are skipped if %* is not used.
2389
+ alias = ' '.join(args[1:])
2390
+ if '%*' not in alias:
2391
+ consecutive = True
2392
+ for idx in range(1, 10):
2393
+ if f'%{idx}' not in alias:
2394
+ consecutive = False
2395
+ if f'%{idx}' in alias and not consecutive:
2396
+ self.error("Replaceable parameters must be consecutive")
2397
+ return
2398
+ self.aliases[args[0]] = alias
2399
+
2400
+ def do_unalias(self, arg):
2401
+ """unalias name
2402
+
2403
+ Delete the specified alias.
2404
+ """
2405
+ args = arg.split()
2406
+ if len(args) == 0:
2407
+ self._print_invalid_arg(arg)
2408
+ return
2409
+ if args[0] in self.aliases:
2410
+ del self.aliases[args[0]]
2411
+
2412
+ def complete_unalias(self, text, line, begidx, endidx):
2413
+ return [a for a in self.aliases if a.startswith(text)]
2414
+
2415
+ # List of all the commands making the program resume execution.
2416
+ commands_resuming = ['do_continue', 'do_step', 'do_next', 'do_return',
2417
+ 'do_until', 'do_quit', 'do_jump']
2418
+
2419
+ # Print a traceback starting at the top stack frame.
2420
+ # The most recently entered frame is printed last;
2421
+ # this is different from dbx and gdb, but consistent with
2422
+ # the Python interpreter's stack trace.
2423
+ # It is also consistent with the up/down commands (which are
2424
+ # compatible with dbx and gdb: up moves towards 'main()'
2425
+ # and down moves towards the most recent stack frame).
2426
+ # * if count is None, prints the full stack
2427
+ # * if count = 0, prints the current frame entry
2428
+ # * if count < 0, prints -count least recent frame entries
2429
+ # * if count > 0, prints count most recent frame entries
2430
+
2431
+ def print_stack_trace(self, count=None):
2432
+ if count is None:
2433
+ stack_to_print = self.stack
2434
+ elif count == 0:
2435
+ stack_to_print = [self.stack[self.curindex]]
2436
+ elif count < 0:
2437
+ stack_to_print = self.stack[:-count]
2438
+ else:
2439
+ stack_to_print = self.stack[-count:]
2440
+ try:
2441
+ for frame_lineno in stack_to_print:
2442
+ self.print_stack_entry(frame_lineno)
2443
+ except KeyboardInterrupt:
2444
+ pass
2445
+
2446
+ def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
2447
+ frame, lineno = frame_lineno
2448
+ if frame is self.curframe:
2449
+ prefix = '> '
2450
+ else:
2451
+ prefix = ' '
2452
+ stack_entry = self.format_stack_entry(frame_lineno, prompt_prefix)
2453
+ if self.colorize:
2454
+ lines = stack_entry.split(prompt_prefix, 1)
2455
+ if len(lines) > 1:
2456
+ # We have some code to display
2457
+ lines[1] = self._colorize_code(lines[1])
2458
+ stack_entry = prompt_prefix.join(lines)
2459
+ self.message(prefix + stack_entry)
2460
+
2461
+ # Provide help
2462
+
2463
+ def do_help(self, arg):
2464
+ """h(elp)
2465
+
2466
+ Without argument, print the list of available commands.
2467
+ With a command name as argument, print help about that command.
2468
+ "help pdb" shows the full pdb documentation.
2469
+ "help exec" gives help on the ! command.
2470
+ """
2471
+ if not arg:
2472
+ return cmd.Cmd.do_help(self, arg)
2473
+ try:
2474
+ try:
2475
+ topic = getattr(self, 'help_' + arg)
2476
+ return topic()
2477
+ except AttributeError:
2478
+ command = getattr(self, 'do_' + arg)
2479
+ except AttributeError:
2480
+ self.error('No help for %r' % arg)
2481
+ else:
2482
+ if sys.flags.optimize >= 2:
2483
+ self.error('No help for %r; please do not run Python with -OO '
2484
+ 'if you need command help' % arg)
2485
+ return
2486
+ if command.__doc__ is None:
2487
+ self.error('No help for %r; __doc__ string missing' % arg)
2488
+ return
2489
+ self.message(self._help_message_from_doc(command.__doc__))
2490
+
2491
+ do_h = do_help
2492
+
2493
+ def help_exec(self):
2494
+ """(!) statement
2495
+
2496
+ Execute the (one-line) statement in the context of the current
2497
+ stack frame. The exclamation point can be omitted unless the
2498
+ first word of the statement resembles a debugger command, e.g.:
2499
+ (Pdb) ! n=42
2500
+ (Pdb)
2501
+
2502
+ To assign to a global variable you must always prefix the command with
2503
+ a 'global' command, e.g.:
2504
+ (Pdb) global list_options; list_options = ['-l']
2505
+ (Pdb)
2506
+ """
2507
+ self.message((self.help_exec.__doc__ or '').strip())
2508
+
2509
+ def help_pdb(self):
2510
+ help()
2511
+
2512
+ # other helper functions
2513
+
2514
+ def lookupmodule(self, filename):
2515
+ """Helper function for break/clear parsing -- may be overridden.
2516
+
2517
+ lookupmodule() translates (possibly incomplete) file or module name
2518
+ into an absolute file name.
2519
+
2520
+ filename could be in format of:
2521
+ * an absolute path like '/path/to/file.py'
2522
+ * a relative path like 'file.py' or 'dir/file.py'
2523
+ * a module name like 'module' or 'package.module'
2524
+
2525
+ files and modules will be searched in sys.path.
2526
+ """
2527
+ if not filename.endswith('.py'):
2528
+ # A module is passed in so convert it to equivalent file
2529
+ filename = filename.replace('.', os.sep) + '.py'
2530
+
2531
+ if os.path.isabs(filename):
2532
+ if os.path.exists(filename):
2533
+ return filename
2534
+ return None
2535
+
2536
+ for dirname in sys.path:
2537
+ while os.path.islink(dirname):
2538
+ dirname = os.readlink(dirname)
2539
+ fullname = os.path.join(dirname, filename)
2540
+ if os.path.exists(fullname):
2541
+ return fullname
2542
+ return None
2543
+
2544
+ def _run(self, target: _ExecutableTarget):
2545
+ # When bdb sets tracing, a number of call and line events happen
2546
+ # BEFORE debugger even reaches user's code (and the exact sequence of
2547
+ # events depends on python version). Take special measures to
2548
+ # avoid stopping before reaching the main script (see user_line and
2549
+ # user_call for details).
2550
+ self._wait_for_mainpyfile = True
2551
+ self._user_requested_quit = False
2552
+
2553
+ self.mainpyfile = self.canonic(target.filename)
2554
+
2555
+ # The target has to run in __main__ namespace (or imports from
2556
+ # __main__ will break). Clear __main__ and replace with
2557
+ # the target namespace.
2558
+ import __main__
2559
+ __main__.__dict__.clear()
2560
+ __main__.__dict__.update(target.namespace)
2561
+
2562
+ # Clear the mtime table for program reruns, assume all the files
2563
+ # are up to date.
2564
+ self._file_mtime_table.clear()
2565
+
2566
+ self.run(target.code)
2567
+
2568
+ def _format_exc(self, exc: BaseException):
2569
+ return traceback.format_exception_only(exc)[-1].strip()
2570
+
2571
+ def _compile_error_message(self, expr):
2572
+ """Return the error message as string if compiling `expr` fails."""
2573
+ try:
2574
+ compile(expr, "<stdin>", "eval")
2575
+ except Exception as exc:
2576
+ return _rstr(self._format_exc(exc))
2577
+ return ""
2578
+
2579
+ def _getsourcelines(self, obj):
2580
+ # GH-103319
2581
+ # inspect.getsourcelines() returns lineno = 0 for
2582
+ # module-level frame which breaks our code print line number
2583
+ # This method should be replaced by inspect.getsourcelines(obj)
2584
+ # once this bug is fixed in inspect
2585
+ lines, lineno = inspect.getsourcelines(obj)
2586
+ lineno = max(1, lineno)
2587
+ return lines, lineno
2588
+
2589
+ def _help_message_from_doc(self, doc, usage_only=False):
2590
+ lines = [line.strip() for line in doc.rstrip().splitlines()]
2591
+ if not lines:
2592
+ return "No help message found."
2593
+ if "" in lines:
2594
+ usage_end = lines.index("")
2595
+ else:
2596
+ usage_end = 1
2597
+ formatted = []
2598
+ indent = " " * len(self.prompt)
2599
+ for i, line in enumerate(lines):
2600
+ if i == 0:
2601
+ prefix = "Usage: "
2602
+ elif i < usage_end:
2603
+ prefix = " "
2604
+ else:
2605
+ if usage_only:
2606
+ break
2607
+ prefix = ""
2608
+ formatted.append(indent + prefix + line)
2609
+ return "\n".join(formatted)
2610
+
2611
+ def _print_invalid_arg(self, arg):
2612
+ """Return the usage string for a function."""
2613
+
2614
+ if not arg:
2615
+ self.error("Argument is required for this command")
2616
+ else:
2617
+ self.error(f"Invalid argument: {arg}")
2618
+
2619
+ # Yes it's a bit hacky. Get the caller name, get the method based on
2620
+ # that name, and get the docstring from that method.
2621
+ # This should NOT fail if the caller is a method of this class.
2622
+ doc = inspect.getdoc(getattr(self, sys._getframe(1).f_code.co_name))
2623
+ if doc is not None:
2624
+ self.message(self._help_message_from_doc(doc, usage_only=True))
2625
+
2626
+ # Collect all command help into docstring, if not run with -OO
2627
+
2628
+ if __doc__ is not None:
2629
+ # unfortunately we can't guess this order from the class definition
2630
+ _help_order = [
2631
+ 'help', 'where', 'down', 'up', 'break', 'tbreak', 'clear', 'disable',
2632
+ 'enable', 'ignore', 'condition', 'commands', 'step', 'next', 'until',
2633
+ 'jump', 'return', 'retval', 'run', 'continue', 'list', 'longlist',
2634
+ 'args', 'p', 'pp', 'whatis', 'source', 'display', 'undisplay',
2635
+ 'interact', 'alias', 'unalias', 'debug', 'quit',
2636
+ ]
2637
+
2638
+ for _command in _help_order:
2639
+ __doc__ += getattr(Pdb, 'do_' + _command).__doc__.strip() + '\n\n'
2640
+ __doc__ += Pdb.help_exec.__doc__
2641
+
2642
+ del _help_order, _command
2643
+
2644
+
2645
+ # Simplified interface
2646
+
2647
+ def run(statement, globals=None, locals=None):
2648
+ """Execute the *statement* (given as a string or a code object)
2649
+ under debugger control.
2650
+
2651
+ The debugger prompt appears before any code is executed; you can set
2652
+ breakpoints and type continue, or you can step through the statement
2653
+ using step or next.
2654
+
2655
+ The optional *globals* and *locals* arguments specify the
2656
+ environment in which the code is executed; by default the
2657
+ dictionary of the module __main__ is used (see the explanation of
2658
+ the built-in exec() or eval() functions.).
2659
+ """
2660
+ Pdb().run(statement, globals, locals)
2661
+
2662
+ def runeval(expression, globals=None, locals=None):
2663
+ """Evaluate the *expression* (given as a string or a code object)
2664
+ under debugger control.
2665
+
2666
+ When runeval() returns, it returns the value of the expression.
2667
+ Otherwise this function is similar to run().
2668
+ """
2669
+ return Pdb().runeval(expression, globals, locals)
2670
+
2671
+ def runctx(statement, globals, locals):
2672
+ # B/W compatibility
2673
+ run(statement, globals, locals)
2674
+
2675
+ def runcall(*args, **kwds):
2676
+ """Call the function (a function or method object, not a string)
2677
+ with the given arguments.
2678
+
2679
+ When runcall() returns, it returns whatever the function call
2680
+ returned. The debugger prompt appears as soon as the function is
2681
+ entered.
2682
+ """
2683
+ return Pdb().runcall(*args, **kwds)
2684
+
2685
+ def set_trace(*, header=None, commands=None):
2686
+ """Enter the debugger at the calling stack frame.
2687
+
2688
+ This is useful to hard-code a breakpoint at a given point in a
2689
+ program, even if the code is not otherwise being debugged (e.g. when
2690
+ an assertion fails). If given, *header* is printed to the console
2691
+ just before debugging begins. *commands* is an optional list of
2692
+ pdb commands to run when the debugger starts.
2693
+ """
2694
+ if Pdb._last_pdb_instance is not None:
2695
+ pdb = Pdb._last_pdb_instance
2696
+ else:
2697
+ pdb = Pdb(mode='inline', backend='monitoring', colorize=True)
2698
+ if header is not None:
2699
+ pdb.message(header)
2700
+ pdb.set_trace(sys._getframe().f_back, commands=commands)
2701
+
2702
+ async def set_trace_async(*, header=None, commands=None):
2703
+ """Enter the debugger at the calling stack frame, but in async mode.
2704
+
2705
+ This should be used as await pdb.set_trace_async(). Users can do await
2706
+ if they enter the debugger with this function. Otherwise it's the same
2707
+ as set_trace().
2708
+ """
2709
+ if Pdb._last_pdb_instance is not None:
2710
+ pdb = Pdb._last_pdb_instance
2711
+ else:
2712
+ pdb = Pdb(mode='inline', backend='monitoring', colorize=True)
2713
+ if header is not None:
2714
+ pdb.message(header)
2715
+ await pdb.set_trace_async(sys._getframe().f_back, commands=commands)
2716
+
2717
+ # Remote PDB
2718
+
2719
+ class _PdbServer(Pdb):
2720
+ def __init__(
2721
+ self,
2722
+ sockfile,
2723
+ signal_server=None,
2724
+ owns_sockfile=True,
2725
+ colorize=False,
2726
+ **kwargs,
2727
+ ):
2728
+ self._owns_sockfile = owns_sockfile
2729
+ self._interact_state = None
2730
+ self._sockfile = sockfile
2731
+ self._command_name_cache = []
2732
+ self._write_failed = False
2733
+ if signal_server:
2734
+ # Only started by the top level _PdbServer, not recursive ones.
2735
+ self._start_signal_listener(signal_server)
2736
+ # Override the `colorize` attribute set by the parent constructor,
2737
+ # because it checks the server's stdout, rather than the client's.
2738
+ super().__init__(colorize=False, **kwargs)
2739
+ self.colorize = colorize
2740
+
2741
+ @staticmethod
2742
+ def protocol_version():
2743
+ # By default, assume a client and server are compatible if they run
2744
+ # the same Python major.minor version. We'll try to keep backwards
2745
+ # compatibility between patch versions of a minor version if possible.
2746
+ # If we do need to change the protocol in a patch version, we'll change
2747
+ # `revision` to the patch version where the protocol changed.
2748
+ # We can ignore compatibility for pre-release versions; sys.remote_exec
2749
+ # can't attach to a pre-release version except from that same version.
2750
+ v = sys.version_info
2751
+ revision = 0
2752
+ return int(f"{v.major:02X}{v.minor:02X}{revision:02X}F0", 16)
2753
+
2754
+ def _ensure_valid_message(self, msg):
2755
+ # Ensure the message conforms to our protocol.
2756
+ # If anything needs to be changed here for a patch release of Python,
2757
+ # the 'revision' in protocol_version() should be updated.
2758
+ match msg:
2759
+ case {"message": str(), "type": str()}:
2760
+ # Have the client show a message. The client chooses how to
2761
+ # format the message based on its type. The currently defined
2762
+ # types are "info" and "error". If a message has a type the
2763
+ # client doesn't recognize, it must be treated as "info".
2764
+ pass
2765
+ case {"help": str()}:
2766
+ # Have the client show the help for a given argument.
2767
+ pass
2768
+ case {"prompt": str(), "state": str()}:
2769
+ # Have the client display the given prompt and wait for a reply
2770
+ # from the user. If the client recognizes the state it may
2771
+ # enable mode-specific features like multi-line editing.
2772
+ # If it doesn't recognize the state it must prompt for a single
2773
+ # line only and send it directly to the server. A server won't
2774
+ # progress until it gets a "reply" or "signal" message, but can
2775
+ # process "complete" requests while waiting for the reply.
2776
+ pass
2777
+ case {
2778
+ "completions": list(completions)
2779
+ } if all(isinstance(c, str) for c in completions):
2780
+ # Return valid completions for a client's "complete" request.
2781
+ pass
2782
+ case {
2783
+ "command_list": list(command_list)
2784
+ } if all(isinstance(c, str) for c in command_list):
2785
+ # Report the list of legal PDB commands to the client.
2786
+ # Due to aliases this list is not static, but the client
2787
+ # needs to know it for multi-line editing.
2788
+ pass
2789
+ case _:
2790
+ raise AssertionError(
2791
+ f"PDB message doesn't follow the schema! {msg}"
2792
+ )
2793
+
2794
+ @classmethod
2795
+ def _start_signal_listener(cls, address):
2796
+ def listener(sock):
2797
+ with closing(sock):
2798
+ # Check if the interpreter is finalizing every quarter of a second.
2799
+ # Clean up and exit if so.
2800
+ sock.settimeout(0.25)
2801
+ sock.shutdown(socket.SHUT_WR)
2802
+ while not shut_down.is_set():
2803
+ try:
2804
+ data = sock.recv(1024)
2805
+ except socket.timeout:
2806
+ continue
2807
+ if data == b"":
2808
+ return # EOF
2809
+ signal.raise_signal(signal.SIGINT)
2810
+
2811
+ def stop_thread():
2812
+ shut_down.set()
2813
+ thread.join()
2814
+
2815
+ # Use a daemon thread so that we don't detach until after all non-daemon
2816
+ # threads are done. Use an atexit handler to stop gracefully at that point,
2817
+ # so that our thread is stopped before the interpreter is torn down.
2818
+ shut_down = threading.Event()
2819
+ thread = threading.Thread(
2820
+ target=listener,
2821
+ args=[socket.create_connection(address, timeout=5)],
2822
+ daemon=True,
2823
+ )
2824
+ atexit.register(stop_thread)
2825
+ thread.start()
2826
+
2827
+ def _send(self, **kwargs):
2828
+ self._ensure_valid_message(kwargs)
2829
+ json_payload = json.dumps(kwargs)
2830
+ try:
2831
+ self._sockfile.write(json_payload.encode() + b"\n")
2832
+ self._sockfile.flush()
2833
+ except (OSError, ValueError):
2834
+ # We get an OSError if the network connection has dropped, and a
2835
+ # ValueError if detach() if the sockfile has been closed. We'll
2836
+ # handle this the next time we try to read from the client instead
2837
+ # of trying to handle it from everywhere _send() may be called.
2838
+ # Track this with a flag rather than assuming readline() will ever
2839
+ # return an empty string because the socket may be half-closed.
2840
+ self._write_failed = True
2841
+
2842
+ @typing.override
2843
+ def message(self, msg, end="\n"):
2844
+ self._send(message=str(msg) + end, type="info")
2845
+
2846
+ @typing.override
2847
+ def error(self, msg):
2848
+ self._send(message=str(msg), type="error")
2849
+
2850
+ def _get_input(self, prompt, state) -> str:
2851
+ # Before displaying a (Pdb) prompt, send the list of PDB commands
2852
+ # unless we've already sent an up-to-date list.
2853
+ if state == "pdb" and not self._command_name_cache:
2854
+ self._command_name_cache = self.completenames("", "", 0, 0)
2855
+ self._send(command_list=self._command_name_cache)
2856
+ self._send(prompt=prompt, state=state)
2857
+ return self._read_reply()
2858
+
2859
+ def _read_reply(self):
2860
+ # Loop until we get a 'reply' or 'signal' from the client,
2861
+ # processing out-of-band 'complete' requests as they arrive.
2862
+ while True:
2863
+ if self._write_failed:
2864
+ raise EOFError
2865
+
2866
+ msg = self._sockfile.readline()
2867
+ if not msg:
2868
+ raise EOFError
2869
+
2870
+ try:
2871
+ payload = json.loads(msg)
2872
+ except json.JSONDecodeError:
2873
+ self.error(f"Disconnecting: client sent invalid JSON {msg!r}")
2874
+ raise EOFError
2875
+
2876
+ match payload:
2877
+ case {"reply": str(reply)}:
2878
+ return reply
2879
+ case {"signal": str(signal)}:
2880
+ if signal == "INT":
2881
+ raise KeyboardInterrupt
2882
+ elif signal == "EOF":
2883
+ raise EOFError
2884
+ else:
2885
+ self.error(
2886
+ f"Received unrecognized signal: {signal}"
2887
+ )
2888
+ # Our best hope of recovering is to pretend we
2889
+ # got an EOF to exit whatever mode we're in.
2890
+ raise EOFError
2891
+ case {
2892
+ "complete": {
2893
+ "text": str(text),
2894
+ "line": str(line),
2895
+ "begidx": int(begidx),
2896
+ "endidx": int(endidx),
2897
+ }
2898
+ }:
2899
+ items = self._complete_any(text, line, begidx, endidx)
2900
+ self._send(completions=items)
2901
+ continue
2902
+ # Valid JSON, but doesn't meet the schema.
2903
+ self.error(f"Ignoring invalid message from client: {msg}")
2904
+
2905
+ def _complete_any(self, text, line, begidx, endidx):
2906
+ # If we're in 'interact' mode, we need to use the default completer
2907
+ if self._interact_state:
2908
+ compfunc = self.completedefault
2909
+ else:
2910
+ if begidx == 0:
2911
+ return self.completenames(text, line, begidx, endidx)
2912
+
2913
+ cmd = self.parseline(line)[0]
2914
+ if cmd:
2915
+ compfunc = getattr(self, "complete_" + cmd, self.completedefault)
2916
+ else:
2917
+ compfunc = self.completedefault
2918
+ return compfunc(text, line, begidx, endidx)
2919
+
2920
+ def cmdloop(self, intro=None):
2921
+ self.preloop()
2922
+ if intro is not None:
2923
+ self.intro = intro
2924
+ if self.intro:
2925
+ self.message(str(self.intro))
2926
+ stop = None
2927
+ while not stop:
2928
+ if self._interact_state is not None:
2929
+ try:
2930
+ reply = self._get_input(prompt=">>> ", state="interact")
2931
+ except KeyboardInterrupt:
2932
+ # Match how KeyboardInterrupt is handled in a REPL
2933
+ self.message("\nKeyboardInterrupt")
2934
+ except EOFError:
2935
+ self.message("\n*exit from pdb interact command*")
2936
+ self._interact_state = None
2937
+ else:
2938
+ self._run_in_python_repl(reply)
2939
+ continue
2940
+
2941
+ if not self.cmdqueue:
2942
+ try:
2943
+ state = "commands" if self.commands_defining else "pdb"
2944
+ reply = self._get_input(prompt=self.prompt, state=state)
2945
+ except EOFError:
2946
+ reply = "EOF"
2947
+
2948
+ self.cmdqueue.append(reply)
2949
+
2950
+ line = self.cmdqueue.pop(0)
2951
+ line = self.precmd(line)
2952
+ stop = self.onecmd(line)
2953
+ stop = self.postcmd(stop, line)
2954
+ self.postloop()
2955
+
2956
+ def postloop(self):
2957
+ super().postloop()
2958
+ if self.quitting:
2959
+ self.detach()
2960
+
2961
+ def detach(self):
2962
+ # Detach the debugger and close the socket without raising BdbQuit
2963
+ self.quitting = False
2964
+ if self._owns_sockfile:
2965
+ # Don't try to reuse this instance, it's not valid anymore.
2966
+ Pdb._last_pdb_instance = None
2967
+ try:
2968
+ self._sockfile.close()
2969
+ except OSError:
2970
+ # close() can fail if the connection was broken unexpectedly.
2971
+ pass
2972
+
2973
+ def do_debug(self, arg):
2974
+ # Clear our cached list of valid commands; the recursive debugger might
2975
+ # send its own differing list, and so ours needs to be re-sent.
2976
+ self._command_name_cache = []
2977
+ return super().do_debug(arg)
2978
+
2979
+ def do_alias(self, arg):
2980
+ # Clear our cached list of valid commands; one might be added.
2981
+ self._command_name_cache = []
2982
+ return super().do_alias(arg)
2983
+
2984
+ def do_unalias(self, arg):
2985
+ # Clear our cached list of valid commands; one might be removed.
2986
+ self._command_name_cache = []
2987
+ return super().do_unalias(arg)
2988
+
2989
+ def do_help(self, arg):
2990
+ # Tell the client to render the help, since it might need a pager.
2991
+ self._send(help=arg)
2992
+
2993
+ do_h = do_help
2994
+
2995
+ def _interact_displayhook(self, obj):
2996
+ # Like the default `sys.displayhook` except sending a socket message.
2997
+ if obj is not None:
2998
+ self.message(repr(obj))
2999
+ builtins._ = obj
3000
+
3001
+ def _run_in_python_repl(self, lines):
3002
+ # Run one 'interact' mode code block against an existing namespace.
3003
+ assert self._interact_state
3004
+ save_displayhook = sys.displayhook
3005
+ try:
3006
+ sys.displayhook = self._interact_displayhook
3007
+ code_obj = self._interact_state["compiler"](lines + "\n")
3008
+ if code_obj is None:
3009
+ raise SyntaxError("Incomplete command")
3010
+ exec(code_obj, self._interact_state["ns"])
3011
+ except:
3012
+ self._error_exc()
3013
+ finally:
3014
+ sys.displayhook = save_displayhook
3015
+
3016
+ def do_interact(self, arg):
3017
+ # Prepare to run 'interact' mode code blocks, and trigger the client
3018
+ # to start treating all input as Python commands, not PDB ones.
3019
+ self.message("*pdb interact start*")
3020
+ self._interact_state = dict(
3021
+ compiler=codeop.CommandCompiler(),
3022
+ ns={**self.curframe.f_globals, **self.curframe.f_locals},
3023
+ )
3024
+
3025
+ @typing.override
3026
+ def _create_recursive_debugger(self):
3027
+ return _PdbServer(
3028
+ self._sockfile,
3029
+ owns_sockfile=False,
3030
+ colorize=self.colorize,
3031
+ )
3032
+
3033
+ @typing.override
3034
+ def _prompt_for_confirmation(self, prompt, default):
3035
+ try:
3036
+ return self._get_input(prompt=prompt, state="confirm")
3037
+ except (EOFError, KeyboardInterrupt):
3038
+ return default
3039
+
3040
+ def do_run(self, arg):
3041
+ self.error("remote PDB cannot restart the program")
3042
+
3043
+ do_restart = do_run
3044
+
3045
+ def _error_exc(self):
3046
+ if self._interact_state and isinstance(sys.exception(), SystemExit):
3047
+ # If we get a SystemExit in 'interact' mode, exit the REPL.
3048
+ self._interact_state = None
3049
+ ret = super()._error_exc()
3050
+ self.message("*exit from pdb interact command*")
3051
+ return ret
3052
+ else:
3053
+ return super()._error_exc()
3054
+
3055
+ def default(self, line):
3056
+ # Unlike Pdb, don't prompt for more lines of a multi-line command.
3057
+ # The remote needs to send us the whole block in one go.
3058
+ try:
3059
+ candidate = line.removeprefix("!") + "\n"
3060
+ if codeop.compile_command(candidate, "<stdin>", "single") is None:
3061
+ raise SyntaxError("Incomplete command")
3062
+ return super().default(candidate)
3063
+ except:
3064
+ self._error_exc()
3065
+
3066
+
3067
+ class _PdbClient:
3068
+ def __init__(self, pid, server_socket, interrupt_sock):
3069
+ self.pid = pid
3070
+ self.read_buf = b""
3071
+ self.signal_read = None
3072
+ self.signal_write = None
3073
+ self.sigint_received = False
3074
+ self.raise_on_sigint = False
3075
+ self.server_socket = server_socket
3076
+ self.interrupt_sock = interrupt_sock
3077
+ self.pdb_instance = Pdb()
3078
+ self.pdb_commands = set()
3079
+ self.completion_matches = []
3080
+ self.state = "dumb"
3081
+ self.write_failed = False
3082
+ self.multiline_block = False
3083
+
3084
+ def _ensure_valid_message(self, msg):
3085
+ # Ensure the message conforms to our protocol.
3086
+ # If anything needs to be changed here for a patch release of Python,
3087
+ # the 'revision' in protocol_version() should be updated.
3088
+ match msg:
3089
+ case {"reply": str()}:
3090
+ # Send input typed by a user at a prompt to the remote PDB.
3091
+ pass
3092
+ case {"signal": "EOF"}:
3093
+ # Tell the remote PDB that the user pressed ^D at a prompt.
3094
+ pass
3095
+ case {"signal": "INT"}:
3096
+ # Tell the remote PDB that the user pressed ^C at a prompt.
3097
+ pass
3098
+ case {
3099
+ "complete": {
3100
+ "text": str(),
3101
+ "line": str(),
3102
+ "begidx": int(),
3103
+ "endidx": int(),
3104
+ }
3105
+ }:
3106
+ # Ask the remote PDB what completions are valid for the given
3107
+ # parameters, using readline's completion protocol.
3108
+ pass
3109
+ case _:
3110
+ raise AssertionError(
3111
+ f"PDB message doesn't follow the schema! {msg}"
3112
+ )
3113
+
3114
+ def _send(self, **kwargs):
3115
+ self._ensure_valid_message(kwargs)
3116
+ json_payload = json.dumps(kwargs)
3117
+ try:
3118
+ self.server_socket.sendall(json_payload.encode() + b"\n")
3119
+ except OSError:
3120
+ # This means that the client has abruptly disconnected, but we'll
3121
+ # handle that the next time we try to read from the client instead
3122
+ # of trying to handle it from everywhere _send() may be called.
3123
+ # Track this with a flag rather than assuming readline() will ever
3124
+ # return an empty string because the socket may be half-closed.
3125
+ self.write_failed = True
3126
+
3127
+ def _readline(self):
3128
+ if self.sigint_received:
3129
+ # There's a pending unhandled SIGINT. Handle it now.
3130
+ self.sigint_received = False
3131
+ raise KeyboardInterrupt
3132
+
3133
+ # Wait for either a SIGINT or a line or EOF from the PDB server.
3134
+ selector = selectors.DefaultSelector()
3135
+ selector.register(self.signal_read, selectors.EVENT_READ)
3136
+ selector.register(self.server_socket, selectors.EVENT_READ)
3137
+
3138
+ while b"\n" not in self.read_buf:
3139
+ for key, _ in selector.select():
3140
+ if key.fileobj == self.signal_read:
3141
+ self.signal_read.recv(1024)
3142
+ if self.sigint_received:
3143
+ # If not, we're reading wakeup events for sigints that
3144
+ # we've previously handled, and can ignore them.
3145
+ self.sigint_received = False
3146
+ raise KeyboardInterrupt
3147
+ elif key.fileobj == self.server_socket:
3148
+ data = self.server_socket.recv(16 * 1024)
3149
+ self.read_buf += data
3150
+ if not data and b"\n" not in self.read_buf:
3151
+ # EOF without a full final line. Drop the partial line.
3152
+ self.read_buf = b""
3153
+ return b""
3154
+
3155
+ ret, sep, self.read_buf = self.read_buf.partition(b"\n")
3156
+ return ret + sep
3157
+
3158
+ def read_input(self, prompt, multiline_block):
3159
+ self.multiline_block = multiline_block
3160
+ with self._sigint_raises_keyboard_interrupt():
3161
+ return input(prompt)
3162
+
3163
+ def read_command(self, prompt):
3164
+ reply = self.read_input(prompt, multiline_block=False)
3165
+ if self.state == "dumb":
3166
+ # No logic applied whatsoever, just pass the raw reply back.
3167
+ return reply
3168
+
3169
+ prefix = ""
3170
+ if self.state == "pdb":
3171
+ # PDB command entry mode
3172
+ cmd = self.pdb_instance.parseline(reply)[0]
3173
+ if cmd in self.pdb_commands or reply.strip() == "":
3174
+ # Recognized PDB command, or blank line repeating last command
3175
+ return reply
3176
+
3177
+ # Otherwise, explicit or implicit exec command
3178
+ if reply.startswith("!"):
3179
+ prefix = "!"
3180
+ reply = reply.removeprefix(prefix).lstrip()
3181
+
3182
+ if codeop.compile_command(reply + "\n", "<stdin>", "single") is not None:
3183
+ # Valid single-line statement
3184
+ return prefix + reply
3185
+
3186
+ # Otherwise, valid first line of a multi-line statement
3187
+ more_prompt = "...".ljust(len(prompt))
3188
+ while codeop.compile_command(reply, "<stdin>", "single") is None:
3189
+ reply += "\n" + self.read_input(more_prompt, multiline_block=True)
3190
+
3191
+ return prefix + reply
3192
+
3193
+ @contextmanager
3194
+ def readline_completion(self, completer):
3195
+ try:
3196
+ import readline
3197
+ except ImportError:
3198
+ yield
3199
+ return
3200
+
3201
+ old_completer = readline.get_completer()
3202
+ try:
3203
+ readline.set_completer(completer)
3204
+ if readline.backend == "editline":
3205
+ # libedit uses "^I" instead of "tab"
3206
+ command_string = "bind ^I rl_complete"
3207
+ else:
3208
+ command_string = "tab: complete"
3209
+ readline.parse_and_bind(command_string)
3210
+ yield
3211
+ finally:
3212
+ readline.set_completer(old_completer)
3213
+
3214
+ @contextmanager
3215
+ def _sigint_handler(self):
3216
+ # Signal handling strategy:
3217
+ # - When we call input() we want a SIGINT to raise KeyboardInterrupt
3218
+ # - Otherwise we want to write to the wakeup FD and set a flag.
3219
+ # We'll break out of select() when the wakeup FD is written to,
3220
+ # and we'll check the flag whenever we're about to accept input.
3221
+ def handler(signum, frame):
3222
+ self.sigint_received = True
3223
+ if self.raise_on_sigint:
3224
+ # One-shot; don't raise again until the flag is set again.
3225
+ self.raise_on_sigint = False
3226
+ self.sigint_received = False
3227
+ raise KeyboardInterrupt
3228
+
3229
+ sentinel = object()
3230
+ old_handler = sentinel
3231
+ old_wakeup_fd = sentinel
3232
+
3233
+ self.signal_read, self.signal_write = socket.socketpair()
3234
+ with (closing(self.signal_read), closing(self.signal_write)):
3235
+ self.signal_read.setblocking(False)
3236
+ self.signal_write.setblocking(False)
3237
+
3238
+ try:
3239
+ old_handler = signal.signal(signal.SIGINT, handler)
3240
+
3241
+ try:
3242
+ old_wakeup_fd = signal.set_wakeup_fd(
3243
+ self.signal_write.fileno(),
3244
+ warn_on_full_buffer=False,
3245
+ )
3246
+ yield
3247
+ finally:
3248
+ # Restore the old wakeup fd if we installed a new one
3249
+ if old_wakeup_fd is not sentinel:
3250
+ signal.set_wakeup_fd(old_wakeup_fd)
3251
+ finally:
3252
+ self.signal_read = self.signal_write = None
3253
+ if old_handler is not sentinel:
3254
+ # Restore the old handler if we installed a new one
3255
+ signal.signal(signal.SIGINT, old_handler)
3256
+
3257
+ @contextmanager
3258
+ def _sigint_raises_keyboard_interrupt(self):
3259
+ if self.sigint_received:
3260
+ # There's a pending unhandled SIGINT. Handle it now.
3261
+ self.sigint_received = False
3262
+ raise KeyboardInterrupt
3263
+
3264
+ try:
3265
+ self.raise_on_sigint = True
3266
+ yield
3267
+ finally:
3268
+ self.raise_on_sigint = False
3269
+
3270
+ def cmdloop(self):
3271
+ with (
3272
+ self._sigint_handler(),
3273
+ self.readline_completion(self.complete),
3274
+ ):
3275
+ while not self.write_failed:
3276
+ try:
3277
+ if not (payload_bytes := self._readline()):
3278
+ break
3279
+ except KeyboardInterrupt:
3280
+ self.send_interrupt()
3281
+ continue
3282
+
3283
+ try:
3284
+ payload = json.loads(payload_bytes)
3285
+ except json.JSONDecodeError:
3286
+ print(
3287
+ f"*** Invalid JSON from remote: {payload_bytes!r}",
3288
+ flush=True,
3289
+ )
3290
+ continue
3291
+
3292
+ self.process_payload(payload)
3293
+
3294
+ def send_interrupt(self):
3295
+ if self.interrupt_sock is not None:
3296
+ # Write to a socket that the PDB server listens on. This triggers
3297
+ # the remote to raise a SIGINT for itself. We do this because
3298
+ # Windows doesn't allow triggering SIGINT remotely.
3299
+ # See https://stackoverflow.com/a/35792192 for many more details.
3300
+ self.interrupt_sock.sendall(signal.SIGINT.to_bytes())
3301
+ else:
3302
+ # On Unix we can just send a SIGINT to the remote process.
3303
+ # This is preferable to using the signal thread approach that we
3304
+ # use on Windows because it can interrupt IO in the main thread.
3305
+ os.kill(self.pid, signal.SIGINT)
3306
+
3307
+ def process_payload(self, payload):
3308
+ match payload:
3309
+ case {
3310
+ "command_list": command_list
3311
+ } if all(isinstance(c, str) for c in command_list):
3312
+ self.pdb_commands = set(command_list)
3313
+ case {"message": str(msg), "type": str(msg_type)}:
3314
+ if msg_type == "error":
3315
+ print("***", msg, flush=True)
3316
+ else:
3317
+ print(msg, end="", flush=True)
3318
+ case {"help": str(arg)}:
3319
+ self.pdb_instance.do_help(arg)
3320
+ case {"prompt": str(prompt), "state": str(state)}:
3321
+ if state not in ("pdb", "interact"):
3322
+ state = "dumb"
3323
+ self.state = state
3324
+ self.prompt_for_reply(prompt)
3325
+ case _:
3326
+ raise RuntimeError(f"Unrecognized payload {payload}")
3327
+
3328
+ def prompt_for_reply(self, prompt):
3329
+ while True:
3330
+ try:
3331
+ payload = {"reply": self.read_command(prompt)}
3332
+ except EOFError:
3333
+ payload = {"signal": "EOF"}
3334
+ except KeyboardInterrupt:
3335
+ payload = {"signal": "INT"}
3336
+ except Exception as exc:
3337
+ msg = traceback.format_exception_only(exc)[-1].strip()
3338
+ print("***", msg, flush=True)
3339
+ continue
3340
+
3341
+ self._send(**payload)
3342
+ return
3343
+
3344
+ def complete(self, text, state):
3345
+ import readline
3346
+
3347
+ if state == 0:
3348
+ self.completion_matches = []
3349
+ if self.state not in ("pdb", "interact"):
3350
+ return None
3351
+
3352
+ origline = readline.get_line_buffer()
3353
+ line = origline.lstrip()
3354
+ if self.multiline_block:
3355
+ # We're completing a line contained in a multi-line block.
3356
+ # Force the remote to treat it as a Python expression.
3357
+ line = "! " + line
3358
+ offset = len(origline) - len(line)
3359
+ begidx = readline.get_begidx() - offset
3360
+ endidx = readline.get_endidx() - offset
3361
+
3362
+ msg = {
3363
+ "complete": {
3364
+ "text": text,
3365
+ "line": line,
3366
+ "begidx": begidx,
3367
+ "endidx": endidx,
3368
+ }
3369
+ }
3370
+
3371
+ self._send(**msg)
3372
+ if self.write_failed:
3373
+ return None
3374
+
3375
+ payload = self._readline()
3376
+ if not payload:
3377
+ return None
3378
+
3379
+ payload = json.loads(payload)
3380
+ if "completions" not in payload:
3381
+ raise RuntimeError(
3382
+ f"Failed to get valid completions. Got: {payload}"
3383
+ )
3384
+
3385
+ self.completion_matches = payload["completions"]
3386
+ try:
3387
+ return self.completion_matches[state]
3388
+ except IndexError:
3389
+ return None
3390
+
3391
+
3392
+ def _connect(
3393
+ *,
3394
+ host,
3395
+ port,
3396
+ frame,
3397
+ commands,
3398
+ version,
3399
+ signal_raising_thread,
3400
+ colorize,
3401
+ ):
3402
+ with closing(socket.create_connection((host, port))) as conn:
3403
+ sockfile = conn.makefile("rwb")
3404
+
3405
+ # The client requests this thread on Windows but not on Unix.
3406
+ # Most tests don't request this thread, to keep them simpler.
3407
+ if signal_raising_thread:
3408
+ signal_server = (host, port)
3409
+ else:
3410
+ signal_server = None
3411
+
3412
+ remote_pdb = _PdbServer(
3413
+ sockfile,
3414
+ signal_server=signal_server,
3415
+ colorize=colorize,
3416
+ )
3417
+ weakref.finalize(remote_pdb, sockfile.close)
3418
+
3419
+ if Pdb._last_pdb_instance is not None:
3420
+ remote_pdb.error("Another PDB instance is already attached.")
3421
+ elif version != remote_pdb.protocol_version():
3422
+ target_ver = f"0x{remote_pdb.protocol_version():08X}"
3423
+ attach_ver = f"0x{version:08X}"
3424
+ remote_pdb.error(
3425
+ f"The target process is running a Python version that is"
3426
+ f" incompatible with this PDB module."
3427
+ f"\nTarget process pdb protocol version: {target_ver}"
3428
+ f"\nLocal pdb module's protocol version: {attach_ver}"
3429
+ )
3430
+ else:
3431
+ remote_pdb.rcLines.extend(commands.splitlines())
3432
+ remote_pdb.set_trace(frame=frame)
3433
+
3434
+
3435
+ def attach(pid, commands=()):
3436
+ """Attach to a running process with the given PID."""
3437
+ with ExitStack() as stack:
3438
+ server = stack.enter_context(
3439
+ closing(socket.create_server(("localhost", 0)))
3440
+ )
3441
+ port = server.getsockname()[1]
3442
+
3443
+ connect_script = stack.enter_context(
3444
+ tempfile.NamedTemporaryFile("w", delete_on_close=False)
3445
+ )
3446
+
3447
+ use_signal_thread = sys.platform == "win32"
3448
+ colorize = _colorize.can_colorize()
3449
+
3450
+ connect_script.write(
3451
+ textwrap.dedent(
3452
+ f"""
3453
+ import pdb, sys
3454
+ pdb._connect(
3455
+ host="localhost",
3456
+ port={port},
3457
+ frame=sys._getframe(1),
3458
+ commands={json.dumps("\n".join(commands))},
3459
+ version={_PdbServer.protocol_version()},
3460
+ signal_raising_thread={use_signal_thread!r},
3461
+ colorize={colorize!r},
3462
+ )
3463
+ """
3464
+ )
3465
+ )
3466
+ connect_script.close()
3467
+ orig_mode = os.stat(connect_script.name).st_mode
3468
+ os.chmod(connect_script.name, orig_mode | stat.S_IROTH | stat.S_IRGRP)
3469
+ sys.remote_exec(pid, connect_script.name)
3470
+
3471
+ # TODO Add a timeout? Or don't bother since the user can ^C?
3472
+ client_sock, _ = server.accept()
3473
+ stack.enter_context(closing(client_sock))
3474
+
3475
+ if use_signal_thread:
3476
+ interrupt_sock, _ = server.accept()
3477
+ stack.enter_context(closing(interrupt_sock))
3478
+ interrupt_sock.setblocking(False)
3479
+ else:
3480
+ interrupt_sock = None
3481
+
3482
+ _PdbClient(pid, client_sock, interrupt_sock).cmdloop()
3483
+
3484
+
3485
+ # Post-Mortem interface
3486
+
3487
+ def post_mortem(t=None):
3488
+ """Enter post-mortem debugging of the given *traceback*, or *exception*
3489
+ object.
3490
+
3491
+ If no traceback is given, it uses the one of the exception that is
3492
+ currently being handled (an exception must be being handled if the
3493
+ default is to be used).
3494
+
3495
+ If `t` is an exception object, the `exceptions` command makes it possible to
3496
+ list and inspect its chained exceptions (if any).
3497
+ """
3498
+ return _post_mortem(t, Pdb())
3499
+
3500
+
3501
+ def _post_mortem(t, pdb_instance):
3502
+ """
3503
+ Private version of post_mortem, which allow to pass a pdb instance
3504
+ for testing purposes.
3505
+ """
3506
+ # handling the default
3507
+ if t is None:
3508
+ exc = sys.exception()
3509
+ if exc is not None:
3510
+ t = exc.__traceback__
3511
+
3512
+ if t is None or (isinstance(t, BaseException) and t.__traceback__ is None):
3513
+ raise ValueError("A valid traceback must be passed if no "
3514
+ "exception is being handled")
3515
+
3516
+ pdb_instance.reset()
3517
+ pdb_instance.interaction(None, t)
3518
+
3519
+
3520
+ def pm():
3521
+ """Enter post-mortem debugging of the traceback found in sys.last_exc."""
3522
+ post_mortem(sys.last_exc)
3523
+
3524
+
3525
+ # Main program for testing
3526
+
3527
+ TESTCMD = 'import x; x.main()'
3528
+
3529
+ def test():
3530
+ run(TESTCMD)
3531
+
3532
+ # print help
3533
+ def help():
3534
+ import pydoc
3535
+ pydoc.pager(__doc__)
3536
+
3537
+ _usage = """\
3538
+ Debug the Python program given by pyfile. Alternatively,
3539
+ an executable module or package to debug can be specified using
3540
+ the -m switch. You can also attach to a running Python process
3541
+ using the -p option with its PID.
3542
+
3543
+ Initial commands are read from .pdbrc files in your home directory
3544
+ and in the current directory, if they exist. Commands supplied with
3545
+ -c are executed after commands from .pdbrc files.
3546
+
3547
+ To let the script run until an exception occurs, use "-c continue".
3548
+ To let the script run up to a given line X in the debugged file, use
3549
+ "-c 'until X'"."""
3550
+
3551
+
3552
+ def exit_with_permission_help_text():
3553
+ """
3554
+ Prints a message pointing to platform-specific permission help text and exits the program.
3555
+ This function is called when a PermissionError is encountered while trying
3556
+ to attach to a process.
3557
+ """
3558
+ print(
3559
+ "Error: The specified process cannot be attached to due to insufficient permissions.\n"
3560
+ "See the Python documentation for details on required privileges and troubleshooting:\n"
3561
+ "https://docs.python.org/3.14/howto/remote_debugging.html#permission-requirements\n"
3562
+ )
3563
+ sys.exit(1)
3564
+
3565
+
3566
+ def parse_args():
3567
+ # We want pdb to be as intuitive as possible to users, so we need to do some
3568
+ # heuristic parsing to deal with ambiguity.
3569
+ # For example:
3570
+ # "python -m pdb -m foo -p 1" should pass "-p 1" to "foo".
3571
+ # "python -m pdb foo.py -m bar" should pass "-m bar" to "foo.py".
3572
+ # "python -m pdb -m foo -m bar" should pass "-m bar" to "foo".
3573
+ # This require some customized parsing logic to find the actual debug target.
3574
+
3575
+ import argparse
3576
+
3577
+ parser = argparse.ArgumentParser(
3578
+ usage="%(prog)s [-h] [-c command] (-m module | -p pid | pyfile) [args ...]",
3579
+ description=_usage,
3580
+ formatter_class=argparse.RawDescriptionHelpFormatter,
3581
+ allow_abbrev=False,
3582
+ color=True,
3583
+ )
3584
+
3585
+ # Get all the commands out first. For backwards compatibility, we allow
3586
+ # -c commands to be after the target.
3587
+ parser.add_argument('-c', '--command', action='append', default=[], metavar='command', dest='commands',
3588
+ help='pdb commands to execute as if given in a .pdbrc file')
3589
+
3590
+ opts, args = parser.parse_known_args()
3591
+
3592
+ if not args:
3593
+ # If no arguments were given (python -m pdb), print the whole help message.
3594
+ # Without this check, argparse would only complain about missing required arguments.
3595
+ # We need to add the arguments definitions here to get a proper help message.
3596
+ parser.add_argument('-m', metavar='module', dest='module')
3597
+ parser.add_argument('-p', '--pid', type=int, help="attach to the specified PID", default=None)
3598
+ parser.print_help()
3599
+ sys.exit(2)
3600
+ elif args[0] == '-p' or args[0] == '--pid':
3601
+ # Attach to a pid
3602
+ parser.add_argument('-p', '--pid', type=int, help="attach to the specified PID", default=None)
3603
+ opts, args = parser.parse_known_args()
3604
+ if args:
3605
+ # For --pid, any extra arguments are invalid.
3606
+ parser.error(f"unrecognized arguments: {' '.join(args)}")
3607
+ elif args[0] == '-m':
3608
+ # Debug a module, we only need the first -m module argument.
3609
+ # The rest is passed to the module itself.
3610
+ parser.add_argument('-m', metavar='module', dest='module')
3611
+ opt_module = parser.parse_args(args[:2])
3612
+ opts.module = opt_module.module
3613
+ args = args[2:]
3614
+ elif args[0] == '--':
3615
+ args.pop(0)
3616
+ if not args:
3617
+ parser.error("missing script or module to run")
3618
+ elif args[0].startswith('-'):
3619
+ # Invalid argument before the script name.
3620
+ invalid_args = list(itertools.takewhile(lambda a: a.startswith('-'), args))
3621
+ parser.error(f"unrecognized arguments: {' '.join(invalid_args)}")
3622
+
3623
+ # Otherwise it's debugging a script and we already parsed all -c commands.
3624
+
3625
+ return opts, args
3626
+
3627
+ def main():
3628
+ opts, args = parse_args()
3629
+
3630
+ if getattr(opts, 'pid', None) is not None:
3631
+ try:
3632
+ attach(opts.pid, opts.commands)
3633
+ except PermissionError as e:
3634
+ exit_with_permission_help_text()
3635
+ return
3636
+ elif getattr(opts, 'module', None) is not None:
3637
+ file = opts.module
3638
+ target = _ModuleTarget(file)
3639
+ else:
3640
+ file = args.pop(0)
3641
+ if file.endswith('.pyz'):
3642
+ target = _ZipTarget(file)
3643
+ else:
3644
+ target = _ScriptTarget(file)
3645
+
3646
+ sys.argv[:] = [file] + args # Hide "pdb.py" and pdb options from argument list
3647
+
3648
+ # Note on saving/restoring sys.argv: it's a good idea when sys.argv was
3649
+ # modified by the script being debugged. It's a bad idea when it was
3650
+ # changed by the user from the command line. There is a "restart" command
3651
+ # which allows explicit specification of command line arguments.
3652
+ pdb = Pdb(mode='cli', backend='monitoring', colorize=True)
3653
+ pdb.rcLines.extend(opts.commands)
3654
+ while True:
3655
+ try:
3656
+ pdb._run(target)
3657
+ except Restart:
3658
+ print("Restarting", target, "with arguments:")
3659
+ print("\t" + " ".join(sys.argv[1:]))
3660
+ except SystemExit as e:
3661
+ # In most cases SystemExit does not warrant a post-mortem session.
3662
+ print("The program exited via sys.exit(). Exit status:", end=' ')
3663
+ print(e)
3664
+ except BaseException as e:
3665
+ traceback.print_exception(e, colorize=_colorize.can_colorize())
3666
+ print("Uncaught exception. Entering post mortem debugging")
3667
+ print("Running 'cont' or 'step' will restart the program")
3668
+ try:
3669
+ pdb.interaction(None, e)
3670
+ except Restart:
3671
+ print("Restarting", target, "with arguments:")
3672
+ print("\t" + " ".join(sys.argv[1:]))
3673
+ continue
3674
+ if pdb._user_requested_quit:
3675
+ break
3676
+ print("The program finished and will be restarted")
3677
+
3678
+
3679
+ # When invoked as main program, invoke the debugger on a script
3680
+ if __name__ == '__main__':
3681
+ import pdb
3682
+ pdb.main()