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,164 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TRACEMALLOC_H
|
|
2
|
+
#define Py_INTERNAL_TRACEMALLOC_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_hashtable.h" // _Py_hashtable_t
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
struct _PyTraceMalloc_Config {
|
|
15
|
+
/* Module initialized?
|
|
16
|
+
Variable protected by the GIL */
|
|
17
|
+
enum {
|
|
18
|
+
TRACEMALLOC_NOT_INITIALIZED,
|
|
19
|
+
TRACEMALLOC_INITIALIZED,
|
|
20
|
+
TRACEMALLOC_FINALIZED
|
|
21
|
+
} initialized;
|
|
22
|
+
|
|
23
|
+
/* Is tracemalloc tracing memory allocations?
|
|
24
|
+
Variable protected by the TABLES_LOCK(). */
|
|
25
|
+
int tracing;
|
|
26
|
+
|
|
27
|
+
/* limit of the number of frames in a traceback, 1 by default.
|
|
28
|
+
Variable protected by the GIL. */
|
|
29
|
+
int max_nframe;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/* Pack the frame_t structure to reduce the memory footprint on 64-bit
|
|
34
|
+
architectures: 12 bytes instead of 16. */
|
|
35
|
+
#if defined(_MSC_VER)
|
|
36
|
+
#pragma pack(push, 4)
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
struct
|
|
40
|
+
#ifdef __GNUC__
|
|
41
|
+
__attribute__((packed))
|
|
42
|
+
#endif
|
|
43
|
+
tracemalloc_frame {
|
|
44
|
+
/* filename cannot be NULL: "<unknown>" is used if the Python frame
|
|
45
|
+
filename is NULL */
|
|
46
|
+
PyObject *filename;
|
|
47
|
+
unsigned int lineno;
|
|
48
|
+
};
|
|
49
|
+
#ifdef _MSC_VER
|
|
50
|
+
#pragma pack(pop)
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
struct tracemalloc_traceback {
|
|
54
|
+
Py_uhash_t hash;
|
|
55
|
+
/* Number of frames stored */
|
|
56
|
+
uint16_t nframe;
|
|
57
|
+
/* Total number of frames the traceback had */
|
|
58
|
+
uint16_t total_nframe;
|
|
59
|
+
struct tracemalloc_frame frames[1];
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
struct _tracemalloc_runtime_state {
|
|
64
|
+
struct _PyTraceMalloc_Config config;
|
|
65
|
+
|
|
66
|
+
/* Protected by the GIL */
|
|
67
|
+
struct {
|
|
68
|
+
PyMemAllocatorEx mem;
|
|
69
|
+
PyMemAllocatorEx raw;
|
|
70
|
+
PyMemAllocatorEx obj;
|
|
71
|
+
} allocators;
|
|
72
|
+
|
|
73
|
+
PyMutex tables_lock;
|
|
74
|
+
/* Size in bytes of currently traced memory.
|
|
75
|
+
Protected by TABLES_LOCK(). */
|
|
76
|
+
size_t traced_memory;
|
|
77
|
+
/* Peak size in bytes of traced memory.
|
|
78
|
+
Protected by TABLES_LOCK(). */
|
|
79
|
+
size_t peak_traced_memory;
|
|
80
|
+
/* Hash table used as a set to intern filenames:
|
|
81
|
+
PyObject* => PyObject*.
|
|
82
|
+
Protected by the TABLES_LOCK(). */
|
|
83
|
+
_Py_hashtable_t *filenames;
|
|
84
|
+
/* Buffer to store a new traceback in traceback_new().
|
|
85
|
+
Protected by the TABLES_LOCK(). */
|
|
86
|
+
struct tracemalloc_traceback *traceback;
|
|
87
|
+
/* Hash table used as a set to intern tracebacks:
|
|
88
|
+
traceback_t* => traceback_t*
|
|
89
|
+
Protected by the TABLES_LOCK(). */
|
|
90
|
+
_Py_hashtable_t *tracebacks;
|
|
91
|
+
/* pointer (void*) => trace (trace_t*).
|
|
92
|
+
Protected by TABLES_LOCK(). */
|
|
93
|
+
_Py_hashtable_t *traces;
|
|
94
|
+
/* domain (unsigned int) => traces (_Py_hashtable_t).
|
|
95
|
+
Protected by TABLES_LOCK(). */
|
|
96
|
+
_Py_hashtable_t *domains;
|
|
97
|
+
|
|
98
|
+
struct tracemalloc_traceback empty_traceback;
|
|
99
|
+
|
|
100
|
+
Py_tss_t reentrant_key;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
#define _tracemalloc_runtime_state_INIT \
|
|
104
|
+
{ \
|
|
105
|
+
.config = { \
|
|
106
|
+
.initialized = TRACEMALLOC_NOT_INITIALIZED, \
|
|
107
|
+
.tracing = 0, \
|
|
108
|
+
.max_nframe = 1, \
|
|
109
|
+
}, \
|
|
110
|
+
.reentrant_key = Py_tss_NEEDS_INIT, \
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// Get the traceback where a memory block was allocated.
|
|
115
|
+
//
|
|
116
|
+
// Return a tuple of (filename: str, lineno: int) tuples.
|
|
117
|
+
//
|
|
118
|
+
// Return None if the tracemalloc module is disabled or if the memory block
|
|
119
|
+
// is not tracked by tracemalloc.
|
|
120
|
+
//
|
|
121
|
+
// Raise an exception and return NULL on error.
|
|
122
|
+
//
|
|
123
|
+
// Export for '_testinternalcapi' shared extension.
|
|
124
|
+
PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback(
|
|
125
|
+
unsigned int domain,
|
|
126
|
+
uintptr_t ptr);
|
|
127
|
+
|
|
128
|
+
/* Return non-zero if tracemalloc is tracing */
|
|
129
|
+
extern int _PyTraceMalloc_IsTracing(void);
|
|
130
|
+
|
|
131
|
+
/* Clear the tracemalloc traces */
|
|
132
|
+
extern void _PyTraceMalloc_ClearTraces(void);
|
|
133
|
+
|
|
134
|
+
/* Clear the tracemalloc traces */
|
|
135
|
+
extern PyObject* _PyTraceMalloc_GetTraces(void);
|
|
136
|
+
|
|
137
|
+
/* Clear tracemalloc traceback for an object */
|
|
138
|
+
extern PyObject* _PyTraceMalloc_GetObjectTraceback(PyObject *obj);
|
|
139
|
+
|
|
140
|
+
/* Initialize tracemalloc */
|
|
141
|
+
extern PyStatus _PyTraceMalloc_Init(void);
|
|
142
|
+
|
|
143
|
+
/* Start tracemalloc */
|
|
144
|
+
extern int _PyTraceMalloc_Start(int max_nframe);
|
|
145
|
+
|
|
146
|
+
/* Stop tracemalloc */
|
|
147
|
+
extern void _PyTraceMalloc_Stop(void);
|
|
148
|
+
|
|
149
|
+
/* Get the tracemalloc traceback limit */
|
|
150
|
+
extern int _PyTraceMalloc_GetTracebackLimit(void);
|
|
151
|
+
|
|
152
|
+
/* Get the memory usage of tracemalloc in bytes */
|
|
153
|
+
extern size_t _PyTraceMalloc_GetMemory(void);
|
|
154
|
+
|
|
155
|
+
/* Get the current size and peak size of traced memory blocks as a 2-tuple */
|
|
156
|
+
extern PyObject* _PyTraceMalloc_GetTracedMemory(void);
|
|
157
|
+
|
|
158
|
+
/* Set the peak size of traced memory blocks to the current size */
|
|
159
|
+
extern void _PyTraceMalloc_ResetPeak(void);
|
|
160
|
+
|
|
161
|
+
#ifdef __cplusplus
|
|
162
|
+
}
|
|
163
|
+
#endif
|
|
164
|
+
#endif // !Py_INTERNAL_TRACEMALLOC_H
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TSTATE_H
|
|
2
|
+
#define Py_INTERNAL_TSTATE_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_brc.h" // struct _brc_thread_state
|
|
12
|
+
#include "pycore_freelist_state.h" // struct _Py_freelists
|
|
13
|
+
#include "pycore_mimalloc.h" // struct _mimalloc_thread_state
|
|
14
|
+
#include "pycore_qsbr.h" // struct qsbr
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#ifdef Py_GIL_DISABLED
|
|
18
|
+
struct _gc_thread_state {
|
|
19
|
+
/* Thread-local allocation count. */
|
|
20
|
+
Py_ssize_t alloc_count;
|
|
21
|
+
};
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
// Every PyThreadState is actually allocated as a _PyThreadStateImpl. The
|
|
25
|
+
// PyThreadState fields are exposed as part of the C API, although most fields
|
|
26
|
+
// are intended to be private. The _PyThreadStateImpl fields not exposed.
|
|
27
|
+
typedef struct _PyThreadStateImpl {
|
|
28
|
+
// semi-public fields are in PyThreadState.
|
|
29
|
+
PyThreadState base;
|
|
30
|
+
|
|
31
|
+
// The reference count field is used to synchronize deallocation of the
|
|
32
|
+
// thread state during runtime finalization.
|
|
33
|
+
Py_ssize_t refcount;
|
|
34
|
+
|
|
35
|
+
// These are addresses, but we need to convert to ints to avoid UB.
|
|
36
|
+
uintptr_t c_stack_top;
|
|
37
|
+
uintptr_t c_stack_soft_limit;
|
|
38
|
+
uintptr_t c_stack_hard_limit;
|
|
39
|
+
|
|
40
|
+
PyObject *asyncio_running_loop; // Strong reference
|
|
41
|
+
PyObject *asyncio_running_task; // Strong reference
|
|
42
|
+
|
|
43
|
+
/* Head of circular linked-list of all tasks which are instances of `asyncio.Task`
|
|
44
|
+
or subclasses of it used in `asyncio.all_tasks`.
|
|
45
|
+
*/
|
|
46
|
+
struct llist_node asyncio_tasks_head;
|
|
47
|
+
struct _qsbr_thread_state *qsbr; // only used by free-threaded build
|
|
48
|
+
struct llist_node mem_free_queue; // delayed free queue
|
|
49
|
+
|
|
50
|
+
#ifdef Py_GIL_DISABLED
|
|
51
|
+
// Stack references for the current thread that exist on the C stack
|
|
52
|
+
struct _PyCStackRef *c_stack_refs;
|
|
53
|
+
struct _gc_thread_state gc;
|
|
54
|
+
struct _mimalloc_thread_state mimalloc;
|
|
55
|
+
struct _Py_freelists freelists;
|
|
56
|
+
struct _brc_thread_state brc;
|
|
57
|
+
struct {
|
|
58
|
+
// The per-thread refcounts
|
|
59
|
+
Py_ssize_t *values;
|
|
60
|
+
|
|
61
|
+
// Size of the refcounts array.
|
|
62
|
+
Py_ssize_t size;
|
|
63
|
+
|
|
64
|
+
// If set, don't use per-thread refcounts
|
|
65
|
+
int is_finalized;
|
|
66
|
+
} refcounts;
|
|
67
|
+
|
|
68
|
+
// Index to use to retrieve thread-local bytecode for this thread
|
|
69
|
+
int32_t tlbc_index;
|
|
70
|
+
|
|
71
|
+
// When >1, code objects do not immortalize their non-string constants.
|
|
72
|
+
int suppress_co_const_immortalization;
|
|
73
|
+
#endif
|
|
74
|
+
|
|
75
|
+
#if defined(Py_REF_DEBUG) && defined(Py_GIL_DISABLED)
|
|
76
|
+
Py_ssize_t reftotal; // this thread's total refcount operations
|
|
77
|
+
#endif
|
|
78
|
+
|
|
79
|
+
// PyUnstable_ThreadState_ResetStackProtection() values
|
|
80
|
+
uintptr_t c_stack_init_base;
|
|
81
|
+
uintptr_t c_stack_init_top;
|
|
82
|
+
|
|
83
|
+
} _PyThreadStateImpl;
|
|
84
|
+
|
|
85
|
+
#ifdef __cplusplus
|
|
86
|
+
}
|
|
87
|
+
#endif
|
|
88
|
+
#endif /* !Py_INTERNAL_TSTATE_H */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TUPLE_H
|
|
2
|
+
#define Py_INTERNAL_TUPLE_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_object.h" // _PyObject_GC_IS_TRACKED
|
|
12
|
+
#include "pycore_structs.h" // _PyStackRef
|
|
13
|
+
|
|
14
|
+
extern void _PyTuple_MaybeUntrack(PyObject *);
|
|
15
|
+
extern void _PyTuple_DebugMallocStats(FILE *out);
|
|
16
|
+
|
|
17
|
+
/* runtime lifecycle */
|
|
18
|
+
|
|
19
|
+
extern PyStatus _PyTuple_InitGlobalObjects(PyInterpreterState *);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/* other API */
|
|
23
|
+
|
|
24
|
+
#define _PyTuple_ITEMS(op) _Py_RVALUE(_PyTuple_CAST(op)->ob_item)
|
|
25
|
+
|
|
26
|
+
PyAPI_FUNC(PyObject *)_PyTuple_FromArray(PyObject *const *, Py_ssize_t);
|
|
27
|
+
PyAPI_FUNC(PyObject *)_PyTuple_FromStackRefStealOnSuccess(const union _PyStackRef *, Py_ssize_t);
|
|
28
|
+
PyAPI_FUNC(PyObject *)_PyTuple_FromArraySteal(PyObject *const *, Py_ssize_t);
|
|
29
|
+
|
|
30
|
+
typedef struct {
|
|
31
|
+
PyObject_HEAD
|
|
32
|
+
Py_ssize_t it_index;
|
|
33
|
+
PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
|
|
34
|
+
} _PyTupleIterObject;
|
|
35
|
+
|
|
36
|
+
#define _PyTuple_RESET_HASH_CACHE(op) \
|
|
37
|
+
do { \
|
|
38
|
+
assert(op != NULL); \
|
|
39
|
+
_PyTuple_CAST(op)->ob_hash = -1; \
|
|
40
|
+
} while (0)
|
|
41
|
+
|
|
42
|
+
/* bpo-42536: If reusing a tuple object, this should be called to re-track it
|
|
43
|
+
with the garbage collector and reset its hash cache. */
|
|
44
|
+
static inline void
|
|
45
|
+
_PyTuple_Recycle(PyObject *op)
|
|
46
|
+
{
|
|
47
|
+
_PyTuple_RESET_HASH_CACHE(op);
|
|
48
|
+
if (!_PyObject_GC_IS_TRACKED(op)) {
|
|
49
|
+
_PyObject_GC_TRACK(op);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Below are the official constants from the xxHash specification. Optimizing
|
|
54
|
+
compilers should emit a single "rotate" instruction for the
|
|
55
|
+
_PyTuple_HASH_XXROTATE() expansion. If that doesn't happen for some important
|
|
56
|
+
platform, the macro could be changed to expand to a platform-specific rotate
|
|
57
|
+
spelling instead.
|
|
58
|
+
*/
|
|
59
|
+
#if SIZEOF_PY_UHASH_T > 4
|
|
60
|
+
#define _PyTuple_HASH_XXPRIME_1 ((Py_uhash_t)11400714785074694791ULL)
|
|
61
|
+
#define _PyTuple_HASH_XXPRIME_2 ((Py_uhash_t)14029467366897019727ULL)
|
|
62
|
+
#define _PyTuple_HASH_XXPRIME_5 ((Py_uhash_t)2870177450012600261ULL)
|
|
63
|
+
#define _PyTuple_HASH_XXROTATE(x) ((x << 31) | (x >> 33)) /* Rotate left 31 bits */
|
|
64
|
+
#else
|
|
65
|
+
#define _PyTuple_HASH_XXPRIME_1 ((Py_uhash_t)2654435761UL)
|
|
66
|
+
#define _PyTuple_HASH_XXPRIME_2 ((Py_uhash_t)2246822519UL)
|
|
67
|
+
#define _PyTuple_HASH_XXPRIME_5 ((Py_uhash_t)374761393UL)
|
|
68
|
+
#define _PyTuple_HASH_XXROTATE(x) ((x << 13) | (x >> 19)) /* Rotate left 13 bits */
|
|
69
|
+
#endif
|
|
70
|
+
#define _PyTuple_HASH_EMPTY (_PyTuple_HASH_XXPRIME_5 + (_PyTuple_HASH_XXPRIME_5 ^ 3527539UL))
|
|
71
|
+
|
|
72
|
+
#ifdef __cplusplus
|
|
73
|
+
}
|
|
74
|
+
#endif
|
|
75
|
+
#endif /* !Py_INTERNAL_TUPLE_H */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TYPEDEFS_H
|
|
2
|
+
#define Py_INTERNAL_TYPEDEFS_H
|
|
3
|
+
|
|
4
|
+
#ifndef Py_BUILD_CORE
|
|
5
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#ifdef __cplusplus
|
|
9
|
+
extern "C" {
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
typedef struct _PyInterpreterFrame _PyInterpreterFrame;
|
|
13
|
+
typedef struct pyruntimestate _PyRuntimeState;
|
|
14
|
+
|
|
15
|
+
#ifdef __cplusplus
|
|
16
|
+
}
|
|
17
|
+
#endif
|
|
18
|
+
#endif // !Py_INTERNAL_TYPEDEFS_H
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TYPEOBJECT_H
|
|
2
|
+
#define Py_INTERNAL_TYPEOBJECT_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" // managed_static_type_state
|
|
12
|
+
#include "pycore_moduleobject.h" // PyModuleObject
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/* state */
|
|
16
|
+
|
|
17
|
+
#define _Py_TYPE_VERSION_INT 1
|
|
18
|
+
#define _Py_TYPE_VERSION_FLOAT 2
|
|
19
|
+
#define _Py_TYPE_VERSION_LIST 3
|
|
20
|
+
#define _Py_TYPE_VERSION_TUPLE 4
|
|
21
|
+
#define _Py_TYPE_VERSION_STR 5
|
|
22
|
+
#define _Py_TYPE_VERSION_SET 6
|
|
23
|
+
#define _Py_TYPE_VERSION_FROZEN_SET 7
|
|
24
|
+
#define _Py_TYPE_VERSION_DICT 8
|
|
25
|
+
#define _Py_TYPE_VERSION_BYTEARRAY 9
|
|
26
|
+
#define _Py_TYPE_VERSION_BYTES 10
|
|
27
|
+
#define _Py_TYPE_VERSION_COMPLEX 11
|
|
28
|
+
|
|
29
|
+
#define _Py_TYPE_VERSION_NEXT 16
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
#define _Py_TYPE_BASE_VERSION_TAG (2<<16)
|
|
33
|
+
#define _Py_MAX_GLOBAL_TYPE_VERSION_TAG (_Py_TYPE_BASE_VERSION_TAG - 1)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/* runtime lifecycle */
|
|
37
|
+
|
|
38
|
+
extern PyStatus _PyTypes_InitTypes(PyInterpreterState *);
|
|
39
|
+
extern void _PyTypes_FiniTypes(PyInterpreterState *);
|
|
40
|
+
extern void _PyTypes_FiniExtTypes(PyInterpreterState *interp);
|
|
41
|
+
extern void _PyTypes_Fini(PyInterpreterState *);
|
|
42
|
+
extern void _PyTypes_AfterFork(void);
|
|
43
|
+
|
|
44
|
+
static inline PyObject **
|
|
45
|
+
_PyStaticType_GET_WEAKREFS_LISTPTR(managed_static_type_state *state)
|
|
46
|
+
{
|
|
47
|
+
assert(state != NULL);
|
|
48
|
+
return &state->tp_weaklist;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
extern int _PyStaticType_InitBuiltin(
|
|
52
|
+
PyInterpreterState *interp,
|
|
53
|
+
PyTypeObject *type);
|
|
54
|
+
extern void _PyStaticType_FiniBuiltin(
|
|
55
|
+
PyInterpreterState *interp,
|
|
56
|
+
PyTypeObject *type);
|
|
57
|
+
extern void _PyStaticType_ClearWeakRefs(
|
|
58
|
+
PyInterpreterState *interp,
|
|
59
|
+
PyTypeObject *type);
|
|
60
|
+
extern managed_static_type_state * _PyStaticType_GetState(
|
|
61
|
+
PyInterpreterState *interp,
|
|
62
|
+
PyTypeObject *type);
|
|
63
|
+
|
|
64
|
+
// Export for '_datetime' shared extension.
|
|
65
|
+
PyAPI_FUNC(int) _PyStaticType_InitForExtension(
|
|
66
|
+
PyInterpreterState *interp,
|
|
67
|
+
PyTypeObject *self);
|
|
68
|
+
|
|
69
|
+
// Export for _testinternalcapi extension.
|
|
70
|
+
PyAPI_FUNC(PyObject *) _PyStaticType_GetBuiltins(void);
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/* Like PyType_GetModuleState, but skips verification
|
|
74
|
+
* that type is a heap type with an associated module */
|
|
75
|
+
static inline void *
|
|
76
|
+
_PyType_GetModuleState(PyTypeObject *type)
|
|
77
|
+
{
|
|
78
|
+
assert(PyType_Check(type));
|
|
79
|
+
assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);
|
|
80
|
+
PyHeapTypeObject *et = (PyHeapTypeObject *)type;
|
|
81
|
+
assert(et->ht_module);
|
|
82
|
+
PyModuleObject *mod = (PyModuleObject *)(et->ht_module);
|
|
83
|
+
assert(mod != NULL);
|
|
84
|
+
return mod->md_state;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
// Export for 'math' shared extension, used via _PyType_IsReady() static inline
|
|
89
|
+
// function
|
|
90
|
+
PyAPI_FUNC(PyObject *) _PyType_GetDict(PyTypeObject *);
|
|
91
|
+
|
|
92
|
+
extern PyObject * _PyType_GetBases(PyTypeObject *type);
|
|
93
|
+
extern PyObject * _PyType_GetMRO(PyTypeObject *type);
|
|
94
|
+
extern PyObject* _PyType_GetSubclasses(PyTypeObject *);
|
|
95
|
+
extern int _PyType_HasSubclasses(PyTypeObject *);
|
|
96
|
+
|
|
97
|
+
// Export for _testinternalcapi extension.
|
|
98
|
+
PyAPI_FUNC(PyObject *) _PyType_GetSlotWrapperNames(void);
|
|
99
|
+
|
|
100
|
+
// PyType_Ready() must be called if _PyType_IsReady() is false.
|
|
101
|
+
// See also the Py_TPFLAGS_READY flag.
|
|
102
|
+
static inline int
|
|
103
|
+
_PyType_IsReady(PyTypeObject *type)
|
|
104
|
+
{
|
|
105
|
+
return _PyType_GetDict(type) != NULL;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
extern PyObject* _Py_type_getattro_impl(PyTypeObject *type, PyObject *name,
|
|
109
|
+
int *suppress_missing_attribute);
|
|
110
|
+
extern PyObject* _Py_type_getattro(PyObject *type, PyObject *name);
|
|
111
|
+
|
|
112
|
+
extern PyObject* _Py_BaseObject_RichCompare(PyObject* self, PyObject* other, int op);
|
|
113
|
+
|
|
114
|
+
extern PyObject* _Py_slot_tp_getattro(PyObject *self, PyObject *name);
|
|
115
|
+
extern PyObject* _Py_slot_tp_getattr_hook(PyObject *self, PyObject *name);
|
|
116
|
+
|
|
117
|
+
extern PyTypeObject _PyBufferWrapper_Type;
|
|
118
|
+
|
|
119
|
+
PyAPI_FUNC(PyObject*) _PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj,
|
|
120
|
+
PyObject *name, int *meth_found);
|
|
121
|
+
|
|
122
|
+
extern PyObject* _PyType_GetFullyQualifiedName(PyTypeObject *type, char sep);
|
|
123
|
+
|
|
124
|
+
// Perform the following operation, in a thread-safe way when required by the
|
|
125
|
+
// build mode.
|
|
126
|
+
//
|
|
127
|
+
// self->tp_flags = (self->tp_flags & ~mask) | flags;
|
|
128
|
+
extern void _PyType_SetFlags(PyTypeObject *self, unsigned long mask,
|
|
129
|
+
unsigned long flags);
|
|
130
|
+
extern int _PyType_AddMethod(PyTypeObject *, PyMethodDef *);
|
|
131
|
+
|
|
132
|
+
// Like _PyType_SetFlags(), but apply the operation to self and any of its
|
|
133
|
+
// subclasses without Py_TPFLAGS_IMMUTABLETYPE set.
|
|
134
|
+
extern void _PyType_SetFlagsRecursive(PyTypeObject *self, unsigned long mask,
|
|
135
|
+
unsigned long flags);
|
|
136
|
+
|
|
137
|
+
extern unsigned int _PyType_GetVersionForCurrentState(PyTypeObject *tp);
|
|
138
|
+
PyAPI_FUNC(void) _PyType_SetVersion(PyTypeObject *tp, unsigned int version);
|
|
139
|
+
PyTypeObject *_PyType_LookupByVersion(unsigned int version);
|
|
140
|
+
|
|
141
|
+
// Function pointer type for user-defined validation function that will be
|
|
142
|
+
// called by _PyType_Validate().
|
|
143
|
+
// It should return 0 if the validation is passed, otherwise it will return -1.
|
|
144
|
+
typedef int (*_py_validate_type)(PyTypeObject *);
|
|
145
|
+
|
|
146
|
+
// It will verify the ``ty`` through user-defined validation function ``validate``,
|
|
147
|
+
// and if the validation is passed, it will set the ``tp_version`` as valid
|
|
148
|
+
// tp_version_tag from the ``ty``.
|
|
149
|
+
extern int _PyType_Validate(PyTypeObject *ty, _py_validate_type validate, unsigned int *tp_version);
|
|
150
|
+
extern int _PyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);
|
|
151
|
+
|
|
152
|
+
#ifdef __cplusplus
|
|
153
|
+
}
|
|
154
|
+
#endif
|
|
155
|
+
#endif /* !Py_INTERNAL_TYPEOBJECT_H */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TYPEVAROBJECT_H
|
|
2
|
+
#define Py_INTERNAL_TYPEVAROBJECT_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 PyObject *_Py_make_typevar(PyObject *, PyObject *, PyObject *);
|
|
12
|
+
extern PyObject *_Py_make_paramspec(PyThreadState *, PyObject *);
|
|
13
|
+
extern PyObject *_Py_make_typevartuple(PyThreadState *, PyObject *);
|
|
14
|
+
extern PyObject *_Py_make_typealias(PyThreadState *, PyObject *);
|
|
15
|
+
extern PyObject *_Py_subscript_generic(PyThreadState *, PyObject *);
|
|
16
|
+
extern PyObject *_Py_set_typeparam_default(PyThreadState *, PyObject *, PyObject *);
|
|
17
|
+
extern int _Py_initialize_generic(PyInterpreterState *);
|
|
18
|
+
extern void _Py_clear_generic_types(PyInterpreterState *);
|
|
19
|
+
extern int _Py_typing_type_repr(PyUnicodeWriter *, PyObject *);
|
|
20
|
+
|
|
21
|
+
extern PyTypeObject _PyTypeAlias_Type;
|
|
22
|
+
extern PyTypeObject _PyNoDefault_Type;
|
|
23
|
+
extern PyObject _Py_NoDefaultStruct;
|
|
24
|
+
|
|
25
|
+
#ifdef __cplusplus
|
|
26
|
+
}
|
|
27
|
+
#endif
|
|
28
|
+
#endif /* !Py_INTERNAL_TYPEVAROBJECT_H */
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Unicode name database interface */
|
|
2
|
+
#ifndef Py_INTERNAL_UCNHASH_H
|
|
3
|
+
#define Py_INTERNAL_UCNHASH_H
|
|
4
|
+
#ifdef __cplusplus
|
|
5
|
+
extern "C" {
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#ifndef Py_BUILD_CORE
|
|
9
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
/* revised ucnhash CAPI interface (exported through a "wrapper") */
|
|
13
|
+
|
|
14
|
+
#define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI"
|
|
15
|
+
|
|
16
|
+
typedef struct {
|
|
17
|
+
|
|
18
|
+
/* Get name for a given character code.
|
|
19
|
+
Returns non-zero if success, zero if not.
|
|
20
|
+
Does not set Python exceptions. */
|
|
21
|
+
int (*getname)(Py_UCS4 code, char* buffer, int buflen,
|
|
22
|
+
int with_alias_and_seq);
|
|
23
|
+
|
|
24
|
+
/* Get character code for a given name.
|
|
25
|
+
Same error handling as for getname(). */
|
|
26
|
+
int (*getcode)(const char* name, int namelen, Py_UCS4* code,
|
|
27
|
+
int with_named_seq);
|
|
28
|
+
|
|
29
|
+
} _PyUnicode_Name_CAPI;
|
|
30
|
+
|
|
31
|
+
extern _PyUnicode_Name_CAPI* _PyUnicode_GetNameCAPI(void);
|
|
32
|
+
|
|
33
|
+
#ifdef __cplusplus
|
|
34
|
+
}
|
|
35
|
+
#endif
|
|
36
|
+
#endif /* !Py_INTERNAL_UCNHASH_H */
|