@rowstile/cli-win32-x64 0.1.0-alpha.2

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 (759) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +5 -0
  3. package/package.json +23 -0
  4. package/python/DLLs/_asyncio.pyd +0 -0
  5. package/python/DLLs/_bz2.pyd +0 -0
  6. package/python/DLLs/_ctypes.pyd +0 -0
  7. package/python/DLLs/_ctypes_test.pyd +0 -0
  8. package/python/DLLs/_decimal.pyd +0 -0
  9. package/python/DLLs/_elementtree.pyd +0 -0
  10. package/python/DLLs/_hashlib.pyd +0 -0
  11. package/python/DLLs/_lzma.pyd +0 -0
  12. package/python/DLLs/_multiprocessing.pyd +0 -0
  13. package/python/DLLs/_overlapped.pyd +0 -0
  14. package/python/DLLs/_queue.pyd +0 -0
  15. package/python/DLLs/_socket.pyd +0 -0
  16. package/python/DLLs/_sqlite3.pyd +0 -0
  17. package/python/DLLs/_ssl.pyd +0 -0
  18. package/python/DLLs/_testbuffer.pyd +0 -0
  19. package/python/DLLs/_testcapi.pyd +0 -0
  20. package/python/DLLs/_testclinic.pyd +0 -0
  21. package/python/DLLs/_testclinic_limited.pyd +0 -0
  22. package/python/DLLs/_testconsole.pyd +0 -0
  23. package/python/DLLs/_testimportmultiple.pyd +0 -0
  24. package/python/DLLs/_testinternalcapi.pyd +0 -0
  25. package/python/DLLs/_testlimitedcapi.pyd +0 -0
  26. package/python/DLLs/_testmultiphase.pyd +0 -0
  27. package/python/DLLs/_testsinglephase.pyd +0 -0
  28. package/python/DLLs/_uuid.pyd +0 -0
  29. package/python/DLLs/_wmi.pyd +0 -0
  30. package/python/DLLs/_zoneinfo.pyd +0 -0
  31. package/python/DLLs/libcrypto-3-x64.dll +0 -0
  32. package/python/DLLs/libffi-8.dll +0 -0
  33. package/python/DLLs/libssl-3-x64.dll +0 -0
  34. package/python/DLLs/pyexpat.pyd +0 -0
  35. package/python/DLLs/select.pyd +0 -0
  36. package/python/DLLs/sqlite3.dll +0 -0
  37. package/python/DLLs/unicodedata.pyd +0 -0
  38. package/python/DLLs/winsound.pyd +0 -0
  39. package/python/DLLs/zlib1.dll +0 -0
  40. package/python/LICENSE.txt +445 -0
  41. package/python/Lib/__future__.py +147 -0
  42. package/python/Lib/__hello__.py +16 -0
  43. package/python/Lib/__pycache__/__future__.cpython-313.pyc +0 -0
  44. package/python/Lib/__pycache__/_colorize.cpython-313.pyc +0 -0
  45. package/python/Lib/__pycache__/_compat_pickle.cpython-313.pyc +0 -0
  46. package/python/Lib/__pycache__/_compression.cpython-313.pyc +0 -0
  47. package/python/Lib/__pycache__/_markupbase.cpython-313.pyc +0 -0
  48. package/python/Lib/__pycache__/_opcode_metadata.cpython-313.pyc +0 -0
  49. package/python/Lib/__pycache__/_weakrefset.cpython-313.pyc +0 -0
  50. package/python/Lib/__pycache__/ast.cpython-313.pyc +0 -0
  51. package/python/Lib/__pycache__/base64.cpython-313.pyc +0 -0
  52. package/python/Lib/__pycache__/bisect.cpython-313.pyc +0 -0
  53. package/python/Lib/__pycache__/bz2.cpython-313.pyc +0 -0
  54. package/python/Lib/__pycache__/calendar.cpython-313.pyc +0 -0
  55. package/python/Lib/__pycache__/colorsys.cpython-313.pyc +0 -0
  56. package/python/Lib/__pycache__/compileall.cpython-313.pyc +0 -0
  57. package/python/Lib/__pycache__/configparser.cpython-313.pyc +0 -0
  58. package/python/Lib/__pycache__/contextlib.cpython-313.pyc +0 -0
  59. package/python/Lib/__pycache__/copy.cpython-313.pyc +0 -0
  60. package/python/Lib/__pycache__/copyreg.cpython-313.pyc +0 -0
  61. package/python/Lib/__pycache__/csv.cpython-313.pyc +0 -0
  62. package/python/Lib/__pycache__/dataclasses.cpython-313.pyc +0 -0
  63. package/python/Lib/__pycache__/datetime.cpython-313.pyc +0 -0
  64. package/python/Lib/__pycache__/decimal.cpython-313.pyc +0 -0
  65. package/python/Lib/__pycache__/dis.cpython-313.pyc +0 -0
  66. package/python/Lib/__pycache__/enum.cpython-313.pyc +0 -0
  67. package/python/Lib/__pycache__/filecmp.cpython-313.pyc +0 -0
  68. package/python/Lib/__pycache__/fnmatch.cpython-313.pyc +0 -0
  69. package/python/Lib/__pycache__/fractions.cpython-313.pyc +0 -0
  70. package/python/Lib/__pycache__/functools.cpython-313.pyc +0 -0
  71. package/python/Lib/__pycache__/getpass.cpython-313.pyc +0 -0
  72. package/python/Lib/__pycache__/gettext.cpython-313.pyc +0 -0
  73. package/python/Lib/__pycache__/glob.cpython-313.pyc +0 -0
  74. package/python/Lib/__pycache__/gzip.cpython-313.pyc +0 -0
  75. package/python/Lib/__pycache__/hashlib.cpython-313.pyc +0 -0
  76. package/python/Lib/__pycache__/heapq.cpython-313.pyc +0 -0
  77. package/python/Lib/__pycache__/hmac.cpython-313.pyc +0 -0
  78. package/python/Lib/__pycache__/inspect.cpython-313.pyc +0 -0
  79. package/python/Lib/__pycache__/ipaddress.cpython-313.pyc +0 -0
  80. package/python/Lib/__pycache__/keyword.cpython-313.pyc +0 -0
  81. package/python/Lib/__pycache__/linecache.cpython-313.pyc +0 -0
  82. package/python/Lib/__pycache__/locale.cpython-313.pyc +0 -0
  83. package/python/Lib/__pycache__/lzma.cpython-313.pyc +0 -0
  84. package/python/Lib/__pycache__/mimetypes.cpython-313.pyc +0 -0
  85. package/python/Lib/__pycache__/nturl2path.cpython-313.pyc +0 -0
  86. package/python/Lib/__pycache__/numbers.cpython-313.pyc +0 -0
  87. package/python/Lib/__pycache__/opcode.cpython-313.pyc +0 -0
  88. package/python/Lib/__pycache__/operator.cpython-313.pyc +0 -0
  89. package/python/Lib/__pycache__/optparse.cpython-313.pyc +0 -0
  90. package/python/Lib/__pycache__/pickle.cpython-313.pyc +0 -0
  91. package/python/Lib/__pycache__/pkgutil.cpython-313.pyc +0 -0
  92. package/python/Lib/__pycache__/platform.cpython-313.pyc +0 -0
  93. package/python/Lib/__pycache__/py_compile.cpython-313.pyc +0 -0
  94. package/python/Lib/__pycache__/queue.cpython-313.pyc +0 -0
  95. package/python/Lib/__pycache__/quopri.cpython-313.pyc +0 -0
  96. package/python/Lib/__pycache__/random.cpython-313.pyc +0 -0
  97. package/python/Lib/__pycache__/reprlib.cpython-313.pyc +0 -0
  98. package/python/Lib/__pycache__/selectors.cpython-313.pyc +0 -0
  99. package/python/Lib/__pycache__/shlex.cpython-313.pyc +0 -0
  100. package/python/Lib/__pycache__/shutil.cpython-313.pyc +0 -0
  101. package/python/Lib/__pycache__/signal.cpython-313.pyc +0 -0
  102. package/python/Lib/__pycache__/socket.cpython-313.pyc +0 -0
  103. package/python/Lib/__pycache__/socketserver.cpython-313.pyc +0 -0
  104. package/python/Lib/__pycache__/ssl.cpython-313.pyc +0 -0
  105. package/python/Lib/__pycache__/string.cpython-313.pyc +0 -0
  106. package/python/Lib/__pycache__/stringprep.cpython-313.pyc +0 -0
  107. package/python/Lib/__pycache__/struct.cpython-313.pyc +0 -0
  108. package/python/Lib/__pycache__/subprocess.cpython-313.pyc +0 -0
  109. package/python/Lib/__pycache__/tarfile.cpython-313.pyc +0 -0
  110. package/python/Lib/__pycache__/tempfile.cpython-313.pyc +0 -0
  111. package/python/Lib/__pycache__/textwrap.cpython-313.pyc +0 -0
  112. package/python/Lib/__pycache__/threading.cpython-313.pyc +0 -0
  113. package/python/Lib/__pycache__/token.cpython-313.pyc +0 -0
  114. package/python/Lib/__pycache__/tokenize.cpython-313.pyc +0 -0
  115. package/python/Lib/__pycache__/traceback.cpython-313.pyc +0 -0
  116. package/python/Lib/__pycache__/types.cpython-313.pyc +0 -0
  117. package/python/Lib/__pycache__/typing.cpython-313.pyc +0 -0
  118. package/python/Lib/__pycache__/uuid.cpython-313.pyc +0 -0
  119. package/python/Lib/__pycache__/warnings.cpython-313.pyc +0 -0
  120. package/python/Lib/__pycache__/weakref.cpython-313.pyc +0 -0
  121. package/python/Lib/_aix_support.py +108 -0
  122. package/python/Lib/_android_support.py +192 -0
  123. package/python/Lib/_apple_support.py +66 -0
  124. package/python/Lib/_collections_abc.py +1187 -0
  125. package/python/Lib/_colorize.py +119 -0
  126. package/python/Lib/_compat_pickle.py +251 -0
  127. package/python/Lib/_compression.py +162 -0
  128. package/python/Lib/_ios_support.py +71 -0
  129. package/python/Lib/_markupbase.py +396 -0
  130. package/python/Lib/_opcode_metadata.py +343 -0
  131. package/python/Lib/_osx_support.py +579 -0
  132. package/python/Lib/_py_abc.py +147 -0
  133. package/python/Lib/_pydatetime.py +2640 -0
  134. package/python/Lib/_pydecimal.py +6356 -0
  135. package/python/Lib/_pyio.py +2714 -0
  136. package/python/Lib/_pylong.py +363 -0
  137. package/python/Lib/_pyrepl/__init__.py +19 -0
  138. package/python/Lib/_pyrepl/__main__.py +10 -0
  139. package/python/Lib/_pyrepl/_minimal_curses.py +68 -0
  140. package/python/Lib/_pyrepl/_threading_handler.py +74 -0
  141. package/python/Lib/_pyrepl/base_eventqueue.py +110 -0
  142. package/python/Lib/_pyrepl/commands.py +492 -0
  143. package/python/Lib/_pyrepl/completing_reader.py +295 -0
  144. package/python/Lib/_pyrepl/console.py +229 -0
  145. package/python/Lib/_pyrepl/curses.py +33 -0
  146. package/python/Lib/_pyrepl/fancy_termios.py +82 -0
  147. package/python/Lib/_pyrepl/historical_reader.py +419 -0
  148. package/python/Lib/_pyrepl/input.py +114 -0
  149. package/python/Lib/_pyrepl/keymap.py +213 -0
  150. package/python/Lib/_pyrepl/main.py +59 -0
  151. package/python/Lib/_pyrepl/mypy.ini +29 -0
  152. package/python/Lib/_pyrepl/pager.py +175 -0
  153. package/python/Lib/_pyrepl/reader.py +764 -0
  154. package/python/Lib/_pyrepl/readline.py +599 -0
  155. package/python/Lib/_pyrepl/simple_interact.py +180 -0
  156. package/python/Lib/_pyrepl/trace.py +21 -0
  157. package/python/Lib/_pyrepl/types.py +10 -0
  158. package/python/Lib/_pyrepl/unix_console.py +852 -0
  159. package/python/Lib/_pyrepl/unix_eventqueue.py +76 -0
  160. package/python/Lib/_pyrepl/utils.py +83 -0
  161. package/python/Lib/_pyrepl/windows_console.py +687 -0
  162. package/python/Lib/_pyrepl/windows_eventqueue.py +42 -0
  163. package/python/Lib/_sitebuiltins.py +91 -0
  164. package/python/Lib/_strptime.py +800 -0
  165. package/python/Lib/_threading_local.py +120 -0
  166. package/python/Lib/_weakrefset.py +205 -0
  167. package/python/Lib/abc.py +188 -0
  168. package/python/Lib/antigravity.py +17 -0
  169. package/python/Lib/argparse.py +2690 -0
  170. package/python/Lib/ast.py +1865 -0
  171. package/python/Lib/asyncio/__init__.py +47 -0
  172. package/python/Lib/asyncio/__main__.py +211 -0
  173. package/python/Lib/asyncio/base_events.py +2086 -0
  174. package/python/Lib/asyncio/base_futures.py +67 -0
  175. package/python/Lib/asyncio/base_subprocess.py +312 -0
  176. package/python/Lib/asyncio/base_tasks.py +94 -0
  177. package/python/Lib/asyncio/constants.py +41 -0
  178. package/python/Lib/asyncio/coroutines.py +109 -0
  179. package/python/Lib/asyncio/events.py +885 -0
  180. package/python/Lib/asyncio/exceptions.py +62 -0
  181. package/python/Lib/asyncio/format_helpers.py +84 -0
  182. package/python/Lib/asyncio/futures.py +425 -0
  183. package/python/Lib/asyncio/locks.py +617 -0
  184. package/python/Lib/asyncio/log.py +7 -0
  185. package/python/Lib/asyncio/mixins.py +21 -0
  186. package/python/Lib/asyncio/proactor_events.py +891 -0
  187. package/python/Lib/asyncio/protocols.py +216 -0
  188. package/python/Lib/asyncio/queues.py +309 -0
  189. package/python/Lib/asyncio/runners.py +217 -0
  190. package/python/Lib/asyncio/selector_events.py +1328 -0
  191. package/python/Lib/asyncio/sslproto.py +929 -0
  192. package/python/Lib/asyncio/staggered.py +174 -0
  193. package/python/Lib/asyncio/streams.py +787 -0
  194. package/python/Lib/asyncio/subprocess.py +229 -0
  195. package/python/Lib/asyncio/taskgroups.py +278 -0
  196. package/python/Lib/asyncio/tasks.py +1121 -0
  197. package/python/Lib/asyncio/threads.py +26 -0
  198. package/python/Lib/asyncio/timeouts.py +185 -0
  199. package/python/Lib/asyncio/transports.py +337 -0
  200. package/python/Lib/asyncio/trsock.py +98 -0
  201. package/python/Lib/asyncio/unix_events.py +1550 -0
  202. package/python/Lib/asyncio/windows_events.py +906 -0
  203. package/python/Lib/asyncio/windows_utils.py +181 -0
  204. package/python/Lib/base64.py +628 -0
  205. package/python/Lib/bdb.py +973 -0
  206. package/python/Lib/bisect.py +118 -0
  207. package/python/Lib/bz2.py +352 -0
  208. package/python/Lib/cProfile.py +197 -0
  209. package/python/Lib/calendar.py +813 -0
  210. package/python/Lib/cmd.py +409 -0
  211. package/python/Lib/code.py +386 -0
  212. package/python/Lib/codecs.py +1132 -0
  213. package/python/Lib/codeop.py +155 -0
  214. package/python/Lib/collections/__init__.py +1603 -0
  215. package/python/Lib/collections/__pycache__/__init__.cpython-313.pyc +0 -0
  216. package/python/Lib/colorsys.py +166 -0
  217. package/python/Lib/compileall.py +470 -0
  218. package/python/Lib/concurrent/__init__.py +1 -0
  219. package/python/Lib/concurrent/futures/__init__.py +54 -0
  220. package/python/Lib/concurrent/futures/_base.py +660 -0
  221. package/python/Lib/concurrent/futures/process.py +892 -0
  222. package/python/Lib/concurrent/futures/thread.py +240 -0
  223. package/python/Lib/configparser.py +1396 -0
  224. package/python/Lib/contextlib.py +814 -0
  225. package/python/Lib/contextvars.py +4 -0
  226. package/python/Lib/copy.py +306 -0
  227. package/python/Lib/copyreg.py +217 -0
  228. package/python/Lib/csv.py +527 -0
  229. package/python/Lib/ctypes/__init__.py +602 -0
  230. package/python/Lib/ctypes/__pycache__/__init__.cpython-313.pyc +0 -0
  231. package/python/Lib/ctypes/__pycache__/_endian.cpython-313.pyc +0 -0
  232. package/python/Lib/ctypes/__pycache__/wintypes.cpython-313.pyc +0 -0
  233. package/python/Lib/ctypes/_aix.py +327 -0
  234. package/python/Lib/ctypes/_endian.py +78 -0
  235. package/python/Lib/ctypes/macholib/README.ctypes +7 -0
  236. package/python/Lib/ctypes/macholib/__init__.py +9 -0
  237. package/python/Lib/ctypes/macholib/dyld.py +165 -0
  238. package/python/Lib/ctypes/macholib/dylib.py +42 -0
  239. package/python/Lib/ctypes/macholib/fetch_macholib +2 -0
  240. package/python/Lib/ctypes/macholib/fetch_macholib.bat +1 -0
  241. package/python/Lib/ctypes/macholib/framework.py +42 -0
  242. package/python/Lib/ctypes/util.py +387 -0
  243. package/python/Lib/ctypes/wintypes.py +202 -0
  244. package/python/Lib/curses/__init__.py +101 -0
  245. package/python/Lib/curses/ascii.py +99 -0
  246. package/python/Lib/curses/has_key.py +192 -0
  247. package/python/Lib/curses/panel.py +6 -0
  248. package/python/Lib/curses/textpad.py +236 -0
  249. package/python/Lib/dataclasses.py +1679 -0
  250. package/python/Lib/datetime.py +9 -0
  251. package/python/Lib/dbm/__init__.py +194 -0
  252. package/python/Lib/dbm/dumb.py +319 -0
  253. package/python/Lib/dbm/gnu.py +3 -0
  254. package/python/Lib/dbm/ndbm.py +3 -0
  255. package/python/Lib/dbm/sqlite3.py +144 -0
  256. package/python/Lib/decimal.py +109 -0
  257. package/python/Lib/difflib.py +2058 -0
  258. package/python/Lib/dis.py +1075 -0
  259. package/python/Lib/doctest.py +2919 -0
  260. package/python/Lib/email/__init__.py +61 -0
  261. package/python/Lib/email/__pycache__/__init__.cpython-313.pyc +0 -0
  262. package/python/Lib/email/__pycache__/_encoded_words.cpython-313.pyc +0 -0
  263. package/python/Lib/email/__pycache__/_parseaddr.cpython-313.pyc +0 -0
  264. package/python/Lib/email/__pycache__/_policybase.cpython-313.pyc +0 -0
  265. package/python/Lib/email/__pycache__/base64mime.cpython-313.pyc +0 -0
  266. package/python/Lib/email/__pycache__/charset.cpython-313.pyc +0 -0
  267. package/python/Lib/email/__pycache__/encoders.cpython-313.pyc +0 -0
  268. package/python/Lib/email/__pycache__/errors.cpython-313.pyc +0 -0
  269. package/python/Lib/email/__pycache__/feedparser.cpython-313.pyc +0 -0
  270. package/python/Lib/email/__pycache__/header.cpython-313.pyc +0 -0
  271. package/python/Lib/email/__pycache__/iterators.cpython-313.pyc +0 -0
  272. package/python/Lib/email/__pycache__/message.cpython-313.pyc +0 -0
  273. package/python/Lib/email/__pycache__/parser.cpython-313.pyc +0 -0
  274. package/python/Lib/email/__pycache__/quoprimime.cpython-313.pyc +0 -0
  275. package/python/Lib/email/__pycache__/utils.cpython-313.pyc +0 -0
  276. package/python/Lib/email/_encoded_words.py +233 -0
  277. package/python/Lib/email/_header_value_parser.py +3153 -0
  278. package/python/Lib/email/_parseaddr.py +563 -0
  279. package/python/Lib/email/_policybase.py +382 -0
  280. package/python/Lib/email/architecture.rst +216 -0
  281. package/python/Lib/email/base64mime.py +115 -0
  282. package/python/Lib/email/charset.py +396 -0
  283. package/python/Lib/email/contentmanager.py +254 -0
  284. package/python/Lib/email/encoders.py +65 -0
  285. package/python/Lib/email/errors.py +117 -0
  286. package/python/Lib/email/feedparser.py +536 -0
  287. package/python/Lib/email/generator.py +530 -0
  288. package/python/Lib/email/header.py +582 -0
  289. package/python/Lib/email/headerregistry.py +618 -0
  290. package/python/Lib/email/iterators.py +68 -0
  291. package/python/Lib/email/message.py +1217 -0
  292. package/python/Lib/email/mime/__init__.py +0 -0
  293. package/python/Lib/email/mime/application.py +37 -0
  294. package/python/Lib/email/mime/audio.py +97 -0
  295. package/python/Lib/email/mime/base.py +29 -0
  296. package/python/Lib/email/mime/image.py +152 -0
  297. package/python/Lib/email/mime/message.py +33 -0
  298. package/python/Lib/email/mime/multipart.py +47 -0
  299. package/python/Lib/email/mime/nonmultipart.py +21 -0
  300. package/python/Lib/email/mime/text.py +40 -0
  301. package/python/Lib/email/parser.py +127 -0
  302. package/python/Lib/email/policy.py +232 -0
  303. package/python/Lib/email/quoprimime.py +300 -0
  304. package/python/Lib/email/utils.py +497 -0
  305. package/python/Lib/encodings/__init__.py +179 -0
  306. package/python/Lib/encodings/__pycache__/__init__.cpython-313.pyc +0 -0
  307. package/python/Lib/encodings/__pycache__/aliases.cpython-313.pyc +0 -0
  308. package/python/Lib/encodings/__pycache__/cp1252.cpython-313.pyc +0 -0
  309. package/python/Lib/encodings/__pycache__/cp437.cpython-313.pyc +0 -0
  310. package/python/Lib/encodings/__pycache__/hex_codec.cpython-313.pyc +0 -0
  311. package/python/Lib/encodings/__pycache__/idna.cpython-313.pyc +0 -0
  312. package/python/Lib/encodings/__pycache__/utf_8.cpython-313.pyc +0 -0
  313. package/python/Lib/encodings/aliases.py +560 -0
  314. package/python/Lib/encodings/ascii.py +50 -0
  315. package/python/Lib/encodings/base64_codec.py +55 -0
  316. package/python/Lib/encodings/big5.py +39 -0
  317. package/python/Lib/encodings/big5hkscs.py +39 -0
  318. package/python/Lib/encodings/bz2_codec.py +78 -0
  319. package/python/Lib/encodings/charmap.py +69 -0
  320. package/python/Lib/encodings/cp037.py +307 -0
  321. package/python/Lib/encodings/cp1006.py +307 -0
  322. package/python/Lib/encodings/cp1026.py +307 -0
  323. package/python/Lib/encodings/cp1125.py +698 -0
  324. package/python/Lib/encodings/cp1140.py +307 -0
  325. package/python/Lib/encodings/cp1250.py +307 -0
  326. package/python/Lib/encodings/cp1251.py +307 -0
  327. package/python/Lib/encodings/cp1252.py +307 -0
  328. package/python/Lib/encodings/cp1253.py +307 -0
  329. package/python/Lib/encodings/cp1254.py +307 -0
  330. package/python/Lib/encodings/cp1255.py +307 -0
  331. package/python/Lib/encodings/cp1256.py +307 -0
  332. package/python/Lib/encodings/cp1257.py +307 -0
  333. package/python/Lib/encodings/cp1258.py +307 -0
  334. package/python/Lib/encodings/cp273.py +307 -0
  335. package/python/Lib/encodings/cp424.py +307 -0
  336. package/python/Lib/encodings/cp437.py +698 -0
  337. package/python/Lib/encodings/cp500.py +307 -0
  338. package/python/Lib/encodings/cp720.py +309 -0
  339. package/python/Lib/encodings/cp737.py +698 -0
  340. package/python/Lib/encodings/cp775.py +697 -0
  341. package/python/Lib/encodings/cp850.py +698 -0
  342. package/python/Lib/encodings/cp852.py +698 -0
  343. package/python/Lib/encodings/cp855.py +698 -0
  344. package/python/Lib/encodings/cp856.py +307 -0
  345. package/python/Lib/encodings/cp857.py +694 -0
  346. package/python/Lib/encodings/cp858.py +698 -0
  347. package/python/Lib/encodings/cp860.py +698 -0
  348. package/python/Lib/encodings/cp861.py +698 -0
  349. package/python/Lib/encodings/cp862.py +698 -0
  350. package/python/Lib/encodings/cp863.py +698 -0
  351. package/python/Lib/encodings/cp864.py +690 -0
  352. package/python/Lib/encodings/cp865.py +698 -0
  353. package/python/Lib/encodings/cp866.py +698 -0
  354. package/python/Lib/encodings/cp869.py +689 -0
  355. package/python/Lib/encodings/cp874.py +307 -0
  356. package/python/Lib/encodings/cp875.py +307 -0
  357. package/python/Lib/encodings/cp932.py +39 -0
  358. package/python/Lib/encodings/cp949.py +39 -0
  359. package/python/Lib/encodings/cp950.py +39 -0
  360. package/python/Lib/encodings/euc_jis_2004.py +39 -0
  361. package/python/Lib/encodings/euc_jisx0213.py +39 -0
  362. package/python/Lib/encodings/euc_jp.py +39 -0
  363. package/python/Lib/encodings/euc_kr.py +39 -0
  364. package/python/Lib/encodings/gb18030.py +39 -0
  365. package/python/Lib/encodings/gb2312.py +39 -0
  366. package/python/Lib/encodings/gbk.py +39 -0
  367. package/python/Lib/encodings/hex_codec.py +55 -0
  368. package/python/Lib/encodings/hp_roman8.py +314 -0
  369. package/python/Lib/encodings/hz.py +39 -0
  370. package/python/Lib/encodings/idna.py +387 -0
  371. package/python/Lib/encodings/iso2022_jp.py +39 -0
  372. package/python/Lib/encodings/iso2022_jp_1.py +39 -0
  373. package/python/Lib/encodings/iso2022_jp_2.py +39 -0
  374. package/python/Lib/encodings/iso2022_jp_2004.py +39 -0
  375. package/python/Lib/encodings/iso2022_jp_3.py +39 -0
  376. package/python/Lib/encodings/iso2022_jp_ext.py +39 -0
  377. package/python/Lib/encodings/iso2022_kr.py +39 -0
  378. package/python/Lib/encodings/iso8859_1.py +307 -0
  379. package/python/Lib/encodings/iso8859_10.py +307 -0
  380. package/python/Lib/encodings/iso8859_11.py +307 -0
  381. package/python/Lib/encodings/iso8859_13.py +307 -0
  382. package/python/Lib/encodings/iso8859_14.py +307 -0
  383. package/python/Lib/encodings/iso8859_15.py +307 -0
  384. package/python/Lib/encodings/iso8859_16.py +307 -0
  385. package/python/Lib/encodings/iso8859_2.py +307 -0
  386. package/python/Lib/encodings/iso8859_3.py +307 -0
  387. package/python/Lib/encodings/iso8859_4.py +307 -0
  388. package/python/Lib/encodings/iso8859_5.py +307 -0
  389. package/python/Lib/encodings/iso8859_6.py +307 -0
  390. package/python/Lib/encodings/iso8859_7.py +307 -0
  391. package/python/Lib/encodings/iso8859_8.py +307 -0
  392. package/python/Lib/encodings/iso8859_9.py +307 -0
  393. package/python/Lib/encodings/johab.py +39 -0
  394. package/python/Lib/encodings/koi8_r.py +307 -0
  395. package/python/Lib/encodings/koi8_t.py +308 -0
  396. package/python/Lib/encodings/koi8_u.py +307 -0
  397. package/python/Lib/encodings/kz1048.py +307 -0
  398. package/python/Lib/encodings/latin_1.py +50 -0
  399. package/python/Lib/encodings/mac_arabic.py +698 -0
  400. package/python/Lib/encodings/mac_croatian.py +307 -0
  401. package/python/Lib/encodings/mac_cyrillic.py +307 -0
  402. package/python/Lib/encodings/mac_farsi.py +307 -0
  403. package/python/Lib/encodings/mac_greek.py +307 -0
  404. package/python/Lib/encodings/mac_iceland.py +307 -0
  405. package/python/Lib/encodings/mac_latin2.py +312 -0
  406. package/python/Lib/encodings/mac_roman.py +307 -0
  407. package/python/Lib/encodings/mac_romanian.py +307 -0
  408. package/python/Lib/encodings/mac_turkish.py +307 -0
  409. package/python/Lib/encodings/mbcs.py +47 -0
  410. package/python/Lib/encodings/oem.py +41 -0
  411. package/python/Lib/encodings/palmos.py +308 -0
  412. package/python/Lib/encodings/ptcp154.py +312 -0
  413. package/python/Lib/encodings/punycode.py +253 -0
  414. package/python/Lib/encodings/quopri_codec.py +56 -0
  415. package/python/Lib/encodings/raw_unicode_escape.py +46 -0
  416. package/python/Lib/encodings/rot_13.py +113 -0
  417. package/python/Lib/encodings/shift_jis.py +39 -0
  418. package/python/Lib/encodings/shift_jis_2004.py +39 -0
  419. package/python/Lib/encodings/shift_jisx0213.py +39 -0
  420. package/python/Lib/encodings/tis_620.py +307 -0
  421. package/python/Lib/encodings/undefined.py +49 -0
  422. package/python/Lib/encodings/unicode_escape.py +46 -0
  423. package/python/Lib/encodings/utf_16.py +155 -0
  424. package/python/Lib/encodings/utf_16_be.py +42 -0
  425. package/python/Lib/encodings/utf_16_le.py +42 -0
  426. package/python/Lib/encodings/utf_32.py +150 -0
  427. package/python/Lib/encodings/utf_32_be.py +37 -0
  428. package/python/Lib/encodings/utf_32_le.py +37 -0
  429. package/python/Lib/encodings/utf_7.py +38 -0
  430. package/python/Lib/encodings/utf_8.py +42 -0
  431. package/python/Lib/encodings/utf_8_sig.py +130 -0
  432. package/python/Lib/encodings/uu_codec.py +103 -0
  433. package/python/Lib/encodings/zlib_codec.py +77 -0
  434. package/python/Lib/enum.py +2183 -0
  435. package/python/Lib/filecmp.py +320 -0
  436. package/python/Lib/fileinput.py +442 -0
  437. package/python/Lib/fnmatch.py +192 -0
  438. package/python/Lib/fractions.py +1043 -0
  439. package/python/Lib/ftplib.py +975 -0
  440. package/python/Lib/functools.py +1036 -0
  441. package/python/Lib/genericpath.py +200 -0
  442. package/python/Lib/getopt.py +215 -0
  443. package/python/Lib/getpass.py +192 -0
  444. package/python/Lib/gettext.py +657 -0
  445. package/python/Lib/glob.py +572 -0
  446. package/python/Lib/graphlib.py +250 -0
  447. package/python/Lib/gzip.py +693 -0
  448. package/python/Lib/hashlib.py +255 -0
  449. package/python/Lib/heapq.py +603 -0
  450. package/python/Lib/hmac.py +220 -0
  451. package/python/Lib/html/__init__.py +132 -0
  452. package/python/Lib/html/__pycache__/__init__.cpython-313.pyc +0 -0
  453. package/python/Lib/html/__pycache__/entities.cpython-313.pyc +0 -0
  454. package/python/Lib/html/__pycache__/parser.cpython-313.pyc +0 -0
  455. package/python/Lib/html/entities.py +2513 -0
  456. package/python/Lib/html/parser.py +583 -0
  457. package/python/Lib/http/__init__.py +202 -0
  458. package/python/Lib/http/__pycache__/__init__.cpython-313.pyc +0 -0
  459. package/python/Lib/http/__pycache__/client.cpython-313.pyc +0 -0
  460. package/python/Lib/http/__pycache__/cookiejar.cpython-313.pyc +0 -0
  461. package/python/Lib/http/__pycache__/cookies.cpython-313.pyc +0 -0
  462. package/python/Lib/http/client.py +1598 -0
  463. package/python/Lib/http/cookiejar.py +2122 -0
  464. package/python/Lib/http/cookies.py +635 -0
  465. package/python/Lib/http/server.py +1355 -0
  466. package/python/Lib/imaplib.py +1769 -0
  467. package/python/Lib/importlib/__init__.py +136 -0
  468. package/python/Lib/importlib/__pycache__/__init__.cpython-313.pyc +0 -0
  469. package/python/Lib/importlib/__pycache__/_abc.cpython-313.pyc +0 -0
  470. package/python/Lib/importlib/__pycache__/abc.cpython-313.pyc +0 -0
  471. package/python/Lib/importlib/__pycache__/readers.cpython-313.pyc +0 -0
  472. package/python/Lib/importlib/_abc.py +39 -0
  473. package/python/Lib/importlib/_bootstrap.py +1559 -0
  474. package/python/Lib/importlib/_bootstrap_external.py +1826 -0
  475. package/python/Lib/importlib/abc.py +243 -0
  476. package/python/Lib/importlib/machinery.py +21 -0
  477. package/python/Lib/importlib/metadata/__init__.py +1093 -0
  478. package/python/Lib/importlib/metadata/__pycache__/__init__.cpython-313.pyc +0 -0
  479. package/python/Lib/importlib/metadata/__pycache__/_adapters.cpython-313.pyc +0 -0
  480. package/python/Lib/importlib/metadata/__pycache__/_collections.cpython-313.pyc +0 -0
  481. package/python/Lib/importlib/metadata/__pycache__/_functools.cpython-313.pyc +0 -0
  482. package/python/Lib/importlib/metadata/__pycache__/_itertools.cpython-313.pyc +0 -0
  483. package/python/Lib/importlib/metadata/__pycache__/_meta.cpython-313.pyc +0 -0
  484. package/python/Lib/importlib/metadata/__pycache__/_text.cpython-313.pyc +0 -0
  485. package/python/Lib/importlib/metadata/_adapters.py +89 -0
  486. package/python/Lib/importlib/metadata/_collections.py +30 -0
  487. package/python/Lib/importlib/metadata/_functools.py +104 -0
  488. package/python/Lib/importlib/metadata/_itertools.py +73 -0
  489. package/python/Lib/importlib/metadata/_meta.py +67 -0
  490. package/python/Lib/importlib/metadata/_text.py +99 -0
  491. package/python/Lib/importlib/metadata/diagnose.py +21 -0
  492. package/python/Lib/importlib/readers.py +12 -0
  493. package/python/Lib/importlib/resources/__init__.py +43 -0
  494. package/python/Lib/importlib/resources/__pycache__/__init__.cpython-313.pyc +0 -0
  495. package/python/Lib/importlib/resources/__pycache__/_adapters.cpython-313.pyc +0 -0
  496. package/python/Lib/importlib/resources/__pycache__/_common.cpython-313.pyc +0 -0
  497. package/python/Lib/importlib/resources/__pycache__/_functional.cpython-313.pyc +0 -0
  498. package/python/Lib/importlib/resources/__pycache__/_itertools.cpython-313.pyc +0 -0
  499. package/python/Lib/importlib/resources/__pycache__/abc.cpython-313.pyc +0 -0
  500. package/python/Lib/importlib/resources/__pycache__/readers.cpython-313.pyc +0 -0
  501. package/python/Lib/importlib/resources/_adapters.py +168 -0
  502. package/python/Lib/importlib/resources/_common.py +211 -0
  503. package/python/Lib/importlib/resources/_functional.py +81 -0
  504. package/python/Lib/importlib/resources/_itertools.py +38 -0
  505. package/python/Lib/importlib/resources/abc.py +173 -0
  506. package/python/Lib/importlib/resources/readers.py +203 -0
  507. package/python/Lib/importlib/resources/simple.py +106 -0
  508. package/python/Lib/importlib/simple.py +14 -0
  509. package/python/Lib/importlib/util.py +274 -0
  510. package/python/Lib/inspect.py +3479 -0
  511. package/python/Lib/io.py +99 -0
  512. package/python/Lib/ipaddress.py +2440 -0
  513. package/python/Lib/json/__init__.py +365 -0
  514. package/python/Lib/json/__pycache__/__init__.cpython-313.pyc +0 -0
  515. package/python/Lib/json/__pycache__/decoder.cpython-313.pyc +0 -0
  516. package/python/Lib/json/__pycache__/encoder.cpython-313.pyc +0 -0
  517. package/python/Lib/json/__pycache__/scanner.cpython-313.pyc +0 -0
  518. package/python/Lib/json/decoder.py +364 -0
  519. package/python/Lib/json/encoder.py +446 -0
  520. package/python/Lib/json/scanner.py +73 -0
  521. package/python/Lib/json/tool.py +90 -0
  522. package/python/Lib/keyword.py +64 -0
  523. package/python/Lib/linecache.py +236 -0
  524. package/python/Lib/locale.py +1987 -0
  525. package/python/Lib/logging/__init__.py +2330 -0
  526. package/python/Lib/logging/__pycache__/__init__.cpython-313.pyc +0 -0
  527. package/python/Lib/logging/__pycache__/config.cpython-313.pyc +0 -0
  528. package/python/Lib/logging/__pycache__/handlers.cpython-313.pyc +0 -0
  529. package/python/Lib/logging/config.py +1080 -0
  530. package/python/Lib/logging/handlers.py +1629 -0
  531. package/python/Lib/lzma.py +364 -0
  532. package/python/Lib/mailbox.py +2219 -0
  533. package/python/Lib/mimetypes.py +679 -0
  534. package/python/Lib/modulefinder.py +671 -0
  535. package/python/Lib/multiprocessing/__init__.py +37 -0
  536. package/python/Lib/multiprocessing/connection.py +1216 -0
  537. package/python/Lib/multiprocessing/context.py +383 -0
  538. package/python/Lib/multiprocessing/dummy/__init__.py +126 -0
  539. package/python/Lib/multiprocessing/dummy/connection.py +75 -0
  540. package/python/Lib/multiprocessing/forkserver.py +373 -0
  541. package/python/Lib/multiprocessing/heap.py +337 -0
  542. package/python/Lib/multiprocessing/managers.py +1397 -0
  543. package/python/Lib/multiprocessing/pool.py +957 -0
  544. package/python/Lib/multiprocessing/popen_fork.py +97 -0
  545. package/python/Lib/multiprocessing/popen_forkserver.py +74 -0
  546. package/python/Lib/multiprocessing/popen_spawn_posix.py +76 -0
  547. package/python/Lib/multiprocessing/popen_spawn_win32.py +147 -0
  548. package/python/Lib/multiprocessing/process.py +436 -0
  549. package/python/Lib/multiprocessing/queues.py +399 -0
  550. package/python/Lib/multiprocessing/reduction.py +281 -0
  551. package/python/Lib/multiprocessing/resource_sharer.py +154 -0
  552. package/python/Lib/multiprocessing/resource_tracker.py +499 -0
  553. package/python/Lib/multiprocessing/shared_memory.py +544 -0
  554. package/python/Lib/multiprocessing/sharedctypes.py +240 -0
  555. package/python/Lib/multiprocessing/spawn.py +307 -0
  556. package/python/Lib/multiprocessing/synchronize.py +404 -0
  557. package/python/Lib/multiprocessing/util.py +562 -0
  558. package/python/Lib/netrc.py +199 -0
  559. package/python/Lib/ntpath.py +872 -0
  560. package/python/Lib/nturl2path.py +69 -0
  561. package/python/Lib/numbers.py +427 -0
  562. package/python/Lib/opcode.py +115 -0
  563. package/python/Lib/operator.py +467 -0
  564. package/python/Lib/optparse.py +1681 -0
  565. package/python/Lib/os.py +1184 -0
  566. package/python/Lib/pathlib/__init__.py +12 -0
  567. package/python/Lib/pathlib/__pycache__/__init__.cpython-313.pyc +0 -0
  568. package/python/Lib/pathlib/__pycache__/_abc.cpython-313.pyc +0 -0
  569. package/python/Lib/pathlib/__pycache__/_local.cpython-313.pyc +0 -0
  570. package/python/Lib/pathlib/_abc.py +930 -0
  571. package/python/Lib/pathlib/_local.py +861 -0
  572. package/python/Lib/pdb.py +2550 -0
  573. package/python/Lib/pickle.py +1860 -0
  574. package/python/Lib/pickletools.py +2904 -0
  575. package/python/Lib/pkgutil.py +529 -0
  576. package/python/Lib/platform.py +1454 -0
  577. package/python/Lib/plistlib.py +948 -0
  578. package/python/Lib/poplib.py +477 -0
  579. package/python/Lib/posixpath.py +578 -0
  580. package/python/Lib/pprint.py +658 -0
  581. package/python/Lib/profile.py +616 -0
  582. package/python/Lib/pstats.py +778 -0
  583. package/python/Lib/pty.py +211 -0
  584. package/python/Lib/py_compile.py +212 -0
  585. package/python/Lib/pyclbr.py +314 -0
  586. package/python/Lib/pydoc.py +2861 -0
  587. package/python/Lib/queue.py +383 -0
  588. package/python/Lib/quopri.py +237 -0
  589. package/python/Lib/random.py +1078 -0
  590. package/python/Lib/re/__init__.py +428 -0
  591. package/python/Lib/re/__pycache__/__init__.cpython-313.pyc +0 -0
  592. package/python/Lib/re/__pycache__/_casefix.cpython-313.pyc +0 -0
  593. package/python/Lib/re/__pycache__/_compiler.cpython-313.pyc +0 -0
  594. package/python/Lib/re/__pycache__/_constants.cpython-313.pyc +0 -0
  595. package/python/Lib/re/__pycache__/_parser.cpython-313.pyc +0 -0
  596. package/python/Lib/re/_casefix.py +106 -0
  597. package/python/Lib/re/_compiler.py +768 -0
  598. package/python/Lib/re/_constants.py +222 -0
  599. package/python/Lib/re/_parser.py +1081 -0
  600. package/python/Lib/reprlib.py +230 -0
  601. package/python/Lib/rlcompleter.py +222 -0
  602. package/python/Lib/runpy.py +326 -0
  603. package/python/Lib/sched.py +167 -0
  604. package/python/Lib/secrets.py +71 -0
  605. package/python/Lib/selectors.py +603 -0
  606. package/python/Lib/shelve.py +250 -0
  607. package/python/Lib/shlex.py +345 -0
  608. package/python/Lib/shutil.py +1569 -0
  609. package/python/Lib/signal.py +94 -0
  610. package/python/Lib/site.py +773 -0
  611. package/python/Lib/smtplib.py +1123 -0
  612. package/python/Lib/socket.py +988 -0
  613. package/python/Lib/socketserver.py +863 -0
  614. package/python/Lib/sqlite3/__init__.py +70 -0
  615. package/python/Lib/sqlite3/__main__.py +139 -0
  616. package/python/Lib/sqlite3/dbapi2.py +108 -0
  617. package/python/Lib/sqlite3/dump.py +118 -0
  618. package/python/Lib/sre_compile.py +7 -0
  619. package/python/Lib/sre_constants.py +7 -0
  620. package/python/Lib/sre_parse.py +7 -0
  621. package/python/Lib/ssl.py +1529 -0
  622. package/python/Lib/stat.py +212 -0
  623. package/python/Lib/statistics.py +1817 -0
  624. package/python/Lib/string.py +314 -0
  625. package/python/Lib/stringprep.py +272 -0
  626. package/python/Lib/struct.py +15 -0
  627. package/python/Lib/subprocess.py +2258 -0
  628. package/python/Lib/symtable.py +414 -0
  629. package/python/Lib/sysconfig/__init__.py +734 -0
  630. package/python/Lib/sysconfig/__main__.py +248 -0
  631. package/python/Lib/sysconfig/__pycache__/__init__.cpython-313.pyc +0 -0
  632. package/python/Lib/tabnanny.py +340 -0
  633. package/python/Lib/tarfile.py +3136 -0
  634. package/python/Lib/tempfile.py +958 -0
  635. package/python/Lib/textwrap.py +497 -0
  636. package/python/Lib/this.py +28 -0
  637. package/python/Lib/threading.py +1602 -0
  638. package/python/Lib/timeit.py +381 -0
  639. package/python/Lib/token.py +141 -0
  640. package/python/Lib/tokenize.py +592 -0
  641. package/python/Lib/tomllib/__init__.py +10 -0
  642. package/python/Lib/tomllib/__pycache__/__init__.cpython-313.pyc +0 -0
  643. package/python/Lib/tomllib/__pycache__/_parser.cpython-313.pyc +0 -0
  644. package/python/Lib/tomllib/__pycache__/_re.cpython-313.pyc +0 -0
  645. package/python/Lib/tomllib/__pycache__/_types.cpython-313.pyc +0 -0
  646. package/python/Lib/tomllib/_parser.py +703 -0
  647. package/python/Lib/tomllib/_re.py +107 -0
  648. package/python/Lib/tomllib/_types.py +10 -0
  649. package/python/Lib/tomllib/mypy.ini +15 -0
  650. package/python/Lib/trace.py +754 -0
  651. package/python/Lib/traceback.py +1639 -0
  652. package/python/Lib/tracemalloc.py +560 -0
  653. package/python/Lib/tty.py +73 -0
  654. package/python/Lib/types.py +346 -0
  655. package/python/Lib/typing.py +3846 -0
  656. package/python/Lib/unittest/__init__.py +80 -0
  657. package/python/Lib/unittest/__main__.py +18 -0
  658. package/python/Lib/unittest/_log.py +86 -0
  659. package/python/Lib/unittest/async_case.py +146 -0
  660. package/python/Lib/unittest/case.py +1478 -0
  661. package/python/Lib/unittest/loader.py +460 -0
  662. package/python/Lib/unittest/main.py +280 -0
  663. package/python/Lib/unittest/mock.py +3189 -0
  664. package/python/Lib/unittest/result.py +256 -0
  665. package/python/Lib/unittest/runner.py +292 -0
  666. package/python/Lib/unittest/signals.py +71 -0
  667. package/python/Lib/unittest/suite.py +379 -0
  668. package/python/Lib/unittest/util.py +170 -0
  669. package/python/Lib/urllib/__init__.py +0 -0
  670. package/python/Lib/urllib/__pycache__/__init__.cpython-313.pyc +0 -0
  671. package/python/Lib/urllib/__pycache__/error.cpython-313.pyc +0 -0
  672. package/python/Lib/urllib/__pycache__/parse.cpython-313.pyc +0 -0
  673. package/python/Lib/urllib/__pycache__/request.cpython-313.pyc +0 -0
  674. package/python/Lib/urllib/__pycache__/response.cpython-313.pyc +0 -0
  675. package/python/Lib/urllib/error.py +74 -0
  676. package/python/Lib/urllib/parse.py +1264 -0
  677. package/python/Lib/urllib/request.py +2796 -0
  678. package/python/Lib/urllib/response.py +84 -0
  679. package/python/Lib/urllib/robotparser.py +363 -0
  680. package/python/Lib/uuid.py +784 -0
  681. package/python/Lib/warnings.py +735 -0
  682. package/python/Lib/wave.py +665 -0
  683. package/python/Lib/weakref.py +674 -0
  684. package/python/Lib/webbrowser.py +724 -0
  685. package/python/Lib/wsgiref/__init__.py +25 -0
  686. package/python/Lib/wsgiref/handlers.py +575 -0
  687. package/python/Lib/wsgiref/headers.py +192 -0
  688. package/python/Lib/wsgiref/simple_server.py +161 -0
  689. package/python/Lib/wsgiref/types.py +54 -0
  690. package/python/Lib/wsgiref/util.py +159 -0
  691. package/python/Lib/wsgiref/validate.py +438 -0
  692. package/python/Lib/xml/__init__.py +20 -0
  693. package/python/Lib/xml/__pycache__/__init__.cpython-313.pyc +0 -0
  694. package/python/Lib/xml/dom/NodeFilter.py +27 -0
  695. package/python/Lib/xml/dom/__init__.py +140 -0
  696. package/python/Lib/xml/dom/domreg.py +99 -0
  697. package/python/Lib/xml/dom/expatbuilder.py +962 -0
  698. package/python/Lib/xml/dom/minicompat.py +109 -0
  699. package/python/Lib/xml/dom/minidom.py +2024 -0
  700. package/python/Lib/xml/dom/pulldom.py +336 -0
  701. package/python/Lib/xml/dom/xmlbuilder.py +389 -0
  702. package/python/Lib/xml/etree/ElementInclude.py +186 -0
  703. package/python/Lib/xml/etree/ElementPath.py +430 -0
  704. package/python/Lib/xml/etree/ElementTree.py +2116 -0
  705. package/python/Lib/xml/etree/__init__.py +33 -0
  706. package/python/Lib/xml/etree/cElementTree.py +3 -0
  707. package/python/Lib/xml/parsers/__init__.py +8 -0
  708. package/python/Lib/xml/parsers/__pycache__/__init__.cpython-313.pyc +0 -0
  709. package/python/Lib/xml/parsers/__pycache__/expat.cpython-313.pyc +0 -0
  710. package/python/Lib/xml/parsers/expat.py +8 -0
  711. package/python/Lib/xml/sax/__init__.py +94 -0
  712. package/python/Lib/xml/sax/_exceptions.py +127 -0
  713. package/python/Lib/xml/sax/expatreader.py +454 -0
  714. package/python/Lib/xml/sax/handler.py +387 -0
  715. package/python/Lib/xml/sax/saxutils.py +369 -0
  716. package/python/Lib/xml/sax/xmlreader.py +378 -0
  717. package/python/Lib/xmlrpc/__init__.py +1 -0
  718. package/python/Lib/xmlrpc/__pycache__/__init__.cpython-313.pyc +0 -0
  719. package/python/Lib/xmlrpc/__pycache__/client.cpython-313.pyc +0 -0
  720. package/python/Lib/xmlrpc/client.py +1503 -0
  721. package/python/Lib/xmlrpc/server.py +1002 -0
  722. package/python/Lib/zipapp.py +229 -0
  723. package/python/Lib/zipfile/__init__.py +2391 -0
  724. package/python/Lib/zipfile/__main__.py +4 -0
  725. package/python/Lib/zipfile/__pycache__/__init__.cpython-313.pyc +0 -0
  726. package/python/Lib/zipfile/_path/__init__.py +452 -0
  727. package/python/Lib/zipfile/_path/__pycache__/__init__.cpython-313.pyc +0 -0
  728. package/python/Lib/zipfile/_path/__pycache__/glob.cpython-313.pyc +0 -0
  729. package/python/Lib/zipfile/_path/glob.py +113 -0
  730. package/python/Lib/zipimport.py +803 -0
  731. package/python/Lib/zoneinfo/__init__.py +34 -0
  732. package/python/Lib/zoneinfo/_common.py +172 -0
  733. package/python/Lib/zoneinfo/_tzpath.py +189 -0
  734. package/python/Lib/zoneinfo/_zoneinfo.py +779 -0
  735. package/python/licenses/LICENSE.bdb.txt +126 -0
  736. package/python/licenses/LICENSE.bzip2.txt +37 -0
  737. package/python/licenses/LICENSE.cpython.txt +771 -0
  738. package/python/licenses/LICENSE.expat.txt +21 -0
  739. package/python/licenses/LICENSE.libX11.txt +942 -0
  740. package/python/licenses/LICENSE.libXau.txt +21 -0
  741. package/python/licenses/LICENSE.libedit.txt +29 -0
  742. package/python/licenses/LICENSE.libffi.txt +21 -0
  743. package/python/licenses/LICENSE.liblzma.txt +13 -0
  744. package/python/licenses/LICENSE.libuuid.txt +27 -0
  745. package/python/licenses/LICENSE.libxcb.txt +30 -0
  746. package/python/licenses/LICENSE.mpdecimal.txt +24 -0
  747. package/python/licenses/LICENSE.ncurses.txt +29 -0
  748. package/python/licenses/LICENSE.openssl-1.1.txt +124 -0
  749. package/python/licenses/LICENSE.openssl-3.txt +177 -0
  750. package/python/licenses/LICENSE.sqlite.txt +23 -0
  751. package/python/licenses/LICENSE.tcl.txt +40 -0
  752. package/python/licenses/LICENSE.tix.txt +54 -0
  753. package/python/licenses/LICENSE.zlib.txt +21 -0
  754. package/python/python.exe +0 -0
  755. package/python/python3.dll +0 -0
  756. package/python/python313.dll +0 -0
  757. package/python/pythonw.exe +0 -0
  758. package/python/vcruntime140.dll +0 -0
  759. package/python/vcruntime140_1.dll +0 -0
@@ -0,0 +1,1075 @@
1
+ """Disassembler of Python byte code into mnemonics."""
2
+
3
+ import sys
4
+ import types
5
+ import collections
6
+ import io
7
+
8
+ from opcode import *
9
+ from opcode import (
10
+ __all__ as _opcodes_all,
11
+ _cache_format,
12
+ _inline_cache_entries,
13
+ _nb_ops,
14
+ _intrinsic_1_descs,
15
+ _intrinsic_2_descs,
16
+ _specializations,
17
+ _specialized_opmap,
18
+ )
19
+
20
+ from _opcode import get_executor
21
+
22
+ __all__ = ["code_info", "dis", "disassemble", "distb", "disco",
23
+ "findlinestarts", "findlabels", "show_code",
24
+ "get_instructions", "Instruction", "Bytecode"] + _opcodes_all
25
+ del _opcodes_all
26
+
27
+ _have_code = (types.MethodType, types.FunctionType, types.CodeType,
28
+ classmethod, staticmethod, type)
29
+
30
+ CONVERT_VALUE = opmap['CONVERT_VALUE']
31
+
32
+ SET_FUNCTION_ATTRIBUTE = opmap['SET_FUNCTION_ATTRIBUTE']
33
+ FUNCTION_ATTR_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure')
34
+
35
+ ENTER_EXECUTOR = opmap['ENTER_EXECUTOR']
36
+ LOAD_CONST = opmap['LOAD_CONST']
37
+ RETURN_CONST = opmap['RETURN_CONST']
38
+ LOAD_GLOBAL = opmap['LOAD_GLOBAL']
39
+ BINARY_OP = opmap['BINARY_OP']
40
+ JUMP_BACKWARD = opmap['JUMP_BACKWARD']
41
+ FOR_ITER = opmap['FOR_ITER']
42
+ SEND = opmap['SEND']
43
+ LOAD_ATTR = opmap['LOAD_ATTR']
44
+ LOAD_SUPER_ATTR = opmap['LOAD_SUPER_ATTR']
45
+ CALL_INTRINSIC_1 = opmap['CALL_INTRINSIC_1']
46
+ CALL_INTRINSIC_2 = opmap['CALL_INTRINSIC_2']
47
+ LOAD_FAST_LOAD_FAST = opmap['LOAD_FAST_LOAD_FAST']
48
+ STORE_FAST_LOAD_FAST = opmap['STORE_FAST_LOAD_FAST']
49
+ STORE_FAST_STORE_FAST = opmap['STORE_FAST_STORE_FAST']
50
+
51
+ CACHE = opmap["CACHE"]
52
+
53
+ _all_opname = list(opname)
54
+ _all_opmap = dict(opmap)
55
+ for name, op in _specialized_opmap.items():
56
+ # fill opname and opmap
57
+ assert op < len(_all_opname)
58
+ _all_opname[op] = name
59
+ _all_opmap[name] = op
60
+
61
+ deoptmap = {
62
+ specialized: base for base, family in _specializations.items() for specialized in family
63
+ }
64
+
65
+ def _try_compile(source, name):
66
+ """Attempts to compile the given source, first as an expression and
67
+ then as a statement if the first approach fails.
68
+
69
+ Utility function to accept strings in functions that otherwise
70
+ expect code objects
71
+ """
72
+ try:
73
+ return compile(source, name, 'eval')
74
+ except SyntaxError:
75
+ pass
76
+ return compile(source, name, 'exec')
77
+
78
+ def dis(x=None, *, file=None, depth=None, show_caches=False, adaptive=False,
79
+ show_offsets=False):
80
+ """Disassemble classes, methods, functions, and other compiled objects.
81
+
82
+ With no argument, disassemble the last traceback.
83
+
84
+ Compiled objects currently include generator objects, async generator
85
+ objects, and coroutine objects, all of which store their code object
86
+ in a special attribute.
87
+ """
88
+ if x is None:
89
+ distb(file=file, show_caches=show_caches, adaptive=adaptive,
90
+ show_offsets=show_offsets)
91
+ return
92
+ # Extract functions from methods.
93
+ if hasattr(x, '__func__'):
94
+ x = x.__func__
95
+ # Extract compiled code objects from...
96
+ if hasattr(x, '__code__'): # ...a function, or
97
+ x = x.__code__
98
+ elif hasattr(x, 'gi_code'): #...a generator object, or
99
+ x = x.gi_code
100
+ elif hasattr(x, 'ag_code'): #...an asynchronous generator object, or
101
+ x = x.ag_code
102
+ elif hasattr(x, 'cr_code'): #...a coroutine.
103
+ x = x.cr_code
104
+ # Perform the disassembly.
105
+ if hasattr(x, '__dict__'): # Class or module
106
+ items = sorted(x.__dict__.items())
107
+ for name, x1 in items:
108
+ if isinstance(x1, _have_code):
109
+ print("Disassembly of %s:" % name, file=file)
110
+ try:
111
+ dis(x1, file=file, depth=depth, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets)
112
+ except TypeError as msg:
113
+ print("Sorry:", msg, file=file)
114
+ print(file=file)
115
+ elif hasattr(x, 'co_code'): # Code object
116
+ _disassemble_recursive(x, file=file, depth=depth, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets)
117
+ elif isinstance(x, (bytes, bytearray)): # Raw bytecode
118
+ labels_map = _make_labels_map(x)
119
+ label_width = 4 + len(str(len(labels_map)))
120
+ formatter = Formatter(file=file,
121
+ offset_width=len(str(max(len(x) - 2, 9999))) if show_offsets else 0,
122
+ label_width=label_width,
123
+ show_caches=show_caches)
124
+ arg_resolver = ArgResolver(labels_map=labels_map)
125
+ _disassemble_bytes(x, arg_resolver=arg_resolver, formatter=formatter)
126
+ elif isinstance(x, str): # Source code
127
+ _disassemble_str(x, file=file, depth=depth, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets)
128
+ else:
129
+ raise TypeError("don't know how to disassemble %s objects" %
130
+ type(x).__name__)
131
+
132
+ def distb(tb=None, *, file=None, show_caches=False, adaptive=False, show_offsets=False):
133
+ """Disassemble a traceback (default: last traceback)."""
134
+ if tb is None:
135
+ try:
136
+ if hasattr(sys, 'last_exc'):
137
+ tb = sys.last_exc.__traceback__
138
+ else:
139
+ tb = sys.last_traceback
140
+ except AttributeError:
141
+ raise RuntimeError("no last traceback to disassemble") from None
142
+ while tb.tb_next: tb = tb.tb_next
143
+ disassemble(tb.tb_frame.f_code, tb.tb_lasti, file=file, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets)
144
+
145
+ # The inspect module interrogates this dictionary to build its
146
+ # list of CO_* constants. It is also used by pretty_flags to
147
+ # turn the co_flags field into a human readable list.
148
+ COMPILER_FLAG_NAMES = {
149
+ 1: "OPTIMIZED",
150
+ 2: "NEWLOCALS",
151
+ 4: "VARARGS",
152
+ 8: "VARKEYWORDS",
153
+ 16: "NESTED",
154
+ 32: "GENERATOR",
155
+ 64: "NOFREE",
156
+ 128: "COROUTINE",
157
+ 256: "ITERABLE_COROUTINE",
158
+ 512: "ASYNC_GENERATOR",
159
+ }
160
+
161
+ def pretty_flags(flags):
162
+ """Return pretty representation of code flags."""
163
+ names = []
164
+ for i in range(32):
165
+ flag = 1<<i
166
+ if flags & flag:
167
+ names.append(COMPILER_FLAG_NAMES.get(flag, hex(flag)))
168
+ flags ^= flag
169
+ if not flags:
170
+ break
171
+ else:
172
+ names.append(hex(flags))
173
+ return ", ".join(names)
174
+
175
+ class _Unknown:
176
+ def __repr__(self):
177
+ return "<unknown>"
178
+
179
+ # Sentinel to represent values that cannot be calculated
180
+ UNKNOWN = _Unknown()
181
+
182
+ def _get_code_object(x):
183
+ """Helper to handle methods, compiled or raw code objects, and strings."""
184
+ # Extract functions from methods.
185
+ if hasattr(x, '__func__'):
186
+ x = x.__func__
187
+ # Extract compiled code objects from...
188
+ if hasattr(x, '__code__'): # ...a function, or
189
+ x = x.__code__
190
+ elif hasattr(x, 'gi_code'): #...a generator object, or
191
+ x = x.gi_code
192
+ elif hasattr(x, 'ag_code'): #...an asynchronous generator object, or
193
+ x = x.ag_code
194
+ elif hasattr(x, 'cr_code'): #...a coroutine.
195
+ x = x.cr_code
196
+ # Handle source code.
197
+ if isinstance(x, str):
198
+ x = _try_compile(x, "<disassembly>")
199
+ # By now, if we don't have a code object, we can't disassemble x.
200
+ if hasattr(x, 'co_code'):
201
+ return x
202
+ raise TypeError("don't know how to disassemble %s objects" %
203
+ type(x).__name__)
204
+
205
+ def _deoptop(op):
206
+ name = _all_opname[op]
207
+ return _all_opmap[deoptmap[name]] if name in deoptmap else op
208
+
209
+ def _get_code_array(co, adaptive):
210
+ if adaptive:
211
+ code = co._co_code_adaptive
212
+ res = []
213
+ found = False
214
+ for i in range(0, len(code), 2):
215
+ op, arg = code[i], code[i+1]
216
+ if op == ENTER_EXECUTOR:
217
+ try:
218
+ ex = get_executor(co, i)
219
+ except (ValueError, RuntimeError):
220
+ ex = None
221
+
222
+ if ex:
223
+ op, arg = ex.get_opcode(), ex.get_oparg()
224
+ found = True
225
+
226
+ res.append(op.to_bytes())
227
+ res.append(arg.to_bytes())
228
+ return code if not found else b''.join(res)
229
+ else:
230
+ return co.co_code
231
+
232
+ def code_info(x):
233
+ """Formatted details of methods, functions, or code."""
234
+ return _format_code_info(_get_code_object(x))
235
+
236
+ def _format_code_info(co):
237
+ lines = []
238
+ lines.append("Name: %s" % co.co_name)
239
+ lines.append("Filename: %s" % co.co_filename)
240
+ lines.append("Argument count: %s" % co.co_argcount)
241
+ lines.append("Positional-only arguments: %s" % co.co_posonlyargcount)
242
+ lines.append("Kw-only arguments: %s" % co.co_kwonlyargcount)
243
+ lines.append("Number of locals: %s" % co.co_nlocals)
244
+ lines.append("Stack size: %s" % co.co_stacksize)
245
+ lines.append("Flags: %s" % pretty_flags(co.co_flags))
246
+ if co.co_consts:
247
+ lines.append("Constants:")
248
+ for i_c in enumerate(co.co_consts):
249
+ lines.append("%4d: %r" % i_c)
250
+ if co.co_names:
251
+ lines.append("Names:")
252
+ for i_n in enumerate(co.co_names):
253
+ lines.append("%4d: %s" % i_n)
254
+ if co.co_varnames:
255
+ lines.append("Variable names:")
256
+ for i_n in enumerate(co.co_varnames):
257
+ lines.append("%4d: %s" % i_n)
258
+ if co.co_freevars:
259
+ lines.append("Free variables:")
260
+ for i_n in enumerate(co.co_freevars):
261
+ lines.append("%4d: %s" % i_n)
262
+ if co.co_cellvars:
263
+ lines.append("Cell variables:")
264
+ for i_n in enumerate(co.co_cellvars):
265
+ lines.append("%4d: %s" % i_n)
266
+ return "\n".join(lines)
267
+
268
+ def show_code(co, *, file=None):
269
+ """Print details of methods, functions, or code to *file*.
270
+
271
+ If *file* is not provided, the output is printed on stdout.
272
+ """
273
+ print(code_info(co), file=file)
274
+
275
+ Positions = collections.namedtuple(
276
+ 'Positions',
277
+ [
278
+ 'lineno',
279
+ 'end_lineno',
280
+ 'col_offset',
281
+ 'end_col_offset',
282
+ ],
283
+ defaults=[None] * 4
284
+ )
285
+
286
+ _Instruction = collections.namedtuple(
287
+ "_Instruction",
288
+ [
289
+ 'opname',
290
+ 'opcode',
291
+ 'arg',
292
+ 'argval',
293
+ 'argrepr',
294
+ 'offset',
295
+ 'start_offset',
296
+ 'starts_line',
297
+ 'line_number',
298
+ 'label',
299
+ 'positions',
300
+ 'cache_info',
301
+ ],
302
+ defaults=[None, None, None]
303
+ )
304
+
305
+ _Instruction.opname.__doc__ = "Human readable name for operation"
306
+ _Instruction.opcode.__doc__ = "Numeric code for operation"
307
+ _Instruction.arg.__doc__ = "Numeric argument to operation (if any), otherwise None"
308
+ _Instruction.argval.__doc__ = "Resolved arg value (if known), otherwise same as arg"
309
+ _Instruction.argrepr.__doc__ = "Human readable description of operation argument"
310
+ _Instruction.offset.__doc__ = "Start index of operation within bytecode sequence"
311
+ _Instruction.start_offset.__doc__ = (
312
+ "Start index of operation within bytecode sequence, including extended args if present; "
313
+ "otherwise equal to Instruction.offset"
314
+ )
315
+ _Instruction.starts_line.__doc__ = "True if this opcode starts a source line, otherwise False"
316
+ _Instruction.line_number.__doc__ = "source line number associated with this opcode (if any), otherwise None"
317
+ _Instruction.label.__doc__ = "A label (int > 0) if this instruction is a jump target, otherwise None"
318
+ _Instruction.positions.__doc__ = "dis.Positions object holding the span of source code covered by this instruction"
319
+ _Instruction.cache_info.__doc__ = "list of (name, size, data), one for each cache entry of the instruction"
320
+
321
+ _ExceptionTableEntryBase = collections.namedtuple("_ExceptionTableEntryBase",
322
+ "start end target depth lasti")
323
+
324
+ class _ExceptionTableEntry(_ExceptionTableEntryBase):
325
+ pass
326
+
327
+ _OPNAME_WIDTH = 20
328
+ _OPARG_WIDTH = 5
329
+
330
+ def _get_cache_size(opname):
331
+ return _inline_cache_entries.get(opname, 0)
332
+
333
+ def _get_jump_target(op, arg, offset):
334
+ """Gets the bytecode offset of the jump target if this is a jump instruction.
335
+
336
+ Otherwise return None.
337
+ """
338
+ deop = _deoptop(op)
339
+ caches = _get_cache_size(_all_opname[deop])
340
+ if deop in hasjrel:
341
+ if _is_backward_jump(deop):
342
+ arg = -arg
343
+ target = offset + 2 + arg*2
344
+ target += 2 * caches
345
+ elif deop in hasjabs:
346
+ target = arg*2
347
+ else:
348
+ target = None
349
+ return target
350
+
351
+ class Instruction(_Instruction):
352
+ """Details for a bytecode operation.
353
+
354
+ Defined fields:
355
+ opname - human readable name for operation
356
+ opcode - numeric code for operation
357
+ arg - numeric argument to operation (if any), otherwise None
358
+ argval - resolved arg value (if known), otherwise same as arg
359
+ argrepr - human readable description of operation argument
360
+ offset - start index of operation within bytecode sequence
361
+ start_offset - start index of operation within bytecode sequence including extended args if present;
362
+ otherwise equal to Instruction.offset
363
+ starts_line - True if this opcode starts a source line, otherwise False
364
+ line_number - source line number associated with this opcode (if any), otherwise None
365
+ label - A label if this instruction is a jump target, otherwise None
366
+ positions - Optional dis.Positions object holding the span of source code
367
+ covered by this instruction
368
+ cache_info - information about the format and content of the instruction's cache
369
+ entries (if any)
370
+ """
371
+
372
+ @property
373
+ def oparg(self):
374
+ """Alias for Instruction.arg."""
375
+ return self.arg
376
+
377
+ @property
378
+ def baseopcode(self):
379
+ """Numeric code for the base operation if operation is specialized.
380
+
381
+ Otherwise equal to Instruction.opcode.
382
+ """
383
+ return _deoptop(self.opcode)
384
+
385
+ @property
386
+ def baseopname(self):
387
+ """Human readable name for the base operation if operation is specialized.
388
+
389
+ Otherwise equal to Instruction.opname.
390
+ """
391
+ return opname[self.baseopcode]
392
+
393
+ @property
394
+ def cache_offset(self):
395
+ """Start index of the cache entries following the operation."""
396
+ return self.offset + 2
397
+
398
+ @property
399
+ def end_offset(self):
400
+ """End index of the cache entries following the operation."""
401
+ return self.cache_offset + _get_cache_size(_all_opname[self.opcode])*2
402
+
403
+ @property
404
+ def jump_target(self):
405
+ """Bytecode index of the jump target if this is a jump operation.
406
+
407
+ Otherwise return None.
408
+ """
409
+ return _get_jump_target(self.opcode, self.arg, self.offset)
410
+
411
+ @property
412
+ def is_jump_target(self):
413
+ """True if other code jumps to here, otherwise False"""
414
+ return self.label is not None
415
+
416
+ def __str__(self):
417
+ output = io.StringIO()
418
+ formatter = Formatter(file=output)
419
+ formatter.print_instruction(self, False)
420
+ return output.getvalue()
421
+
422
+
423
+ class Formatter:
424
+
425
+ def __init__(self, file=None, lineno_width=0, offset_width=0, label_width=0,
426
+ line_offset=0, show_caches=False):
427
+ """Create a Formatter
428
+
429
+ *file* where to write the output
430
+ *lineno_width* sets the width of the line number field (0 omits it)
431
+ *offset_width* sets the width of the instruction offset field
432
+ *label_width* sets the width of the label field
433
+ *show_caches* is a boolean indicating whether to display cache lines
434
+
435
+ """
436
+ self.file = file
437
+ self.lineno_width = lineno_width
438
+ self.offset_width = offset_width
439
+ self.label_width = label_width
440
+ self.show_caches = show_caches
441
+
442
+ def print_instruction(self, instr, mark_as_current=False):
443
+ self.print_instruction_line(instr, mark_as_current)
444
+ if self.show_caches and instr.cache_info:
445
+ offset = instr.offset
446
+ for name, size, data in instr.cache_info:
447
+ for i in range(size):
448
+ offset += 2
449
+ # Only show the fancy argrepr for a CACHE instruction when it's
450
+ # the first entry for a particular cache value:
451
+ if i == 0:
452
+ argrepr = f"{name}: {int.from_bytes(data, sys.byteorder)}"
453
+ else:
454
+ argrepr = ""
455
+ self.print_instruction_line(
456
+ Instruction("CACHE", CACHE, 0, None, argrepr, offset, offset,
457
+ False, None, None, instr.positions),
458
+ False)
459
+
460
+ def print_instruction_line(self, instr, mark_as_current):
461
+ """Format instruction details for inclusion in disassembly output."""
462
+ lineno_width = self.lineno_width
463
+ offset_width = self.offset_width
464
+ label_width = self.label_width
465
+
466
+ new_source_line = (lineno_width > 0 and
467
+ instr.starts_line and
468
+ instr.offset > 0)
469
+ if new_source_line:
470
+ print(file=self.file)
471
+
472
+ fields = []
473
+ # Column: Source code line number
474
+ if lineno_width:
475
+ if instr.starts_line:
476
+ lineno_fmt = "%%%dd" if instr.line_number is not None else "%%%ds"
477
+ lineno_fmt = lineno_fmt % lineno_width
478
+ lineno = _NO_LINENO if instr.line_number is None else instr.line_number
479
+ fields.append(lineno_fmt % lineno)
480
+ else:
481
+ fields.append(' ' * lineno_width)
482
+ # Column: Label
483
+ if instr.label is not None:
484
+ lbl = f"L{instr.label}:"
485
+ fields.append(f"{lbl:>{label_width}}")
486
+ else:
487
+ fields.append(' ' * label_width)
488
+ # Column: Instruction offset from start of code sequence
489
+ if offset_width > 0:
490
+ fields.append(f"{repr(instr.offset):>{offset_width}} ")
491
+ # Column: Current instruction indicator
492
+ if mark_as_current:
493
+ fields.append('-->')
494
+ else:
495
+ fields.append(' ')
496
+ # Column: Opcode name
497
+ fields.append(instr.opname.ljust(_OPNAME_WIDTH))
498
+ # Column: Opcode argument
499
+ if instr.arg is not None:
500
+ arg = repr(instr.arg)
501
+ # If opname is longer than _OPNAME_WIDTH, we allow it to overflow into
502
+ # the space reserved for oparg. This results in fewer misaligned opargs
503
+ # in the disassembly output.
504
+ opname_excess = max(0, len(instr.opname) - _OPNAME_WIDTH)
505
+ fields.append(repr(instr.arg).rjust(_OPARG_WIDTH - opname_excess))
506
+ # Column: Opcode argument details
507
+ if instr.argrepr:
508
+ fields.append('(' + instr.argrepr + ')')
509
+ print(' '.join(fields).rstrip(), file=self.file)
510
+
511
+ def print_exception_table(self, exception_entries):
512
+ file = self.file
513
+ if exception_entries:
514
+ print("ExceptionTable:", file=file)
515
+ for entry in exception_entries:
516
+ lasti = " lasti" if entry.lasti else ""
517
+ start = entry.start_label
518
+ end = entry.end_label
519
+ target = entry.target_label
520
+ print(f" L{start} to L{end} -> L{target} [{entry.depth}]{lasti}", file=file)
521
+
522
+
523
+ class ArgResolver:
524
+ def __init__(self, co_consts=None, names=None, varname_from_oparg=None, labels_map=None):
525
+ self.co_consts = co_consts
526
+ self.names = names
527
+ self.varname_from_oparg = varname_from_oparg
528
+ self.labels_map = labels_map or {}
529
+
530
+ def offset_from_jump_arg(self, op, arg, offset):
531
+ deop = _deoptop(op)
532
+ if deop in hasjabs:
533
+ return arg * 2
534
+ elif deop in hasjrel:
535
+ signed_arg = -arg if _is_backward_jump(deop) else arg
536
+ argval = offset + 2 + signed_arg*2
537
+ caches = _get_cache_size(_all_opname[deop])
538
+ argval += 2 * caches
539
+ return argval
540
+ return None
541
+
542
+ def get_label_for_offset(self, offset):
543
+ return self.labels_map.get(offset, None)
544
+
545
+ def get_argval_argrepr(self, op, arg, offset):
546
+ get_name = None if self.names is None else self.names.__getitem__
547
+ argval = None
548
+ argrepr = ''
549
+ deop = _deoptop(op)
550
+ if arg is not None:
551
+ # Set argval to the dereferenced value of the argument when
552
+ # available, and argrepr to the string representation of argval.
553
+ # _disassemble_bytes needs the string repr of the
554
+ # raw name index for LOAD_GLOBAL, LOAD_CONST, etc.
555
+ argval = arg
556
+ if deop in hasconst:
557
+ argval, argrepr = _get_const_info(deop, arg, self.co_consts)
558
+ elif deop in hasname:
559
+ if deop == LOAD_GLOBAL:
560
+ argval, argrepr = _get_name_info(arg//2, get_name)
561
+ if (arg & 1) and argrepr:
562
+ argrepr = f"{argrepr} + NULL"
563
+ elif deop == LOAD_ATTR:
564
+ argval, argrepr = _get_name_info(arg//2, get_name)
565
+ if (arg & 1) and argrepr:
566
+ argrepr = f"{argrepr} + NULL|self"
567
+ elif deop == LOAD_SUPER_ATTR:
568
+ argval, argrepr = _get_name_info(arg//4, get_name)
569
+ if (arg & 1) and argrepr:
570
+ argrepr = f"{argrepr} + NULL|self"
571
+ else:
572
+ argval, argrepr = _get_name_info(arg, get_name)
573
+ elif deop in hasjump or deop in hasexc:
574
+ argval = self.offset_from_jump_arg(op, arg, offset)
575
+ lbl = self.get_label_for_offset(argval)
576
+ assert lbl is not None
577
+ argrepr = f"to L{lbl}"
578
+ elif deop in (LOAD_FAST_LOAD_FAST, STORE_FAST_LOAD_FAST, STORE_FAST_STORE_FAST):
579
+ arg1 = arg >> 4
580
+ arg2 = arg & 15
581
+ val1, argrepr1 = _get_name_info(arg1, self.varname_from_oparg)
582
+ val2, argrepr2 = _get_name_info(arg2, self.varname_from_oparg)
583
+ argrepr = argrepr1 + ", " + argrepr2
584
+ argval = val1, val2
585
+ elif deop in haslocal or deop in hasfree:
586
+ argval, argrepr = _get_name_info(arg, self.varname_from_oparg)
587
+ elif deop in hascompare:
588
+ argval = cmp_op[arg >> 5]
589
+ argrepr = argval
590
+ if arg & 16:
591
+ argrepr = f"bool({argrepr})"
592
+ elif deop == CONVERT_VALUE:
593
+ argval = (None, str, repr, ascii)[arg]
594
+ argrepr = ('', 'str', 'repr', 'ascii')[arg]
595
+ elif deop == SET_FUNCTION_ATTRIBUTE:
596
+ argrepr = ', '.join(s for i, s in enumerate(FUNCTION_ATTR_FLAGS)
597
+ if arg & (1<<i))
598
+ elif deop == BINARY_OP:
599
+ _, argrepr = _nb_ops[arg]
600
+ elif deop == CALL_INTRINSIC_1:
601
+ argrepr = _intrinsic_1_descs[arg]
602
+ elif deop == CALL_INTRINSIC_2:
603
+ argrepr = _intrinsic_2_descs[arg]
604
+ return argval, argrepr
605
+
606
+ def get_instructions(x, *, first_line=None, show_caches=None, adaptive=False):
607
+ """Iterator for the opcodes in methods, functions or code
608
+
609
+ Generates a series of Instruction named tuples giving the details of
610
+ each operations in the supplied code.
611
+
612
+ If *first_line* is not None, it indicates the line number that should
613
+ be reported for the first source line in the disassembled code.
614
+ Otherwise, the source line information (if any) is taken directly from
615
+ the disassembled code object.
616
+ """
617
+ co = _get_code_object(x)
618
+ linestarts = dict(findlinestarts(co))
619
+ if first_line is not None:
620
+ line_offset = first_line - co.co_firstlineno
621
+ else:
622
+ line_offset = 0
623
+
624
+ original_code = co.co_code
625
+ arg_resolver = ArgResolver(co_consts=co.co_consts,
626
+ names=co.co_names,
627
+ varname_from_oparg=co._varname_from_oparg,
628
+ labels_map=_make_labels_map(original_code))
629
+ return _get_instructions_bytes(_get_code_array(co, adaptive),
630
+ linestarts=linestarts,
631
+ line_offset=line_offset,
632
+ co_positions=co.co_positions(),
633
+ original_code=original_code,
634
+ arg_resolver=arg_resolver)
635
+
636
+ def _get_const_value(op, arg, co_consts):
637
+ """Helper to get the value of the const in a hasconst op.
638
+
639
+ Returns the dereferenced constant if this is possible.
640
+ Otherwise (if it is a LOAD_CONST and co_consts is not
641
+ provided) returns the dis.UNKNOWN sentinel.
642
+ """
643
+ assert op in hasconst
644
+
645
+ argval = UNKNOWN
646
+ if co_consts is not None:
647
+ argval = co_consts[arg]
648
+ return argval
649
+
650
+ def _get_const_info(op, arg, co_consts):
651
+ """Helper to get optional details about const references
652
+
653
+ Returns the dereferenced constant and its repr if the value
654
+ can be calculated.
655
+ Otherwise returns the sentinel value dis.UNKNOWN for the value
656
+ and an empty string for its repr.
657
+ """
658
+ argval = _get_const_value(op, arg, co_consts)
659
+ argrepr = repr(argval) if argval is not UNKNOWN else ''
660
+ return argval, argrepr
661
+
662
+ def _get_name_info(name_index, get_name, **extrainfo):
663
+ """Helper to get optional details about named references
664
+
665
+ Returns the dereferenced name as both value and repr if the name
666
+ list is defined.
667
+ Otherwise returns the sentinel value dis.UNKNOWN for the value
668
+ and an empty string for its repr.
669
+ """
670
+ if get_name is not None:
671
+ argval = get_name(name_index, **extrainfo)
672
+ return argval, argval
673
+ else:
674
+ return UNKNOWN, ''
675
+
676
+ def _parse_varint(iterator):
677
+ b = next(iterator)
678
+ val = b & 63
679
+ while b&64:
680
+ val <<= 6
681
+ b = next(iterator)
682
+ val |= b&63
683
+ return val
684
+
685
+ def _parse_exception_table(code):
686
+ iterator = iter(code.co_exceptiontable)
687
+ entries = []
688
+ try:
689
+ while True:
690
+ start = _parse_varint(iterator)*2
691
+ length = _parse_varint(iterator)*2
692
+ end = start + length
693
+ target = _parse_varint(iterator)*2
694
+ dl = _parse_varint(iterator)
695
+ depth = dl >> 1
696
+ lasti = bool(dl&1)
697
+ entries.append(_ExceptionTableEntry(start, end, target, depth, lasti))
698
+ except StopIteration:
699
+ return entries
700
+
701
+ def _is_backward_jump(op):
702
+ return opname[op] in ('JUMP_BACKWARD',
703
+ 'JUMP_BACKWARD_NO_INTERRUPT')
704
+
705
+ def _get_instructions_bytes(code, linestarts=None, line_offset=0, co_positions=None,
706
+ original_code=None, arg_resolver=None):
707
+ """Iterate over the instructions in a bytecode string.
708
+
709
+ Generates a sequence of Instruction namedtuples giving the details of each
710
+ opcode.
711
+
712
+ """
713
+ # Use the basic, unadaptive code for finding labels and actually walking the
714
+ # bytecode, since replacements like ENTER_EXECUTOR and INSTRUMENTED_* can
715
+ # mess that logic up pretty badly:
716
+ original_code = original_code or code
717
+ co_positions = co_positions or iter(())
718
+
719
+ starts_line = False
720
+ local_line_number = None
721
+ line_number = None
722
+ for offset, start_offset, op, arg in _unpack_opargs(original_code):
723
+ if linestarts is not None:
724
+ starts_line = offset in linestarts
725
+ if starts_line:
726
+ local_line_number = linestarts[offset]
727
+ if local_line_number is not None:
728
+ line_number = local_line_number + line_offset
729
+ else:
730
+ line_number = None
731
+ positions = Positions(*next(co_positions, ()))
732
+ deop = _deoptop(op)
733
+ op = code[offset]
734
+
735
+ if arg_resolver:
736
+ argval, argrepr = arg_resolver.get_argval_argrepr(op, arg, offset)
737
+ else:
738
+ argval, argrepr = arg, repr(arg)
739
+
740
+ caches = _get_cache_size(_all_opname[deop])
741
+ # Advance the co_positions iterator:
742
+ for _ in range(caches):
743
+ next(co_positions, ())
744
+
745
+ if caches:
746
+ cache_info = []
747
+ for name, size in _cache_format[opname[deop]].items():
748
+ data = code[offset + 2: offset + 2 + 2 * size]
749
+ cache_info.append((name, size, data))
750
+ else:
751
+ cache_info = None
752
+
753
+ label = arg_resolver.get_label_for_offset(offset) if arg_resolver else None
754
+ yield Instruction(_all_opname[op], op, arg, argval, argrepr,
755
+ offset, start_offset, starts_line, line_number,
756
+ label, positions, cache_info)
757
+
758
+
759
+ def disassemble(co, lasti=-1, *, file=None, show_caches=False, adaptive=False,
760
+ show_offsets=False):
761
+ """Disassemble a code object."""
762
+ linestarts = dict(findlinestarts(co))
763
+ exception_entries = _parse_exception_table(co)
764
+ labels_map = _make_labels_map(co.co_code, exception_entries=exception_entries)
765
+ label_width = 4 + len(str(len(labels_map)))
766
+ formatter = Formatter(file=file,
767
+ lineno_width=_get_lineno_width(linestarts),
768
+ offset_width=len(str(max(len(co.co_code) - 2, 9999))) if show_offsets else 0,
769
+ label_width=label_width,
770
+ show_caches=show_caches)
771
+ arg_resolver = ArgResolver(co_consts=co.co_consts,
772
+ names=co.co_names,
773
+ varname_from_oparg=co._varname_from_oparg,
774
+ labels_map=labels_map)
775
+ _disassemble_bytes(_get_code_array(co, adaptive), lasti, linestarts,
776
+ exception_entries=exception_entries, co_positions=co.co_positions(),
777
+ original_code=co.co_code, arg_resolver=arg_resolver, formatter=formatter)
778
+
779
+ def _disassemble_recursive(co, *, file=None, depth=None, show_caches=False, adaptive=False, show_offsets=False):
780
+ disassemble(co, file=file, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets)
781
+ if depth is None or depth > 0:
782
+ if depth is not None:
783
+ depth = depth - 1
784
+ for x in co.co_consts:
785
+ if hasattr(x, 'co_code'):
786
+ print(file=file)
787
+ print("Disassembly of %r:" % (x,), file=file)
788
+ _disassemble_recursive(
789
+ x, file=file, depth=depth, show_caches=show_caches,
790
+ adaptive=adaptive, show_offsets=show_offsets
791
+ )
792
+
793
+
794
+ def _make_labels_map(original_code, exception_entries=()):
795
+ jump_targets = set(findlabels(original_code))
796
+ labels = set(jump_targets)
797
+ for start, end, target, _, _ in exception_entries:
798
+ labels.add(start)
799
+ labels.add(end)
800
+ labels.add(target)
801
+ labels = sorted(labels)
802
+ labels_map = {offset: i+1 for (i, offset) in enumerate(sorted(labels))}
803
+ for e in exception_entries:
804
+ e.start_label = labels_map[e.start]
805
+ e.end_label = labels_map[e.end]
806
+ e.target_label = labels_map[e.target]
807
+ return labels_map
808
+
809
+ _NO_LINENO = ' --'
810
+
811
+ def _get_lineno_width(linestarts):
812
+ if linestarts is None:
813
+ return 0
814
+ maxlineno = max(filter(None, linestarts.values()), default=-1)
815
+ if maxlineno == -1:
816
+ # Omit the line number column entirely if we have no line number info
817
+ return 0
818
+ lineno_width = max(3, len(str(maxlineno)))
819
+ if lineno_width < len(_NO_LINENO) and None in linestarts.values():
820
+ lineno_width = len(_NO_LINENO)
821
+ return lineno_width
822
+
823
+
824
+ def _disassemble_bytes(code, lasti=-1, linestarts=None,
825
+ *, line_offset=0, exception_entries=(),
826
+ co_positions=None, original_code=None,
827
+ arg_resolver=None, formatter=None):
828
+
829
+ assert formatter is not None
830
+ assert arg_resolver is not None
831
+
832
+ instrs = _get_instructions_bytes(code, linestarts=linestarts,
833
+ line_offset=line_offset,
834
+ co_positions=co_positions,
835
+ original_code=original_code,
836
+ arg_resolver=arg_resolver)
837
+
838
+ print_instructions(instrs, exception_entries, formatter, lasti=lasti)
839
+
840
+
841
+ def print_instructions(instrs, exception_entries, formatter, lasti=-1):
842
+ for instr in instrs:
843
+ # Each CACHE takes 2 bytes
844
+ is_current_instr = instr.offset <= lasti \
845
+ <= instr.offset + 2 * _get_cache_size(_all_opname[_deoptop(instr.opcode)])
846
+ formatter.print_instruction(instr, is_current_instr)
847
+
848
+ formatter.print_exception_table(exception_entries)
849
+
850
+ def _disassemble_str(source, **kwargs):
851
+ """Compile the source string, then disassemble the code object."""
852
+ _disassemble_recursive(_try_compile(source, '<dis>'), **kwargs)
853
+
854
+ disco = disassemble # XXX For backwards compatibility
855
+
856
+
857
+ # Rely on C `int` being 32 bits for oparg
858
+ _INT_BITS = 32
859
+ # Value for c int when it overflows
860
+ _INT_OVERFLOW = 2 ** (_INT_BITS - 1)
861
+
862
+ def _unpack_opargs(code):
863
+ extended_arg = 0
864
+ extended_args_offset = 0 # Number of EXTENDED_ARG instructions preceding the current instruction
865
+ caches = 0
866
+ for i in range(0, len(code), 2):
867
+ # Skip inline CACHE entries:
868
+ if caches:
869
+ caches -= 1
870
+ continue
871
+ op = code[i]
872
+ deop = _deoptop(op)
873
+ caches = _get_cache_size(_all_opname[deop])
874
+ if deop in hasarg:
875
+ arg = code[i+1] | extended_arg
876
+ extended_arg = (arg << 8) if deop == EXTENDED_ARG else 0
877
+ # The oparg is stored as a signed integer
878
+ # If the value exceeds its upper limit, it will overflow and wrap
879
+ # to a negative integer
880
+ if extended_arg >= _INT_OVERFLOW:
881
+ extended_arg -= 2 * _INT_OVERFLOW
882
+ else:
883
+ arg = None
884
+ extended_arg = 0
885
+ if deop == EXTENDED_ARG:
886
+ extended_args_offset += 1
887
+ yield (i, i, op, arg)
888
+ else:
889
+ start_offset = i - extended_args_offset*2
890
+ yield (i, start_offset, op, arg)
891
+ extended_args_offset = 0
892
+
893
+ def findlabels(code):
894
+ """Detect all offsets in a byte code which are jump targets.
895
+
896
+ Return the list of offsets.
897
+
898
+ """
899
+ labels = []
900
+ for offset, _, op, arg in _unpack_opargs(code):
901
+ if arg is not None:
902
+ label = _get_jump_target(op, arg, offset)
903
+ if label is None:
904
+ continue
905
+ if label not in labels:
906
+ labels.append(label)
907
+ return labels
908
+
909
+ def findlinestarts(code):
910
+ """Find the offsets in a byte code which are start of lines in the source.
911
+
912
+ Generate pairs (offset, lineno)
913
+ lineno will be an integer or None the offset does not have a source line.
914
+ """
915
+
916
+ lastline = False # None is a valid line number
917
+ for start, end, line in code.co_lines():
918
+ if line is not lastline:
919
+ lastline = line
920
+ yield start, line
921
+ return
922
+
923
+ def _find_imports(co):
924
+ """Find import statements in the code
925
+
926
+ Generate triplets (name, level, fromlist) where
927
+ name is the imported module and level, fromlist are
928
+ the corresponding args to __import__.
929
+ """
930
+ IMPORT_NAME = opmap['IMPORT_NAME']
931
+
932
+ consts = co.co_consts
933
+ names = co.co_names
934
+ opargs = [(op, arg) for _, _, op, arg in _unpack_opargs(co.co_code)
935
+ if op != EXTENDED_ARG]
936
+ for i, (op, oparg) in enumerate(opargs):
937
+ if op == IMPORT_NAME and i >= 2:
938
+ from_op = opargs[i-1]
939
+ level_op = opargs[i-2]
940
+ if (from_op[0] in hasconst and level_op[0] in hasconst):
941
+ level = _get_const_value(level_op[0], level_op[1], consts)
942
+ fromlist = _get_const_value(from_op[0], from_op[1], consts)
943
+ yield (names[oparg], level, fromlist)
944
+
945
+ def _find_store_names(co):
946
+ """Find names of variables which are written in the code
947
+
948
+ Generate sequence of strings
949
+ """
950
+ STORE_OPS = {
951
+ opmap['STORE_NAME'],
952
+ opmap['STORE_GLOBAL']
953
+ }
954
+
955
+ names = co.co_names
956
+ for _, _, op, arg in _unpack_opargs(co.co_code):
957
+ if op in STORE_OPS:
958
+ yield names[arg]
959
+
960
+
961
+ class Bytecode:
962
+ """The bytecode operations of a piece of code
963
+
964
+ Instantiate this with a function, method, other compiled object, string of
965
+ code, or a code object (as returned by compile()).
966
+
967
+ Iterating over this yields the bytecode operations as Instruction instances.
968
+ """
969
+ def __init__(self, x, *, first_line=None, current_offset=None, show_caches=False, adaptive=False, show_offsets=False):
970
+ self.codeobj = co = _get_code_object(x)
971
+ if first_line is None:
972
+ self.first_line = co.co_firstlineno
973
+ self._line_offset = 0
974
+ else:
975
+ self.first_line = first_line
976
+ self._line_offset = first_line - co.co_firstlineno
977
+ self._linestarts = dict(findlinestarts(co))
978
+ self._original_object = x
979
+ self.current_offset = current_offset
980
+ self.exception_entries = _parse_exception_table(co)
981
+ self.show_caches = show_caches
982
+ self.adaptive = adaptive
983
+ self.show_offsets = show_offsets
984
+
985
+ def __iter__(self):
986
+ co = self.codeobj
987
+ original_code = co.co_code
988
+ labels_map = _make_labels_map(original_code, self.exception_entries)
989
+ arg_resolver = ArgResolver(co_consts=co.co_consts,
990
+ names=co.co_names,
991
+ varname_from_oparg=co._varname_from_oparg,
992
+ labels_map=labels_map)
993
+ return _get_instructions_bytes(_get_code_array(co, self.adaptive),
994
+ linestarts=self._linestarts,
995
+ line_offset=self._line_offset,
996
+ co_positions=co.co_positions(),
997
+ original_code=original_code,
998
+ arg_resolver=arg_resolver)
999
+
1000
+ def __repr__(self):
1001
+ return "{}({!r})".format(self.__class__.__name__,
1002
+ self._original_object)
1003
+
1004
+ @classmethod
1005
+ def from_traceback(cls, tb, *, show_caches=False, adaptive=False):
1006
+ """ Construct a Bytecode from the given traceback """
1007
+ while tb.tb_next:
1008
+ tb = tb.tb_next
1009
+ return cls(
1010
+ tb.tb_frame.f_code, current_offset=tb.tb_lasti, show_caches=show_caches, adaptive=adaptive
1011
+ )
1012
+
1013
+ def info(self):
1014
+ """Return formatted information about the code object."""
1015
+ return _format_code_info(self.codeobj)
1016
+
1017
+ def dis(self):
1018
+ """Return a formatted view of the bytecode operations."""
1019
+ co = self.codeobj
1020
+ if self.current_offset is not None:
1021
+ offset = self.current_offset
1022
+ else:
1023
+ offset = -1
1024
+ with io.StringIO() as output:
1025
+ code = _get_code_array(co, self.adaptive)
1026
+ offset_width = len(str(max(len(code) - 2, 9999))) if self.show_offsets else 0
1027
+
1028
+
1029
+ labels_map = _make_labels_map(co.co_code, self.exception_entries)
1030
+ label_width = 4 + len(str(len(labels_map)))
1031
+ formatter = Formatter(file=output,
1032
+ lineno_width=_get_lineno_width(self._linestarts),
1033
+ offset_width=offset_width,
1034
+ label_width=label_width,
1035
+ line_offset=self._line_offset,
1036
+ show_caches=self.show_caches)
1037
+
1038
+ arg_resolver = ArgResolver(co_consts=co.co_consts,
1039
+ names=co.co_names,
1040
+ varname_from_oparg=co._varname_from_oparg,
1041
+ labels_map=labels_map)
1042
+ _disassemble_bytes(code,
1043
+ linestarts=self._linestarts,
1044
+ line_offset=self._line_offset,
1045
+ lasti=offset,
1046
+ exception_entries=self.exception_entries,
1047
+ co_positions=co.co_positions(),
1048
+ original_code=co.co_code,
1049
+ arg_resolver=arg_resolver,
1050
+ formatter=formatter)
1051
+ return output.getvalue()
1052
+
1053
+
1054
+ def main(args=None):
1055
+ import argparse
1056
+
1057
+ parser = argparse.ArgumentParser()
1058
+ parser.add_argument('-C', '--show-caches', action='store_true',
1059
+ help='show inline caches')
1060
+ parser.add_argument('-O', '--show-offsets', action='store_true',
1061
+ help='show instruction offsets')
1062
+ parser.add_argument('infile', nargs='?', default='-')
1063
+ args = parser.parse_args(args=args)
1064
+ if args.infile == '-':
1065
+ name = '<stdin>'
1066
+ source = sys.stdin.buffer.read()
1067
+ else:
1068
+ name = args.infile
1069
+ with open(args.infile, 'rb') as infile:
1070
+ source = infile.read()
1071
+ code = compile(source, name, "exec")
1072
+ dis(code, show_caches=args.show_caches, show_offsets=args.show_offsets)
1073
+
1074
+ if __name__ == "__main__":
1075
+ main()