pytron-kit 0.3.12__py3-none-win_amd64.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.pyd +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.exe +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,107 @@
1
+ #ifndef Py_LIMITED_API
2
+ #ifndef Py_CONTEXT_H
3
+ #define Py_CONTEXT_H
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ PyAPI_DATA(PyTypeObject) PyContext_Type;
9
+ typedef struct _pycontextobject PyContext;
10
+
11
+ PyAPI_DATA(PyTypeObject) PyContextVar_Type;
12
+ typedef struct _pycontextvarobject PyContextVar;
13
+
14
+ PyAPI_DATA(PyTypeObject) PyContextToken_Type;
15
+ typedef struct _pycontexttokenobject PyContextToken;
16
+
17
+
18
+ #define PyContext_CheckExact(o) Py_IS_TYPE((o), &PyContext_Type)
19
+ #define PyContextVar_CheckExact(o) Py_IS_TYPE((o), &PyContextVar_Type)
20
+ #define PyContextToken_CheckExact(o) Py_IS_TYPE((o), &PyContextToken_Type)
21
+
22
+
23
+ PyAPI_FUNC(PyObject *) PyContext_New(void);
24
+ PyAPI_FUNC(PyObject *) PyContext_Copy(PyObject *);
25
+ PyAPI_FUNC(PyObject *) PyContext_CopyCurrent(void);
26
+
27
+ PyAPI_FUNC(int) PyContext_Enter(PyObject *);
28
+ PyAPI_FUNC(int) PyContext_Exit(PyObject *);
29
+
30
+ typedef enum {
31
+ /*
32
+ * The current context has switched to a different context. The object
33
+ * passed to the watch callback is the now-current contextvars.Context
34
+ * object, or None if no context is current.
35
+ */
36
+ Py_CONTEXT_SWITCHED = 1,
37
+ } PyContextEvent;
38
+
39
+ /*
40
+ * Context object watcher callback function. The object passed to the callback
41
+ * is event-specific; see PyContextEvent for details.
42
+ *
43
+ * if the callback returns with an exception set, it must return -1. Otherwise
44
+ * it should return 0
45
+ */
46
+ typedef int (*PyContext_WatchCallback)(PyContextEvent, PyObject *);
47
+
48
+ /*
49
+ * Register a per-interpreter callback that will be invoked for context object
50
+ * enter/exit events.
51
+ *
52
+ * Returns a handle that may be passed to PyContext_ClearWatcher on success,
53
+ * or -1 and sets and error if no more handles are available.
54
+ */
55
+ PyAPI_FUNC(int) PyContext_AddWatcher(PyContext_WatchCallback callback);
56
+
57
+ /*
58
+ * Clear the watcher associated with the watcher_id handle.
59
+ *
60
+ * Returns 0 on success or -1 if no watcher exists for the provided id.
61
+ */
62
+ PyAPI_FUNC(int) PyContext_ClearWatcher(int watcher_id);
63
+
64
+ /* Create a new context variable.
65
+
66
+ default_value can be NULL.
67
+ */
68
+ PyAPI_FUNC(PyObject *) PyContextVar_New(
69
+ const char *name, PyObject *default_value);
70
+
71
+
72
+ /* Get a value for the variable.
73
+
74
+ Returns -1 if an error occurred during lookup.
75
+
76
+ Returns 0 if value either was or was not found.
77
+
78
+ If value was found, *value will point to it.
79
+ If not, it will point to:
80
+
81
+ - default_value, if not NULL;
82
+ - the default value of "var", if not NULL;
83
+ - NULL.
84
+
85
+ '*value' will be a new ref, if not NULL.
86
+ */
87
+ PyAPI_FUNC(int) PyContextVar_Get(
88
+ PyObject *var, PyObject *default_value, PyObject **value);
89
+
90
+
91
+ /* Set a new value for the variable.
92
+ Returns NULL if an error occurs.
93
+ */
94
+ PyAPI_FUNC(PyObject *) PyContextVar_Set(PyObject *var, PyObject *value);
95
+
96
+
97
+ /* Reset a variable to its previous value.
98
+ Returns 0 on success, -1 on error.
99
+ */
100
+ PyAPI_FUNC(int) PyContextVar_Reset(PyObject *var, PyObject *token);
101
+
102
+
103
+ #ifdef __cplusplus
104
+ }
105
+ #endif
106
+ #endif /* !Py_CONTEXT_H */
107
+ #endif /* !Py_LIMITED_API */
@@ -0,0 +1,154 @@
1
+ #ifndef Py_CPYTHON_CRITICAL_SECTION_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ // Python critical sections
6
+ //
7
+ // Conceptually, critical sections are a deadlock avoidance layer on top of
8
+ // per-object locks. These helpers, in combination with those locks, replace
9
+ // our usage of the global interpreter lock to provide thread-safety for
10
+ // otherwise thread-unsafe objects, such as dict.
11
+ //
12
+ // NOTE: These APIs are no-ops in non-free-threaded builds.
13
+ //
14
+ // Straightforward per-object locking could introduce deadlocks that were not
15
+ // present when running with the GIL. Threads may hold locks for multiple
16
+ // objects simultaneously because Python operations can nest. If threads were
17
+ // to acquire the same locks in different orders, they would deadlock.
18
+ //
19
+ // One way to avoid deadlocks is to allow threads to hold only the lock (or
20
+ // locks) for a single operation at a time (typically a single lock, but some
21
+ // operations involve two locks). When a thread begins a nested operation it
22
+ // could suspend the locks for any outer operation: before beginning the nested
23
+ // operation, the locks for the outer operation are released and when the
24
+ // nested operation completes, the locks for the outer operation are
25
+ // reacquired.
26
+ //
27
+ // To improve performance, this API uses a variation of the above scheme.
28
+ // Instead of immediately suspending locks any time a nested operation begins,
29
+ // locks are only suspended if the thread would block. This reduces the number
30
+ // of lock acquisitions and releases for nested operations, while still
31
+ // avoiding deadlocks.
32
+ //
33
+ // Additionally, the locks for any active operation are suspended around
34
+ // other potentially blocking operations, such as I/O. This is because the
35
+ // interaction between locks and blocking operations can lead to deadlocks in
36
+ // the same way as the interaction between multiple locks.
37
+ //
38
+ // Each thread's critical sections and their corresponding locks are tracked in
39
+ // a stack in `PyThreadState.critical_section`. When a thread calls
40
+ // `_PyThreadState_Detach()`, such as before a blocking I/O operation or when
41
+ // waiting to acquire a lock, the thread suspends all of its active critical
42
+ // sections, temporarily releasing the associated locks. When the thread calls
43
+ // `_PyThreadState_Attach()`, it resumes the top-most (i.e., most recent)
44
+ // critical section by reacquiring the associated lock or locks. See
45
+ // `_PyCriticalSection_Resume()`.
46
+ //
47
+ // NOTE: Only the top-most critical section is guaranteed to be active.
48
+ // Operations that need to lock two objects at once must use
49
+ // `Py_BEGIN_CRITICAL_SECTION2()`. You *CANNOT* use nested critical sections
50
+ // to lock more than one object at once, because the inner critical section
51
+ // may suspend the outer critical sections. This API does not provide a way
52
+ // to lock more than two objects at once (though it could be added later
53
+ // if actually needed).
54
+ //
55
+ // NOTE: Critical sections implicitly behave like reentrant locks because
56
+ // attempting to acquire the same lock will suspend any outer (earlier)
57
+ // critical sections. However, they are less efficient for this use case than
58
+ // purposefully designed reentrant locks.
59
+ //
60
+ // Example usage:
61
+ // Py_BEGIN_CRITICAL_SECTION(op);
62
+ // ...
63
+ // Py_END_CRITICAL_SECTION();
64
+ //
65
+ // To lock two objects at once:
66
+ // Py_BEGIN_CRITICAL_SECTION2(op1, op2);
67
+ // ...
68
+ // Py_END_CRITICAL_SECTION2();
69
+
70
+ typedef struct PyCriticalSection PyCriticalSection;
71
+ typedef struct PyCriticalSection2 PyCriticalSection2;
72
+
73
+ PyAPI_FUNC(void)
74
+ PyCriticalSection_Begin(PyCriticalSection *c, PyObject *op);
75
+
76
+ PyAPI_FUNC(void)
77
+ PyCriticalSection_BeginMutex(PyCriticalSection *c, PyMutex *m);
78
+
79
+ PyAPI_FUNC(void)
80
+ PyCriticalSection_End(PyCriticalSection *c);
81
+
82
+ PyAPI_FUNC(void)
83
+ PyCriticalSection2_Begin(PyCriticalSection2 *c, PyObject *a, PyObject *b);
84
+
85
+ PyAPI_FUNC(void)
86
+ PyCriticalSection2_BeginMutex(PyCriticalSection2 *c, PyMutex *m1, PyMutex *m2);
87
+
88
+ PyAPI_FUNC(void)
89
+ PyCriticalSection2_End(PyCriticalSection2 *c);
90
+
91
+ #ifndef Py_GIL_DISABLED
92
+ # define Py_BEGIN_CRITICAL_SECTION(op) \
93
+ {
94
+ # define Py_BEGIN_CRITICAL_SECTION_MUTEX(mutex) \
95
+ {
96
+ # define Py_END_CRITICAL_SECTION() \
97
+ }
98
+ # define Py_BEGIN_CRITICAL_SECTION2(a, b) \
99
+ {
100
+ # define Py_BEGIN_CRITICAL_SECTION2_MUTEX(m1, m2) \
101
+ {
102
+ # define Py_END_CRITICAL_SECTION2() \
103
+ }
104
+ #else /* !Py_GIL_DISABLED */
105
+
106
+ // NOTE: the contents of this struct are private and may change betweeen
107
+ // Python releases without a deprecation period.
108
+ struct PyCriticalSection {
109
+ // Tagged pointer to an outer active critical section (or 0).
110
+ uintptr_t _cs_prev;
111
+
112
+ // Mutex used to protect critical section
113
+ PyMutex *_cs_mutex;
114
+ };
115
+
116
+ // A critical section protected by two mutexes. Use
117
+ // Py_BEGIN_CRITICAL_SECTION2 and Py_END_CRITICAL_SECTION2.
118
+ // NOTE: the contents of this struct are private and may change betweeen
119
+ // Python releases without a deprecation period.
120
+ struct PyCriticalSection2 {
121
+ PyCriticalSection _cs_base;
122
+
123
+ PyMutex *_cs_mutex2;
124
+ };
125
+
126
+ # define Py_BEGIN_CRITICAL_SECTION(op) \
127
+ { \
128
+ PyCriticalSection _py_cs; \
129
+ PyCriticalSection_Begin(&_py_cs, _PyObject_CAST(op))
130
+
131
+ # define Py_BEGIN_CRITICAL_SECTION_MUTEX(mutex) \
132
+ { \
133
+ PyCriticalSection _py_cs; \
134
+ PyCriticalSection_BeginMutex(&_py_cs, mutex)
135
+
136
+ # define Py_END_CRITICAL_SECTION() \
137
+ PyCriticalSection_End(&_py_cs); \
138
+ }
139
+
140
+ # define Py_BEGIN_CRITICAL_SECTION2(a, b) \
141
+ { \
142
+ PyCriticalSection2 _py_cs2; \
143
+ PyCriticalSection2_Begin(&_py_cs2, _PyObject_CAST(a), _PyObject_CAST(b))
144
+
145
+ # define Py_BEGIN_CRITICAL_SECTION2_MUTEX(m1, m2) \
146
+ { \
147
+ PyCriticalSection2 _py_cs2; \
148
+ PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)
149
+
150
+ # define Py_END_CRITICAL_SECTION2() \
151
+ PyCriticalSection2_End(&_py_cs2); \
152
+ }
153
+
154
+ #endif
@@ -0,0 +1,62 @@
1
+ #ifndef Py_CPYTHON_DESCROBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
6
+ void *wrapped);
7
+
8
+ typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
9
+ void *wrapped, PyObject *kwds);
10
+
11
+ struct wrapperbase {
12
+ const char *name;
13
+ int offset;
14
+ void *function;
15
+ wrapperfunc wrapper;
16
+ const char *doc;
17
+ int flags;
18
+ PyObject *name_strobj;
19
+ };
20
+
21
+ /* Flags for above struct */
22
+ #define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */
23
+
24
+ /* Various kinds of descriptor objects */
25
+
26
+ typedef struct {
27
+ PyObject_HEAD
28
+ PyTypeObject *d_type;
29
+ PyObject *d_name;
30
+ PyObject *d_qualname;
31
+ } PyDescrObject;
32
+
33
+ #define PyDescr_COMMON PyDescrObject d_common
34
+
35
+ #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
36
+ #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
37
+
38
+ typedef struct {
39
+ PyDescr_COMMON;
40
+ PyMethodDef *d_method;
41
+ vectorcallfunc vectorcall;
42
+ } PyMethodDescrObject;
43
+
44
+ typedef struct {
45
+ PyDescr_COMMON;
46
+ PyMemberDef *d_member;
47
+ } PyMemberDescrObject;
48
+
49
+ typedef struct {
50
+ PyDescr_COMMON;
51
+ PyGetSetDef *d_getset;
52
+ } PyGetSetDescrObject;
53
+
54
+ typedef struct {
55
+ PyDescr_COMMON;
56
+ struct wrapperbase *d_base;
57
+ void *d_wrapped; /* This can be any function pointer */
58
+ } PyWrapperDescrObject;
59
+
60
+ PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
61
+ struct wrapperbase *, void *);
62
+ PyAPI_FUNC(int) PyDescr_IsData(PyObject *);
@@ -0,0 +1,105 @@
1
+ #ifndef Py_CPYTHON_DICTOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ typedef struct _dictkeysobject PyDictKeysObject;
6
+ typedef struct _dictvalues PyDictValues;
7
+
8
+ /* The ma_values pointer is NULL for a combined table
9
+ * or points to an array of PyObject* for a split table
10
+ */
11
+ typedef struct {
12
+ PyObject_HEAD
13
+
14
+ /* Number of items in the dictionary */
15
+ Py_ssize_t ma_used;
16
+
17
+ /* This is a private field for CPython's internal use.
18
+ * Bits 0-7 are for dict watchers.
19
+ * Bits 8-11 are for the watched mutation counter (used by tier2 optimization)
20
+ * Bits 12-31 are currently unused
21
+ * Bits 32-63 are a unique id in the free threading build (used for per-thread refcounting)
22
+ */
23
+ uint64_t _ma_watcher_tag;
24
+
25
+ PyDictKeysObject *ma_keys;
26
+
27
+ /* If ma_values is NULL, the table is "combined": keys and values
28
+ are stored in ma_keys.
29
+
30
+ If ma_values is not NULL, the table is split:
31
+ keys are stored in ma_keys and values are stored in ma_values */
32
+ PyDictValues *ma_values;
33
+ } PyDictObject;
34
+
35
+ PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
36
+ Py_hash_t hash);
37
+ // PyDict_GetItemStringRef() can be used instead
38
+ Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *);
39
+ PyAPI_FUNC(PyObject *) PyDict_SetDefault(
40
+ PyObject *mp, PyObject *key, PyObject *defaultobj);
41
+
42
+ // Inserts `key` with a value `default_value`, if `key` is not already present
43
+ // in the dictionary. If `result` is not NULL, then the value associated
44
+ // with `key` is returned in `*result` (either the existing value, or the now
45
+ // inserted `default_value`).
46
+ // Returns:
47
+ // -1 on error
48
+ // 0 if `key` was not present and `default_value` was inserted
49
+ // 1 if `key` was present and `default_value` was not inserted
50
+ PyAPI_FUNC(int) PyDict_SetDefaultRef(PyObject *mp, PyObject *key, PyObject *default_value, PyObject **result);
51
+
52
+ /* Get the number of items of a dictionary. */
53
+ static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
+ PyDictObject *mp;
55
+ assert(PyDict_Check(op));
56
+ mp = _Py_CAST(PyDictObject*, op);
57
+ #ifdef Py_GIL_DISABLED
58
+ return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
+ #else
60
+ return mp->ma_used;
61
+ #endif
62
+ }
63
+ #define PyDict_GET_SIZE(op) PyDict_GET_SIZE(_PyObject_CAST(op))
64
+
65
+ PyAPI_FUNC(int) PyDict_ContainsString(PyObject *mp, const char *key);
66
+
67
+ PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
68
+
69
+ PyAPI_FUNC(int) PyDict_Pop(PyObject *dict, PyObject *key, PyObject **result);
70
+ PyAPI_FUNC(int) PyDict_PopString(PyObject *dict, const char *key, PyObject **result);
71
+
72
+ // Use PyDict_Pop() instead
73
+ Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_Pop(
74
+ PyObject *dict,
75
+ PyObject *key,
76
+ PyObject *default_value);
77
+
78
+ /* Dictionary watchers */
79
+
80
+ #define PY_FOREACH_DICT_EVENT(V) \
81
+ V(ADDED) \
82
+ V(MODIFIED) \
83
+ V(DELETED) \
84
+ V(CLONED) \
85
+ V(CLEARED) \
86
+ V(DEALLOCATED)
87
+
88
+ typedef enum {
89
+ #define PY_DEF_EVENT(EVENT) PyDict_EVENT_##EVENT,
90
+ PY_FOREACH_DICT_EVENT(PY_DEF_EVENT)
91
+ #undef PY_DEF_EVENT
92
+ } PyDict_WatchEvent;
93
+
94
+ // Callback to be invoked when a watched dict is cleared, dealloced, or modified.
95
+ // In clear/dealloc case, key and new_value will be NULL. Otherwise, new_value will be the
96
+ // new value for key, NULL if key is being deleted.
97
+ typedef int(*PyDict_WatchCallback)(PyDict_WatchEvent event, PyObject* dict, PyObject* key, PyObject* new_value);
98
+
99
+ // Register/unregister a dict-watcher callback
100
+ PyAPI_FUNC(int) PyDict_AddWatcher(PyDict_WatchCallback callback);
101
+ PyAPI_FUNC(int) PyDict_ClearWatcher(int watcher_id);
102
+
103
+ // Mark given dictionary as "watched" (callback will be called if it is modified)
104
+ PyAPI_FUNC(int) PyDict_Watch(int watcher_id, PyObject* dict);
105
+ PyAPI_FUNC(int) PyDict_Unwatch(int watcher_id, PyObject* dict);
@@ -0,0 +1,16 @@
1
+ #ifndef Py_CPYTHON_FILEOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
6
+
7
+ /* The std printer acts as a preliminary sys.stderr until the new io
8
+ infrastructure is in place. */
9
+ PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
10
+ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
11
+
12
+ typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *);
13
+
14
+ PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
15
+ PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
16
+ PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
@@ -0,0 +1,16 @@
1
+ #ifndef Py_CPYTHON_FILEUTILS_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ PyAPI_FUNC(FILE*) Py_fopen(
6
+ PyObject *path,
7
+ const char *mode);
8
+
9
+ // Deprecated alias kept for backward compatibility
10
+ Py_DEPRECATED(3.14) static inline FILE*
11
+ _Py_fopen_obj(PyObject *path, const char *mode)
12
+ {
13
+ return Py_fopen(path, mode);
14
+ }
15
+
16
+ PyAPI_FUNC(int) Py_fclose(FILE *file);
@@ -0,0 +1,27 @@
1
+ #ifndef Py_CPYTHON_FLOATOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ typedef struct {
6
+ PyObject_HEAD
7
+ double ob_fval;
8
+ } PyFloatObject;
9
+
10
+ #define _PyFloat_CAST(op) \
11
+ (assert(PyFloat_Check(op)), _Py_CAST(PyFloatObject*, op))
12
+
13
+ // Static inline version of PyFloat_AsDouble() trading safety for speed.
14
+ // It doesn't check if op is a double object.
15
+ static inline double PyFloat_AS_DOUBLE(PyObject *op) {
16
+ return _PyFloat_CAST(op)->ob_fval;
17
+ }
18
+ #define PyFloat_AS_DOUBLE(op) PyFloat_AS_DOUBLE(_PyObject_CAST(op))
19
+
20
+
21
+ PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le);
22
+ PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le);
23
+ PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le);
24
+
25
+ PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le);
26
+ PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le);
27
+ PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le);
@@ -0,0 +1,35 @@
1
+ /* Frame object interface */
2
+
3
+ #ifndef Py_CPYTHON_FRAMEOBJECT_H
4
+ # error "this header file must not be included directly"
5
+ #endif
6
+
7
+ /* Standard object interface */
8
+
9
+ PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
10
+ PyObject *, PyObject *);
11
+
12
+ /* The rest of the interface is specific for frame objects */
13
+
14
+ /* Conversions between "fast locals" and locals in dictionary */
15
+
16
+ PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);
17
+
18
+ /* -- Caveat emptor --
19
+ * The concept of entry frames is an implementation detail of the CPython
20
+ * interpreter. This API is considered unstable and is provided for the
21
+ * convenience of debuggers, profilers and state-inspecting tools. Notice that
22
+ * this API can be changed in future minor versions if the underlying frame
23
+ * mechanism change or the concept of an 'entry frame' or its semantics becomes
24
+ * obsolete or outdated. */
25
+
26
+ PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame);
27
+
28
+ PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
29
+ PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
30
+
31
+
32
+ typedef struct {
33
+ PyObject_HEAD
34
+ PyFrameObject* frame;
35
+ } PyFrameLocalsProxyObject;