Nuitka-winsvc 2.5.1__cp311-cp311-win_amd64.whl → 2.6__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Nuitka-winsvc might be problematic. Click here for more details.
- {Nuitka_winsvc-2.5.1.data → Nuitka_winsvc-2.6.data}/scripts/nuitka-run.cmd +1 -1
- {Nuitka_winsvc-2.5.1.data → Nuitka_winsvc-2.6.data}/scripts/nuitka.cmd +1 -1
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/METADATA +80 -122
- Nuitka_winsvc-2.6.dist-info/RECORD +988 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +1 -1
- nuitka/BytecodeCaching.py +1 -1
- nuitka/Bytecodes.py +1 -1
- nuitka/CacheCleanup.py +1 -1
- nuitka/Constants.py +1 -1
- nuitka/Errors.py +1 -1
- nuitka/HardImportRegistry.py +1 -1
- nuitka/MainControl.py +93 -94
- nuitka/ModuleRegistry.py +1 -1
- nuitka/OptionParsing.py +90 -20
- nuitka/Options.py +160 -53
- nuitka/OutputDirectories.py +5 -3
- nuitka/PostProcessing.py +76 -27
- nuitka/Progress.py +1 -1
- nuitka/PythonFlavors.py +9 -3
- nuitka/PythonOperators.py +1 -1
- nuitka/PythonVersions.py +8 -4
- nuitka/Serialization.py +1 -1
- nuitka/SourceCodeReferences.py +1 -1
- nuitka/Tracing.py +2 -1
- nuitka/TreeXML.py +1 -1
- nuitka/Variables.py +1 -1
- nuitka/Version.py +2 -2
- nuitka/__init__.py +1 -1
- nuitka/__main__.py +4 -1
- nuitka/__past__.py +1 -1
- nuitka/build/Backend.scons +44 -66
- nuitka/build/CCompilerVersion.scons +2 -1
- nuitka/build/DataComposerInterface.py +2 -1
- nuitka/build/Offsets.scons +644 -0
- nuitka/build/Onefile.scons +5 -13
- nuitka/build/SconsCaching.py +9 -7
- nuitka/build/SconsCompilerSettings.py +54 -31
- nuitka/build/SconsHacks.py +3 -3
- nuitka/build/SconsInterface.py +86 -56
- nuitka/build/SconsProgress.py +12 -5
- nuitka/build/SconsSpawn.py +3 -3
- nuitka/build/SconsUtils.py +20 -1
- nuitka/build/__init__.py +1 -1
- nuitka/build/include/nuitka/allocator.h +3 -1
- nuitka/build/include/nuitka/builtins.h +1 -1
- nuitka/build/include/nuitka/calling.h +1 -1
- nuitka/build/include/nuitka/checkers.h +1 -1
- nuitka/build/include/nuitka/checksum_tools.h +1 -1
- nuitka/build/include/nuitka/compiled_asyncgen.h +4 -2
- nuitka/build/include/nuitka/compiled_cell.h +1 -1
- nuitka/build/include/nuitka/compiled_coroutine.h +3 -2
- nuitka/build/include/nuitka/compiled_frame.h +5 -12
- nuitka/build/include/nuitka/compiled_function.h +2 -3
- nuitka/build/include/nuitka/compiled_generator.h +3 -2
- nuitka/build/include/nuitka/compiled_method.h +1 -1
- nuitka/build/include/nuitka/constants.h +7 -1
- nuitka/build/include/nuitka/constants_blob.h +1 -1
- nuitka/build/include/nuitka/debug_settings.h +1 -1
- nuitka/build/include/nuitka/environment_variables.h +1 -1
- nuitka/build/include/nuitka/environment_variables_system.h +1 -1
- nuitka/build/include/nuitka/exception_groups.h +1 -1
- nuitka/build/include/nuitka/exceptions.h +1 -1
- nuitka/build/include/nuitka/filesystem_paths.h +4 -1
- nuitka/build/include/nuitka/freelists.h +2 -2
- nuitka/build/include/nuitka/helper/attributes.h +1 -1
- nuitka/build/include/nuitka/helper/boolean.h +1 -1
- nuitka/build/include/nuitka/helper/bytearrays.h +1 -1
- nuitka/build/include/nuitka/helper/bytes.h +1 -1
- nuitka/build/include/nuitka/helper/calling_generated.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ne.h +1 -1
- nuitka/build/include/nuitka/helper/complex.h +1 -1
- nuitka/build/include/nuitka/helper/dictionaries.h +11 -3
- nuitka/build/include/nuitka/helper/floats.h +1 -1
- nuitka/build/include/nuitka/helper/import_hard.h +1 -1
- nuitka/build/include/nuitka/helper/indexes.h +1 -1
- nuitka/build/include/nuitka/helper/ints.h +1 -1
- nuitka/build/include/nuitka/helper/iterators.h +1 -1
- nuitka/build/include/nuitka/helper/lists.h +1 -1
- nuitka/build/include/nuitka/helper/lists_generated.h +1 -1
- nuitka/build/include/nuitka/helper/mappings.h +1 -1
- nuitka/build/include/nuitka/helper/operations.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/raising.h +1 -1
- nuitka/build/include/nuitka/helper/rangeobjects.h +1 -1
- nuitka/build/include/nuitka/helper/richcomparisons.h +1 -1
- nuitka/build/include/nuitka/helper/sequences.h +1 -1
- nuitka/build/include/nuitka/helper/sets.h +1 -1
- nuitka/build/include/nuitka/helper/slices.h +1 -1
- nuitka/build/include/nuitka/helper/strings.h +1 -1
- nuitka/build/include/nuitka/helper/subscripts.h +1 -1
- nuitka/build/include/nuitka/helper/tuples.h +13 -1
- nuitka/build/include/nuitka/helpers.h +1 -43
- nuitka/build/include/nuitka/importing.h +1 -1
- nuitka/build/include/nuitka/jit_sources.h +1 -1
- nuitka/build/include/nuitka/prelude.h +11 -10
- nuitka/build/include/nuitka/printing.h +1 -1
- nuitka/build/include/nuitka/python_pgo.h +1 -1
- nuitka/build/include/nuitka/safe_string_ops.h +1 -1
- nuitka/build/include/nuitka/threading.h +1 -1
- nuitka/build/include/nuitka/tracing.h +1 -1
- nuitka/build/include/nuitka/type_aliases.h +1 -1
- nuitka/build/include/nuitka/unfreezing.h +1 -1
- nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
- nuitka/build/inline_copy/pefile/pefile.py +8034 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +85 -71
- nuitka/build/static_src/CompiledCellType.c +2 -1
- nuitka/build/static_src/CompiledCodeHelpers.c +8 -26
- nuitka/build/static_src/CompiledCoroutineType.c +33 -35
- nuitka/build/static_src/CompiledFrameType.c +63 -5
- nuitka/build/static_src/CompiledFunctionType.c +11 -13
- nuitka/build/static_src/CompiledGeneratorType.c +64 -11
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +33 -24
- nuitka/build/static_src/CompiledMethodType.c +2 -1
- nuitka/build/static_src/GenerateHeadersMain.c +30 -0
- nuitka/build/static_src/HelpersAllocator.c +1 -1
- nuitka/build/static_src/HelpersAttributes.c +5 -2
- nuitka/build/static_src/HelpersBuiltin.c +2 -2
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +1 -1
- nuitka/build/static_src/HelpersBytes.c +1 -1
- nuitka/build/static_src/HelpersCalling.c +1 -1
- nuitka/build/static_src/HelpersCallingGenerated.c +6 -16
- nuitka/build/static_src/HelpersChecksumTools.c +1 -1
- nuitka/build/static_src/HelpersClasses.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualNe.c +1 -1
- nuitka/build/static_src/HelpersComparisonEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
- nuitka/build/static_src/HelpersComparisonGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonNe.c +1 -1
- nuitka/build/static_src/HelpersConsole.c +1 -1
- nuitka/build/static_src/HelpersConstantsBlob.c +199 -50
- nuitka/build/static_src/HelpersDeepcopy.c +4 -1
- nuitka/build/static_src/HelpersDictionaries.c +15 -3
- nuitka/build/static_src/HelpersDictionariesGenerated.c +13 -2
- nuitka/build/static_src/HelpersDumpBacktraces.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariables.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +1 -1
- nuitka/build/static_src/HelpersExceptions.c +1 -1
- nuitka/build/static_src/HelpersFiles.c +18 -10
- nuitka/build/static_src/HelpersFilesystemPaths.c +36 -16
- nuitka/build/static_src/HelpersFloats.c +1 -1
- nuitka/build/static_src/HelpersHeapStorage.c +1 -1
- nuitka/build/static_src/HelpersImport.c +1 -1
- nuitka/build/static_src/HelpersImportHard.c +1 -1
- nuitka/build/static_src/HelpersJitSources.c +1 -1
- nuitka/build/static_src/HelpersLists.c +2 -1
- nuitka/build/static_src/HelpersListsGenerated.c +1 -1
- nuitka/build/static_src/HelpersMappings.c +1 -1
- nuitka/build/static_src/HelpersMatching.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPow.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinarySub.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMod.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplacePow.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceSub.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +1 -1
- nuitka/build/static_src/HelpersProfiling.c +1 -1
- nuitka/build/static_src/HelpersPythonPgo.c +5 -2
- nuitka/build/static_src/HelpersRaising.c +1 -1
- nuitka/build/static_src/HelpersSafeStrings.c +1 -1
- nuitka/build/static_src/HelpersSequences.c +1 -1
- nuitka/build/static_src/HelpersSlices.c +1 -1
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +2 -2
- nuitka/build/static_src/HelpersTypes.c +1 -1
- nuitka/build/static_src/InspectPatcher.c +2 -1
- nuitka/build/static_src/MainProgram.c +30 -9
- nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +17 -4
- nuitka/build/static_src/OnefileBootstrap.c +3 -3
- nuitka/build/static_src/OnefileSplashScreen.cpp +1 -1
- nuitka/code_generation/AsyncgenCodes.py +5 -6
- nuitka/code_generation/AttributeCodes.py +1 -1
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +1 -1
- nuitka/code_generation/BranchCodes.py +1 -1
- nuitka/code_generation/BuiltinCodes.py +15 -5
- nuitka/code_generation/CallCodes.py +1 -1
- nuitka/code_generation/ClassCodes.py +1 -1
- nuitka/code_generation/CodeGeneration.py +23 -17
- nuitka/code_generation/CodeHelperSelection.py +1 -1
- nuitka/code_generation/CodeHelpers.py +1 -1
- nuitka/code_generation/CodeObjectCodes.py +19 -2
- nuitka/code_generation/ComparisonCodes.py +1 -1
- nuitka/code_generation/ComparisonHelperDefinitions.py +1 -1
- nuitka/code_generation/ConditionalCodes.py +1 -1
- nuitka/code_generation/ConstantCodes.py +1 -1
- nuitka/code_generation/Contexts.py +52 -39
- nuitka/code_generation/CoroutineCodes.py +4 -5
- nuitka/code_generation/CtypesCodes.py +1 -1
- nuitka/code_generation/DictCodes.py +1 -1
- nuitka/code_generation/Emission.py +1 -1
- nuitka/code_generation/ErrorCodes.py +1 -1
- nuitka/code_generation/EvalCodes.py +1 -1
- nuitka/code_generation/ExceptionCodes.py +1 -1
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -1
- nuitka/code_generation/ExpressionCodes.py +1 -1
- nuitka/code_generation/FrameCodes.py +26 -17
- nuitka/code_generation/FunctionCodes.py +9 -15
- nuitka/code_generation/GeneratorCodes.py +9 -10
- nuitka/code_generation/GlobalConstants.py +6 -4
- nuitka/code_generation/GlobalsLocalsCodes.py +1 -1
- nuitka/code_generation/IdCodes.py +1 -1
- nuitka/code_generation/ImportCodes.py +1 -1
- nuitka/code_generation/Indentation.py +1 -1
- nuitka/code_generation/IndexCodes.py +1 -1
- nuitka/code_generation/InjectCCodes.py +1 -1
- nuitka/code_generation/IntegerCodes.py +1 -1
- nuitka/code_generation/IteratorCodes.py +1 -1
- nuitka/code_generation/JitCodes.py +1 -1
- nuitka/code_generation/LabelCodes.py +1 -1
- nuitka/code_generation/LineNumberCodes.py +1 -1
- nuitka/code_generation/ListCodes.py +1 -1
- nuitka/code_generation/LoaderCodes.py +1 -1
- nuitka/code_generation/LocalsDictCodes.py +1 -1
- nuitka/code_generation/LoopCodes.py +1 -1
- nuitka/code_generation/MatchCodes.py +1 -1
- nuitka/code_generation/ModuleCodes.py +31 -4
- nuitka/code_generation/Namify.py +4 -1
- nuitka/code_generation/NetworkxCodes.py +1 -1
- nuitka/code_generation/OperationCodes.py +1 -1
- nuitka/code_generation/PackageResourceCodes.py +4 -10
- nuitka/code_generation/PrintCodes.py +1 -1
- nuitka/code_generation/PythonAPICodes.py +1 -1
- nuitka/code_generation/RaisingCodes.py +1 -1
- nuitka/code_generation/Reports.py +1 -1
- nuitka/code_generation/ReturnCodes.py +1 -1
- nuitka/code_generation/SetCodes.py +1 -1
- nuitka/code_generation/SliceCodes.py +1 -1
- nuitka/code_generation/StringCodes.py +1 -1
- nuitka/code_generation/SubscriptCodes.py +1 -1
- nuitka/code_generation/TensorflowCodes.py +1 -1
- nuitka/code_generation/TryCodes.py +1 -1
- nuitka/code_generation/TupleCodes.py +1 -1
- nuitka/code_generation/TypeAliasCodes.py +1 -1
- nuitka/code_generation/VariableCodes.py +1 -1
- nuitka/code_generation/VariableDeclarations.py +1 -1
- nuitka/code_generation/YieldCodes.py +1 -1
- nuitka/code_generation/__init__.py +1 -1
- nuitka/code_generation/c_types/CTypeBases.py +1 -1
- nuitka/code_generation/c_types/CTypeBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeCFloats.py +1 -1
- nuitka/code_generation/c_types/CTypeCLongs.py +1 -1
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +1 -1
- nuitka/code_generation/c_types/CTypeVoids.py +1 -1
- nuitka/code_generation/c_types/__init__.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesConstants.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesFrames.py +21 -25
- nuitka/code_generation/templates/CodeTemplatesFunction.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +3 -3
- nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesLoader.py +26 -3
- nuitka/code_generation/templates/CodeTemplatesModules.py +21 -8
- nuitka/code_generation/templates/CodeTemplatesVariables.py +24 -21
- nuitka/code_generation/templates/TemplateDebugWrapper.py +1 -1
- nuitka/code_generation/templates/__init__.py +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +21 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +5 -2
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +1 -1
- nuitka/containers/Namedtuples.py +1 -1
- nuitka/containers/OrderedSetsFallback.py +1 -1
- nuitka/containers/__init__.py +1 -1
- nuitka/distutils/Build.py +1 -1
- nuitka/distutils/DistutilCommands.py +2 -2
- nuitka/distutils/__init__.py +1 -1
- nuitka/finalizations/Finalization.py +1 -1
- nuitka/finalizations/FinalizeMarkups.py +1 -1
- nuitka/finalizations/__init__.py +1 -1
- nuitka/freezer/DependsExe.py +2 -1
- nuitka/freezer/DllDependenciesCommon.py +1 -1
- nuitka/freezer/DllDependenciesMacOS.py +1 -1
- nuitka/freezer/DllDependenciesPosix.py +1 -1
- nuitka/freezer/DllDependenciesWin32.py +111 -25
- nuitka/freezer/ImportDetection.py +5 -2
- nuitka/freezer/IncludedDataFiles.py +11 -2
- nuitka/freezer/IncludedEntryPoints.py +1 -1
- nuitka/freezer/Onefile.py +14 -15
- nuitka/freezer/Standalone.py +6 -3
- nuitka/freezer/__init__.py +1 -1
- nuitka/importing/IgnoreListing.py +1 -1
- nuitka/importing/ImportCache.py +1 -1
- nuitka/importing/ImportResolving.py +1 -1
- nuitka/importing/Importing.py +4 -3
- nuitka/importing/PreloadedPackages.py +1 -1
- nuitka/importing/Recursion.py +37 -12
- nuitka/importing/StandardLibrary.py +1 -1
- nuitka/importing/__init__.py +1 -1
- nuitka/nodes/AsyncgenNodes.py +1 -1
- nuitka/nodes/AttributeLookupNodes.py +1 -1
- nuitka/nodes/AttributeNodes.py +1 -1
- nuitka/nodes/AttributeNodesGenerated.py +1 -1
- nuitka/nodes/BuiltinAllNodes.py +1 -1
- nuitka/nodes/BuiltinAnyNodes.py +1 -1
- nuitka/nodes/BuiltinComplexNodes.py +1 -1
- nuitka/nodes/BuiltinDecodingNodes.py +1 -1
- nuitka/nodes/BuiltinDecoratorNodes.py +1 -1
- nuitka/nodes/BuiltinDictNodes.py +1 -1
- nuitka/nodes/BuiltinFormatNodes.py +1 -1
- nuitka/nodes/BuiltinHashNodes.py +1 -1
- nuitka/nodes/BuiltinInputNodes.py +1 -1
- nuitka/nodes/BuiltinIntegerNodes.py +1 -1
- nuitka/nodes/BuiltinIteratorNodes.py +2 -2
- nuitka/nodes/BuiltinLenNodes.py +1 -1
- nuitka/nodes/BuiltinNextNodes.py +1 -1
- nuitka/nodes/BuiltinOpenNodes.py +1 -1
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +1 -1
- nuitka/nodes/BuiltinRangeNodes.py +1 -1
- nuitka/nodes/BuiltinRefNodes.py +1 -1
- nuitka/nodes/BuiltinSumNodes.py +1 -1
- nuitka/nodes/BuiltinTypeNodes.py +1 -1
- nuitka/nodes/BuiltinVarsNodes.py +1 -1
- nuitka/nodes/BytesNodes.py +1 -1
- nuitka/nodes/CallNodes.py +1 -1
- nuitka/nodes/Checkers.py +1 -1
- nuitka/nodes/ChildrenHavingMixins.py +227 -3
- nuitka/nodes/ClassNodes.py +1 -1
- nuitka/nodes/CodeObjectSpecs.py +4 -4
- nuitka/nodes/ComparisonNodes.py +1 -1
- nuitka/nodes/ConditionalNodes.py +1 -1
- nuitka/nodes/ConstantRefNodes.py +1 -1
- nuitka/nodes/ContainerMakingNodes.py +1 -1
- nuitka/nodes/ContainerOperationNodes.py +1 -1
- nuitka/nodes/CoroutineNodes.py +1 -1
- nuitka/nodes/CtypesNodes.py +1 -1
- nuitka/nodes/DictionaryNodes.py +2 -2
- nuitka/nodes/ExceptionNodes.py +1 -1
- nuitka/nodes/ExecEvalNodes.py +1 -1
- nuitka/nodes/ExpressionBases.py +1 -1
- nuitka/nodes/ExpressionBasesGenerated.py +1 -1
- nuitka/nodes/ExpressionShapeMixins.py +1 -1
- nuitka/nodes/FrameNodes.py +19 -7
- nuitka/nodes/FunctionAttributeNodes.py +1 -1
- nuitka/nodes/FunctionNodes.py +1 -1
- nuitka/nodes/FutureSpecs.py +34 -2
- nuitka/nodes/GeneratorNodes.py +1 -1
- nuitka/nodes/GlobalsLocalsNodes.py +1 -1
- nuitka/nodes/HardImportNodesGenerated.py +140 -56
- nuitka/nodes/ImportHardNodes.py +1 -1
- nuitka/nodes/ImportNodes.py +1 -1
- nuitka/nodes/IndicatorMixins.py +1 -1
- nuitka/nodes/InjectCNodes.py +1 -1
- nuitka/nodes/IterationHandles.py +1 -1
- nuitka/nodes/KeyValuePairNodes.py +1 -1
- nuitka/nodes/ListOperationNodes.py +1 -1
- nuitka/nodes/LocalsDictNodes.py +1 -1
- nuitka/nodes/LocalsScopes.py +1 -1
- nuitka/nodes/LoopNodes.py +1 -1
- nuitka/nodes/MatchNodes.py +1 -1
- nuitka/nodes/ModuleAttributeNodes.py +1 -1
- nuitka/nodes/ModuleNodes.py +2 -2
- nuitka/nodes/NetworkxNodes.py +1 -1
- nuitka/nodes/NodeBases.py +1 -1
- nuitka/nodes/NodeMakingHelpers.py +1 -1
- nuitka/nodes/NodeMetaClasses.py +1 -1
- nuitka/nodes/OperatorNodes.py +1 -1
- nuitka/nodes/OperatorNodesUnary.py +1 -1
- nuitka/nodes/OsSysNodes.py +1 -1
- nuitka/nodes/OutlineNodes.py +1 -1
- nuitka/nodes/PackageMetadataNodes.py +1 -1
- nuitka/nodes/PackageResourceNodes.py +42 -7
- nuitka/nodes/PrintNodes.py +1 -1
- nuitka/nodes/ReturnNodes.py +1 -1
- nuitka/nodes/SideEffectNodes.py +1 -1
- nuitka/nodes/SliceNodes.py +1 -1
- nuitka/nodes/StatementBasesGenerated.py +1 -1
- nuitka/nodes/StatementNodes.py +1 -1
- nuitka/nodes/StrNodes.py +1 -1
- nuitka/nodes/StringConcatenationNodes.py +1 -1
- nuitka/nodes/SubscriptNodes.py +1 -1
- nuitka/nodes/TensorflowNodes.py +1 -1
- nuitka/nodes/TryNodes.py +1 -1
- nuitka/nodes/TypeMatchNodes.py +1 -1
- nuitka/nodes/TypeNodes.py +1 -1
- nuitka/nodes/VariableAssignNodes.py +3 -2
- nuitka/nodes/VariableDelNodes.py +1 -1
- nuitka/nodes/VariableNameNodes.py +1 -1
- nuitka/nodes/VariableRefNodes.py +1 -1
- nuitka/nodes/VariableReleaseNodes.py +1 -1
- nuitka/nodes/YieldNodes.py +1 -1
- nuitka/nodes/__init__.py +1 -1
- nuitka/nodes/shapes/BuiltinTypeShapes.py +1 -1
- nuitka/nodes/shapes/ControlFlowDescriptions.py +1 -1
- nuitka/nodes/shapes/IteratorShapes.py +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +4 -3
- nuitka/nodes/shapes/StandardShapes.py +2 -51
- nuitka/nodes/shapes/__init__.py +1 -1
- nuitka/optimizations/BytecodeDemotion.py +1 -1
- nuitka/optimizations/FunctionInlining.py +1 -1
- nuitka/optimizations/Graphs.py +1 -1
- nuitka/optimizations/Optimization.py +1 -1
- nuitka/optimizations/OptimizeBuiltinCalls.py +1 -1
- nuitka/optimizations/Tags.py +1 -1
- nuitka/optimizations/TraceCollections.py +1 -1
- nuitka/optimizations/ValueTraces.py +1 -1
- nuitka/optimizations/__init__.py +1 -1
- nuitka/pgo/PGO.py +1 -1
- nuitka/pgo/__init__.py +1 -1
- nuitka/plugins/PluginBase.py +24 -3
- nuitka/plugins/Plugins.py +67 -14
- nuitka/plugins/YamlPluginBase.py +1 -1
- nuitka/plugins/__init__.py +1 -1
- nuitka/plugins/standard/AntiBloatPlugin.py +2 -1
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +2 -1
- nuitka/plugins/standard/DataFilesPlugin.py +2 -2
- nuitka/plugins/standard/DelvewheelPlugin.py +2 -1
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +1 -1
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +1 -1
- nuitka/plugins/standard/DillPlugin.py +2 -2
- nuitka/plugins/standard/DllFilesPlugin.py +80 -14
- nuitka/plugins/standard/EnumPlugin.py +2 -2
- nuitka/plugins/standard/EventletPlugin.py +2 -1
- nuitka/plugins/standard/GeventPlugin.py +2 -1
- nuitka/plugins/standard/GiPlugin.py +2 -1
- nuitka/plugins/standard/GlfwPlugin.py +2 -1
- nuitka/plugins/standard/ImplicitImports.py +8 -6
- nuitka/plugins/standard/KivyPlugin.py +2 -1
- nuitka/plugins/standard/MatplotlibPlugin.py +3 -2
- nuitka/plugins/standard/MultiprocessingPlugin.py +2 -1
- nuitka/plugins/standard/NumpyPlugin.py +2 -1
- nuitka/plugins/standard/OptionsNannyPlugin.py +7 -6
- nuitka/plugins/standard/PbrPlugin.py +2 -2
- nuitka/plugins/standard/PkgResourcesPlugin.py +2 -1
- nuitka/plugins/standard/PlaywrightPlugin.py +10 -15
- nuitka/plugins/standard/PmwPlugin.py +2 -1
- nuitka/plugins/standard/PySidePyQtPlugin.py +12 -15
- nuitka/plugins/standard/PywebViewPlugin.py +2 -1
- nuitka/plugins/standard/SpacyPlugin.py +2 -1
- nuitka/plugins/standard/TensorflowPlugin.py +2 -1
- nuitka/plugins/standard/TkinterPlugin.py +38 -5
- nuitka/plugins/standard/TorchPlugin.py +2 -1
- nuitka/plugins/standard/TransformersPlugin.py +2 -2
- nuitka/plugins/standard/TrioPlugin.py +2 -1
- nuitka/plugins/standard/UpxPlugin.py +2 -1
- nuitka/plugins/standard/__init__.py +1 -1
- nuitka/plugins/standard/standard.nuitka-package.config.yml +173 -49
- nuitka/reports/CompilationReportReader.py +5 -1
- nuitka/reports/LicenseReport.rst.j2 +1 -1
- nuitka/reports/Reports.py +5 -1
- nuitka/reports/__init__.py +1 -1
- nuitka/specs/BuiltinBytesOperationSpecs.py +1 -1
- nuitka/specs/BuiltinDictOperationSpecs.py +1 -1
- nuitka/specs/BuiltinListOperationSpecs.py +1 -1
- nuitka/specs/BuiltinParameterSpecs.py +1 -1
- nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
- nuitka/specs/BuiltinTypeOperationSpecs.py +1 -1
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +1 -1
- nuitka/specs/HardImportSpecs.py +10 -2
- nuitka/specs/ParameterSpecs.py +17 -2
- nuitka/specs/__init__.py +1 -1
- nuitka/tools/Basics.py +1 -1
- nuitka/tools/__init__.py +1 -1
- nuitka/tools/commercial/__init__.py +1 -1
- nuitka/tools/data_composer/DataComposer.py +125 -1
- nuitka/tools/data_composer/__init__.py +1 -1
- nuitka/tools/data_composer/__main__.py +1 -1
- nuitka/tools/environments/CreateEnvironment.py +1 -1
- nuitka/tools/environments/Virtualenv.py +14 -6
- nuitka/tools/environments/__init__.py +1 -1
- nuitka/tools/general/__init__.py +1 -1
- nuitka/tools/general/dll_report/__init__.py +1 -1
- nuitka/tools/general/dll_report/__main__.py +1 -1
- nuitka/tools/general/find_module/FindModuleCode.py +2 -2
- nuitka/tools/general/find_module/__init__.py +1 -1
- nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
- nuitka/tools/general/generate_header/__init__.py +19 -0
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/onefile_compressor/__init__.py +1 -1
- nuitka/tools/onefile_compressor/__main__.py +1 -1
- nuitka/tools/podman/Podman.py +1 -1
- nuitka/tools/podman/__init__.py +1 -1
- nuitka/tools/podman/__main__.py +8 -4
- nuitka/tools/profiler/__init__.py +1 -1
- nuitka/tools/profiler/__main__.py +1 -1
- nuitka/tools/scanning/DisplayPackageDLLs.py +43 -20
- nuitka/tools/scanning/DisplayPackageData.py +1 -1
- nuitka/tools/scanning/__init__.py +1 -1
- nuitka/tools/specialize/CTypeDescriptions.py +1 -1
- nuitka/tools/specialize/Common.py +1 -1
- nuitka/tools/specialize/SpecializeC.py +1 -1
- nuitka/tools/specialize/SpecializePython.py +7 -3
- nuitka/tools/specialize/__init__.py +1 -1
- nuitka/tools/testing/Common.py +140 -19
- nuitka/tools/testing/Constructs.py +1 -1
- nuitka/tools/testing/OutputComparison.py +5 -4
- nuitka/tools/testing/Pythons.py +1 -1
- nuitka/tools/testing/RuntimeTracing.py +1 -1
- nuitka/tools/testing/SearchModes.py +1 -1
- nuitka/tools/testing/Valgrind.py +1 -1
- nuitka/tools/testing/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__main__.py +6 -2
- nuitka/tools/testing/compare_with_cpython/__init__.py +1 -1
- nuitka/tools/testing/compare_with_cpython/__main__.py +51 -14
- nuitka/tools/testing/find_sxs_modules/__init__.py +1 -1
- nuitka/tools/testing/find_sxs_modules/__main__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__init__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__main__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__init__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__main__.py +1 -1
- nuitka/tools/watch/AutoStage.py +1 -1
- nuitka/tools/watch/Common.py +55 -0
- nuitka/tools/watch/Conda.py +125 -0
- nuitka/tools/watch/GitHub.py +1 -1
- nuitka/tools/watch/Pacman.py +73 -0
- nuitka/tools/watch/Pipenv.py +143 -0
- nuitka/tools/watch/__init__.py +1 -1
- nuitka/tools/watch/__main__.py +117 -264
- nuitka/tree/Building.py +1 -1
- nuitka/tree/ComplexCallHelperFunctions.py +1 -1
- nuitka/tree/Extractions.py +1 -1
- nuitka/tree/InternalModule.py +1 -1
- nuitka/tree/Operations.py +1 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -1
- nuitka/tree/ReformulationAssignmentStatements.py +1 -1
- nuitka/tree/ReformulationBooleanExpressions.py +1 -1
- nuitka/tree/ReformulationCallExpressions.py +1 -1
- nuitka/tree/ReformulationClasses.py +1 -1
- nuitka/tree/ReformulationClasses3.py +1 -1
- nuitka/tree/ReformulationComparisonExpressions.py +1 -1
- nuitka/tree/ReformulationContractionExpressions.py +3 -1
- nuitka/tree/ReformulationDictionaryCreation.py +1 -1
- nuitka/tree/ReformulationExecStatements.py +1 -1
- nuitka/tree/ReformulationForLoopStatements.py +1 -1
- nuitka/tree/ReformulationFunctionStatements.py +1 -1
- nuitka/tree/ReformulationImportStatements.py +1 -1
- nuitka/tree/ReformulationLambdaExpressions.py +2 -1
- nuitka/tree/ReformulationMatchStatements.py +1 -1
- nuitka/tree/ReformulationMultidist.py +1 -1
- nuitka/tree/ReformulationNamespacePackages.py +1 -1
- nuitka/tree/ReformulationPrintStatements.py +1 -1
- nuitka/tree/ReformulationSequenceCreation.py +1 -1
- nuitka/tree/ReformulationSubscriptExpressions.py +1 -1
- nuitka/tree/ReformulationTryExceptStatements.py +1 -1
- nuitka/tree/ReformulationTryFinallyStatements.py +1 -1
- nuitka/tree/ReformulationWhileLoopStatements.py +1 -1
- nuitka/tree/ReformulationWithStatements.py +1 -1
- nuitka/tree/ReformulationYieldExpressions.py +1 -1
- nuitka/tree/SourceHandling.py +1 -1
- nuitka/tree/SyntaxErrors.py +1 -1
- nuitka/tree/TreeHelpers.py +24 -10
- nuitka/tree/VariableClosure.py +1 -1
- nuitka/tree/__init__.py +1 -1
- nuitka/utils/AppDirs.py +5 -2
- nuitka/utils/CStrings.py +1 -1
- nuitka/utils/CommandLineOptions.py +2 -2
- nuitka/utils/Distributions.py +177 -15
- nuitka/utils/Download.py +14 -6
- nuitka/utils/Execution.py +43 -14
- nuitka/utils/FileOperations.py +29 -5
- nuitka/utils/Hashing.py +6 -2
- nuitka/utils/Images.py +8 -2
- nuitka/utils/Importing.py +1 -1
- nuitka/utils/InlineCopies.py +1 -1
- nuitka/utils/InstalledPythons.py +1 -1
- nuitka/utils/InstanceCounters.py +1 -1
- nuitka/utils/Jinja2.py +1 -1
- nuitka/utils/Json.py +2 -2
- nuitka/utils/MacOSApp.py +4 -3
- nuitka/utils/MemoryUsage.py +1 -1
- nuitka/utils/ModuleNames.py +1 -1
- nuitka/utils/PackageResources.py +1 -1
- nuitka/utils/ReExecute.py +1 -1
- nuitka/utils/Rest.py +1 -1
- nuitka/utils/SharedLibraries.py +76 -7
- nuitka/utils/Shebang.py +1 -1
- nuitka/utils/Signing.py +11 -5
- nuitka/utils/SlotMetaClasses.py +1 -1
- nuitka/utils/StaticLibraries.py +25 -1
- nuitka/utils/ThreadedExecutor.py +1 -1
- nuitka/utils/Timing.py +1 -1
- nuitka/utils/Utils.py +1 -1
- nuitka/utils/WindowsFileUsage.py +1 -1
- nuitka/utils/WindowsResources.py +3 -1
- nuitka/utils/Yaml.py +1 -1
- nuitka/utils/__init__.py +1 -1
- Nuitka_winsvc-2.5.1.dist-info/RECORD +0 -977
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
/** Compiled Asyncgen.
|
|
4
4
|
*
|
|
@@ -177,13 +177,13 @@ static int Nuitka_Asyncgen_set_frame(PyObject *self, PyObject *value, void *data
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
static void Nuitka_Asyncgen_release_closure(struct Nuitka_AsyncgenObject *asyncgen) {
|
|
180
|
-
CHECK_OBJECT(asyncgen);
|
|
181
|
-
|
|
182
180
|
for (Py_ssize_t i = 0; i < asyncgen->m_closure_given; i++) {
|
|
183
181
|
CHECK_OBJECT(asyncgen->m_closure[i]);
|
|
184
182
|
Py_DECREF(asyncgen->m_closure[i]);
|
|
185
183
|
}
|
|
186
184
|
|
|
185
|
+
// This can be ran multiple times, set the count to zero,
|
|
186
|
+
// after first run, which deactivates the above loop.
|
|
187
187
|
asyncgen->m_closure_given = 0;
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -367,6 +367,7 @@ static PySendResult _Nuitka_Asyncgen_sendR(PyThreadState *tstate, struct Nuitka_
|
|
|
367
367
|
PyObject *yielded;
|
|
368
368
|
|
|
369
369
|
if (asyncgen->m_yield_from == NULL) {
|
|
370
|
+
// This consumes a reference to the value.
|
|
370
371
|
yielded = ((asyncgen_code)asyncgen->m_code)(tstate, asyncgen, value);
|
|
371
372
|
} else {
|
|
372
373
|
// This does not release the value if any, so we need to do it afterwards.
|
|
@@ -397,7 +398,7 @@ static PySendResult _Nuitka_Asyncgen_sendR(PyThreadState *tstate, struct Nuitka_
|
|
|
397
398
|
_Nuitka_GeneratorPopFrame(tstate, return_frame);
|
|
398
399
|
|
|
399
400
|
#if _DEBUG_ASYNCGEN
|
|
400
|
-
PRINT_ASYNCGEN_STATUS("Returned from
|
|
401
|
+
PRINT_ASYNCGEN_STATUS("Returned from asyncgen", asyncgen);
|
|
401
402
|
// dumpFrameStack();
|
|
402
403
|
#endif
|
|
403
404
|
|
|
@@ -792,7 +793,7 @@ static PyObject *Nuitka_Asyncgen_throw(PyThreadState *tstate, struct Nuitka_Asyn
|
|
|
792
793
|
return result;
|
|
793
794
|
}
|
|
794
795
|
|
|
795
|
-
static
|
|
796
|
+
static bool _Nuitka_Asyncgen_init_hooks(PyThreadState *tstate, struct Nuitka_AsyncgenObject *asyncgen) {
|
|
796
797
|
/* Just do this once per async generator object. */
|
|
797
798
|
if (asyncgen->m_hooks_init_done) {
|
|
798
799
|
return 0;
|
|
@@ -816,13 +817,13 @@ static int _Nuitka_Asyncgen_init_hooks(PyThreadState *tstate, struct Nuitka_Asyn
|
|
|
816
817
|
Py_DECREF(firstiter);
|
|
817
818
|
|
|
818
819
|
if (unlikely(res == NULL)) {
|
|
819
|
-
return
|
|
820
|
+
return true;
|
|
820
821
|
}
|
|
821
822
|
|
|
822
823
|
Py_DECREF(res);
|
|
823
824
|
}
|
|
824
825
|
|
|
825
|
-
return
|
|
826
|
+
return false;
|
|
826
827
|
}
|
|
827
828
|
|
|
828
829
|
static PyObject *Nuitka_AsyncgenAsend_New(struct Nuitka_AsyncgenObject *asyncgen, PyObject *sendval);
|
|
@@ -896,13 +897,13 @@ static PySendResult _Nuitka_Asyncgen_am_send(struct Nuitka_AsyncgenObject *async
|
|
|
896
897
|
#endif
|
|
897
898
|
|
|
898
899
|
*result = NULL;
|
|
899
|
-
Py_INCREF(arg);
|
|
900
900
|
|
|
901
901
|
PyThreadState *tstate = PyThreadState_GET();
|
|
902
902
|
|
|
903
903
|
struct Nuitka_ExceptionPreservationItem exception_state;
|
|
904
904
|
INIT_ERROR_OCCURRED_STATE(&exception_state);
|
|
905
905
|
|
|
906
|
+
Py_INCREF(arg);
|
|
906
907
|
PySendResult res = _Nuitka_Asyncgen_sendR(tstate, asyncgen, arg, false, &exception_state, result);
|
|
907
908
|
|
|
908
909
|
#if _DEBUG_ASYNCGEN
|
|
@@ -922,6 +923,26 @@ static void Nuitka_Asyncgen_tp_finalize(struct Nuitka_AsyncgenObject *asyncgen)
|
|
|
922
923
|
PyThreadState *tstate = PyThreadState_GET();
|
|
923
924
|
|
|
924
925
|
struct Nuitka_ExceptionPreservationItem saved_exception_state;
|
|
926
|
+
|
|
927
|
+
// Need to call registered finalizer if provided, "asyncio" seems to do
|
|
928
|
+
// that.
|
|
929
|
+
PyObject *finalizer = asyncgen->m_finalizer;
|
|
930
|
+
if (finalizer != NULL && asyncgen->m_closed == false) {
|
|
931
|
+
// Save the current exception, if any.
|
|
932
|
+
FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
933
|
+
|
|
934
|
+
PyObject *res = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, finalizer, (PyObject *)asyncgen);
|
|
935
|
+
|
|
936
|
+
if (unlikely(res == NULL)) {
|
|
937
|
+
PyErr_WriteUnraisable((PyObject *)asyncgen);
|
|
938
|
+
} else {
|
|
939
|
+
Py_DECREF(res);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
|
|
925
946
|
FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
926
947
|
|
|
927
948
|
bool close_result = _Nuitka_Asyncgen_close(tstate, asyncgen);
|
|
@@ -944,69 +965,56 @@ static void Nuitka_Asyncgen_tp_dealloc(struct Nuitka_AsyncgenObject *asyncgen) {
|
|
|
944
965
|
count_active_Nuitka_Asyncgen_Type -= 1;
|
|
945
966
|
count_released_Nuitka_Asyncgen_Type += 1;
|
|
946
967
|
#endif
|
|
968
|
+
if (asyncgen->m_weakrefs != NULL) {
|
|
969
|
+
Nuitka_GC_UnTrack(asyncgen);
|
|
947
970
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
971
|
+
// TODO: Avoid API call and make this our own function to reuse the
|
|
972
|
+
// pattern of temporarily untracking the value or maybe even to avoid
|
|
973
|
+
// the need to do it. It may also be a lot of work to do that though
|
|
974
|
+
// and maybe having weakrefs is uncommon.
|
|
975
|
+
PyObject_ClearWeakRefs((PyObject *)asyncgen);
|
|
976
|
+
assert(!HAS_ERROR_OCCURRED(PyThreadState_GET()));
|
|
951
977
|
|
|
952
|
-
|
|
978
|
+
Nuitka_GC_Track(asyncgen);
|
|
979
|
+
}
|
|
953
980
|
|
|
954
|
-
//
|
|
955
|
-
|
|
981
|
+
// TODO: Avoid this API call, it's bound to be slow on some platforms and
|
|
982
|
+
// does more checks than necessary for us.
|
|
983
|
+
if (PyObject_CallFinalizerFromDealloc((PyObject *)asyncgen)) {
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
// if (!_PyGC_FINALIZED(asyncgen)) {
|
|
987
|
+
// Nuitka_Asyncgen_tp_finalize(asyncgen);
|
|
956
988
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
// Save the current exception, if any.
|
|
960
|
-
FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
989
|
+
// _PyGC_SET_FINALIZED(asyncgen);
|
|
990
|
+
// }
|
|
961
991
|
|
|
962
|
-
|
|
992
|
+
Nuitka_GC_UnTrack(asyncgen);
|
|
963
993
|
|
|
964
|
-
|
|
965
|
-
PyErr_WriteUnraisable((PyObject *)asyncgen);
|
|
966
|
-
} else {
|
|
967
|
-
Py_DECREF(res);
|
|
968
|
-
}
|
|
994
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
969
995
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}
|
|
996
|
+
// Save the current exception, if any, we must preserve it.
|
|
997
|
+
struct Nuitka_ExceptionPreservationItem saved_exception_state;
|
|
973
998
|
|
|
974
999
|
FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
975
1000
|
|
|
976
|
-
bool close_result = _Nuitka_Asyncgen_close(tstate, asyncgen);
|
|
977
|
-
|
|
978
|
-
if (unlikely(close_result == false)) {
|
|
979
|
-
PyErr_WriteUnraisable((PyObject *)asyncgen);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
1001
|
Nuitka_Asyncgen_release_closure(asyncgen);
|
|
983
1002
|
|
|
984
|
-
|
|
985
|
-
// like Py_DECREF would.
|
|
986
|
-
Py_SET_REFCNT(asyncgen, Py_REFCNT(asyncgen) - 1);
|
|
987
|
-
if (Py_REFCNT(asyncgen) >= 1) {
|
|
988
|
-
return;
|
|
989
|
-
}
|
|
1003
|
+
Py_XDECREF(asyncgen->m_finalizer);
|
|
990
1004
|
|
|
991
1005
|
if (asyncgen->m_frame) {
|
|
992
1006
|
Nuitka_SetFrameGenerator(asyncgen->m_frame, NULL);
|
|
993
1007
|
Py_DECREF(asyncgen->m_frame);
|
|
994
|
-
asyncgen->m_frame = NULL;
|
|
995
1008
|
}
|
|
996
1009
|
|
|
997
1010
|
// Now it is safe to release references and memory for it.
|
|
998
|
-
Nuitka_GC_UnTrack(asyncgen);
|
|
999
|
-
|
|
1000
|
-
Py_XDECREF(asyncgen->m_finalizer);
|
|
1001
|
-
|
|
1002
|
-
if (asyncgen->m_weakrefs != NULL) {
|
|
1003
|
-
PyObject_ClearWeakRefs((PyObject *)asyncgen);
|
|
1004
|
-
assert(!HAS_ERROR_OCCURRED(tstate));
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
1011
|
Py_DECREF(asyncgen->m_name);
|
|
1008
1012
|
Py_DECREF(asyncgen->m_qualname);
|
|
1009
1013
|
|
|
1014
|
+
// TODO: Maybe push this into the freelist code and do
|
|
1015
|
+
// it on allocation.
|
|
1016
|
+
_PyGC_SET_UNFINALIZED((PyObject *)asyncgen);
|
|
1017
|
+
|
|
1010
1018
|
/* Put the object into free list or release to GC */
|
|
1011
1019
|
releaseToFreeList(free_list_asyncgens, asyncgen, MAX_ASYNCGEN_FREE_LIST_COUNT);
|
|
1012
1020
|
|
|
@@ -1310,8 +1318,8 @@ struct Nuitka_AsyncgenAsendObject {
|
|
|
1310
1318
|
|
|
1311
1319
|
#if _DEBUG_ASYNCGEN
|
|
1312
1320
|
|
|
1313
|
-
NUITKA_MAY_BE_UNUSED static void
|
|
1314
|
-
|
|
1321
|
+
NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGEN_ASEND_STATUS(char const *descriptor, char const *context,
|
|
1322
|
+
struct Nuitka_AsyncgenAsendObject *asyncgen_asend) {
|
|
1315
1323
|
char const *status;
|
|
1316
1324
|
|
|
1317
1325
|
switch (asyncgen_asend->m_state) {
|
|
@@ -1339,8 +1347,8 @@ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENASEND_STATUS(char const *descrip
|
|
|
1339
1347
|
PRINT_NEW_LINE();
|
|
1340
1348
|
}
|
|
1341
1349
|
|
|
1342
|
-
#define
|
|
1343
|
-
|
|
1350
|
+
#define PRINT_ASYNCGEN_ASEND_STATUS(context, asyncgen_asend) \
|
|
1351
|
+
_PRINT_ASYNCGEN_ASEND_STATUS(__FUNCTION__, context, asyncgen_asend)
|
|
1344
1352
|
|
|
1345
1353
|
#endif
|
|
1346
1354
|
|
|
@@ -1447,7 +1455,7 @@ static int Nuitka_AsyncgenAsend_tp_traverse(struct Nuitka_AsyncgenAsendObject *a
|
|
|
1447
1455
|
|
|
1448
1456
|
static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *asyncgen_asend, PyObject *arg) {
|
|
1449
1457
|
#if _DEBUG_ASYNCGEN
|
|
1450
|
-
|
|
1458
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
|
|
1451
1459
|
PRINT_COROUTINE_VALUE("arg", arg);
|
|
1452
1460
|
PRINT_NEW_LINE();
|
|
1453
1461
|
#endif
|
|
@@ -1462,7 +1470,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
|
|
|
1462
1470
|
#endif
|
|
1463
1471
|
|
|
1464
1472
|
#if _DEBUG_ASYNCGEN
|
|
1465
|
-
|
|
1473
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
|
|
1466
1474
|
PRINT_STRING("Closed -> StopIteration\n");
|
|
1467
1475
|
PRINT_CURRENT_EXCEPTION();
|
|
1468
1476
|
PRINT_NEW_LINE();
|
|
@@ -1507,12 +1515,17 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
|
|
|
1507
1515
|
PyObject *result = _Nuitka_Asyncgen_send(tstate, asyncgen_asend->m_gen, arg, false, &exception_state);
|
|
1508
1516
|
|
|
1509
1517
|
#if _DEBUG_ASYNCGEN
|
|
1510
|
-
|
|
1518
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Returned from _Nuitka_Asyncgen_send", asyncgen_asend);
|
|
1511
1519
|
PRINT_COROUTINE_VALUE("result", result);
|
|
1512
1520
|
PRINT_CURRENT_EXCEPTION();
|
|
1513
1521
|
#endif
|
|
1514
1522
|
|
|
1515
1523
|
result = _Nuitka_Asyncgen_unwrap_value(tstate, asyncgen_asend->m_gen, result);
|
|
1524
|
+
#if _DEBUG_ASYNCGEN
|
|
1525
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Returned from _Nuitka_Asyncgen_unwrap_value", asyncgen_asend);
|
|
1526
|
+
PRINT_COROUTINE_VALUE("result", result);
|
|
1527
|
+
PRINT_CURRENT_EXCEPTION();
|
|
1528
|
+
#endif
|
|
1516
1529
|
|
|
1517
1530
|
#if _DEBUG_ASYNCGEN
|
|
1518
1531
|
PRINT_COROUTINE_VALUE("result", result);
|
|
@@ -1525,7 +1538,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
|
|
|
1525
1538
|
}
|
|
1526
1539
|
|
|
1527
1540
|
#if _DEBUG_ASYNCGEN
|
|
1528
|
-
|
|
1541
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
|
|
1529
1542
|
PRINT_COROUTINE_VALUE("result", result);
|
|
1530
1543
|
PRINT_NEW_LINE();
|
|
1531
1544
|
#endif
|
|
@@ -1535,7 +1548,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
|
|
|
1535
1548
|
|
|
1536
1549
|
static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObject *asyncgen_asend) {
|
|
1537
1550
|
#if _DEBUG_ASYNCGEN
|
|
1538
|
-
|
|
1551
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
|
|
1539
1552
|
PRINT_STRING("Deferring to Nuitka_AsyncgenAsend_send(Py_None)\n");
|
|
1540
1553
|
PRINT_NEW_LINE();
|
|
1541
1554
|
#endif
|
|
@@ -1543,7 +1556,7 @@ static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObj
|
|
|
1543
1556
|
PyObject *result = Nuitka_AsyncgenAsend_send(asyncgen_asend, Py_None);
|
|
1544
1557
|
|
|
1545
1558
|
#if _DEBUG_ASYNCGEN
|
|
1546
|
-
|
|
1559
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
|
|
1547
1560
|
PRINT_COROUTINE_VALUE("result", result);
|
|
1548
1561
|
PRINT_NEW_LINE();
|
|
1549
1562
|
#endif
|
|
@@ -1553,7 +1566,7 @@ static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObj
|
|
|
1553
1566
|
|
|
1554
1567
|
static PyObject *Nuitka_AsyncgenAsend_throw(struct Nuitka_AsyncgenAsendObject *asyncgen_asend, PyObject *args) {
|
|
1555
1568
|
#if _DEBUG_ASYNCGEN
|
|
1556
|
-
|
|
1569
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
|
|
1557
1570
|
PRINT_STRING("Nuitka_AsyncgenAsend_throw: args:");
|
|
1558
1571
|
PRINT_ITEM(args);
|
|
1559
1572
|
PRINT_NEW_LINE();
|
|
@@ -1601,7 +1614,7 @@ static PyObject *Nuitka_AsyncgenAsend_throw(struct Nuitka_AsyncgenAsendObject *a
|
|
|
1601
1614
|
static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuitka_AsyncgenAsendObject *asyncgen_asend,
|
|
1602
1615
|
struct Nuitka_ExceptionPreservationItem *exception_state) {
|
|
1603
1616
|
#if _DEBUG_ASYNCGEN
|
|
1604
|
-
|
|
1617
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
|
|
1605
1618
|
PRINT_EXCEPTION_STATE(exception_state);
|
|
1606
1619
|
PRINT_CURRENT_EXCEPTION();
|
|
1607
1620
|
PRINT_NEW_LINE();
|
|
@@ -1623,7 +1636,7 @@ static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuit
|
|
|
1623
1636
|
}
|
|
1624
1637
|
|
|
1625
1638
|
#if _DEBUG_ASYNCGEN
|
|
1626
|
-
|
|
1639
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Got result", asyncgen_asend);
|
|
1627
1640
|
PRINT_COROUTINE_VALUE("result", result);
|
|
1628
1641
|
PRINT_CURRENT_EXCEPTION();
|
|
1629
1642
|
#endif
|
|
@@ -1640,7 +1653,7 @@ static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuit
|
|
|
1640
1653
|
}
|
|
1641
1654
|
|
|
1642
1655
|
#if _DEBUG_ASYNCGEN
|
|
1643
|
-
|
|
1656
|
+
PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
|
|
1644
1657
|
PRINT_COROUTINE_VALUE("result", result);
|
|
1645
1658
|
PRINT_CURRENT_EXCEPTION();
|
|
1646
1659
|
PRINT_NEW_LINE();
|
|
@@ -1753,8 +1766,8 @@ struct Nuitka_AsyncgenAthrowObject {
|
|
|
1753
1766
|
|
|
1754
1767
|
#if _DEBUG_ASYNCGEN
|
|
1755
1768
|
|
|
1756
|
-
NUITKA_MAY_BE_UNUSED static void
|
|
1757
|
-
|
|
1769
|
+
NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGEN_ATHROW_STATUS(char const *descriptor, char const *context,
|
|
1770
|
+
struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow) {
|
|
1758
1771
|
char const *status;
|
|
1759
1772
|
|
|
1760
1773
|
switch (asyncgen_athrow->m_state) {
|
|
@@ -1782,8 +1795,8 @@ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENATHROW_STATUS(char const *descri
|
|
|
1782
1795
|
PRINT_NEW_LINE();
|
|
1783
1796
|
}
|
|
1784
1797
|
|
|
1785
|
-
#define
|
|
1786
|
-
|
|
1798
|
+
#define PRINT_ASYNCGEN_ATHROW_STATUS(context, coroutine) \
|
|
1799
|
+
_PRINT_ASYNCGEN_ATHROW_STATUS(__FUNCTION__, context, asyncgen_athrow)
|
|
1787
1800
|
|
|
1788
1801
|
#endif
|
|
1789
1802
|
|
|
@@ -1818,7 +1831,7 @@ static int Nuitka_AsyncgenAthrow_traverse(struct Nuitka_AsyncgenAthrowObject *as
|
|
|
1818
1831
|
|
|
1819
1832
|
static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow, PyObject *arg) {
|
|
1820
1833
|
#if _DEBUG_ASYNCGEN
|
|
1821
|
-
|
|
1834
|
+
PRINT_ASYNCGEN_ATHROW_STATUS("Enter", asyncgen_athrow);
|
|
1822
1835
|
PRINT_COROUTINE_VALUE("arg", arg);
|
|
1823
1836
|
PRINT_NEW_LINE();
|
|
1824
1837
|
#endif
|
|
@@ -1893,7 +1906,7 @@ static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *
|
|
|
1893
1906
|
1, /* Do not close generator when PyExc_GeneratorExit is passed */
|
|
1894
1907
|
&exception_state);
|
|
1895
1908
|
|
|
1896
|
-
if (retval) {
|
|
1909
|
+
if (retval != NULL) {
|
|
1897
1910
|
if (_PyAsyncGenWrappedValue_CheckExact(retval) || Nuitka_AsyncgenWrappedValue_CheckExact(retval)) {
|
|
1898
1911
|
#if PYTHON_VERSION >= 0x380
|
|
1899
1912
|
asyncgen_athrow->m_gen->m_running_async = false;
|
|
@@ -1943,13 +1956,14 @@ static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *
|
|
|
1943
1956
|
struct Nuitka_ExceptionPreservationItem exception_state;
|
|
1944
1957
|
INIT_ERROR_OCCURRED_STATE(&exception_state);
|
|
1945
1958
|
|
|
1959
|
+
Py_INCREF(arg);
|
|
1946
1960
|
retval = _Nuitka_Asyncgen_send(tstate, asyncgen, arg, false, &exception_state);
|
|
1947
1961
|
|
|
1948
1962
|
if (asyncgen_athrow->m_args) {
|
|
1949
1963
|
return _Nuitka_Asyncgen_unwrap_value(tstate, asyncgen, retval);
|
|
1950
1964
|
} else {
|
|
1951
1965
|
/* We are here to close if no args. */
|
|
1952
|
-
if (retval) {
|
|
1966
|
+
if (retval != NULL) {
|
|
1953
1967
|
if (_PyAsyncGenWrappedValue_CheckExact(retval) || Nuitka_AsyncgenWrappedValue_CheckExact(retval)) {
|
|
1954
1968
|
#if PYTHON_VERSION >= 0x380
|
|
1955
1969
|
asyncgen_athrow->m_gen->m_running_async = false;
|
|
@@ -1994,7 +2008,7 @@ check_error:
|
|
|
1994
2008
|
|
|
1995
2009
|
static PyObject *Nuitka_AsyncgenAthrow_throw(struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow, PyObject *args) {
|
|
1996
2010
|
#if _DEBUG_ASYNCGEN
|
|
1997
|
-
|
|
2011
|
+
PRINT_ASYNCGEN_ATHROW_STATUS("Enter", asyncgen_athrow);
|
|
1998
2012
|
PRINT_COROUTINE_VALUE("args", args);
|
|
1999
2013
|
PRINT_NEW_LINE();
|
|
2000
2014
|
#endif
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
/** Compiled cells.
|
|
4
4
|
*
|
|
@@ -22,6 +22,7 @@ int count_allocated_Nuitka_Cell_Type;
|
|
|
22
22
|
int count_released_Nuitka_Cell_Type;
|
|
23
23
|
#endif
|
|
24
24
|
|
|
25
|
+
// Freelist setup
|
|
25
26
|
#define MAX_CELL_FREE_LIST_COUNT 1000
|
|
26
27
|
static struct Nuitka_CellObject *free_list_cells = NULL;
|
|
27
28
|
static int free_list_cells_count = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
/* Implementations of compiled code helpers.
|
|
4
4
|
|
|
@@ -1595,25 +1595,6 @@ PyObject *JOIN_PATH2(PyObject *dirname, PyObject *filename) {
|
|
|
1595
1595
|
return result;
|
|
1596
1596
|
}
|
|
1597
1597
|
|
|
1598
|
-
#if defined(_WIN32)
|
|
1599
|
-
// Replacement for RemoveFileSpecW, slightly smaller, avoids a link library.
|
|
1600
|
-
NUITKA_MAY_BE_UNUSED static void stripFilenameW(wchar_t *path) {
|
|
1601
|
-
wchar_t *last_slash = NULL;
|
|
1602
|
-
|
|
1603
|
-
while (*path != 0) {
|
|
1604
|
-
if (*path == L'\\') {
|
|
1605
|
-
last_slash = path;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
path++;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
if (last_slash != NULL) {
|
|
1612
|
-
*last_slash = 0;
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
#endif
|
|
1616
|
-
|
|
1617
1598
|
#if defined(_NUITKA_EXE)
|
|
1618
1599
|
|
|
1619
1600
|
wchar_t const *getBinaryDirectoryWideChars(bool resolve_symlinks) {
|
|
@@ -1629,6 +1610,7 @@ wchar_t const *getBinaryDirectoryWideChars(bool resolve_symlinks) {
|
|
|
1629
1610
|
|
|
1630
1611
|
stripFilenameW(binary_directory);
|
|
1631
1612
|
|
|
1613
|
+
#ifndef _NUITKA_EXPERIMENTAL_AVOID_SHORT_PATH
|
|
1632
1614
|
// Query length of result first.
|
|
1633
1615
|
DWORD length = GetShortPathNameW(binary_directory, NULL, 0);
|
|
1634
1616
|
assert(length != 0);
|
|
@@ -1645,6 +1627,7 @@ wchar_t const *getBinaryDirectoryWideChars(bool resolve_symlinks) {
|
|
|
1645
1627
|
appendWStringSafeW(binary_directory, short_binary_directory, sizeof(binary_directory) / sizeof(wchar_t));
|
|
1646
1628
|
|
|
1647
1629
|
free(short_binary_directory);
|
|
1630
|
+
#endif
|
|
1648
1631
|
#else
|
|
1649
1632
|
appendStringSafeW(binary_directory, getBinaryDirectoryHostEncoded(true),
|
|
1650
1633
|
sizeof(binary_directory) / sizeof(wchar_t));
|
|
@@ -1938,13 +1921,12 @@ PyObject *getDllFilenameObject(void) {
|
|
|
1938
1921
|
PyObject *getContainingDirectoryObject(bool resolve_symlinks) {
|
|
1939
1922
|
#if defined(_NUITKA_EXE)
|
|
1940
1923
|
#if defined(_NUITKA_ONEFILE_MODE)
|
|
1941
|
-
environment_char_t const *
|
|
1942
|
-
if (
|
|
1943
|
-
PyObject *result = Nuitka_String_FromFilename(
|
|
1944
|
-
unsetEnvironmentVariable("
|
|
1924
|
+
environment_char_t const *onefile_directory = getEnvironmentVariable("NUITKA_ONEFILE_DIRECTORY");
|
|
1925
|
+
if (onefile_directory != NULL) {
|
|
1926
|
+
PyObject *result = Nuitka_String_FromFilename(onefile_directory);
|
|
1927
|
+
unsetEnvironmentVariable("NUITKA_ONEFILE_DIRECTORY");
|
|
1945
1928
|
|
|
1946
|
-
|
|
1947
|
-
return OS_PATH_DIRNAME(tstate, result);
|
|
1929
|
+
return result;
|
|
1948
1930
|
}
|
|
1949
1931
|
|
|
1950
1932
|
return getBinaryDirectoryObject(resolve_symlinks);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
/** Compiled Coroutines.
|
|
4
4
|
*
|
|
@@ -177,8 +177,6 @@ static int Nuitka_Coroutine_set_frame(PyObject *self, PyObject *value, void *dat
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
static void Nuitka_Coroutine_release_closure(struct Nuitka_CoroutineObject *coroutine) {
|
|
180
|
-
CHECK_OBJECT(coroutine);
|
|
181
|
-
|
|
182
180
|
for (Py_ssize_t i = 0; i < coroutine->m_closure_given; i++) {
|
|
183
181
|
CHECK_OBJECT(coroutine->m_closure[i]);
|
|
184
182
|
Py_DECREF(coroutine->m_closure[i]);
|
|
@@ -1084,19 +1082,37 @@ static void Nuitka_Coroutine_tp_finalize(struct Nuitka_CoroutineObject *coroutin
|
|
|
1084
1082
|
RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
1085
1083
|
}
|
|
1086
1084
|
|
|
1085
|
+
// Freelist setup
|
|
1087
1086
|
#define MAX_COROUTINE_FREE_LIST_COUNT 100
|
|
1088
|
-
static struct Nuitka_CoroutineObject *
|
|
1089
|
-
static int
|
|
1087
|
+
static struct Nuitka_CoroutineObject *free_list_coroutines = NULL;
|
|
1088
|
+
static int free_list_coroutines_count = 0;
|
|
1090
1089
|
|
|
1091
1090
|
static void Nuitka_Coroutine_tp_dealloc(struct Nuitka_CoroutineObject *coroutine) {
|
|
1092
1091
|
#if _DEBUG_REFCOUNTS
|
|
1093
1092
|
count_active_Nuitka_Coroutine_Type -= 1;
|
|
1094
1093
|
count_released_Nuitka_Coroutine_Type += 1;
|
|
1095
1094
|
#endif
|
|
1095
|
+
if (coroutine->m_weakrefs != NULL) {
|
|
1096
|
+
Nuitka_GC_UnTrack(coroutine);
|
|
1097
|
+
|
|
1098
|
+
// TODO: Avoid API call and make this our own function to reuse the
|
|
1099
|
+
// pattern of temporarily untracking the value or maybe even to avoid
|
|
1100
|
+
// the need to do it. It may also be a lot of work to do that though
|
|
1101
|
+
// and maybe having weakrefs is uncommon.
|
|
1102
|
+
PyObject_ClearWeakRefs((PyObject *)coroutine);
|
|
1103
|
+
assert(!HAS_ERROR_OCCURRED(PyThreadState_GET()));
|
|
1104
|
+
|
|
1105
|
+
Nuitka_GC_Track(coroutine);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
// TODO: Avoid this API call, it's bound to be slow on some platforms and
|
|
1109
|
+
// does more checks than necessary for us.
|
|
1110
|
+
if (PyObject_CallFinalizerFromDealloc((PyObject *)coroutine)) {
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1096
1113
|
|
|
1097
|
-
//
|
|
1098
|
-
|
|
1099
|
-
Py_SET_REFCNT(coroutine, 1);
|
|
1114
|
+
// Now it is safe to release references and memory for it.
|
|
1115
|
+
Nuitka_GC_UnTrack(coroutine);
|
|
1100
1116
|
|
|
1101
1117
|
PyThreadState *tstate = PyThreadState_GET();
|
|
1102
1118
|
|
|
@@ -1109,44 +1125,26 @@ static void Nuitka_Coroutine_tp_dealloc(struct Nuitka_CoroutineObject *coroutine
|
|
|
1109
1125
|
PRINT_NEW_LINE();
|
|
1110
1126
|
#endif
|
|
1111
1127
|
|
|
1112
|
-
bool close_result = _Nuitka_Coroutine_close(tstate, coroutine);
|
|
1113
|
-
|
|
1114
|
-
if (unlikely(close_result == false)) {
|
|
1115
|
-
PyErr_WriteUnraisable((PyObject *)coroutine);
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
1128
|
Nuitka_Coroutine_release_closure(coroutine);
|
|
1119
1129
|
|
|
1120
|
-
// Allow for above code to resurrect the coroutine.
|
|
1121
|
-
Py_SET_REFCNT(coroutine, Py_REFCNT(coroutine) - 1);
|
|
1122
|
-
if (Py_REFCNT(coroutine) >= 1) {
|
|
1123
|
-
RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
1130
|
if (coroutine->m_frame) {
|
|
1128
1131
|
Nuitka_SetFrameGenerator(coroutine->m_frame, NULL);
|
|
1129
1132
|
Py_DECREF(coroutine->m_frame);
|
|
1130
|
-
coroutine->m_frame = NULL;
|
|
1131
1133
|
}
|
|
1132
1134
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
if (coroutine->m_weakrefs != NULL) {
|
|
1137
|
-
PyObject_ClearWeakRefs((PyObject *)coroutine);
|
|
1138
|
-
assert(!HAS_ERROR_OCCURRED(tstate));
|
|
1139
|
-
}
|
|
1135
|
+
#if PYTHON_VERSION >= 0x370
|
|
1136
|
+
Py_XDECREF(coroutine->m_origin);
|
|
1137
|
+
#endif
|
|
1140
1138
|
|
|
1141
1139
|
Py_DECREF(coroutine->m_name);
|
|
1142
1140
|
Py_DECREF(coroutine->m_qualname);
|
|
1143
1141
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1142
|
+
// TODO: Maybe push this into the freelist code and do
|
|
1143
|
+
// it on allocation.
|
|
1144
|
+
_PyGC_SET_UNFINALIZED((PyObject *)coroutine);
|
|
1147
1145
|
|
|
1148
1146
|
/* Put the object into free list or release to GC */
|
|
1149
|
-
releaseToFreeList(
|
|
1147
|
+
releaseToFreeList(free_list_coroutines, coroutine, MAX_COROUTINE_FREE_LIST_COUNT);
|
|
1150
1148
|
|
|
1151
1149
|
RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
|
|
1152
1150
|
}
|
|
@@ -1402,7 +1400,7 @@ static PyObject *computeCoroutineOrigin(PyThreadState *tstate, int origin_depth)
|
|
|
1402
1400
|
frame_count += 1;
|
|
1403
1401
|
}
|
|
1404
1402
|
|
|
1405
|
-
PyObject *cr_origin =
|
|
1403
|
+
PyObject *cr_origin = MAKE_TUPLE_EMPTY_VAR(tstate, frame_count);
|
|
1406
1404
|
|
|
1407
1405
|
frame = PyEval_GetFrame();
|
|
1408
1406
|
|
|
@@ -1435,7 +1433,7 @@ PyObject *Nuitka_Coroutine_New(PyThreadState *tstate, coroutine_code code, PyObj
|
|
|
1435
1433
|
Py_ssize_t full_size = closure_given + (heap_storage_size + sizeof(void *) - 1) / sizeof(void *);
|
|
1436
1434
|
|
|
1437
1435
|
// Macro to assign result memory from GC or free list.
|
|
1438
|
-
allocateFromFreeList(
|
|
1436
|
+
allocateFromFreeList(free_list_coroutines, struct Nuitka_CoroutineObject, Nuitka_Coroutine_Type, full_size);
|
|
1439
1437
|
|
|
1440
1438
|
// For quicker access of generator heap.
|
|
1441
1439
|
result->m_heap_storage = &result->m_closure[closure_given];
|