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,21 @@
1
+ #ifndef Py_INTERNAL_WARNINGS_H
2
+ #define Py_INTERNAL_WARNINGS_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
+ extern int _PyWarnings_InitState(PyInterpreterState *interp);
12
+
13
+ extern PyObject* _PyWarnings_Init(void);
14
+
15
+ extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro);
16
+ extern void _PyErr_WarnUnawaitedAgenMethod(PyAsyncGenObject *agen, PyObject *method);
17
+
18
+ #ifdef __cplusplus
19
+ }
20
+ #endif
21
+ #endif /* !Py_INTERNAL_WARNINGS_H */
@@ -0,0 +1,133 @@
1
+ #ifndef Py_INTERNAL_WEAKREF_H
2
+ #define Py_INTERNAL_WEAKREF_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_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
12
+ #include "pycore_lock.h" // PyMutex_LockFlags()
13
+ #include "pycore_object.h" // _Py_REF_IS_MERGED()
14
+ #include "pycore_pyatomic_ft_wrappers.h"
15
+
16
+ #ifdef Py_GIL_DISABLED
17
+
18
+ #define WEAKREF_LIST_LOCK(obj) \
19
+ _PyInterpreterState_GET() \
20
+ ->weakref_locks[((uintptr_t)obj) % NUM_WEAKREF_LIST_LOCKS]
21
+
22
+ // Lock using the referenced object
23
+ #define LOCK_WEAKREFS(obj) \
24
+ PyMutex_LockFlags(&WEAKREF_LIST_LOCK(obj), _Py_LOCK_DONT_DETACH)
25
+ #define UNLOCK_WEAKREFS(obj) PyMutex_Unlock(&WEAKREF_LIST_LOCK(obj))
26
+
27
+ // Lock using a weakref
28
+ #define LOCK_WEAKREFS_FOR_WR(wr) \
29
+ PyMutex_LockFlags(wr->weakrefs_lock, _Py_LOCK_DONT_DETACH)
30
+ #define UNLOCK_WEAKREFS_FOR_WR(wr) PyMutex_Unlock(wr->weakrefs_lock)
31
+
32
+ #define FT_CLEAR_WEAKREFS(obj, weakref_list) \
33
+ do { \
34
+ assert(Py_REFCNT(obj) == 0); \
35
+ PyObject_ClearWeakRefs(obj); \
36
+ } while (0)
37
+
38
+ #else
39
+
40
+ #define LOCK_WEAKREFS(obj)
41
+ #define UNLOCK_WEAKREFS(obj)
42
+
43
+ #define LOCK_WEAKREFS_FOR_WR(wr)
44
+ #define UNLOCK_WEAKREFS_FOR_WR(wr)
45
+
46
+ #define FT_CLEAR_WEAKREFS(obj, weakref_list) \
47
+ do { \
48
+ assert(Py_REFCNT(obj) == 0); \
49
+ if (weakref_list != NULL) { \
50
+ PyObject_ClearWeakRefs(obj); \
51
+ } \
52
+ } while (0)
53
+
54
+ #endif
55
+
56
+ static inline int _is_dead(PyObject *obj)
57
+ {
58
+ // Explanation for the Py_REFCNT() check: when a weakref's target is part
59
+ // of a long chain of deallocations which triggers the trashcan mechanism,
60
+ // clearing the weakrefs can be delayed long after the target's refcount
61
+ // has dropped to zero. In the meantime, code accessing the weakref will
62
+ // be able to "see" the target object even though it is supposed to be
63
+ // unreachable. See issue gh-60806.
64
+ #if defined(Py_GIL_DISABLED)
65
+ Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&obj->ob_ref_shared);
66
+ return shared == _Py_REF_SHARED(0, _Py_REF_MERGED);
67
+ #else
68
+ return (Py_REFCNT(obj) == 0);
69
+ #endif
70
+ }
71
+
72
+ static inline PyObject* _PyWeakref_GET_REF(PyObject *ref_obj)
73
+ {
74
+ assert(PyWeakref_Check(ref_obj));
75
+ PyWeakReference *ref = _Py_CAST(PyWeakReference*, ref_obj);
76
+
77
+ PyObject *obj = FT_ATOMIC_LOAD_PTR(ref->wr_object);
78
+ if (obj == Py_None) {
79
+ // clear_weakref() was called
80
+ return NULL;
81
+ }
82
+
83
+ LOCK_WEAKREFS(obj);
84
+ #ifdef Py_GIL_DISABLED
85
+ if (ref->wr_object == Py_None) {
86
+ // clear_weakref() was called
87
+ UNLOCK_WEAKREFS(obj);
88
+ return NULL;
89
+ }
90
+ #endif
91
+ if (_Py_TryIncref(obj)) {
92
+ UNLOCK_WEAKREFS(obj);
93
+ return obj;
94
+ }
95
+ UNLOCK_WEAKREFS(obj);
96
+ return NULL;
97
+ }
98
+
99
+ static inline int _PyWeakref_IS_DEAD(PyObject *ref_obj)
100
+ {
101
+ assert(PyWeakref_Check(ref_obj));
102
+ int ret = 0;
103
+ PyWeakReference *ref = _Py_CAST(PyWeakReference*, ref_obj);
104
+ PyObject *obj = FT_ATOMIC_LOAD_PTR(ref->wr_object);
105
+ if (obj == Py_None) {
106
+ // clear_weakref() was called
107
+ ret = 1;
108
+ }
109
+ else {
110
+ LOCK_WEAKREFS(obj);
111
+ // See _PyWeakref_GET_REF() for the rationale of this test
112
+ #ifdef Py_GIL_DISABLED
113
+ ret = (ref->wr_object == Py_None) || _is_dead(obj);
114
+ #else
115
+ ret = _is_dead(obj);
116
+ #endif
117
+ UNLOCK_WEAKREFS(obj);
118
+ }
119
+ return ret;
120
+ }
121
+
122
+ extern Py_ssize_t _PyWeakref_GetWeakrefCount(PyObject *obj);
123
+
124
+ // Clear all the weak references to obj but leave their callbacks uncalled and
125
+ // intact.
126
+ extern void _PyWeakref_ClearWeakRefsNoCallbacks(PyObject *obj);
127
+
128
+ PyAPI_FUNC(int) _PyWeakref_IsDead(PyObject *weakref);
129
+
130
+ #ifdef __cplusplus
131
+ }
132
+ #endif
133
+ #endif /* !Py_INTERNAL_WEAKREF_H */
@@ -0,0 +1,23 @@
1
+ #ifndef Py_INTRCHECK_H
2
+ #define Py_INTRCHECK_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ PyAPI_FUNC(int) PyOS_InterruptOccurred(void);
8
+
9
+ #ifdef HAVE_FORK
10
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
11
+ PyAPI_FUNC(void) PyOS_BeforeFork(void);
12
+ PyAPI_FUNC(void) PyOS_AfterFork_Parent(void);
13
+ PyAPI_FUNC(void) PyOS_AfterFork_Child(void);
14
+ #endif
15
+ #endif
16
+
17
+ /* Deprecated, please use PyOS_AfterFork_Child() instead */
18
+ Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void);
19
+
20
+ #ifdef __cplusplus
21
+ }
22
+ #endif
23
+ #endif /* !Py_INTRCHECK_H */
@@ -0,0 +1,24 @@
1
+ #ifndef Py_ITEROBJECT_H
2
+ #define Py_ITEROBJECT_H
3
+ /* Iterators (the basic kind, over a sequence) */
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ PyAPI_DATA(PyTypeObject) PySeqIter_Type;
9
+ PyAPI_DATA(PyTypeObject) PyCallIter_Type;
10
+
11
+ #define PySeqIter_Check(op) Py_IS_TYPE((op), &PySeqIter_Type)
12
+
13
+ PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);
14
+
15
+
16
+ #define PyCallIter_Check(op) Py_IS_TYPE((op), &PyCallIter_Type)
17
+
18
+ PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);
19
+
20
+ #ifdef __cplusplus
21
+ }
22
+ #endif
23
+ #endif /* !Py_ITEROBJECT_H */
24
+
@@ -0,0 +1,55 @@
1
+ /* List object interface
2
+
3
+ Another generally useful object type is a list of object pointers.
4
+ This is a mutable type: the list items can be changed, and items can be
5
+ added or removed. Out-of-range indices or non-list objects are ignored.
6
+
7
+ WARNING: PyList_SetItem does not increment the new item's reference count,
8
+ but does decrement the reference count of the item it replaces, if not nil.
9
+ It does *decrement* the reference count if it is *not* inserted in the list.
10
+ Similarly, PyList_GetItem does not increment the returned item's reference
11
+ count.
12
+ */
13
+
14
+ #ifndef Py_LISTOBJECT_H
15
+ #define Py_LISTOBJECT_H
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ PyAPI_DATA(PyTypeObject) PyList_Type;
21
+ PyAPI_DATA(PyTypeObject) PyListIter_Type;
22
+ PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
23
+
24
+ #define PyList_Check(op) \
25
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
26
+ #define PyList_CheckExact(op) Py_IS_TYPE((op), &PyList_Type)
27
+
28
+ PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
29
+ PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
30
+
31
+ PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);
32
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
33
+ PyAPI_FUNC(PyObject *) PyList_GetItemRef(PyObject *, Py_ssize_t);
34
+ #endif
35
+ PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
36
+ PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
37
+ PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);
38
+
39
+ PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
40
+ PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
41
+
42
+ PyAPI_FUNC(int) PyList_Sort(PyObject *);
43
+ PyAPI_FUNC(int) PyList_Reverse(PyObject *);
44
+ PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
45
+
46
+ #ifndef Py_LIMITED_API
47
+ # define Py_CPYTHON_LISTOBJECT_H
48
+ # include "cpython/listobject.h"
49
+ # undef Py_CPYTHON_LISTOBJECT_H
50
+ #endif
51
+
52
+ #ifdef __cplusplus
53
+ }
54
+ #endif
55
+ #endif /* !Py_LISTOBJECT_H */
@@ -0,0 +1,16 @@
1
+ #ifndef Py_LOCK_H
2
+ #define Py_LOCK_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ #ifndef Py_LIMITED_API
8
+ # define Py_CPYTHON_LOCK_H
9
+ # include "cpython/lock.h"
10
+ # undef Py_CPYTHON_LOCK_H
11
+ #endif
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+ #endif /* !Py_LOCK_H */
@@ -0,0 +1,178 @@
1
+ #ifndef Py_LONGOBJECT_H
2
+ #define Py_LONGOBJECT_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+
8
+ /* Long (arbitrary precision) integer object interface */
9
+
10
+ // PyLong_Type is declared by object.h
11
+
12
+ #define PyLong_Check(op) \
13
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)
14
+ #define PyLong_CheckExact(op) Py_IS_TYPE((op), &PyLong_Type)
15
+
16
+ PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
17
+ PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
18
+ PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t);
19
+ PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t);
20
+ PyAPI_FUNC(PyObject *) PyLong_FromDouble(double);
21
+
22
+ PyAPI_FUNC(long) PyLong_AsLong(PyObject *);
23
+ PyAPI_FUNC(long) PyLong_AsLongAndOverflow(PyObject *, int *);
24
+ PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *);
25
+ PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *);
26
+ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
27
+ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
28
+
29
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
30
+ PyAPI_FUNC(int) PyLong_AsInt(PyObject *);
31
+ #endif
32
+
33
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030e0000
34
+ PyAPI_FUNC(PyObject*) PyLong_FromInt32(int32_t value);
35
+ PyAPI_FUNC(PyObject*) PyLong_FromUInt32(uint32_t value);
36
+ PyAPI_FUNC(PyObject*) PyLong_FromInt64(int64_t value);
37
+ PyAPI_FUNC(PyObject*) PyLong_FromUInt64(uint64_t value);
38
+
39
+ PyAPI_FUNC(int) PyLong_AsInt32(PyObject *obj, int32_t *value);
40
+ PyAPI_FUNC(int) PyLong_AsUInt32(PyObject *obj, uint32_t *value);
41
+ PyAPI_FUNC(int) PyLong_AsInt64(PyObject *obj, int64_t *value);
42
+ PyAPI_FUNC(int) PyLong_AsUInt64(PyObject *obj, uint64_t *value);
43
+
44
+ #define Py_ASNATIVEBYTES_DEFAULTS -1
45
+ #define Py_ASNATIVEBYTES_BIG_ENDIAN 0
46
+ #define Py_ASNATIVEBYTES_LITTLE_ENDIAN 1
47
+ #define Py_ASNATIVEBYTES_NATIVE_ENDIAN 3
48
+ #define Py_ASNATIVEBYTES_UNSIGNED_BUFFER 4
49
+ #define Py_ASNATIVEBYTES_REJECT_NEGATIVE 8
50
+ #define Py_ASNATIVEBYTES_ALLOW_INDEX 16
51
+
52
+ /* PyLong_AsNativeBytes: Copy the integer value to a native variable.
53
+ buffer points to the first byte of the variable.
54
+ n_bytes is the number of bytes available in the buffer. Pass 0 to request
55
+ the required size for the value.
56
+ flags is a bitfield of the following flags:
57
+ * 1 - little endian
58
+ * 2 - native endian
59
+ * 4 - unsigned destination (e.g. don't reject copying 255 into one byte)
60
+ * 8 - raise an exception for negative inputs
61
+ * 16 - call __index__ on non-int types
62
+ If flags is -1 (all bits set), native endian is used, value truncation
63
+ behaves most like C (allows negative inputs and allow MSB set), and non-int
64
+ objects will raise a TypeError.
65
+ Big endian mode will write the most significant byte into the address
66
+ directly referenced by buffer; little endian will write the least significant
67
+ byte into that address.
68
+
69
+ If an exception is raised, returns a negative value.
70
+ Otherwise, returns the number of bytes that are required to store the value.
71
+ To check that the full value is represented, ensure that the return value is
72
+ equal or less than n_bytes.
73
+ All n_bytes are guaranteed to be written (unless an exception occurs), and
74
+ so ignoring a positive return value is the equivalent of a downcast in C.
75
+ In cases where the full value could not be represented, the returned value
76
+ may be larger than necessary - this function is not an accurate way to
77
+ calculate the bit length of an integer object.
78
+ */
79
+ PyAPI_FUNC(Py_ssize_t) PyLong_AsNativeBytes(PyObject* v, void* buffer,
80
+ Py_ssize_t n_bytes, int flags);
81
+
82
+ /* PyLong_FromNativeBytes: Create an int value from a native integer
83
+ n_bytes is the number of bytes to read from the buffer. Passing 0 will
84
+ always produce the zero int.
85
+ PyLong_FromUnsignedNativeBytes always produces a non-negative int.
86
+ flags is the same as for PyLong_AsNativeBytes, but only supports selecting
87
+ the endianness or forcing an unsigned buffer.
88
+
89
+ Returns the int object, or NULL with an exception set. */
90
+ PyAPI_FUNC(PyObject*) PyLong_FromNativeBytes(const void* buffer, size_t n_bytes,
91
+ int flags);
92
+ PyAPI_FUNC(PyObject*) PyLong_FromUnsignedNativeBytes(const void* buffer,
93
+ size_t n_bytes, int flags);
94
+
95
+ #endif
96
+
97
+ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
98
+
99
+ /* It may be useful in the future. I've added it in the PyInt -> PyLong
100
+ cleanup to keep the extra information. [CH] */
101
+ #define PyLong_AS_LONG(op) PyLong_AsLong(op)
102
+
103
+ /* Issue #1983: pid_t can be longer than a C long on some systems */
104
+ #if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
105
+ #define _Py_PARSE_PID "i"
106
+ #define PyLong_FromPid PyLong_FromLong
107
+ # if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
108
+ # define PyLong_AsPid PyLong_AsInt
109
+ # elif SIZEOF_INT == SIZEOF_LONG
110
+ # define PyLong_AsPid PyLong_AsLong
111
+ # else
112
+ static inline int
113
+ PyLong_AsPid(PyObject *obj)
114
+ {
115
+ int overflow;
116
+ long result = PyLong_AsLongAndOverflow(obj, &overflow);
117
+ if (overflow || result > INT_MAX || result < INT_MIN) {
118
+ PyErr_SetString(PyExc_OverflowError,
119
+ "Python int too large to convert to C int");
120
+ return -1;
121
+ }
122
+ return (int)result;
123
+ }
124
+ # endif
125
+ #elif SIZEOF_PID_T == SIZEOF_LONG
126
+ #define _Py_PARSE_PID "l"
127
+ #define PyLong_FromPid PyLong_FromLong
128
+ #define PyLong_AsPid PyLong_AsLong
129
+ #elif defined(SIZEOF_LONG_LONG) && SIZEOF_PID_T == SIZEOF_LONG_LONG
130
+ #define _Py_PARSE_PID "L"
131
+ #define PyLong_FromPid PyLong_FromLongLong
132
+ #define PyLong_AsPid PyLong_AsLongLong
133
+ #else
134
+ #error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
135
+ #endif /* SIZEOF_PID_T */
136
+
137
+ #if SIZEOF_VOID_P == SIZEOF_INT
138
+ # define _Py_PARSE_INTPTR "i"
139
+ # define _Py_PARSE_UINTPTR "I"
140
+ #elif SIZEOF_VOID_P == SIZEOF_LONG
141
+ # define _Py_PARSE_INTPTR "l"
142
+ # define _Py_PARSE_UINTPTR "k"
143
+ #elif defined(SIZEOF_LONG_LONG) && SIZEOF_VOID_P == SIZEOF_LONG_LONG
144
+ # define _Py_PARSE_INTPTR "L"
145
+ # define _Py_PARSE_UINTPTR "K"
146
+ #else
147
+ # error "void* different in size from int, long and long long"
148
+ #endif /* SIZEOF_VOID_P */
149
+
150
+ PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
151
+ PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
152
+ PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *);
153
+
154
+ PyAPI_FUNC(PyObject *) PyLong_FromLongLong(long long);
155
+ PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned long long);
156
+ PyAPI_FUNC(long long) PyLong_AsLongLong(PyObject *);
157
+ PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLong(PyObject *);
158
+ PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLongMask(PyObject *);
159
+ PyAPI_FUNC(long long) PyLong_AsLongLongAndOverflow(PyObject *, int *);
160
+
161
+ PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
162
+
163
+ /* These aren't really part of the int object, but they're handy. The
164
+ functions are in Python/mystrtoul.c.
165
+ */
166
+ PyAPI_FUNC(unsigned long) PyOS_strtoul(const char *, char **, int);
167
+ PyAPI_FUNC(long) PyOS_strtol(const char *, char **, int);
168
+
169
+ #ifndef Py_LIMITED_API
170
+ # define Py_CPYTHON_LONGOBJECT_H
171
+ # include "cpython/longobject.h"
172
+ # undef Py_CPYTHON_LONGOBJECT_H
173
+ #endif
174
+
175
+ #ifdef __cplusplus
176
+ }
177
+ #endif
178
+ #endif /* !Py_LONGOBJECT_H */
@@ -0,0 +1,31 @@
1
+
2
+ /* Interface for marshal.c */
3
+
4
+ #ifndef Py_MARSHAL_H
5
+ #define Py_MARSHAL_H
6
+ #ifndef Py_LIMITED_API
7
+
8
+ #ifdef __cplusplus
9
+ extern "C" {
10
+ #endif
11
+
12
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
13
+ Py_ssize_t);
14
+ PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int);
15
+
16
+ #define Py_MARSHAL_VERSION 5
17
+
18
+ PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
19
+ PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *);
20
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
21
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
22
+
23
+ PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
24
+ PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
25
+
26
+ #ifdef __cplusplus
27
+ }
28
+ #endif
29
+
30
+ #endif /* Py_LIMITED_API */
31
+ #endif /* !Py_MARSHAL_H */
@@ -0,0 +1,34 @@
1
+ /* Memory view object. In Python this is available as "memoryview". */
2
+
3
+ #ifndef Py_MEMORYOBJECT_H
4
+ #define Py_MEMORYOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ PyAPI_DATA(PyTypeObject) PyMemoryView_Type;
10
+
11
+ #define PyMemoryView_Check(op) Py_IS_TYPE((op), &PyMemoryView_Type)
12
+
13
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base);
14
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
15
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(char *mem, Py_ssize_t size,
16
+ int flags);
17
+ #endif
18
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030b0000
19
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(const Py_buffer *info);
20
+ #endif
21
+ PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base,
22
+ int buffertype,
23
+ char order);
24
+
25
+ #ifndef Py_LIMITED_API
26
+ # define Py_CPYTHON_MEMORYOBJECT_H
27
+ # include "cpython/memoryobject.h"
28
+ # undef Py_CPYTHON_MEMORYOBJECT_H
29
+ #endif
30
+
31
+ #ifdef __cplusplus
32
+ }
33
+ #endif
34
+ #endif /* !Py_MEMORYOBJECT_H */
@@ -0,0 +1,146 @@
1
+
2
+ /* Method object interface */
3
+
4
+ #ifndef Py_METHODOBJECT_H
5
+ #define Py_METHODOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ /* This is about the type 'builtin_function_or_method',
11
+ not Python methods in user-defined classes. See classobject.h
12
+ for the latter. */
13
+
14
+ PyAPI_DATA(PyTypeObject) PyCFunction_Type;
15
+
16
+ #define PyCFunction_CheckExact(op) Py_IS_TYPE((op), &PyCFunction_Type)
17
+ #define PyCFunction_Check(op) PyObject_TypeCheck((op), &PyCFunction_Type)
18
+
19
+ typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
20
+ typedef PyObject *(*PyCFunctionFast) (PyObject *, PyObject *const *, Py_ssize_t);
21
+ typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
22
+ PyObject *);
23
+ typedef PyObject *(*PyCFunctionFastWithKeywords) (PyObject *,
24
+ PyObject *const *, Py_ssize_t,
25
+ PyObject *);
26
+ typedef PyObject *(*PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *,
27
+ Py_ssize_t, PyObject *);
28
+
29
+ // For backwards compatibility. `METH_FASTCALL` was added to the stable API in
30
+ // 3.10 alongside `_PyCFunctionFastWithKeywords` and `_PyCFunctionFast`.
31
+ // Note that the underscore-prefixed names were documented in public docs;
32
+ // people may be using them.
33
+ typedef PyCFunctionFast _PyCFunctionFast;
34
+ typedef PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords;
35
+
36
+ // Cast a function to the PyCFunction type to use it with PyMethodDef.
37
+ //
38
+ // This macro can be used to prevent compiler warnings if the first parameter
39
+ // uses a different pointer type than PyObject* (ex: METH_VARARGS and METH_O
40
+ // calling conventions).
41
+ //
42
+ // The macro can also be used for METH_FASTCALL and METH_VARARGS|METH_KEYWORDS
43
+ // calling conventions to avoid compiler warnings because the function has more
44
+ // than 2 parameters. The macro first casts the function to the
45
+ // "void func(void)" type to prevent compiler warnings.
46
+ //
47
+ // If a function is declared with the METH_NOARGS calling convention, it must
48
+ // have 2 parameters. Since the second parameter is unused, Py_UNUSED() can be
49
+ // used to prevent a compiler warning. If the function has a single parameter,
50
+ // it triggers an undefined behavior when Python calls it with 2 parameters
51
+ // (bpo-33012).
52
+ #define _PyCFunction_CAST(func) \
53
+ _Py_FUNC_CAST(PyCFunction, func)
54
+ // The macros below are given for semantic convenience, allowing users
55
+ // to see whether a cast to suppress an undefined behavior is necessary.
56
+ // Note: At runtime, the original function signature must be respected.
57
+ #define _PyCFunctionFast_CAST(func) \
58
+ _Py_FUNC_CAST(PyCFunctionFast, func)
59
+ #define _PyCFunctionWithKeywords_CAST(func) \
60
+ _Py_FUNC_CAST(PyCFunctionWithKeywords, func)
61
+ #define _PyCFunctionFastWithKeywords_CAST(func) \
62
+ _Py_FUNC_CAST(PyCFunctionFastWithKeywords, func)
63
+
64
+ PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
65
+ PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
66
+ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
67
+
68
+ struct PyMethodDef {
69
+ const char *ml_name; /* The name of the built-in function/method */
70
+ PyCFunction ml_meth; /* The C function that implements it */
71
+ int ml_flags; /* Combination of METH_xxx flags, which mostly
72
+ describe the args expected by the C func */
73
+ const char *ml_doc; /* The __doc__ attribute, or NULL */
74
+ };
75
+
76
+ /* PyCFunction_New is declared as a function for stable ABI (declaration is
77
+ * needed for e.g. GCC with -fvisibility=hidden), but redefined as a macro
78
+ * that calls PyCFunction_NewEx. */
79
+ PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
80
+ #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
81
+
82
+ /* PyCFunction_NewEx is similar: on 3.9+, this calls PyCMethod_New. */
83
+ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
84
+ PyObject *);
85
+
86
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
87
+ #define PyCFunction_NewEx(ML, SELF, MOD) PyCMethod_New((ML), (SELF), (MOD), NULL)
88
+ PyAPI_FUNC(PyObject *) PyCMethod_New(PyMethodDef *, PyObject *,
89
+ PyObject *, PyTypeObject *);
90
+ #endif
91
+
92
+
93
+ /* Flag passed to newmethodobject */
94
+ /* #define METH_OLDARGS 0x0000 -- unsupported now */
95
+ #define METH_VARARGS 0x0001
96
+ #define METH_KEYWORDS 0x0002
97
+ /* METH_NOARGS and METH_O must not be combined with the flags above. */
98
+ #define METH_NOARGS 0x0004
99
+ #define METH_O 0x0008
100
+
101
+ /* METH_CLASS and METH_STATIC are a little different; these control
102
+ the construction of methods for a class. These cannot be used for
103
+ functions in modules. */
104
+ #define METH_CLASS 0x0010
105
+ #define METH_STATIC 0x0020
106
+
107
+ /* METH_COEXIST allows a method to be entered even though a slot has
108
+ already filled the entry. When defined, the flag allows a separate
109
+ method, "__contains__" for example, to coexist with a defined
110
+ slot like sq_contains. */
111
+
112
+ #define METH_COEXIST 0x0040
113
+
114
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030a0000
115
+ # define METH_FASTCALL 0x0080
116
+ #endif
117
+
118
+ /* This bit is preserved for Stackless Python */
119
+ #ifdef STACKLESS
120
+ # define METH_STACKLESS 0x0100
121
+ #else
122
+ # define METH_STACKLESS 0x0000
123
+ #endif
124
+
125
+ /* METH_METHOD means the function stores an
126
+ * additional reference to the class that defines it;
127
+ * both self and class are passed to it.
128
+ * It uses PyCMethodObject instead of PyCFunctionObject.
129
+ * May not be combined with METH_NOARGS, METH_O, METH_CLASS or METH_STATIC.
130
+ */
131
+
132
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
133
+ #define METH_METHOD 0x0200
134
+ #endif
135
+
136
+
137
+ #ifndef Py_LIMITED_API
138
+ # define Py_CPYTHON_METHODOBJECT_H
139
+ # include "cpython/methodobject.h"
140
+ # undef Py_CPYTHON_METHODOBJECT_H
141
+ #endif
142
+
143
+ #ifdef __cplusplus
144
+ }
145
+ #endif
146
+ #endif /* !Py_METHODOBJECT_H */