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,100 @@
1
+ #ifndef Py_INTERNAL_FAULTHANDLER_H
2
+ #define Py_INTERNAL_FAULTHANDLER_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
+ #ifdef HAVE_SIGACTION
12
+ # include <signal.h> // sigaction
13
+ #endif
14
+
15
+
16
+ #ifndef MS_WINDOWS
17
+ /* register() is useless on Windows, because only SIGSEGV, SIGABRT and
18
+ SIGILL can be handled by the process, and these signals can only be used
19
+ with enable(), not using register() */
20
+ # define FAULTHANDLER_USER
21
+ #endif
22
+
23
+
24
+ #ifdef HAVE_SIGACTION
25
+ /* Using an alternative stack requires sigaltstack()
26
+ and sigaction() SA_ONSTACK */
27
+ # ifdef HAVE_SIGALTSTACK
28
+ # define FAULTHANDLER_USE_ALT_STACK
29
+ # endif
30
+ typedef struct sigaction _Py_sighandler_t;
31
+ #else
32
+ typedef PyOS_sighandler_t _Py_sighandler_t;
33
+ #endif // HAVE_SIGACTION
34
+
35
+
36
+ #ifdef FAULTHANDLER_USER
37
+ struct faulthandler_user_signal {
38
+ int enabled;
39
+ PyObject *file;
40
+ int fd;
41
+ int all_threads;
42
+ int chain;
43
+ _Py_sighandler_t previous;
44
+ PyInterpreterState *interp;
45
+ };
46
+ #endif /* FAULTHANDLER_USER */
47
+
48
+
49
+ struct _faulthandler_runtime_state {
50
+ struct {
51
+ int enabled;
52
+ PyObject *file;
53
+ int fd;
54
+ int all_threads;
55
+ PyInterpreterState *interp;
56
+ #ifdef MS_WINDOWS
57
+ void *exc_handler;
58
+ #endif
59
+ int c_stack;
60
+ } fatal_error;
61
+
62
+ struct {
63
+ PyObject *file;
64
+ int fd;
65
+ PY_TIMEOUT_T timeout_us; /* timeout in microseconds */
66
+ int repeat;
67
+ PyInterpreterState *interp;
68
+ int exit;
69
+ char *header;
70
+ size_t header_len;
71
+ /* The main thread always holds this lock. It is only released when
72
+ faulthandler_thread() is interrupted before this thread exits, or at
73
+ Python exit. */
74
+ PyThread_type_lock cancel_event;
75
+ /* released by child thread when joined */
76
+ PyThread_type_lock running;
77
+ } thread;
78
+
79
+ #ifdef FAULTHANDLER_USER
80
+ struct faulthandler_user_signal *user_signals;
81
+ #endif
82
+
83
+ #ifdef FAULTHANDLER_USE_ALT_STACK
84
+ stack_t stack;
85
+ stack_t old_stack;
86
+ #endif
87
+ };
88
+
89
+ #define _faulthandler_runtime_state_INIT \
90
+ { \
91
+ .fatal_error = { \
92
+ .fd = -1, \
93
+ }, \
94
+ }
95
+
96
+
97
+ #ifdef __cplusplus
98
+ }
99
+ #endif
100
+ #endif /* !Py_INTERNAL_FAULTHANDLER_H */
@@ -0,0 +1,320 @@
1
+ #ifndef Py_INTERNAL_FILEUTILS_H
2
+ #define Py_INTERNAL_FILEUTILS_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
+ #include <locale.h> // struct lconv
12
+ #include "pycore_interp_structs.h" // _Py_error_handler
13
+
14
+
15
+ /* A routine to check if a file descriptor can be select()-ed. */
16
+ #ifdef _MSC_VER
17
+ /* On Windows, any socket fd can be select()-ed, no matter how high */
18
+ #define _PyIsSelectable_fd(FD) (1)
19
+ #else
20
+ #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
21
+ #endif
22
+
23
+ // Export for '_testinternalcapi' shared extension
24
+ PyAPI_FUNC(_Py_error_handler) _Py_GetErrorHandler(const char *errors);
25
+
26
+ // Export for '_testinternalcapi' shared extension
27
+ PyAPI_FUNC(int) _Py_DecodeLocaleEx(
28
+ const char *arg,
29
+ wchar_t **wstr,
30
+ size_t *wlen,
31
+ const char **reason,
32
+ int current_locale,
33
+ _Py_error_handler errors);
34
+
35
+ // Export for '_testinternalcapi' shared extension
36
+ PyAPI_FUNC(int) _Py_EncodeLocaleEx(
37
+ const wchar_t *text,
38
+ char **str,
39
+ size_t *error_pos,
40
+ const char **reason,
41
+ int current_locale,
42
+ _Py_error_handler errors);
43
+
44
+ extern char* _Py_EncodeLocaleRaw(
45
+ const wchar_t *text,
46
+ size_t *error_pos);
47
+
48
+ extern PyObject* _Py_device_encoding(int);
49
+
50
+ #if defined(MS_WINDOWS) || defined(__APPLE__)
51
+ /* On Windows, the count parameter of read() is an int (bpo-9015, bpo-9611).
52
+ On macOS 10.13, read() and write() with more than INT_MAX bytes
53
+ fail with EINVAL (bpo-24658). */
54
+ # define _PY_READ_MAX INT_MAX
55
+ # define _PY_WRITE_MAX INT_MAX
56
+ #else
57
+ /* write() should truncate the input to PY_SSIZE_T_MAX bytes,
58
+ but it's safer to do it ourself to have a portable behaviour */
59
+ # define _PY_READ_MAX PY_SSIZE_T_MAX
60
+ # define _PY_WRITE_MAX PY_SSIZE_T_MAX
61
+ #endif
62
+
63
+ #ifdef MS_WINDOWS
64
+ struct _Py_stat_struct {
65
+ uint64_t st_dev;
66
+ uint64_t st_ino;
67
+ unsigned short st_mode;
68
+ int st_nlink;
69
+ int st_uid;
70
+ int st_gid;
71
+ unsigned long st_rdev;
72
+ __int64 st_size;
73
+ time_t st_atime;
74
+ int st_atime_nsec;
75
+ time_t st_mtime;
76
+ int st_mtime_nsec;
77
+ time_t st_ctime;
78
+ int st_ctime_nsec;
79
+ time_t st_birthtime;
80
+ int st_birthtime_nsec;
81
+ unsigned long st_file_attributes;
82
+ unsigned long st_reparse_tag;
83
+ uint64_t st_ino_high;
84
+ };
85
+ #else
86
+ # define _Py_stat_struct stat
87
+ #endif
88
+
89
+ // Export for 'mmap' shared extension
90
+ PyAPI_FUNC(int) _Py_fstat(
91
+ int fd,
92
+ struct _Py_stat_struct *status);
93
+
94
+ // Export for 'mmap' shared extension
95
+ PyAPI_FUNC(int) _Py_fstat_noraise(
96
+ int fd,
97
+ struct _Py_stat_struct *status);
98
+
99
+ // Export for '_tkinter' shared extension
100
+ PyAPI_FUNC(int) _Py_stat(
101
+ PyObject *path,
102
+ struct stat *status);
103
+
104
+ // Export for 'select' shared extension (Solaris newDevPollObject())
105
+ PyAPI_FUNC(int) _Py_open(
106
+ const char *pathname,
107
+ int flags);
108
+
109
+ // Export for '_posixsubprocess' shared extension
110
+ PyAPI_FUNC(int) _Py_open_noraise(
111
+ const char *pathname,
112
+ int flags);
113
+
114
+ extern FILE* _Py_wfopen(
115
+ const wchar_t *path,
116
+ const wchar_t *mode);
117
+
118
+ extern Py_ssize_t _Py_read(
119
+ int fd,
120
+ void *buf,
121
+ size_t count);
122
+
123
+ // Export for 'select' shared extension (Solaris devpoll_flush())
124
+ PyAPI_FUNC(Py_ssize_t) _Py_write(
125
+ int fd,
126
+ const void *buf,
127
+ size_t count);
128
+
129
+ // Export for '_posixsubprocess' shared extension
130
+ PyAPI_FUNC(Py_ssize_t) _Py_write_noraise(
131
+ int fd,
132
+ const void *buf,
133
+ size_t count);
134
+
135
+ #ifdef HAVE_READLINK
136
+ extern int _Py_wreadlink(
137
+ const wchar_t *path,
138
+ wchar_t *buf,
139
+ /* Number of characters of 'buf' buffer
140
+ including the trailing NUL character */
141
+ size_t buflen);
142
+ #endif
143
+
144
+ #ifdef HAVE_REALPATH
145
+ extern wchar_t* _Py_wrealpath(
146
+ const wchar_t *path,
147
+ wchar_t *resolved_path,
148
+ /* Number of characters of 'resolved_path' buffer
149
+ including the trailing NUL character */
150
+ size_t resolved_path_len);
151
+ #endif
152
+
153
+ extern wchar_t* _Py_wgetcwd(
154
+ wchar_t *buf,
155
+ /* Number of characters of 'buf' buffer
156
+ including the trailing NUL character */
157
+ size_t buflen);
158
+
159
+ extern int _Py_get_inheritable(int fd);
160
+
161
+ // Export for '_socket' shared extension
162
+ PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
163
+ int *atomic_flag_works);
164
+
165
+ // Export for '_posixsubprocess' shared extension
166
+ PyAPI_FUNC(int) _Py_set_inheritable_async_safe(int fd, int inheritable,
167
+ int *atomic_flag_works);
168
+
169
+ // Export for '_socket' shared extension
170
+ PyAPI_FUNC(int) _Py_dup(int fd);
171
+
172
+ extern int _Py_get_blocking(int fd);
173
+
174
+ extern int _Py_set_blocking(int fd, int blocking);
175
+
176
+ #ifdef MS_WINDOWS
177
+ extern void* _Py_get_osfhandle_noraise(int fd);
178
+
179
+ // Export for '_testconsole' shared extension
180
+ PyAPI_FUNC(void*) _Py_get_osfhandle(int fd);
181
+
182
+ extern int _Py_open_osfhandle_noraise(void *handle, int flags);
183
+
184
+ extern int _Py_open_osfhandle(void *handle, int flags);
185
+ #endif /* MS_WINDOWS */
186
+
187
+ // This is used after getting NULL back from Py_DecodeLocale().
188
+ #define DECODE_LOCALE_ERR(NAME, LEN) \
189
+ ((LEN) == (size_t)-2) \
190
+ ? _PyStatus_ERR("cannot decode " NAME) \
191
+ : _PyStatus_NO_MEMORY()
192
+
193
+ extern int _Py_HasFileSystemDefaultEncodeErrors;
194
+
195
+ extern int _Py_DecodeUTF8Ex(
196
+ const char *arg,
197
+ Py_ssize_t arglen,
198
+ wchar_t **wstr,
199
+ size_t *wlen,
200
+ const char **reason,
201
+ _Py_error_handler errors);
202
+
203
+ extern int _Py_EncodeUTF8Ex(
204
+ const wchar_t *text,
205
+ char **str,
206
+ size_t *error_pos,
207
+ const char **reason,
208
+ int raw_malloc,
209
+ _Py_error_handler errors);
210
+
211
+ extern wchar_t* _Py_DecodeUTF8_surrogateescape(
212
+ const char *arg,
213
+ Py_ssize_t arglen,
214
+ size_t *wlen);
215
+
216
+ extern int
217
+ _Py_wstat(const wchar_t *, struct stat *);
218
+
219
+ extern int _Py_GetForceASCII(void);
220
+
221
+ /* Reset "force ASCII" mode (if it was initialized).
222
+
223
+ This function should be called when Python changes the LC_CTYPE locale,
224
+ so the "force ASCII" mode can be detected again on the new locale
225
+ encoding. */
226
+ extern void _Py_ResetForceASCII(void);
227
+
228
+
229
+ extern int _Py_GetLocaleconvNumeric(
230
+ struct lconv *lc,
231
+ PyObject **decimal_point,
232
+ PyObject **thousands_sep);
233
+
234
+ // Export for '_posixsubprocess' (on macOS)
235
+ PyAPI_FUNC(void) _Py_closerange(int first, int last);
236
+
237
+ extern wchar_t* _Py_GetLocaleEncoding(void);
238
+ extern PyObject* _Py_GetLocaleEncodingObject(void);
239
+
240
+ #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION
241
+ extern int _Py_LocaleUsesNonUnicodeWchar(void);
242
+
243
+ extern wchar_t* _Py_DecodeNonUnicodeWchar(
244
+ const wchar_t* native,
245
+ Py_ssize_t size);
246
+
247
+ extern int _Py_EncodeNonUnicodeWchar_InPlace(
248
+ wchar_t* unicode,
249
+ Py_ssize_t size);
250
+ #endif
251
+
252
+ extern int _Py_isabs(const wchar_t *path);
253
+ extern int _Py_abspath(const wchar_t *path, wchar_t **abspath_p);
254
+ #ifdef MS_WINDOWS
255
+ extern int _PyOS_getfullpathname(const wchar_t *path, wchar_t **abspath_p);
256
+ #endif
257
+ extern wchar_t* _Py_join_relfile(const wchar_t *dirname,
258
+ const wchar_t *relfile);
259
+ extern int _Py_add_relfile(wchar_t *dirname,
260
+ const wchar_t *relfile,
261
+ size_t bufsize);
262
+ extern size_t _Py_find_basename(const wchar_t *filename);
263
+
264
+ // Export for '_testinternalcapi' shared extension
265
+ PyAPI_FUNC(wchar_t*) _Py_normpath(wchar_t *path, Py_ssize_t size);
266
+
267
+ extern wchar_t *_Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *length);
268
+
269
+ // The Windows Games API family does not provide these functions
270
+ // so provide our own implementations. Remove them in case they get added
271
+ // to the Games API family
272
+ #if defined(MS_WINDOWS_GAMES) && !defined(MS_WINDOWS_DESKTOP)
273
+ #include <winerror.h> // HRESULT
274
+
275
+ extern HRESULT PathCchSkipRoot(const wchar_t *pszPath, const wchar_t **ppszRootEnd);
276
+ #endif /* defined(MS_WINDOWS_GAMES) && !defined(MS_WINDOWS_DESKTOP) */
277
+
278
+ extern void _Py_skiproot(const wchar_t *path, Py_ssize_t size, Py_ssize_t *drvsize, Py_ssize_t *rootsize);
279
+
280
+ // Macros to protect CRT calls against instant termination when passed an
281
+ // invalid parameter (bpo-23524). IPH stands for Invalid Parameter Handler.
282
+ // Usage:
283
+ //
284
+ // _Py_BEGIN_SUPPRESS_IPH
285
+ // ...
286
+ // _Py_END_SUPPRESS_IPH
287
+ #if defined _MSC_VER && _MSC_VER >= 1900
288
+
289
+ # include <stdlib.h> // _set_thread_local_invalid_parameter_handler()
290
+
291
+ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
292
+ # define _Py_BEGIN_SUPPRESS_IPH \
293
+ { _invalid_parameter_handler _Py_old_handler = \
294
+ _set_thread_local_invalid_parameter_handler(_Py_silent_invalid_parameter_handler);
295
+ # define _Py_END_SUPPRESS_IPH \
296
+ _set_thread_local_invalid_parameter_handler(_Py_old_handler); }
297
+ #else
298
+ # define _Py_BEGIN_SUPPRESS_IPH
299
+ # define _Py_END_SUPPRESS_IPH
300
+ #endif /* _MSC_VER >= 1900 */
301
+
302
+ // Export for 'select' shared extension (Argument Clinic code)
303
+ PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *);
304
+
305
+ // Export for test_peg_generator
306
+ PyAPI_FUNC(char*) _Py_UniversalNewlineFgetsWithSize(char *, int, FILE*, PyObject *, size_t*);
307
+
308
+ extern int _PyFile_Flush(PyObject *);
309
+
310
+ #ifndef MS_WINDOWS
311
+ extern int _Py_GetTicksPerSecond(long *ticks_per_second);
312
+ #endif
313
+
314
+ // Export for '_testcapi' shared extension
315
+ PyAPI_FUNC(int) _Py_IsValidFD(int fd);
316
+
317
+ #ifdef __cplusplus
318
+ }
319
+ #endif
320
+ #endif /* !Py_INTERNAL_FILEUTILS_H */
@@ -0,0 +1,98 @@
1
+ #ifndef Py_INTERNAL_FILEUTILS_WINDOWS_H
2
+ #define Py_INTERNAL_FILEUTILS_WINDOWS_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
+ #ifdef MS_WINDOWS
12
+
13
+ #if !defined(NTDDI_WIN10_NI) || !(NTDDI_VERSION >= NTDDI_WIN10_NI)
14
+ typedef struct _FILE_STAT_BASIC_INFORMATION {
15
+ LARGE_INTEGER FileId;
16
+ LARGE_INTEGER CreationTime;
17
+ LARGE_INTEGER LastAccessTime;
18
+ LARGE_INTEGER LastWriteTime;
19
+ LARGE_INTEGER ChangeTime;
20
+ LARGE_INTEGER AllocationSize;
21
+ LARGE_INTEGER EndOfFile;
22
+ ULONG FileAttributes;
23
+ ULONG ReparseTag;
24
+ ULONG NumberOfLinks;
25
+ ULONG DeviceType;
26
+ ULONG DeviceCharacteristics;
27
+ ULONG Reserved;
28
+ LARGE_INTEGER VolumeSerialNumber;
29
+ FILE_ID_128 FileId128;
30
+ } FILE_STAT_BASIC_INFORMATION;
31
+
32
+ typedef enum _FILE_INFO_BY_NAME_CLASS {
33
+ FileStatByNameInfo,
34
+ FileStatLxByNameInfo,
35
+ FileCaseSensitiveByNameInfo,
36
+ FileStatBasicByNameInfo,
37
+ MaximumFileInfoByNameClass
38
+ } FILE_INFO_BY_NAME_CLASS;
39
+ #endif
40
+
41
+ typedef BOOL (WINAPI *PGetFileInformationByName)(
42
+ PCWSTR FileName,
43
+ FILE_INFO_BY_NAME_CLASS FileInformationClass,
44
+ PVOID FileInfoBuffer,
45
+ ULONG FileInfoBufferSize
46
+ );
47
+
48
+ static inline BOOL _Py_GetFileInformationByName(
49
+ PCWSTR FileName,
50
+ FILE_INFO_BY_NAME_CLASS FileInformationClass,
51
+ PVOID FileInfoBuffer,
52
+ ULONG FileInfoBufferSize
53
+ ) {
54
+ static PGetFileInformationByName GetFileInformationByName = NULL;
55
+ static int GetFileInformationByName_init = -1;
56
+
57
+ if (GetFileInformationByName_init < 0) {
58
+ HMODULE hMod = LoadLibraryW(L"api-ms-win-core-file-l2-1-4");
59
+ GetFileInformationByName_init = 0;
60
+ if (hMod) {
61
+ GetFileInformationByName = (PGetFileInformationByName)GetProcAddress(
62
+ hMod, "GetFileInformationByName");
63
+ if (GetFileInformationByName) {
64
+ GetFileInformationByName_init = 1;
65
+ } else {
66
+ FreeLibrary(hMod);
67
+ }
68
+ }
69
+ }
70
+
71
+ if (GetFileInformationByName_init <= 0) {
72
+ SetLastError(ERROR_NOT_SUPPORTED);
73
+ return FALSE;
74
+ }
75
+ return GetFileInformationByName(FileName, FileInformationClass, FileInfoBuffer, FileInfoBufferSize);
76
+ }
77
+
78
+ static inline BOOL _Py_GetFileInformationByName_ErrorIsTrustworthy(int error)
79
+ {
80
+ switch(error) {
81
+ case ERROR_FILE_NOT_FOUND:
82
+ case ERROR_PATH_NOT_FOUND:
83
+ case ERROR_NOT_READY:
84
+ case ERROR_BAD_NET_NAME:
85
+ case ERROR_BAD_NETPATH:
86
+ case ERROR_BAD_PATHNAME:
87
+ case ERROR_INVALID_NAME:
88
+ case ERROR_FILENAME_EXCED_RANGE:
89
+ return TRUE;
90
+ case ERROR_NOT_SUPPORTED:
91
+ return FALSE;
92
+ }
93
+ return FALSE;
94
+ }
95
+
96
+ #endif
97
+
98
+ #endif
@@ -0,0 +1,49 @@
1
+ #ifndef Py_INTERNAL_FLOATOBJECT_H
2
+ #define Py_INTERNAL_FLOATOBJECT_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
+ #include "pycore_unicodeobject.h" // _PyUnicodeWriter
12
+
13
+ /* runtime lifecycle */
14
+
15
+ extern void _PyFloat_InitState(PyInterpreterState *);
16
+ extern PyStatus _PyFloat_InitTypes(PyInterpreterState *);
17
+ extern void _PyFloat_FiniType(PyInterpreterState *);
18
+
19
+
20
+
21
+
22
+ PyAPI_FUNC(void) _PyFloat_ExactDealloc(PyObject *op);
23
+
24
+
25
+ extern void _PyFloat_DebugMallocStats(FILE* out);
26
+
27
+
28
+ /* Format the object based on the format_spec, as defined in PEP 3101
29
+ (Advanced String Formatting). */
30
+ extern int _PyFloat_FormatAdvancedWriter(
31
+ _PyUnicodeWriter *writer,
32
+ PyObject *obj,
33
+ PyObject *format_spec,
34
+ Py_ssize_t start,
35
+ Py_ssize_t end);
36
+
37
+ extern PyObject* _Py_string_to_number_with_underscores(
38
+ const char *str, Py_ssize_t len, const char *what, PyObject *obj, void *arg,
39
+ PyObject *(*innerfunc)(const char *, Py_ssize_t, void *));
40
+
41
+ extern double _Py_parse_inf_or_nan(const char *p, char **endptr);
42
+
43
+ extern int _Py_convert_int_to_double(PyObject **v, double *dbl);
44
+
45
+
46
+ #ifdef __cplusplus
47
+ }
48
+ #endif
49
+ #endif /* !Py_INTERNAL_FLOATOBJECT_H */
@@ -0,0 +1,47 @@
1
+ #ifndef Py_INTERNAL_CFG_H
2
+ #define Py_INTERNAL_CFG_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
+ #include "pycore_compile.h"
12
+ #include "pycore_instruction_sequence.h"
13
+ #include "pycore_opcode_utils.h"
14
+
15
+ struct _PyCfgBuilder;
16
+
17
+ int _PyCfgBuilder_UseLabel(struct _PyCfgBuilder *g, _PyJumpTargetLabel lbl);
18
+ int _PyCfgBuilder_Addop(struct _PyCfgBuilder *g, int opcode, int oparg, _Py_SourceLocation loc);
19
+
20
+ struct _PyCfgBuilder* _PyCfgBuilder_New(void);
21
+ void _PyCfgBuilder_Free(struct _PyCfgBuilder *g);
22
+ int _PyCfgBuilder_CheckSize(struct _PyCfgBuilder* g);
23
+
24
+ int _PyCfg_OptimizeCodeUnit(struct _PyCfgBuilder *g, PyObject *consts, PyObject *const_cache,
25
+ int nlocals, int nparams, int firstlineno);
26
+
27
+ struct _PyCfgBuilder* _PyCfg_FromInstructionSequence(_PyInstructionSequence *seq);
28
+ int _PyCfg_ToInstructionSequence(struct _PyCfgBuilder *g, _PyInstructionSequence *seq);
29
+ int _PyCfg_OptimizedCfgToInstructionSequence(struct _PyCfgBuilder *g, _PyCompile_CodeUnitMetadata *umd,
30
+ int code_flags, int *stackdepth, int *nlocalsplus,
31
+ _PyInstructionSequence *seq);
32
+
33
+ PyCodeObject *
34
+ _PyAssemble_MakeCodeObject(_PyCompile_CodeUnitMetadata *u, PyObject *const_cache,
35
+ PyObject *consts, int maxdepth, _PyInstructionSequence *instrs,
36
+ int nlocalsplus, int code_flags, PyObject *filename);
37
+
38
+ // Export for '_testinternalcapi' shared extension
39
+ PyAPI_FUNC(PyObject*) _PyCompile_OptimizeCfg(
40
+ PyObject *instructions,
41
+ PyObject *consts,
42
+ int nlocals);
43
+
44
+ #ifdef __cplusplus
45
+ }
46
+ #endif
47
+ #endif /* !Py_INTERNAL_CFG_H */
@@ -0,0 +1,27 @@
1
+ #ifndef Py_INTERNAL_FORMAT_H
2
+ #define Py_INTERNAL_FORMAT_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
+ /* Format codes
12
+ * F_LJUST '-'
13
+ * F_SIGN '+'
14
+ * F_BLANK ' '
15
+ * F_ALT '#'
16
+ * F_ZERO '0'
17
+ */
18
+ #define F_LJUST (1<<0)
19
+ #define F_SIGN (1<<1)
20
+ #define F_BLANK (1<<2)
21
+ #define F_ALT (1<<3)
22
+ #define F_ZERO (1<<4)
23
+
24
+ #ifdef __cplusplus
25
+ }
26
+ #endif
27
+ #endif /* !Py_INTERNAL_FORMAT_H */
@@ -0,0 +1,61 @@
1
+ /* See InternalDocs/frames.md for an explanation of the frame stack
2
+ * including explanation of the PyFrameObject and _PyInterpreterFrame
3
+ * structs. */
4
+
5
+ #ifndef Py_INTERNAL_FRAME_H
6
+ #define Py_INTERNAL_FRAME_H
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+
11
+ #ifndef Py_BUILD_CORE
12
+ # error "this header requires Py_BUILD_CORE define"
13
+ #endif
14
+
15
+ #include "pycore_typedefs.h" // _PyInterpreterFrame
16
+
17
+
18
+ struct _frame {
19
+ PyObject_HEAD
20
+ PyFrameObject *f_back; /* previous frame, or NULL */
21
+ _PyInterpreterFrame *f_frame; /* points to the frame data */
22
+ PyObject *f_trace; /* Trace function */
23
+ int f_lineno; /* Current line number. Only valid if non-zero */
24
+ char f_trace_lines; /* Emit per-line trace events? */
25
+ char f_trace_opcodes; /* Emit per-opcode trace events? */
26
+ PyObject *f_extra_locals; /* Dict for locals set by users using f_locals, could be NULL */
27
+ /* This is purely for backwards compatibility for PyEval_GetLocals.
28
+ PyEval_GetLocals requires a borrowed reference so the actual reference
29
+ is stored here */
30
+ PyObject *f_locals_cache;
31
+ /* A tuple containing strong references to fast locals that were overwritten
32
+ * via f_locals. Borrowed references to these locals may exist in frames
33
+ * closer to the top of the stack. The references in this tuple act as
34
+ * "support" for the borrowed references, ensuring that they remain valid.
35
+ */
36
+ PyObject *f_overwritten_fast_locals;
37
+ /* The frame data, if this frame object owns the frame */
38
+ PyObject *_f_frame_data[1];
39
+ };
40
+
41
+ extern PyFrameObject* _PyFrame_New_NoTrack(PyCodeObject *code);
42
+
43
+
44
+ /* other API */
45
+
46
+ typedef enum _framestate {
47
+ FRAME_CREATED = -3,
48
+ FRAME_SUSPENDED = -2,
49
+ FRAME_SUSPENDED_YIELD_FROM = -1,
50
+ FRAME_EXECUTING = 0,
51
+ FRAME_COMPLETED = 1,
52
+ FRAME_CLEARED = 4
53
+ } PyFrameState;
54
+
55
+ #define FRAME_STATE_SUSPENDED(S) ((S) == FRAME_SUSPENDED || (S) == FRAME_SUSPENDED_YIELD_FROM)
56
+ #define FRAME_STATE_FINISHED(S) ((S) >= FRAME_COMPLETED)
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
61
+ #endif /* !Py_INTERNAL_FRAME_H */