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.
- pytron/__init__.py +112 -0
- pytron/application.py +562 -0
- pytron/apputils/__init__.py +0 -0
- pytron/apputils/chrome_ipc.py +203 -0
- pytron/apputils/codegen.py +261 -0
- pytron/apputils/config.py +303 -0
- pytron/apputils/deadmansswitch.py +47 -0
- pytron/apputils/extras.py +76 -0
- pytron/apputils/native.py +148 -0
- pytron/apputils/shell.py +73 -0
- pytron/apputils/windows.py +286 -0
- pytron/cli.py +384 -0
- pytron/commands/__init__.py +0 -0
- pytron/commands/android.py +28 -0
- pytron/commands/build.py +26 -0
- pytron/commands/doctor.py +221 -0
- pytron/commands/engine.py +23 -0
- pytron/commands/frontend.py +60 -0
- pytron/commands/harvest.py +112 -0
- pytron/commands/helpers.py +239 -0
- pytron/commands/info.py +50 -0
- pytron/commands/init.py +521 -0
- pytron/commands/install.py +294 -0
- pytron/commands/login.py +130 -0
- pytron/commands/package.py +228 -0
- pytron/commands/plugin.py +442 -0
- pytron/commands/run.py +312 -0
- pytron/commands/scan.py +210 -0
- pytron/commands/show.py +23 -0
- pytron/commands/uninstall.py +150 -0
- pytron/commands/utils.py +42 -0
- pytron/commands/workflow.py +95 -0
- pytron/console.py +133 -0
- pytron/core.py +18 -0
- pytron/dependencies/WebView2Loader.dll +0 -0
- pytron/dependencies/__init__.py +1 -0
- pytron/dependencies/pytron_native.so +0 -0
- pytron/engines/chrome/adapter.py +445 -0
- pytron/engines/chrome/engine.py +576 -0
- pytron/engines/chrome/forge.py +147 -0
- pytron/engines/chrome/shell/package.json +8 -0
- pytron/engines/chrome/shell/preload.js +12 -0
- pytron/engines/chrome/shell/shell.js +534 -0
- pytron/exceptions.py +36 -0
- pytron/inspector.py +201 -0
- pytron/inspector_ui.py +512 -0
- pytron/installer/Installation.nsi +236 -0
- pytron/installer/header.bmp +0 -0
- pytron/installer/pytron.ico +0 -0
- pytron/installer/sidebar.bmp +0 -0
- pytron/llms.md +98 -0
- pytron/manifests/README.md +29 -0
- pytron/manifests/windows-utf8.manifest +44 -0
- pytron/menu.py +128 -0
- pytron/nsis-setup.exe +0 -0
- pytron/pack/__init__.py +0 -0
- pytron/pack/assets.py +131 -0
- pytron/pack/compilers.py +289 -0
- pytron/pack/crystal.py +297 -0
- pytron/pack/graph.py +377 -0
- pytron/pack/inference.py +157 -0
- pytron/pack/installers.py +402 -0
- pytron/pack/introspect.py +357 -0
- pytron/pack/metadata.py +213 -0
- pytron/pack/modules.py +618 -0
- pytron/pack/nuitka.py +108 -0
- pytron/pack/pipeline.py +107 -0
- pytron/pack/pyinstaller.py +176 -0
- pytron/pack/rust_engine.py +273 -0
- pytron/pack/secure.py +309 -0
- pytron/pack/secure_loader/bin/pytron_rust_bootloader +0 -0
- pytron/pack/secure_loader/icon.ico +0 -0
- pytron/pack/utils.py +110 -0
- pytron/pack/virtual_root.py +124 -0
- pytron/platforms/__init__.py +0 -0
- pytron/platforms/android/__init__.py +3 -0
- pytron/platforms/android/android.py +103 -0
- pytron/platforms/android/builder.py +736 -0
- pytron/platforms/android/ops/build.py +79 -0
- pytron/platforms/android/ops/init.py +63 -0
- pytron/platforms/android/ops/run.py +79 -0
- pytron/platforms/android/ops/sync.py +770 -0
- pytron/platforms/android/ops/utils.py +8 -0
- pytron/platforms/android/shell/README.md +30 -0
- pytron/platforms/android/shell/app/build.gradle +64 -0
- pytron/platforms/android/shell/app/src/main/AndroidManifest.xml +29 -0
- pytron/platforms/android/shell/app/src/main/assets/python/main.py +86 -0
- pytron/platforms/android/shell/app/src/main/assets/python/python314.zip +0 -0
- pytron/platforms/android/shell/app/src/main/cpp/CMakeLists.txt +25 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/Python.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/abstract.h +915 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/audit.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bltinmodule.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/boolobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytearrayobject.h +44 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytesobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/ceval.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/codecs.h +176 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/compile.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/complexobject.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/abstract.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/audit.h +8 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytearrayobject.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytesobject.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/cellobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/ceval.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/classobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/code.h +340 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/compile.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/complexobject.h +33 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/context.h +107 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/critical_section.h +154 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/descrobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/dictobject.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileobject.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileutils.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/floatobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/frameobject.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/funcobject.h +185 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/genobject.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/import.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/initconfig.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/listobject.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/lock.h +74 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longintrepr.h +184 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longobject.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/memoryobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/methodobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/modsupport.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/monitoring.h +269 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/object.h +493 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/objimpl.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/odictobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/picklebufobject.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pthread_stubs.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic.h +614 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_gcc.h +615 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_msc.h +1197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_std.h +1112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyctype.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pydebug.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyerrors.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyfpe.h +15 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyframe.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyhash.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pylifecycle.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pymem.h +84 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystate.h +275 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystats.h +194 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythonrun.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythread.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pytime.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/setobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/traceback.h +13 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tracemalloc.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tupleobject.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/unicodeobject.h +773 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/warnings.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/weakrefobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/critical_section.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/datetime.h +267 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/descrobject.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dictobject.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dynamic_annotations.h +499 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/enumobject.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/errcode.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/exports.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileutils.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/floatobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/frameobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/genericaliasobject.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/import.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/atomic.h +392 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/internal.h +969 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/prim.h +329 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/track.h +147 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/types.h +721 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc.h +565 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_abstract.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_asdl.h +112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast.h +945 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast_state.h +271 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_atexit.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_audit.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_backoff.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bitutils.h +186 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_blocks_output_buffer.h +321 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_brc.h +73 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytes_methods.h +82 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytesobject.h +149 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_c_array.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_call.h +206 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_capsule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_cell.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval.h +390 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval_state.h +48 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_code.h +671 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_codecs.h +76 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_compile.h +230 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_complexobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_condvar.h +93 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_context.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_critical_section.h +237 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp.h +406 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp_data_registry.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_debug_offsets.h +379 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_descrobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict.h +410 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict_state.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dtoa.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_signal.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_trampoline.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_exceptions.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_faulthandler.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils.h +320 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils_windows.h +98 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_floatobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_flowgraph.h +47 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_format.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_frame.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist_state.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_function.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gc.h +378 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_genobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_getopt.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gil.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects_fini_generated.h +1592 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_strings.h +854 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hamt.h +113 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hashtable.h +150 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_import.h +141 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_importdl.h +139 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_index_pool.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_initconfig.h +197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h +83 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruments.h +127 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp.h +109 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp_structs.h +977 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe.h +401 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe_structs.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpolation.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_intrinsics.h +51 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_jit.h +29 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_list.h +81 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_llist.h +106 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_lock.h +236 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_long.h +319 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_magic_number.h +305 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_memoryobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_mimalloc.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_modsupport.h +99 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_moduleobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_namespace.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_alloc.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_deferred.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_stack.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_state.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc.h +702 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc_init.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_metadata.h +2117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_utils.h +90 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_optimizer.h +318 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parking_lot.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parser.h +78 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pathconfig.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyarena.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyatomic_ft_wrappers.h +174 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pybuffer.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyerrors.h +213 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyhash.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pylifecycle.h +136 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymath.h +205 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem_init.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystate.h +339 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystats.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythonrun.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythread.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_qsbr.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_range.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime.h +63 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init.h +239 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init_generated.h +1589 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_structs.h +310 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_semaphore.h +67 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_setobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_signal.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sliceobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stackref.h +791 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stats.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_strhex.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structs.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structseq.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_symtable.h +201 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sysmodule.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_template.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_time.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_token.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_traceback.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tracemalloc.h +164 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tstate.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tuple.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typedefs.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typeobject.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typevarobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ucnhash.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject.h +308 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject_generated.h +3132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unionobject.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uniqueid.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_ids.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_metadata.h +1204 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_warnings.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_weakref.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/intrcheck.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/iterobject.h +24 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/listobject.h +55 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/lock.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/longobject.h +178 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/marshal.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/memoryobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/methodobject.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/modsupport.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/moduleobject.h +122 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/monitoring.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/object.h +828 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/objimpl.h +211 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode_ids.h +259 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osdefs.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osmodule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/patchlevel.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/py_curses.h +117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyatomic.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pybuffer.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pycapsule.h +58 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyconfig.h +2088 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pydtrace.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyerrors.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyexpat.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyframe.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyhash.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pylifecycle.h +80 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacconfig.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacro.h +243 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymath.h +65 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymem.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyport.h +710 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystate.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystats.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrcmp.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrtod.h +37 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythonrun.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythread.h +131 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pytypedefs.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/rangeobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/refcount.h +555 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/setobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sliceobject.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structmember.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structseq.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sysmodule.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/traceback.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/tupleobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/typeslots.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/unicodeobject.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/warnings.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/weakrefobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/pytron_bridge.cpp +224 -0
- pytron/platforms/android/shell/app/src/main/java/com/pytron/shell/MainActivity.kt +208 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- pytron/platforms/android/shell/build.gradle +11 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.jar +0 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.properties +5 -0
- pytron/platforms/android/shell/gradle.properties +2 -0
- pytron/platforms/android/shell/gradlew.bat +85 -0
- pytron/platforms/android/shell/settings.gradle +16 -0
- pytron/platforms/darwin.py +82 -0
- pytron/platforms/darwin_ops/libs.py +31 -0
- pytron/platforms/darwin_ops/system.py +182 -0
- pytron/platforms/darwin_ops/utils.py +85 -0
- pytron/platforms/darwin_ops/webview.py +5 -0
- pytron/platforms/darwin_ops/window.py +102 -0
- pytron/platforms/interface.py +152 -0
- pytron/platforms/linux.py +82 -0
- pytron/platforms/linux_ops/libs.py +49 -0
- pytron/platforms/linux_ops/system.py +316 -0
- pytron/platforms/linux_ops/utils.py +19 -0
- pytron/platforms/linux_ops/webview.py +5 -0
- pytron/platforms/linux_ops/window.py +115 -0
- pytron/platforms/windows.py +136 -0
- pytron/platforms/windows_ops/__init__.py +0 -0
- pytron/platforms/windows_ops/constants.py +126 -0
- pytron/platforms/windows_ops/system.py +518 -0
- pytron/platforms/windows_ops/utils.py +3 -0
- pytron/platforms/windows_ops/webview.py +5 -0
- pytron/platforms/windows_ops/window.py +361 -0
- pytron/plugin.py +467 -0
- pytron/rcedit-x64.exe +0 -0
- pytron/router.py +146 -0
- pytron/serializer.py +240 -0
- pytron/shortcuts.py +279 -0
- pytron/state.py +76 -0
- pytron/tray.py +399 -0
- pytron/updater.py +181 -0
- pytron/utf8_hook.py +112 -0
- pytron/utils.py +44 -0
- pytron/webview.py +722 -0
- pytron_kit-0.3.12.dist-info/METADATA +131 -0
- pytron_kit-0.3.12.dist-info/RECORD +419 -0
- pytron_kit-0.3.12.dist-info/WHEEL +5 -0
- pytron_kit-0.3.12.dist-info/entry_points.txt +2 -0
- pytron_kit-0.3.12.dist-info/licenses/LICENSE +201 -0
- pytron_kit-0.3.12.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_CORECONFIG_H
|
|
2
|
+
#define Py_INTERNAL_CORECONFIG_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_typedefs.h" // _PyRuntimeState
|
|
12
|
+
|
|
13
|
+
/* --- PyStatus ----------------------------------------------- */
|
|
14
|
+
|
|
15
|
+
/* Almost all errors causing Python initialization to fail */
|
|
16
|
+
#ifdef _MSC_VER
|
|
17
|
+
/* Visual Studio 2015 doesn't implement C99 __func__ in C */
|
|
18
|
+
# define _PyStatus_GET_FUNC() __FUNCTION__
|
|
19
|
+
#else
|
|
20
|
+
# define _PyStatus_GET_FUNC() __func__
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
#define _PyStatus_OK() \
|
|
24
|
+
(PyStatus){._type = _PyStatus_TYPE_OK}
|
|
25
|
+
/* other fields are set to 0 */
|
|
26
|
+
#define _PyStatus_ERR(ERR_MSG) \
|
|
27
|
+
(PyStatus){ \
|
|
28
|
+
._type = _PyStatus_TYPE_ERROR, \
|
|
29
|
+
.func = _PyStatus_GET_FUNC(), \
|
|
30
|
+
.err_msg = (ERR_MSG)}
|
|
31
|
+
/* other fields are set to 0 */
|
|
32
|
+
#define _PyStatus_NO_MEMORY_ERRMSG "memory allocation failed"
|
|
33
|
+
#define _PyStatus_NO_MEMORY() _PyStatus_ERR(_PyStatus_NO_MEMORY_ERRMSG)
|
|
34
|
+
#define _PyStatus_EXIT(EXITCODE) \
|
|
35
|
+
(PyStatus){ \
|
|
36
|
+
._type = _PyStatus_TYPE_EXIT, \
|
|
37
|
+
.exitcode = (EXITCODE)}
|
|
38
|
+
#define _PyStatus_IS_ERROR(err) \
|
|
39
|
+
((err)._type == _PyStatus_TYPE_ERROR)
|
|
40
|
+
#define _PyStatus_IS_EXIT(err) \
|
|
41
|
+
((err)._type == _PyStatus_TYPE_EXIT)
|
|
42
|
+
#define _PyStatus_EXCEPTION(err) \
|
|
43
|
+
((err)._type != _PyStatus_TYPE_OK)
|
|
44
|
+
#define _PyStatus_UPDATE_FUNC(err) \
|
|
45
|
+
do { (err).func = _PyStatus_GET_FUNC(); } while (0)
|
|
46
|
+
|
|
47
|
+
// Export for '_testinternalcapi' shared extension
|
|
48
|
+
PyAPI_FUNC(void) _PyErr_SetFromPyStatus(PyStatus status);
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/* --- PyWideStringList ------------------------------------------------ */
|
|
52
|
+
|
|
53
|
+
#define _PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL}
|
|
54
|
+
|
|
55
|
+
#ifndef NDEBUG
|
|
56
|
+
extern int _PyWideStringList_CheckConsistency(const PyWideStringList *list);
|
|
57
|
+
#endif
|
|
58
|
+
extern void _PyWideStringList_Clear(PyWideStringList *list);
|
|
59
|
+
extern int _PyWideStringList_Copy(PyWideStringList *list,
|
|
60
|
+
const PyWideStringList *list2);
|
|
61
|
+
extern PyStatus _PyWideStringList_Extend(PyWideStringList *list,
|
|
62
|
+
const PyWideStringList *list2);
|
|
63
|
+
extern PyObject* _PyWideStringList_AsList(const PyWideStringList *list);
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/* --- _PyArgv ---------------------------------------------------- */
|
|
67
|
+
|
|
68
|
+
typedef struct _PyArgv {
|
|
69
|
+
Py_ssize_t argc;
|
|
70
|
+
int use_bytes_argv;
|
|
71
|
+
char * const *bytes_argv;
|
|
72
|
+
wchar_t * const *wchar_argv;
|
|
73
|
+
} _PyArgv;
|
|
74
|
+
|
|
75
|
+
extern PyStatus _PyArgv_AsWstrList(const _PyArgv *args,
|
|
76
|
+
PyWideStringList *list);
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/* --- Helper functions ------------------------------------------- */
|
|
80
|
+
|
|
81
|
+
extern int _Py_str_to_int(
|
|
82
|
+
const char *str,
|
|
83
|
+
int *result);
|
|
84
|
+
extern const wchar_t* _Py_get_xoption(
|
|
85
|
+
const PyWideStringList *xoptions,
|
|
86
|
+
const wchar_t *name);
|
|
87
|
+
extern const char* _Py_GetEnv(
|
|
88
|
+
int use_environment,
|
|
89
|
+
const char *name);
|
|
90
|
+
extern void _Py_get_env_flag(
|
|
91
|
+
int use_environment,
|
|
92
|
+
int *flag,
|
|
93
|
+
const char *name);
|
|
94
|
+
|
|
95
|
+
/* Py_GetArgcArgv() helper */
|
|
96
|
+
extern void _Py_ClearArgcArgv(void);
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/* --- _PyPreCmdline ------------------------------------------------- */
|
|
100
|
+
|
|
101
|
+
typedef struct {
|
|
102
|
+
PyWideStringList argv;
|
|
103
|
+
PyWideStringList xoptions; /* "-X value" option */
|
|
104
|
+
int isolated; /* -I option */
|
|
105
|
+
int use_environment; /* -E option */
|
|
106
|
+
int dev_mode; /* -X dev and PYTHONDEVMODE */
|
|
107
|
+
int warn_default_encoding; /* -X warn_default_encoding and PYTHONWARNDEFAULTENCODING */
|
|
108
|
+
} _PyPreCmdline;
|
|
109
|
+
|
|
110
|
+
#define _PyPreCmdline_INIT \
|
|
111
|
+
(_PyPreCmdline){ \
|
|
112
|
+
.use_environment = -1, \
|
|
113
|
+
.isolated = -1, \
|
|
114
|
+
.dev_mode = -1}
|
|
115
|
+
/* Note: _PyPreCmdline_INIT sets other fields to 0/NULL */
|
|
116
|
+
|
|
117
|
+
extern void _PyPreCmdline_Clear(_PyPreCmdline *cmdline);
|
|
118
|
+
extern PyStatus _PyPreCmdline_SetArgv(_PyPreCmdline *cmdline,
|
|
119
|
+
const _PyArgv *args);
|
|
120
|
+
extern PyStatus _PyPreCmdline_SetConfig(
|
|
121
|
+
const _PyPreCmdline *cmdline,
|
|
122
|
+
PyConfig *config);
|
|
123
|
+
extern PyStatus _PyPreCmdline_Read(_PyPreCmdline *cmdline,
|
|
124
|
+
const PyPreConfig *preconfig);
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/* --- PyPreConfig ----------------------------------------------- */
|
|
128
|
+
|
|
129
|
+
// Export for '_testembed' program
|
|
130
|
+
PyAPI_FUNC(void) _PyPreConfig_InitCompatConfig(PyPreConfig *preconfig);
|
|
131
|
+
|
|
132
|
+
extern void _PyPreConfig_InitFromConfig(
|
|
133
|
+
PyPreConfig *preconfig,
|
|
134
|
+
const PyConfig *config);
|
|
135
|
+
extern PyStatus _PyPreConfig_InitFromPreConfig(
|
|
136
|
+
PyPreConfig *preconfig,
|
|
137
|
+
const PyPreConfig *config2);
|
|
138
|
+
extern PyObject* _PyPreConfig_AsDict(const PyPreConfig *preconfig);
|
|
139
|
+
extern void _PyPreConfig_GetConfig(PyPreConfig *preconfig,
|
|
140
|
+
const PyConfig *config);
|
|
141
|
+
extern PyStatus _PyPreConfig_Read(PyPreConfig *preconfig,
|
|
142
|
+
const _PyArgv *args);
|
|
143
|
+
extern PyStatus _PyPreConfig_Write(const PyPreConfig *preconfig);
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
/* --- PyConfig ---------------------------------------------- */
|
|
147
|
+
|
|
148
|
+
typedef enum {
|
|
149
|
+
/* Py_Initialize() API: backward compatibility with Python 3.6 and 3.7 */
|
|
150
|
+
_PyConfig_INIT_COMPAT = 1,
|
|
151
|
+
_PyConfig_INIT_PYTHON = 2,
|
|
152
|
+
_PyConfig_INIT_ISOLATED = 3
|
|
153
|
+
} _PyConfigInitEnum;
|
|
154
|
+
|
|
155
|
+
typedef enum {
|
|
156
|
+
/* In free threaded builds, this means that the GIL is disabled at startup,
|
|
157
|
+
but may be enabled by loading an incompatible extension module. */
|
|
158
|
+
_PyConfig_GIL_DEFAULT = -1,
|
|
159
|
+
|
|
160
|
+
/* The GIL has been forced off or on, and will not be affected by module loading. */
|
|
161
|
+
_PyConfig_GIL_DISABLE = 0,
|
|
162
|
+
_PyConfig_GIL_ENABLE = 1,
|
|
163
|
+
} _PyConfigGILEnum;
|
|
164
|
+
|
|
165
|
+
// Export for '_testembed' program
|
|
166
|
+
PyAPI_FUNC(void) _PyConfig_InitCompatConfig(PyConfig *config);
|
|
167
|
+
|
|
168
|
+
extern PyStatus _PyConfig_Copy(
|
|
169
|
+
PyConfig *config,
|
|
170
|
+
const PyConfig *config2);
|
|
171
|
+
extern PyStatus _PyConfig_InitPathConfig(
|
|
172
|
+
PyConfig *config,
|
|
173
|
+
int compute_path_config);
|
|
174
|
+
extern PyStatus _PyConfig_InitImportConfig(PyConfig *config);
|
|
175
|
+
extern PyStatus _PyConfig_Read(PyConfig *config, int compute_path_config);
|
|
176
|
+
extern PyStatus _PyConfig_Write(const PyConfig *config,
|
|
177
|
+
_PyRuntimeState *runtime);
|
|
178
|
+
extern PyStatus _PyConfig_SetPyArgv(
|
|
179
|
+
PyConfig *config,
|
|
180
|
+
const _PyArgv *args);
|
|
181
|
+
extern PyObject* _PyConfig_CreateXOptionsDict(const PyConfig *config);
|
|
182
|
+
|
|
183
|
+
extern void _Py_DumpPathConfig(PyThreadState *tstate);
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/* --- Function used for testing ---------------------------------- */
|
|
187
|
+
|
|
188
|
+
// Export these functions for '_testinternalcapi' shared extension
|
|
189
|
+
PyAPI_FUNC(PyObject*) _PyConfig_AsDict(const PyConfig *config);
|
|
190
|
+
PyAPI_FUNC(int) _PyConfig_FromDict(PyConfig *config, PyObject *dict);
|
|
191
|
+
PyAPI_FUNC(PyObject*) _Py_Get_Getpath_CodeObject(void);
|
|
192
|
+
PyAPI_FUNC(PyObject*) _Py_GetConfigsAsDict(void);
|
|
193
|
+
|
|
194
|
+
#ifdef __cplusplus
|
|
195
|
+
}
|
|
196
|
+
#endif
|
|
197
|
+
#endif /* !Py_INTERNAL_CORECONFIG_H */
|
pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_INSTRUCTION_SEQUENCE_H
|
|
2
|
+
#define Py_INTERNAL_INSTRUCTION_SEQUENCE_H
|
|
3
|
+
|
|
4
|
+
#ifndef Py_BUILD_CORE
|
|
5
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include "pycore_symtable.h"
|
|
9
|
+
|
|
10
|
+
#ifdef __cplusplus
|
|
11
|
+
extern "C" {
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
typedef struct {
|
|
16
|
+
int h_label;
|
|
17
|
+
int h_startdepth;
|
|
18
|
+
int h_preserve_lasti;
|
|
19
|
+
} _PyExceptHandlerInfo;
|
|
20
|
+
|
|
21
|
+
typedef struct {
|
|
22
|
+
int i_opcode;
|
|
23
|
+
int i_oparg;
|
|
24
|
+
_Py_SourceLocation i_loc;
|
|
25
|
+
_PyExceptHandlerInfo i_except_handler_info;
|
|
26
|
+
|
|
27
|
+
/* Temporary fields, used by the assembler and in instr_sequence_to_cfg */
|
|
28
|
+
int i_target;
|
|
29
|
+
int i_offset;
|
|
30
|
+
} _PyInstruction;
|
|
31
|
+
|
|
32
|
+
typedef struct instruction_sequence {
|
|
33
|
+
PyObject_HEAD
|
|
34
|
+
_PyInstruction *s_instrs;
|
|
35
|
+
int s_allocated;
|
|
36
|
+
int s_used;
|
|
37
|
+
|
|
38
|
+
int s_next_free_label; /* next free label id */
|
|
39
|
+
|
|
40
|
+
/* Map of a label id to instruction offset (index into s_instrs).
|
|
41
|
+
* If s_labelmap is NULL, then each label id is the offset itself.
|
|
42
|
+
*/
|
|
43
|
+
int *s_labelmap;
|
|
44
|
+
int s_labelmap_size;
|
|
45
|
+
|
|
46
|
+
/* PyList of instruction sequences of nested functions */
|
|
47
|
+
PyObject *s_nested;
|
|
48
|
+
|
|
49
|
+
/* Code for creating annotations, spliced into the main sequence later */
|
|
50
|
+
struct instruction_sequence *s_annotations_code;
|
|
51
|
+
} _PyInstructionSequence;
|
|
52
|
+
|
|
53
|
+
typedef struct {
|
|
54
|
+
int id;
|
|
55
|
+
} _PyJumpTargetLabel;
|
|
56
|
+
|
|
57
|
+
#define NO_LABEL ((const _PyJumpTargetLabel){-1})
|
|
58
|
+
|
|
59
|
+
#define SAME_JUMP_TARGET_LABEL(L1, L2) ((L1).id == (L2).id)
|
|
60
|
+
#define IS_JUMP_TARGET_LABEL(L) (!SAME_JUMP_TARGET_LABEL((L), (NO_LABEL)))
|
|
61
|
+
|
|
62
|
+
PyAPI_FUNC(PyObject*)_PyInstructionSequence_New(void);
|
|
63
|
+
|
|
64
|
+
int _PyInstructionSequence_UseLabel(_PyInstructionSequence *seq, int lbl);
|
|
65
|
+
int _PyInstructionSequence_Addop(_PyInstructionSequence *seq,
|
|
66
|
+
int opcode, int oparg,
|
|
67
|
+
_Py_SourceLocation loc);
|
|
68
|
+
_PyJumpTargetLabel _PyInstructionSequence_NewLabel(_PyInstructionSequence *seq);
|
|
69
|
+
int _PyInstructionSequence_ApplyLabelMap(_PyInstructionSequence *seq);
|
|
70
|
+
int _PyInstructionSequence_InsertInstruction(_PyInstructionSequence *seq, int pos,
|
|
71
|
+
int opcode, int oparg, _Py_SourceLocation loc);
|
|
72
|
+
int _PyInstructionSequence_SetAnnotationsCode(_PyInstructionSequence *seq,
|
|
73
|
+
_PyInstructionSequence *annotations);
|
|
74
|
+
int _PyInstructionSequence_AddNested(_PyInstructionSequence *seq, _PyInstructionSequence *nested);
|
|
75
|
+
void PyInstructionSequence_Fini(_PyInstructionSequence *seq);
|
|
76
|
+
|
|
77
|
+
extern PyTypeObject _PyInstructionSequence_Type;
|
|
78
|
+
#define _PyInstructionSequence_Check(v) Py_IS_TYPE((v), &_PyInstructionSequence_Type)
|
|
79
|
+
|
|
80
|
+
#ifdef __cplusplus
|
|
81
|
+
}
|
|
82
|
+
#endif
|
|
83
|
+
#endif /* !Py_INTERNAL_INSTRUCTION_SEQUENCE_H */
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_INSTRUMENT_H
|
|
2
|
+
#define Py_INTERNAL_INSTRUMENT_H
|
|
3
|
+
|
|
4
|
+
#ifndef Py_BUILD_CORE
|
|
5
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include "pycore_structs.h" // _Py_CODEUNIT
|
|
9
|
+
#include "pycore_typedefs.h" // _PyInterpreterFrame
|
|
10
|
+
|
|
11
|
+
#ifdef __cplusplus
|
|
12
|
+
extern "C" {
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
typedef uint32_t _PyMonitoringEventSet;
|
|
16
|
+
|
|
17
|
+
/* Tool IDs */
|
|
18
|
+
|
|
19
|
+
/* These are defined in PEP 669 for convenience to avoid clashes */
|
|
20
|
+
#define PY_MONITORING_DEBUGGER_ID 0
|
|
21
|
+
#define PY_MONITORING_COVERAGE_ID 1
|
|
22
|
+
#define PY_MONITORING_PROFILER_ID 2
|
|
23
|
+
#define PY_MONITORING_OPTIMIZER_ID 5
|
|
24
|
+
|
|
25
|
+
/* Internal IDs used to support sys.setprofile() and sys.settrace() */
|
|
26
|
+
#define PY_MONITORING_SYS_PROFILE_ID 6
|
|
27
|
+
#define PY_MONITORING_SYS_TRACE_ID 7
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
PyObject *_PyMonitoring_RegisterCallback(int tool_id, int event_id, PyObject *obj);
|
|
31
|
+
|
|
32
|
+
int _PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events);
|
|
33
|
+
int _PyMonitoring_SetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEventSet events);
|
|
34
|
+
int _PyMonitoring_GetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEventSet *events);
|
|
35
|
+
|
|
36
|
+
extern int
|
|
37
|
+
_Py_call_instrumentation(PyThreadState *tstate, int event,
|
|
38
|
+
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr);
|
|
39
|
+
|
|
40
|
+
extern int
|
|
41
|
+
_Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
|
|
42
|
+
_Py_CODEUNIT *instr, _Py_CODEUNIT *prev);
|
|
43
|
+
|
|
44
|
+
extern int
|
|
45
|
+
_Py_call_instrumentation_instruction(
|
|
46
|
+
PyThreadState *tstate, _PyInterpreterFrame* frame, _Py_CODEUNIT *instr);
|
|
47
|
+
|
|
48
|
+
_Py_CODEUNIT *
|
|
49
|
+
_Py_call_instrumentation_jump(
|
|
50
|
+
_Py_CODEUNIT *instr, PyThreadState *tstate, int event,
|
|
51
|
+
_PyInterpreterFrame *frame, _Py_CODEUNIT *src, _Py_CODEUNIT *dest);
|
|
52
|
+
|
|
53
|
+
extern int
|
|
54
|
+
_Py_call_instrumentation_arg(PyThreadState *tstate, int event,
|
|
55
|
+
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg);
|
|
56
|
+
|
|
57
|
+
extern int
|
|
58
|
+
_Py_call_instrumentation_2args(PyThreadState *tstate, int event,
|
|
59
|
+
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg0, PyObject *arg1);
|
|
60
|
+
|
|
61
|
+
extern void
|
|
62
|
+
_Py_call_instrumentation_exc2(PyThreadState *tstate, int event,
|
|
63
|
+
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg0, PyObject *arg1);
|
|
64
|
+
|
|
65
|
+
extern int
|
|
66
|
+
_Py_Instrumentation_GetLine(PyCodeObject *code, int index);
|
|
67
|
+
|
|
68
|
+
extern PyObject _PyInstrumentation_MISSING;
|
|
69
|
+
extern PyObject _PyInstrumentation_DISABLE;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/* Total tool ids available */
|
|
73
|
+
#define PY_MONITORING_TOOL_IDS 8
|
|
74
|
+
/* Count of all local monitoring events */
|
|
75
|
+
#define _PY_MONITORING_LOCAL_EVENTS 11
|
|
76
|
+
/* Count of all "real" monitoring events (not derived from other events) */
|
|
77
|
+
#define _PY_MONITORING_UNGROUPED_EVENTS 16
|
|
78
|
+
/* Count of all monitoring events */
|
|
79
|
+
#define _PY_MONITORING_EVENTS 19
|
|
80
|
+
|
|
81
|
+
/* Tables of which tools are active for each monitored event. */
|
|
82
|
+
typedef struct _Py_LocalMonitors {
|
|
83
|
+
uint8_t tools[_PY_MONITORING_LOCAL_EVENTS];
|
|
84
|
+
} _Py_LocalMonitors;
|
|
85
|
+
|
|
86
|
+
typedef struct _Py_GlobalMonitors {
|
|
87
|
+
uint8_t tools[_PY_MONITORING_UNGROUPED_EVENTS];
|
|
88
|
+
} _Py_GlobalMonitors;
|
|
89
|
+
|
|
90
|
+
/* Ancillary data structure used for instrumentation.
|
|
91
|
+
Line instrumentation creates this with sufficient
|
|
92
|
+
space for one entry per code unit. The total size
|
|
93
|
+
of the data will be `bytes_per_entry * Py_SIZE(code)` */
|
|
94
|
+
typedef struct {
|
|
95
|
+
uint8_t bytes_per_entry;
|
|
96
|
+
uint8_t data[1];
|
|
97
|
+
} _PyCoLineInstrumentationData;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/* Main data structure used for instrumentation.
|
|
101
|
+
* This is allocated when needed for instrumentation
|
|
102
|
+
*/
|
|
103
|
+
typedef struct _PyCoMonitoringData {
|
|
104
|
+
/* Monitoring specific to this code object */
|
|
105
|
+
_Py_LocalMonitors local_monitors;
|
|
106
|
+
/* Monitoring that is active on this code object */
|
|
107
|
+
_Py_LocalMonitors active_monitors;
|
|
108
|
+
/* The tools that are to be notified for events for the matching code unit */
|
|
109
|
+
uint8_t *tools;
|
|
110
|
+
/* The version of tools when they instrument the code */
|
|
111
|
+
uintptr_t tool_versions[PY_MONITORING_TOOL_IDS];
|
|
112
|
+
/* Information to support line events */
|
|
113
|
+
_PyCoLineInstrumentationData *lines;
|
|
114
|
+
/* The tools that are to be notified for line events for the matching code unit */
|
|
115
|
+
uint8_t *line_tools;
|
|
116
|
+
/* Information to support instruction events */
|
|
117
|
+
/* The underlying instructions, which can themselves be instrumented */
|
|
118
|
+
uint8_t *per_instruction_opcodes;
|
|
119
|
+
/* The tools that are to be notified for instruction events for the matching code unit */
|
|
120
|
+
uint8_t *per_instruction_tools;
|
|
121
|
+
} _PyCoMonitoringData;
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
#ifdef __cplusplus
|
|
125
|
+
}
|
|
126
|
+
#endif
|
|
127
|
+
#endif /* !Py_INTERNAL_INSTRUMENT_H */
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_INTERP_H
|
|
2
|
+
#define Py_INTERNAL_INTERP_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_interp_structs.h" // PyInterpreterState
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/* interpreter state */
|
|
15
|
+
|
|
16
|
+
#define _PyInterpreterState_WHENCE_NOTSET -1
|
|
17
|
+
#define _PyInterpreterState_WHENCE_UNKNOWN 0
|
|
18
|
+
#define _PyInterpreterState_WHENCE_RUNTIME 1
|
|
19
|
+
#define _PyInterpreterState_WHENCE_LEGACY_CAPI 2
|
|
20
|
+
#define _PyInterpreterState_WHENCE_CAPI 3
|
|
21
|
+
#define _PyInterpreterState_WHENCE_XI 4
|
|
22
|
+
#define _PyInterpreterState_WHENCE_STDLIB 5
|
|
23
|
+
#define _PyInterpreterState_WHENCE_MAX 5
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* other API */
|
|
27
|
+
|
|
28
|
+
extern void _PyInterpreterState_Clear(PyThreadState *tstate);
|
|
29
|
+
|
|
30
|
+
static inline PyThreadState*
|
|
31
|
+
_PyInterpreterState_GetFinalizing(PyInterpreterState *interp) {
|
|
32
|
+
return (PyThreadState*)_Py_atomic_load_ptr_relaxed(&interp->_finalizing);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static inline unsigned long
|
|
36
|
+
_PyInterpreterState_GetFinalizingID(PyInterpreterState *interp) {
|
|
37
|
+
return _Py_atomic_load_ulong_relaxed(&interp->_finalizing_id);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static inline void
|
|
41
|
+
_PyInterpreterState_SetFinalizing(PyInterpreterState *interp, PyThreadState *tstate) {
|
|
42
|
+
_Py_atomic_store_ptr_relaxed(&interp->_finalizing, tstate);
|
|
43
|
+
if (tstate == NULL) {
|
|
44
|
+
_Py_atomic_store_ulong_relaxed(&interp->_finalizing_id, 0);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// XXX Re-enable this assert once gh-109860 is fixed.
|
|
48
|
+
//assert(tstate->thread_id == PyThread_get_thread_ident());
|
|
49
|
+
_Py_atomic_store_ulong_relaxed(&interp->_finalizing_id,
|
|
50
|
+
tstate->thread_id);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// Exports for the _testinternalcapi module.
|
|
56
|
+
PyAPI_FUNC(int64_t) _PyInterpreterState_ObjectToID(PyObject *);
|
|
57
|
+
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpID(int64_t);
|
|
58
|
+
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpIDObject(PyObject *);
|
|
59
|
+
PyAPI_FUNC(void) _PyInterpreterState_IDIncref(PyInterpreterState *);
|
|
60
|
+
PyAPI_FUNC(void) _PyInterpreterState_IDDecref(PyInterpreterState *);
|
|
61
|
+
|
|
62
|
+
PyAPI_FUNC(int) _PyInterpreterState_IsReady(PyInterpreterState *interp);
|
|
63
|
+
|
|
64
|
+
PyAPI_FUNC(long) _PyInterpreterState_GetWhence(PyInterpreterState *interp);
|
|
65
|
+
extern void _PyInterpreterState_SetWhence(
|
|
66
|
+
PyInterpreterState *interp,
|
|
67
|
+
long whence);
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
Runtime Feature Flags
|
|
71
|
+
|
|
72
|
+
Each flag indicate whether or not a specific runtime feature
|
|
73
|
+
is available in a given context. For example, forking the process
|
|
74
|
+
might not be allowed in the current interpreter (i.e. os.fork() would fail).
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/* Set if the interpreter share obmalloc runtime state
|
|
78
|
+
with the main interpreter. */
|
|
79
|
+
#define Py_RTFLAGS_USE_MAIN_OBMALLOC (1UL << 5)
|
|
80
|
+
|
|
81
|
+
/* Set if import should check a module for subinterpreter support. */
|
|
82
|
+
#define Py_RTFLAGS_MULTI_INTERP_EXTENSIONS (1UL << 8)
|
|
83
|
+
|
|
84
|
+
/* Set if threads are allowed. */
|
|
85
|
+
#define Py_RTFLAGS_THREADS (1UL << 10)
|
|
86
|
+
|
|
87
|
+
/* Set if daemon threads are allowed. */
|
|
88
|
+
#define Py_RTFLAGS_DAEMON_THREADS (1UL << 11)
|
|
89
|
+
|
|
90
|
+
/* Set if os.fork() is allowed. */
|
|
91
|
+
#define Py_RTFLAGS_FORK (1UL << 15)
|
|
92
|
+
|
|
93
|
+
/* Set if os.exec*() is allowed. */
|
|
94
|
+
#define Py_RTFLAGS_EXEC (1UL << 16)
|
|
95
|
+
|
|
96
|
+
extern int _PyInterpreterState_HasFeature(PyInterpreterState *interp,
|
|
97
|
+
unsigned long feature);
|
|
98
|
+
|
|
99
|
+
PyAPI_FUNC(PyStatus) _PyInterpreterState_New(
|
|
100
|
+
PyThreadState *tstate,
|
|
101
|
+
PyInterpreterState **pinterp);
|
|
102
|
+
|
|
103
|
+
extern const PyConfig* _PyInterpreterState_GetConfig(
|
|
104
|
+
PyInterpreterState *interp);
|
|
105
|
+
|
|
106
|
+
#ifdef __cplusplus
|
|
107
|
+
}
|
|
108
|
+
#endif
|
|
109
|
+
#endif /* !Py_INTERNAL_INTERP_H */
|