pytron-kit 0.3.12__py3-none-macosx_11_0_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. pytron/__init__.py +112 -0
  2. pytron/application.py +562 -0
  3. pytron/apputils/__init__.py +0 -0
  4. pytron/apputils/chrome_ipc.py +203 -0
  5. pytron/apputils/codegen.py +261 -0
  6. pytron/apputils/config.py +303 -0
  7. pytron/apputils/deadmansswitch.py +47 -0
  8. pytron/apputils/extras.py +76 -0
  9. pytron/apputils/native.py +148 -0
  10. pytron/apputils/shell.py +73 -0
  11. pytron/apputils/windows.py +286 -0
  12. pytron/cli.py +384 -0
  13. pytron/commands/__init__.py +0 -0
  14. pytron/commands/android.py +28 -0
  15. pytron/commands/build.py +26 -0
  16. pytron/commands/doctor.py +221 -0
  17. pytron/commands/engine.py +23 -0
  18. pytron/commands/frontend.py +60 -0
  19. pytron/commands/harvest.py +112 -0
  20. pytron/commands/helpers.py +239 -0
  21. pytron/commands/info.py +50 -0
  22. pytron/commands/init.py +521 -0
  23. pytron/commands/install.py +294 -0
  24. pytron/commands/login.py +130 -0
  25. pytron/commands/package.py +228 -0
  26. pytron/commands/plugin.py +442 -0
  27. pytron/commands/run.py +312 -0
  28. pytron/commands/scan.py +210 -0
  29. pytron/commands/show.py +23 -0
  30. pytron/commands/uninstall.py +150 -0
  31. pytron/commands/utils.py +42 -0
  32. pytron/commands/workflow.py +95 -0
  33. pytron/console.py +133 -0
  34. pytron/core.py +18 -0
  35. pytron/dependencies/WebView2Loader.dll +0 -0
  36. pytron/dependencies/__init__.py +1 -0
  37. pytron/dependencies/pytron_native.so +0 -0
  38. pytron/engines/chrome/adapter.py +445 -0
  39. pytron/engines/chrome/engine.py +576 -0
  40. pytron/engines/chrome/forge.py +147 -0
  41. pytron/engines/chrome/shell/package.json +8 -0
  42. pytron/engines/chrome/shell/preload.js +12 -0
  43. pytron/engines/chrome/shell/shell.js +534 -0
  44. pytron/exceptions.py +36 -0
  45. pytron/inspector.py +201 -0
  46. pytron/inspector_ui.py +512 -0
  47. pytron/installer/Installation.nsi +236 -0
  48. pytron/installer/header.bmp +0 -0
  49. pytron/installer/pytron.ico +0 -0
  50. pytron/installer/sidebar.bmp +0 -0
  51. pytron/llms.md +98 -0
  52. pytron/manifests/README.md +29 -0
  53. pytron/manifests/windows-utf8.manifest +44 -0
  54. pytron/menu.py +128 -0
  55. pytron/nsis-setup.exe +0 -0
  56. pytron/pack/__init__.py +0 -0
  57. pytron/pack/assets.py +131 -0
  58. pytron/pack/compilers.py +289 -0
  59. pytron/pack/crystal.py +297 -0
  60. pytron/pack/graph.py +377 -0
  61. pytron/pack/inference.py +157 -0
  62. pytron/pack/installers.py +402 -0
  63. pytron/pack/introspect.py +357 -0
  64. pytron/pack/metadata.py +213 -0
  65. pytron/pack/modules.py +618 -0
  66. pytron/pack/nuitka.py +108 -0
  67. pytron/pack/pipeline.py +107 -0
  68. pytron/pack/pyinstaller.py +176 -0
  69. pytron/pack/rust_engine.py +273 -0
  70. pytron/pack/secure.py +309 -0
  71. pytron/pack/secure_loader/bin/pytron_rust_bootloader +0 -0
  72. pytron/pack/secure_loader/icon.ico +0 -0
  73. pytron/pack/utils.py +110 -0
  74. pytron/pack/virtual_root.py +124 -0
  75. pytron/platforms/__init__.py +0 -0
  76. pytron/platforms/android/__init__.py +3 -0
  77. pytron/platforms/android/android.py +103 -0
  78. pytron/platforms/android/builder.py +736 -0
  79. pytron/platforms/android/ops/build.py +79 -0
  80. pytron/platforms/android/ops/init.py +63 -0
  81. pytron/platforms/android/ops/run.py +79 -0
  82. pytron/platforms/android/ops/sync.py +770 -0
  83. pytron/platforms/android/ops/utils.py +8 -0
  84. pytron/platforms/android/shell/README.md +30 -0
  85. pytron/platforms/android/shell/app/build.gradle +64 -0
  86. pytron/platforms/android/shell/app/src/main/AndroidManifest.xml +29 -0
  87. pytron/platforms/android/shell/app/src/main/assets/python/main.py +86 -0
  88. pytron/platforms/android/shell/app/src/main/assets/python/python314.zip +0 -0
  89. pytron/platforms/android/shell/app/src/main/cpp/CMakeLists.txt +25 -0
  90. pytron/platforms/android/shell/app/src/main/cpp/include/Python.h +155 -0
  91. pytron/platforms/android/shell/app/src/main/cpp/include/abstract.h +915 -0
  92. pytron/platforms/android/shell/app/src/main/cpp/include/audit.h +30 -0
  93. pytron/platforms/android/shell/app/src/main/cpp/include/bltinmodule.h +14 -0
  94. pytron/platforms/android/shell/app/src/main/cpp/include/boolobject.h +54 -0
  95. pytron/platforms/android/shell/app/src/main/cpp/include/bytearrayobject.h +44 -0
  96. pytron/platforms/android/shell/app/src/main/cpp/include/bytesobject.h +66 -0
  97. pytron/platforms/android/shell/app/src/main/cpp/include/ceval.h +145 -0
  98. pytron/platforms/android/shell/app/src/main/cpp/include/codecs.h +176 -0
  99. pytron/platforms/android/shell/app/src/main/cpp/include/compile.h +22 -0
  100. pytron/platforms/android/shell/app/src/main/cpp/include/complexobject.h +30 -0
  101. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/abstract.h +104 -0
  102. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/audit.h +8 -0
  103. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytearrayobject.h +38 -0
  104. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytesobject.h +42 -0
  105. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/cellobject.h +50 -0
  106. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/ceval.h +43 -0
  107. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/classobject.h +71 -0
  108. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/code.h +340 -0
  109. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/compile.h +50 -0
  110. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/complexobject.h +33 -0
  111. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/context.h +107 -0
  112. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/critical_section.h +154 -0
  113. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/descrobject.h +62 -0
  114. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/dictobject.h +105 -0
  115. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileobject.h +16 -0
  116. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileutils.h +16 -0
  117. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/floatobject.h +27 -0
  118. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/frameobject.h +35 -0
  119. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/funcobject.h +185 -0
  120. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/genobject.h +56 -0
  121. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/import.h +30 -0
  122. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/initconfig.h +334 -0
  123. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/listobject.h +53 -0
  124. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/lock.h +74 -0
  125. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longintrepr.h +184 -0
  126. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longobject.h +89 -0
  127. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/memoryobject.h +50 -0
  128. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/methodobject.h +66 -0
  129. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/modsupport.h +26 -0
  130. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/monitoring.h +269 -0
  131. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/object.h +493 -0
  132. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/objimpl.h +104 -0
  133. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/odictobject.h +43 -0
  134. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/picklebufobject.h +31 -0
  135. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pthread_stubs.h +105 -0
  136. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic.h +614 -0
  137. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_gcc.h +615 -0
  138. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_msc.h +1197 -0
  139. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_std.h +1112 -0
  140. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyctype.h +39 -0
  141. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pydebug.h +38 -0
  142. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyerrors.h +132 -0
  143. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyfpe.h +15 -0
  144. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyframe.h +45 -0
  145. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyhash.h +54 -0
  146. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pylifecycle.h +89 -0
  147. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pymem.h +84 -0
  148. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystate.h +275 -0
  149. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystats.h +194 -0
  150. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythonrun.h +96 -0
  151. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythread.h +43 -0
  152. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pytime.h +27 -0
  153. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/setobject.h +71 -0
  154. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/traceback.h +13 -0
  155. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tracemalloc.h +32 -0
  156. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tupleobject.h +40 -0
  157. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/unicodeobject.h +773 -0
  158. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/warnings.h +20 -0
  159. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/weakrefobject.h +66 -0
  160. pytron/platforms/android/shell/app/src/main/cpp/include/critical_section.h +16 -0
  161. pytron/platforms/android/shell/app/src/main/cpp/include/datetime.h +267 -0
  162. pytron/platforms/android/shell/app/src/main/cpp/include/descrobject.h +100 -0
  163. pytron/platforms/android/shell/app/src/main/cpp/include/dictobject.h +108 -0
  164. pytron/platforms/android/shell/app/src/main/cpp/include/dynamic_annotations.h +499 -0
  165. pytron/platforms/android/shell/app/src/main/cpp/include/enumobject.h +17 -0
  166. pytron/platforms/android/shell/app/src/main/cpp/include/errcode.h +45 -0
  167. pytron/platforms/android/shell/app/src/main/cpp/include/exports.h +105 -0
  168. pytron/platforms/android/shell/app/src/main/cpp/include/fileobject.h +41 -0
  169. pytron/platforms/android/shell/app/src/main/cpp/include/fileutils.h +62 -0
  170. pytron/platforms/android/shell/app/src/main/cpp/include/floatobject.h +54 -0
  171. pytron/platforms/android/shell/app/src/main/cpp/include/frameobject.h +20 -0
  172. pytron/platforms/android/shell/app/src/main/cpp/include/genericaliasobject.h +14 -0
  173. pytron/platforms/android/shell/app/src/main/cpp/include/import.h +103 -0
  174. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/atomic.h +392 -0
  175. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/internal.h +969 -0
  176. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/prim.h +329 -0
  177. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/track.h +147 -0
  178. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/types.h +721 -0
  179. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc.h +565 -0
  180. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_abstract.h +61 -0
  181. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_asdl.h +112 -0
  182. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast.h +945 -0
  183. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast_state.h +271 -0
  184. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_atexit.h +31 -0
  185. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_audit.h +35 -0
  186. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_backoff.h +133 -0
  187. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bitutils.h +186 -0
  188. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_blocks_output_buffer.h +321 -0
  189. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_brc.h +73 -0
  190. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytes_methods.h +82 -0
  191. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytesobject.h +149 -0
  192. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_c_array.h +39 -0
  193. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_call.h +206 -0
  194. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_capsule.h +17 -0
  195. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_cell.h +75 -0
  196. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval.h +390 -0
  197. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval_state.h +48 -0
  198. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_code.h +671 -0
  199. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_codecs.h +76 -0
  200. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_compile.h +230 -0
  201. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_complexobject.h +34 -0
  202. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_condvar.h +93 -0
  203. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_context.h +59 -0
  204. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_critical_section.h +237 -0
  205. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp.h +406 -0
  206. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp_data_registry.h +41 -0
  207. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_debug_offsets.h +379 -0
  208. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_descrobject.h +28 -0
  209. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict.h +410 -0
  210. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict_state.h +28 -0
  211. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dtoa.h +40 -0
  212. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_signal.h +30 -0
  213. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_trampoline.h +70 -0
  214. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_exceptions.h +40 -0
  215. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_faulthandler.h +100 -0
  216. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils.h +320 -0
  217. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils_windows.h +98 -0
  218. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_floatobject.h +49 -0
  219. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_flowgraph.h +47 -0
  220. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_format.h +27 -0
  221. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_frame.h +61 -0
  222. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist.h +111 -0
  223. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist_state.h +70 -0
  224. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_function.h +53 -0
  225. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gc.h +378 -0
  226. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_genobject.h +43 -0
  227. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_getopt.h +22 -0
  228. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gil.h +66 -0
  229. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects.h +34 -0
  230. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects_fini_generated.h +1592 -0
  231. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_strings.h +854 -0
  232. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hamt.h +113 -0
  233. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hashtable.h +150 -0
  234. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_import.h +141 -0
  235. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_importdl.h +139 -0
  236. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_index_pool.h +36 -0
  237. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_initconfig.h +197 -0
  238. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h +83 -0
  239. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruments.h +127 -0
  240. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp.h +109 -0
  241. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp_structs.h +977 -0
  242. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe.h +401 -0
  243. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe_structs.h +95 -0
  244. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpolation.h +26 -0
  245. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_intrinsics.h +51 -0
  246. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_jit.h +29 -0
  247. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_list.h +81 -0
  248. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_llist.h +106 -0
  249. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_lock.h +236 -0
  250. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_long.h +319 -0
  251. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_magic_number.h +305 -0
  252. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_memoryobject.h +20 -0
  253. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_mimalloc.h +69 -0
  254. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_modsupport.h +99 -0
  255. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_moduleobject.h +62 -0
  256. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_namespace.h +21 -0
  257. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object.h +1029 -0
  258. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_alloc.h +71 -0
  259. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_deferred.h +32 -0
  260. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_stack.h +95 -0
  261. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_state.h +49 -0
  262. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc.h +702 -0
  263. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc_init.h +66 -0
  264. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_metadata.h +2117 -0
  265. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_utils.h +90 -0
  266. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_optimizer.h +318 -0
  267. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parking_lot.h +97 -0
  268. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parser.h +78 -0
  269. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pathconfig.h +26 -0
  270. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyarena.h +68 -0
  271. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyatomic_ft_wrappers.h +174 -0
  272. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pybuffer.h +21 -0
  273. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyerrors.h +213 -0
  274. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyhash.h +91 -0
  275. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pylifecycle.h +136 -0
  276. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymath.h +205 -0
  277. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem.h +145 -0
  278. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem_init.h +103 -0
  279. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystate.h +339 -0
  280. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystats.h +21 -0
  281. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythonrun.h +68 -0
  282. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythread.h +172 -0
  283. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_qsbr.h +172 -0
  284. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_range.h +21 -0
  285. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime.h +63 -0
  286. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init.h +239 -0
  287. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init_generated.h +1589 -0
  288. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_structs.h +310 -0
  289. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_semaphore.h +67 -0
  290. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_setobject.h +41 -0
  291. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_signal.h +108 -0
  292. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sliceobject.h +20 -0
  293. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stackref.h +791 -0
  294. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stats.h +97 -0
  295. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_strhex.h +39 -0
  296. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structs.h +88 -0
  297. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structseq.h +40 -0
  298. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_symtable.h +201 -0
  299. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sysmodule.h +32 -0
  300. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_template.h +26 -0
  301. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_time.h +334 -0
  302. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_token.h +110 -0
  303. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_traceback.h +111 -0
  304. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tracemalloc.h +164 -0
  305. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tstate.h +88 -0
  306. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tuple.h +75 -0
  307. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typedefs.h +18 -0
  308. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typeobject.h +155 -0
  309. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typevarobject.h +28 -0
  310. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ucnhash.h +36 -0
  311. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject.h +308 -0
  312. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject_generated.h +3132 -0
  313. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unionobject.h +26 -0
  314. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uniqueid.h +57 -0
  315. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_ids.h +335 -0
  316. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_metadata.h +1204 -0
  317. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_warnings.h +21 -0
  318. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_weakref.h +133 -0
  319. pytron/platforms/android/shell/app/src/main/cpp/include/intrcheck.h +23 -0
  320. pytron/platforms/android/shell/app/src/main/cpp/include/iterobject.h +24 -0
  321. pytron/platforms/android/shell/app/src/main/cpp/include/listobject.h +55 -0
  322. pytron/platforms/android/shell/app/src/main/cpp/include/lock.h +16 -0
  323. pytron/platforms/android/shell/app/src/main/cpp/include/longobject.h +178 -0
  324. pytron/platforms/android/shell/app/src/main/cpp/include/marshal.h +31 -0
  325. pytron/platforms/android/shell/app/src/main/cpp/include/memoryobject.h +34 -0
  326. pytron/platforms/android/shell/app/src/main/cpp/include/methodobject.h +146 -0
  327. pytron/platforms/android/shell/app/src/main/cpp/include/modsupport.h +146 -0
  328. pytron/platforms/android/shell/app/src/main/cpp/include/moduleobject.h +122 -0
  329. pytron/platforms/android/shell/app/src/main/cpp/include/monitoring.h +18 -0
  330. pytron/platforms/android/shell/app/src/main/cpp/include/object.h +828 -0
  331. pytron/platforms/android/shell/app/src/main/cpp/include/objimpl.h +211 -0
  332. pytron/platforms/android/shell/app/src/main/cpp/include/opcode.h +43 -0
  333. pytron/platforms/android/shell/app/src/main/cpp/include/opcode_ids.h +259 -0
  334. pytron/platforms/android/shell/app/src/main/cpp/include/osdefs.h +57 -0
  335. pytron/platforms/android/shell/app/src/main/cpp/include/osmodule.h +17 -0
  336. pytron/platforms/android/shell/app/src/main/cpp/include/patchlevel.h +49 -0
  337. pytron/platforms/android/shell/app/src/main/cpp/include/py_curses.h +117 -0
  338. pytron/platforms/android/shell/app/src/main/cpp/include/pyatomic.h +16 -0
  339. pytron/platforms/android/shell/app/src/main/cpp/include/pybuffer.h +145 -0
  340. pytron/platforms/android/shell/app/src/main/cpp/include/pycapsule.h +58 -0
  341. pytron/platforms/android/shell/app/src/main/cpp/include/pyconfig.h +2088 -0
  342. pytron/platforms/android/shell/app/src/main/cpp/include/pydtrace.h +59 -0
  343. pytron/platforms/android/shell/app/src/main/cpp/include/pyerrors.h +335 -0
  344. pytron/platforms/android/shell/app/src/main/cpp/include/pyexpat.h +62 -0
  345. pytron/platforms/android/shell/app/src/main/cpp/include/pyframe.h +26 -0
  346. pytron/platforms/android/shell/app/src/main/cpp/include/pyhash.h +59 -0
  347. pytron/platforms/android/shell/app/src/main/cpp/include/pylifecycle.h +80 -0
  348. pytron/platforms/android/shell/app/src/main/cpp/include/pymacconfig.h +91 -0
  349. pytron/platforms/android/shell/app/src/main/cpp/include/pymacro.h +243 -0
  350. pytron/platforms/android/shell/app/src/main/cpp/include/pymath.h +65 -0
  351. pytron/platforms/android/shell/app/src/main/cpp/include/pymem.h +110 -0
  352. pytron/platforms/android/shell/app/src/main/cpp/include/pyport.h +710 -0
  353. pytron/platforms/android/shell/app/src/main/cpp/include/pystate.h +132 -0
  354. pytron/platforms/android/shell/app/src/main/cpp/include/pystats.h +28 -0
  355. pytron/platforms/android/shell/app/src/main/cpp/include/pystrcmp.h +23 -0
  356. pytron/platforms/android/shell/app/src/main/cpp/include/pystrtod.h +37 -0
  357. pytron/platforms/android/shell/app/src/main/cpp/include/pythonrun.h +42 -0
  358. pytron/platforms/android/shell/app/src/main/cpp/include/pythread.h +131 -0
  359. pytron/platforms/android/shell/app/src/main/cpp/include/pytypedefs.h +30 -0
  360. pytron/platforms/android/shell/app/src/main/cpp/include/rangeobject.h +27 -0
  361. pytron/platforms/android/shell/app/src/main/cpp/include/refcount.h +555 -0
  362. pytron/platforms/android/shell/app/src/main/cpp/include/setobject.h +49 -0
  363. pytron/platforms/android/shell/app/src/main/cpp/include/sliceobject.h +69 -0
  364. pytron/platforms/android/shell/app/src/main/cpp/include/structmember.h +56 -0
  365. pytron/platforms/android/shell/app/src/main/cpp/include/structseq.h +46 -0
  366. pytron/platforms/android/shell/app/src/main/cpp/include/sysmodule.h +27 -0
  367. pytron/platforms/android/shell/app/src/main/cpp/include/traceback.h +26 -0
  368. pytron/platforms/android/shell/app/src/main/cpp/include/tupleobject.h +46 -0
  369. pytron/platforms/android/shell/app/src/main/cpp/include/typeslots.h +96 -0
  370. pytron/platforms/android/shell/app/src/main/cpp/include/unicodeobject.h +1029 -0
  371. pytron/platforms/android/shell/app/src/main/cpp/include/warnings.h +45 -0
  372. pytron/platforms/android/shell/app/src/main/cpp/include/weakrefobject.h +46 -0
  373. pytron/platforms/android/shell/app/src/main/cpp/pytron_bridge.cpp +224 -0
  374. pytron/platforms/android/shell/app/src/main/java/com/pytron/shell/MainActivity.kt +208 -0
  375. pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  376. pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  377. pytron/platforms/android/shell/build.gradle +11 -0
  378. pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.jar +0 -0
  379. pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.properties +5 -0
  380. pytron/platforms/android/shell/gradle.properties +2 -0
  381. pytron/platforms/android/shell/gradlew.bat +85 -0
  382. pytron/platforms/android/shell/settings.gradle +16 -0
  383. pytron/platforms/darwin.py +82 -0
  384. pytron/platforms/darwin_ops/libs.py +31 -0
  385. pytron/platforms/darwin_ops/system.py +182 -0
  386. pytron/platforms/darwin_ops/utils.py +85 -0
  387. pytron/platforms/darwin_ops/webview.py +5 -0
  388. pytron/platforms/darwin_ops/window.py +102 -0
  389. pytron/platforms/interface.py +152 -0
  390. pytron/platforms/linux.py +82 -0
  391. pytron/platforms/linux_ops/libs.py +49 -0
  392. pytron/platforms/linux_ops/system.py +316 -0
  393. pytron/platforms/linux_ops/utils.py +19 -0
  394. pytron/platforms/linux_ops/webview.py +5 -0
  395. pytron/platforms/linux_ops/window.py +115 -0
  396. pytron/platforms/windows.py +136 -0
  397. pytron/platforms/windows_ops/__init__.py +0 -0
  398. pytron/platforms/windows_ops/constants.py +126 -0
  399. pytron/platforms/windows_ops/system.py +518 -0
  400. pytron/platforms/windows_ops/utils.py +3 -0
  401. pytron/platforms/windows_ops/webview.py +5 -0
  402. pytron/platforms/windows_ops/window.py +361 -0
  403. pytron/plugin.py +467 -0
  404. pytron/rcedit-x64.exe +0 -0
  405. pytron/router.py +146 -0
  406. pytron/serializer.py +240 -0
  407. pytron/shortcuts.py +279 -0
  408. pytron/state.py +76 -0
  409. pytron/tray.py +399 -0
  410. pytron/updater.py +181 -0
  411. pytron/utf8_hook.py +112 -0
  412. pytron/utils.py +44 -0
  413. pytron/webview.py +722 -0
  414. pytron_kit-0.3.12.dist-info/METADATA +131 -0
  415. pytron_kit-0.3.12.dist-info/RECORD +419 -0
  416. pytron_kit-0.3.12.dist-info/WHEEL +5 -0
  417. pytron_kit-0.3.12.dist-info/entry_points.txt +2 -0
  418. pytron_kit-0.3.12.dist-info/licenses/LICENSE +201 -0
  419. pytron_kit-0.3.12.dist-info/top_level.txt +1 -0
@@ -0,0 +1,271 @@
1
+ // File automatically generated by Parser/asdl_c.py.
2
+
3
+ #ifndef Py_INTERNAL_AST_STATE_H
4
+ #define Py_INTERNAL_AST_STATE_H
5
+
6
+ #include "pycore_lock.h" // _PyOnceFlag
7
+
8
+ #ifdef __cplusplus
9
+ extern "C" {
10
+ #endif
11
+
12
+ #ifndef Py_BUILD_CORE
13
+ # error "this header requires Py_BUILD_CORE define"
14
+ #endif
15
+
16
+ struct ast_state {
17
+ _PyOnceFlag once;
18
+ int finalized;
19
+ PyObject *AST_type;
20
+ PyObject *Add_singleton;
21
+ PyObject *Add_type;
22
+ PyObject *And_singleton;
23
+ PyObject *And_type;
24
+ PyObject *AnnAssign_type;
25
+ PyObject *Assert_type;
26
+ PyObject *Assign_type;
27
+ PyObject *AsyncFor_type;
28
+ PyObject *AsyncFunctionDef_type;
29
+ PyObject *AsyncWith_type;
30
+ PyObject *Attribute_type;
31
+ PyObject *AugAssign_type;
32
+ PyObject *Await_type;
33
+ PyObject *BinOp_type;
34
+ PyObject *BitAnd_singleton;
35
+ PyObject *BitAnd_type;
36
+ PyObject *BitOr_singleton;
37
+ PyObject *BitOr_type;
38
+ PyObject *BitXor_singleton;
39
+ PyObject *BitXor_type;
40
+ PyObject *BoolOp_type;
41
+ PyObject *Break_type;
42
+ PyObject *Call_type;
43
+ PyObject *ClassDef_type;
44
+ PyObject *Compare_type;
45
+ PyObject *Constant_type;
46
+ PyObject *Continue_type;
47
+ PyObject *Del_singleton;
48
+ PyObject *Del_type;
49
+ PyObject *Delete_type;
50
+ PyObject *DictComp_type;
51
+ PyObject *Dict_type;
52
+ PyObject *Div_singleton;
53
+ PyObject *Div_type;
54
+ PyObject *Eq_singleton;
55
+ PyObject *Eq_type;
56
+ PyObject *ExceptHandler_type;
57
+ PyObject *Expr_type;
58
+ PyObject *Expression_type;
59
+ PyObject *FloorDiv_singleton;
60
+ PyObject *FloorDiv_type;
61
+ PyObject *For_type;
62
+ PyObject *FormattedValue_type;
63
+ PyObject *FunctionDef_type;
64
+ PyObject *FunctionType_type;
65
+ PyObject *GeneratorExp_type;
66
+ PyObject *Global_type;
67
+ PyObject *GtE_singleton;
68
+ PyObject *GtE_type;
69
+ PyObject *Gt_singleton;
70
+ PyObject *Gt_type;
71
+ PyObject *IfExp_type;
72
+ PyObject *If_type;
73
+ PyObject *ImportFrom_type;
74
+ PyObject *Import_type;
75
+ PyObject *In_singleton;
76
+ PyObject *In_type;
77
+ PyObject *Interactive_type;
78
+ PyObject *Interpolation_type;
79
+ PyObject *Invert_singleton;
80
+ PyObject *Invert_type;
81
+ PyObject *IsNot_singleton;
82
+ PyObject *IsNot_type;
83
+ PyObject *Is_singleton;
84
+ PyObject *Is_type;
85
+ PyObject *JoinedStr_type;
86
+ PyObject *LShift_singleton;
87
+ PyObject *LShift_type;
88
+ PyObject *Lambda_type;
89
+ PyObject *ListComp_type;
90
+ PyObject *List_type;
91
+ PyObject *Load_singleton;
92
+ PyObject *Load_type;
93
+ PyObject *LtE_singleton;
94
+ PyObject *LtE_type;
95
+ PyObject *Lt_singleton;
96
+ PyObject *Lt_type;
97
+ PyObject *MatMult_singleton;
98
+ PyObject *MatMult_type;
99
+ PyObject *MatchAs_type;
100
+ PyObject *MatchClass_type;
101
+ PyObject *MatchMapping_type;
102
+ PyObject *MatchOr_type;
103
+ PyObject *MatchSequence_type;
104
+ PyObject *MatchSingleton_type;
105
+ PyObject *MatchStar_type;
106
+ PyObject *MatchValue_type;
107
+ PyObject *Match_type;
108
+ PyObject *Mod_singleton;
109
+ PyObject *Mod_type;
110
+ PyObject *Module_type;
111
+ PyObject *Mult_singleton;
112
+ PyObject *Mult_type;
113
+ PyObject *Name_type;
114
+ PyObject *NamedExpr_type;
115
+ PyObject *Nonlocal_type;
116
+ PyObject *NotEq_singleton;
117
+ PyObject *NotEq_type;
118
+ PyObject *NotIn_singleton;
119
+ PyObject *NotIn_type;
120
+ PyObject *Not_singleton;
121
+ PyObject *Not_type;
122
+ PyObject *Or_singleton;
123
+ PyObject *Or_type;
124
+ PyObject *ParamSpec_type;
125
+ PyObject *Pass_type;
126
+ PyObject *Pow_singleton;
127
+ PyObject *Pow_type;
128
+ PyObject *RShift_singleton;
129
+ PyObject *RShift_type;
130
+ PyObject *Raise_type;
131
+ PyObject *Return_type;
132
+ PyObject *SetComp_type;
133
+ PyObject *Set_type;
134
+ PyObject *Slice_type;
135
+ PyObject *Starred_type;
136
+ PyObject *Store_singleton;
137
+ PyObject *Store_type;
138
+ PyObject *Sub_singleton;
139
+ PyObject *Sub_type;
140
+ PyObject *Subscript_type;
141
+ PyObject *TemplateStr_type;
142
+ PyObject *TryStar_type;
143
+ PyObject *Try_type;
144
+ PyObject *Tuple_type;
145
+ PyObject *TypeAlias_type;
146
+ PyObject *TypeIgnore_type;
147
+ PyObject *TypeVarTuple_type;
148
+ PyObject *TypeVar_type;
149
+ PyObject *UAdd_singleton;
150
+ PyObject *UAdd_type;
151
+ PyObject *USub_singleton;
152
+ PyObject *USub_type;
153
+ PyObject *UnaryOp_type;
154
+ PyObject *While_type;
155
+ PyObject *With_type;
156
+ PyObject *YieldFrom_type;
157
+ PyObject *Yield_type;
158
+ PyObject *__dict__;
159
+ PyObject *__doc__;
160
+ PyObject *__match_args__;
161
+ PyObject *__module__;
162
+ PyObject *_attributes;
163
+ PyObject *_fields;
164
+ PyObject *alias_type;
165
+ PyObject *annotation;
166
+ PyObject *arg;
167
+ PyObject *arg_type;
168
+ PyObject *args;
169
+ PyObject *argtypes;
170
+ PyObject *arguments_type;
171
+ PyObject *asname;
172
+ PyObject *ast;
173
+ PyObject *attr;
174
+ PyObject *bases;
175
+ PyObject *body;
176
+ PyObject *boolop_type;
177
+ PyObject *bound;
178
+ PyObject *cases;
179
+ PyObject *cause;
180
+ PyObject *cls;
181
+ PyObject *cmpop_type;
182
+ PyObject *col_offset;
183
+ PyObject *comparators;
184
+ PyObject *comprehension_type;
185
+ PyObject *context_expr;
186
+ PyObject *conversion;
187
+ PyObject *ctx;
188
+ PyObject *decorator_list;
189
+ PyObject *default_value;
190
+ PyObject *defaults;
191
+ PyObject *elt;
192
+ PyObject *elts;
193
+ PyObject *end_col_offset;
194
+ PyObject *end_lineno;
195
+ PyObject *exc;
196
+ PyObject *excepthandler_type;
197
+ PyObject *expr_context_type;
198
+ PyObject *expr_type;
199
+ PyObject *finalbody;
200
+ PyObject *format_spec;
201
+ PyObject *func;
202
+ PyObject *generators;
203
+ PyObject *guard;
204
+ PyObject *handlers;
205
+ PyObject *id;
206
+ PyObject *ifs;
207
+ PyObject *is_async;
208
+ PyObject *items;
209
+ PyObject *iter;
210
+ PyObject *key;
211
+ PyObject *keys;
212
+ PyObject *keyword_type;
213
+ PyObject *keywords;
214
+ PyObject *kind;
215
+ PyObject *kw_defaults;
216
+ PyObject *kwarg;
217
+ PyObject *kwd_attrs;
218
+ PyObject *kwd_patterns;
219
+ PyObject *kwonlyargs;
220
+ PyObject *left;
221
+ PyObject *level;
222
+ PyObject *lineno;
223
+ PyObject *lower;
224
+ PyObject *match_case_type;
225
+ PyObject *mod_type;
226
+ PyObject *module;
227
+ PyObject *msg;
228
+ PyObject *name;
229
+ PyObject *names;
230
+ PyObject *op;
231
+ PyObject *operand;
232
+ PyObject *operator_type;
233
+ PyObject *ops;
234
+ PyObject *optional_vars;
235
+ PyObject *orelse;
236
+ PyObject *pattern;
237
+ PyObject *pattern_type;
238
+ PyObject *patterns;
239
+ PyObject *posonlyargs;
240
+ PyObject *rest;
241
+ PyObject *returns;
242
+ PyObject *right;
243
+ PyObject *simple;
244
+ PyObject *slice;
245
+ PyObject *step;
246
+ PyObject *stmt_type;
247
+ PyObject *str;
248
+ PyObject *subject;
249
+ PyObject *tag;
250
+ PyObject *target;
251
+ PyObject *targets;
252
+ PyObject *test;
253
+ PyObject *type;
254
+ PyObject *type_comment;
255
+ PyObject *type_ignore_type;
256
+ PyObject *type_ignores;
257
+ PyObject *type_param_type;
258
+ PyObject *type_params;
259
+ PyObject *unaryop_type;
260
+ PyObject *upper;
261
+ PyObject *value;
262
+ PyObject *values;
263
+ PyObject *vararg;
264
+ PyObject *withitem_type;
265
+ };
266
+
267
+ #ifdef __cplusplus
268
+ }
269
+ #endif
270
+ #endif /* !Py_INTERNAL_AST_STATE_H */
271
+
@@ -0,0 +1,31 @@
1
+ #ifndef Py_INTERNAL_ATEXIT_H
2
+ #define Py_INTERNAL_ATEXIT_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #ifndef Py_BUILD_CORE
9
+ # error "this header requires Py_BUILD_CORE define"
10
+ #endif
11
+
12
+
13
+
14
+ #ifdef Py_GIL_DISABLED
15
+ # define _PyAtExit_LockCallbacks(state) PyMutex_Lock(&state->ll_callbacks_lock);
16
+ # define _PyAtExit_UnlockCallbacks(state) PyMutex_Unlock(&state->ll_callbacks_lock);
17
+ #else
18
+ # define _PyAtExit_LockCallbacks(state)
19
+ # define _PyAtExit_UnlockCallbacks(state)
20
+ #endif
21
+
22
+ // Export for '_interpchannels' shared extension
23
+ PyAPI_FUNC(int) _Py_AtExit(
24
+ PyInterpreterState *interp,
25
+ atexit_datacallbackfunc func,
26
+ void *data);
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+ #endif /* !Py_INTERNAL_ATEXIT_H */
@@ -0,0 +1,35 @@
1
+ #ifndef Py_INTERNAL_AUDIT_H
2
+ #define Py_INTERNAL_AUDIT_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ #ifndef Py_BUILD_CORE
8
+ # error "this header requires Py_BUILD_CORE define"
9
+ #endif
10
+
11
+
12
+ /* Runtime audit hook state */
13
+
14
+ typedef struct _Py_AuditHookEntry {
15
+ struct _Py_AuditHookEntry *next;
16
+ Py_AuditHookFunction hookCFunction;
17
+ void *userData;
18
+ } _Py_AuditHookEntry;
19
+
20
+
21
+ extern int _PySys_Audit(
22
+ PyThreadState *tstate,
23
+ const char *event,
24
+ const char *argFormat,
25
+ ...);
26
+
27
+ // _PySys_ClearAuditHooks() must not be exported: use extern rather than
28
+ // PyAPI_FUNC(). We want minimal exposure of this function.
29
+ extern void _PySys_ClearAuditHooks(PyThreadState *tstate);
30
+
31
+
32
+ #ifdef __cplusplus
33
+ }
34
+ #endif
35
+ #endif /* !Py_INTERNAL_AUDIT_H */
@@ -0,0 +1,133 @@
1
+
2
+ #ifndef Py_INTERNAL_BACKOFF_H
3
+ #define Py_INTERNAL_BACKOFF_H
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #ifndef Py_BUILD_CORE
9
+ # error "this header requires Py_BUILD_CORE define"
10
+ #endif
11
+
12
+ #include <assert.h>
13
+ #include <stdbool.h>
14
+ #include "pycore_structs.h" // _Py_BackoffCounter
15
+
16
+ /* 16-bit countdown counters using exponential backoff.
17
+
18
+ These are used by the adaptive specializer to count down until
19
+ it is time to specialize an instruction. If specialization fails
20
+ the counter is reset using exponential backoff.
21
+
22
+ Another use is for the Tier 2 optimizer to decide when to create
23
+ a new Tier 2 trace (executor). Again, exponential backoff is used.
24
+
25
+ The 16-bit counter is structured as a 12-bit unsigned 'value'
26
+ and a 4-bit 'backoff' field. When resetting the counter, the
27
+ backoff field is incremented (until it reaches a limit) and the
28
+ value is set to a bit mask representing the value 2**backoff - 1.
29
+ The maximum backoff is 12 (the number of bits in the value).
30
+
31
+ There is an exceptional value which must not be updated, 0xFFFF.
32
+ */
33
+
34
+ #define BACKOFF_BITS 4
35
+ #define MAX_BACKOFF 12
36
+ #define UNREACHABLE_BACKOFF 15
37
+
38
+ static inline bool
39
+ is_unreachable_backoff_counter(_Py_BackoffCounter counter)
40
+ {
41
+ return counter.value_and_backoff == UNREACHABLE_BACKOFF;
42
+ }
43
+
44
+ static inline _Py_BackoffCounter
45
+ make_backoff_counter(uint16_t value, uint16_t backoff)
46
+ {
47
+ assert(backoff <= 15);
48
+ assert(value <= 0xFFF);
49
+ _Py_BackoffCounter result;
50
+ result.value_and_backoff = (value << BACKOFF_BITS) | backoff;
51
+ return result;
52
+ }
53
+
54
+ static inline _Py_BackoffCounter
55
+ forge_backoff_counter(uint16_t counter)
56
+ {
57
+ _Py_BackoffCounter result;
58
+ result.value_and_backoff = counter;
59
+ return result;
60
+ }
61
+
62
+ static inline _Py_BackoffCounter
63
+ restart_backoff_counter(_Py_BackoffCounter counter)
64
+ {
65
+ assert(!is_unreachable_backoff_counter(counter));
66
+ int backoff = counter.value_and_backoff & 15;
67
+ if (backoff < MAX_BACKOFF) {
68
+ return make_backoff_counter((1 << (backoff + 1)) - 1, backoff + 1);
69
+ }
70
+ else {
71
+ return make_backoff_counter((1 << MAX_BACKOFF) - 1, MAX_BACKOFF);
72
+ }
73
+ }
74
+
75
+ static inline _Py_BackoffCounter
76
+ pause_backoff_counter(_Py_BackoffCounter counter)
77
+ {
78
+ _Py_BackoffCounter result;
79
+ result.value_and_backoff = counter.value_and_backoff | (1 << BACKOFF_BITS);
80
+ return result;
81
+ }
82
+
83
+ static inline _Py_BackoffCounter
84
+ advance_backoff_counter(_Py_BackoffCounter counter)
85
+ {
86
+ _Py_BackoffCounter result;
87
+ result.value_and_backoff = counter.value_and_backoff - (1 << BACKOFF_BITS);
88
+ return result;
89
+ }
90
+
91
+ static inline bool
92
+ backoff_counter_triggers(_Py_BackoffCounter counter)
93
+ {
94
+ /* Test whether the value is zero and the backoff is not UNREACHABLE_BACKOFF */
95
+ return counter.value_and_backoff < UNREACHABLE_BACKOFF;
96
+ }
97
+
98
+ /* Initial JUMP_BACKWARD counter.
99
+ * This determines when we create a trace for a loop. */
100
+ #define JUMP_BACKWARD_INITIAL_VALUE 4095
101
+ #define JUMP_BACKWARD_INITIAL_BACKOFF 12
102
+ static inline _Py_BackoffCounter
103
+ initial_jump_backoff_counter(void)
104
+ {
105
+ return make_backoff_counter(JUMP_BACKWARD_INITIAL_VALUE,
106
+ JUMP_BACKWARD_INITIAL_BACKOFF);
107
+ }
108
+
109
+ /* Initial exit temperature.
110
+ * Must be larger than ADAPTIVE_COOLDOWN_VALUE,
111
+ * otherwise when a side exit warms up we may construct
112
+ * a new trace before the Tier 1 code has properly re-specialized. */
113
+ #define SIDE_EXIT_INITIAL_VALUE 4095
114
+ #define SIDE_EXIT_INITIAL_BACKOFF 12
115
+
116
+ static inline _Py_BackoffCounter
117
+ initial_temperature_backoff_counter(void)
118
+ {
119
+ return make_backoff_counter(SIDE_EXIT_INITIAL_VALUE,
120
+ SIDE_EXIT_INITIAL_BACKOFF);
121
+ }
122
+
123
+ /* Unreachable backoff counter. */
124
+ static inline _Py_BackoffCounter
125
+ initial_unreachable_backoff_counter(void)
126
+ {
127
+ return make_backoff_counter(0, UNREACHABLE_BACKOFF);
128
+ }
129
+
130
+ #ifdef __cplusplus
131
+ }
132
+ #endif
133
+ #endif /* !Py_INTERNAL_BACKOFF_H */
@@ -0,0 +1,186 @@
1
+ /* Bit and bytes utilities.
2
+
3
+ Bytes swap functions, reverse order of bytes:
4
+
5
+ - _Py_bswap16(uint16_t)
6
+ - _Py_bswap32(uint32_t)
7
+ - _Py_bswap64(uint64_t)
8
+ */
9
+
10
+ #ifndef Py_INTERNAL_BITUTILS_H
11
+ #define Py_INTERNAL_BITUTILS_H
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ #ifndef Py_BUILD_CORE
17
+ # error "this header requires Py_BUILD_CORE define"
18
+ #endif
19
+
20
+ #if defined(__GNUC__) \
21
+ && ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8))
22
+ /* __builtin_bswap16() is available since GCC 4.8,
23
+ __builtin_bswap32() is available since GCC 4.3,
24
+ __builtin_bswap64() is available since GCC 4.3. */
25
+ # define _PY_HAVE_BUILTIN_BSWAP
26
+ #endif
27
+
28
+ #ifdef _MSC_VER
29
+ # include <intrin.h> // _byteswap_uint64()
30
+ #endif
31
+
32
+
33
+ static inline uint16_t
34
+ _Py_bswap16(uint16_t word)
35
+ {
36
+ #if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap16)
37
+ return __builtin_bswap16(word);
38
+ #elif defined(_MSC_VER)
39
+ Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned short));
40
+ return _byteswap_ushort(word);
41
+ #else
42
+ // Portable implementation which doesn't rely on circular bit shift
43
+ return ( ((word & UINT16_C(0x00FF)) << 8)
44
+ | ((word & UINT16_C(0xFF00)) >> 8));
45
+ #endif
46
+ }
47
+
48
+ static inline uint32_t
49
+ _Py_bswap32(uint32_t word)
50
+ {
51
+ #if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap32)
52
+ return __builtin_bswap32(word);
53
+ #elif defined(_MSC_VER)
54
+ Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned long));
55
+ return _byteswap_ulong(word);
56
+ #else
57
+ // Portable implementation which doesn't rely on circular bit shift
58
+ return ( ((word & UINT32_C(0x000000FF)) << 24)
59
+ | ((word & UINT32_C(0x0000FF00)) << 8)
60
+ | ((word & UINT32_C(0x00FF0000)) >> 8)
61
+ | ((word & UINT32_C(0xFF000000)) >> 24));
62
+ #endif
63
+ }
64
+
65
+ static inline uint64_t
66
+ _Py_bswap64(uint64_t word)
67
+ {
68
+ #if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap64)
69
+ return __builtin_bswap64(word);
70
+ #elif defined(_MSC_VER)
71
+ return _byteswap_uint64(word);
72
+ #else
73
+ // Portable implementation which doesn't rely on circular bit shift
74
+ return ( ((word & UINT64_C(0x00000000000000FF)) << 56)
75
+ | ((word & UINT64_C(0x000000000000FF00)) << 40)
76
+ | ((word & UINT64_C(0x0000000000FF0000)) << 24)
77
+ | ((word & UINT64_C(0x00000000FF000000)) << 8)
78
+ | ((word & UINT64_C(0x000000FF00000000)) >> 8)
79
+ | ((word & UINT64_C(0x0000FF0000000000)) >> 24)
80
+ | ((word & UINT64_C(0x00FF000000000000)) >> 40)
81
+ | ((word & UINT64_C(0xFF00000000000000)) >> 56));
82
+ #endif
83
+ }
84
+
85
+
86
+ // Population count: count the number of 1's in 'x'
87
+ // (number of bits set to 1), also known as the hamming weight.
88
+ //
89
+ // Implementation note. CPUID is not used, to test if x86 POPCNT instruction
90
+ // can be used, to keep the implementation simple. For example, Visual Studio
91
+ // __popcnt() is not used this reason. The clang and GCC builtin function can
92
+ // use the x86 POPCNT instruction if the target architecture has SSE4a or
93
+ // newer.
94
+ static inline int
95
+ _Py_popcount32(uint32_t x)
96
+ {
97
+ #if (defined(__clang__) || defined(__GNUC__))
98
+
99
+ #if SIZEOF_INT >= 4
100
+ Py_BUILD_ASSERT(sizeof(x) <= sizeof(unsigned int));
101
+ return __builtin_popcount(x);
102
+ #else
103
+ // The C standard guarantees that unsigned long will always be big enough
104
+ // to hold a uint32_t value without losing information.
105
+ Py_BUILD_ASSERT(sizeof(x) <= sizeof(unsigned long));
106
+ return __builtin_popcountl(x);
107
+ #endif
108
+
109
+ #else
110
+ // 32-bit SWAR (SIMD Within A Register) popcount
111
+
112
+ // Binary: 0 1 0 1 ...
113
+ const uint32_t M1 = 0x55555555;
114
+ // Binary: 00 11 00 11. ..
115
+ const uint32_t M2 = 0x33333333;
116
+ // Binary: 0000 1111 0000 1111 ...
117
+ const uint32_t M4 = 0x0F0F0F0F;
118
+
119
+ // Put count of each 2 bits into those 2 bits
120
+ x = x - ((x >> 1) & M1);
121
+ // Put count of each 4 bits into those 4 bits
122
+ x = (x & M2) + ((x >> 2) & M2);
123
+ // Put count of each 8 bits into those 8 bits
124
+ x = (x + (x >> 4)) & M4;
125
+ // Sum of the 4 byte counts.
126
+ // Take care when considering changes to the next line. Portability and
127
+ // correctness are delicate here, thanks to C's "integer promotions" (C99
128
+ // §6.3.1.1p2). On machines where the `int` type has width greater than 32
129
+ // bits, `x` will be promoted to an `int`, and following C's "usual
130
+ // arithmetic conversions" (C99 §6.3.1.8), the multiplication will be
131
+ // performed as a multiplication of two `unsigned int` operands. In this
132
+ // case it's critical that we cast back to `uint32_t` in order to keep only
133
+ // the least significant 32 bits. On machines where the `int` type has
134
+ // width no greater than 32, the multiplication is of two 32-bit unsigned
135
+ // integer types, and the (uint32_t) cast is a no-op. In both cases, we
136
+ // avoid the risk of undefined behaviour due to overflow of a
137
+ // multiplication of signed integer types.
138
+ return (uint32_t)(x * 0x01010101U) >> 24;
139
+ #endif
140
+ }
141
+
142
+
143
+ // Return the index of the most significant 1 bit in 'x'. This is the smallest
144
+ // integer k such that x < 2**k. Equivalent to floor(log2(x)) + 1 for x != 0.
145
+ static inline int
146
+ _Py_bit_length(unsigned long x)
147
+ {
148
+ #if (defined(__clang__) || defined(__GNUC__))
149
+ if (x != 0) {
150
+ // __builtin_clzl() is available since GCC 3.4.
151
+ // Undefined behavior for x == 0.
152
+ return (int)sizeof(unsigned long) * 8 - __builtin_clzl(x);
153
+ }
154
+ else {
155
+ return 0;
156
+ }
157
+ #elif defined(_MSC_VER)
158
+ // _BitScanReverse() is documented to search 32 bits.
159
+ Py_BUILD_ASSERT(sizeof(unsigned long) <= 4);
160
+ unsigned long msb;
161
+ if (_BitScanReverse(&msb, x)) {
162
+ return (int)msb + 1;
163
+ }
164
+ else {
165
+ return 0;
166
+ }
167
+ #else
168
+ const int BIT_LENGTH_TABLE[32] = {
169
+ 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
170
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
171
+ };
172
+ int msb = 0;
173
+ while (x >= 32) {
174
+ msb += 6;
175
+ x >>= 6;
176
+ }
177
+ msb += BIT_LENGTH_TABLE[x];
178
+ return msb;
179
+ #endif
180
+ }
181
+
182
+
183
+ #ifdef __cplusplus
184
+ }
185
+ #endif
186
+ #endif /* !Py_INTERNAL_BITUTILS_H */