Nuitka-winsvc 2.5.6__cp311-cp311-win_amd64.whl → 2.6.5__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.

Files changed (701) hide show
  1. {Nuitka_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka-run.cmd +1 -1
  2. {Nuitka_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka.cmd +1 -1
  3. {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/METADATA +36 -24
  4. Nuitka_winsvc-2.6.5.dist-info/RECORD +992 -0
  5. {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/WHEEL +1 -1
  6. nuitka/Builtins.py +1 -1
  7. nuitka/BytecodeCaching.py +15 -4
  8. nuitka/Bytecodes.py +1 -1
  9. nuitka/CacheCleanup.py +1 -1
  10. nuitka/Constants.py +1 -1
  11. nuitka/Errors.py +1 -1
  12. nuitka/HardImportRegistry.py +1 -1
  13. nuitka/MainControl.py +93 -94
  14. nuitka/ModuleRegistry.py +19 -4
  15. nuitka/OptionParsing.py +86 -17
  16. nuitka/Options.py +230 -106
  17. nuitka/OutputDirectories.py +5 -3
  18. nuitka/PostProcessing.py +76 -27
  19. nuitka/Progress.py +1 -1
  20. nuitka/PythonFlavors.py +24 -3
  21. nuitka/PythonOperators.py +1 -1
  22. nuitka/PythonVersions.py +8 -4
  23. nuitka/Serialization.py +1 -1
  24. nuitka/SourceCodeReferences.py +1 -1
  25. nuitka/Tracing.py +2 -1
  26. nuitka/TreeXML.py +1 -1
  27. nuitka/Variables.py +1 -1
  28. nuitka/Version.py +2 -2
  29. nuitka/__init__.py +1 -1
  30. nuitka/__main__.py +4 -1
  31. nuitka/__past__.py +1 -1
  32. nuitka/build/Backend.scons +44 -66
  33. nuitka/build/CCompilerVersion.scons +2 -1
  34. nuitka/build/DataComposerInterface.py +2 -1
  35. nuitka/build/Offsets.scons +644 -0
  36. nuitka/build/Onefile.scons +5 -13
  37. nuitka/build/SconsCaching.py +9 -7
  38. nuitka/build/SconsCompilerSettings.py +57 -35
  39. nuitka/build/SconsHacks.py +3 -3
  40. nuitka/build/SconsInterface.py +86 -58
  41. nuitka/build/SconsProgress.py +12 -5
  42. nuitka/build/SconsSpawn.py +3 -3
  43. nuitka/build/SconsUtils.py +20 -1
  44. nuitka/build/__init__.py +1 -1
  45. nuitka/build/include/nuitka/allocator.h +3 -1
  46. nuitka/build/include/nuitka/builtins.h +1 -1
  47. nuitka/build/include/nuitka/calling.h +1 -1
  48. nuitka/build/include/nuitka/checkers.h +1 -1
  49. nuitka/build/include/nuitka/checksum_tools.h +1 -1
  50. nuitka/build/include/nuitka/compiled_asyncgen.h +4 -2
  51. nuitka/build/include/nuitka/compiled_cell.h +1 -1
  52. nuitka/build/include/nuitka/compiled_coroutine.h +3 -2
  53. nuitka/build/include/nuitka/compiled_frame.h +6 -13
  54. nuitka/build/include/nuitka/compiled_function.h +2 -3
  55. nuitka/build/include/nuitka/compiled_generator.h +3 -2
  56. nuitka/build/include/nuitka/compiled_method.h +1 -1
  57. nuitka/build/include/nuitka/constants.h +5 -1
  58. nuitka/build/include/nuitka/constants_blob.h +1 -1
  59. nuitka/build/include/nuitka/debug_settings.h +1 -1
  60. nuitka/build/include/nuitka/environment_variables.h +1 -1
  61. nuitka/build/include/nuitka/environment_variables_system.h +1 -1
  62. nuitka/build/include/nuitka/exception_groups.h +1 -1
  63. nuitka/build/include/nuitka/exceptions.h +2 -2
  64. nuitka/build/include/nuitka/filesystem_paths.h +4 -1
  65. nuitka/build/include/nuitka/freelists.h +2 -2
  66. nuitka/build/include/nuitka/helper/attributes.h +1 -1
  67. nuitka/build/include/nuitka/helper/boolean.h +1 -1
  68. nuitka/build/include/nuitka/helper/bytearrays.h +1 -1
  69. nuitka/build/include/nuitka/helper/bytes.h +1 -1
  70. nuitka/build/include/nuitka/helper/calling_generated.h +1 -1
  71. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +1 -1
  72. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +1 -1
  73. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +1 -1
  74. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +1 -1
  75. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +1 -1
  76. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +1 -1
  77. nuitka/build/include/nuitka/helper/comparisons_eq.h +1 -1
  78. nuitka/build/include/nuitka/helper/comparisons_ge.h +1 -1
  79. nuitka/build/include/nuitka/helper/comparisons_gt.h +1 -1
  80. nuitka/build/include/nuitka/helper/comparisons_le.h +1 -1
  81. nuitka/build/include/nuitka/helper/comparisons_lt.h +1 -1
  82. nuitka/build/include/nuitka/helper/comparisons_ne.h +1 -1
  83. nuitka/build/include/nuitka/helper/complex.h +1 -1
  84. nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
  85. nuitka/build/include/nuitka/helper/floats.h +1 -1
  86. nuitka/build/include/nuitka/helper/import_hard.h +1 -1
  87. nuitka/build/include/nuitka/helper/indexes.h +1 -1
  88. nuitka/build/include/nuitka/helper/ints.h +1 -1
  89. nuitka/build/include/nuitka/helper/iterators.h +1 -1
  90. nuitka/build/include/nuitka/helper/lists.h +1 -1
  91. nuitka/build/include/nuitka/helper/lists_generated.h +1 -1
  92. nuitka/build/include/nuitka/helper/mappings.h +1 -1
  93. nuitka/build/include/nuitka/helper/operations.h +1 -1
  94. nuitka/build/include/nuitka/helper/operations_binary_add.h +1 -1
  95. nuitka/build/include/nuitka/helper/operations_binary_bitand.h +1 -1
  96. nuitka/build/include/nuitka/helper/operations_binary_bitor.h +1 -1
  97. nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +1 -1
  98. nuitka/build/include/nuitka/helper/operations_binary_divmod.h +1 -1
  99. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +1 -1
  100. nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +1 -1
  101. nuitka/build/include/nuitka/helper/operations_binary_lshift.h +1 -1
  102. nuitka/build/include/nuitka/helper/operations_binary_matmult.h +1 -1
  103. nuitka/build/include/nuitka/helper/operations_binary_mod.h +1 -1
  104. nuitka/build/include/nuitka/helper/operations_binary_mult.h +1 -1
  105. nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +1 -1
  106. nuitka/build/include/nuitka/helper/operations_binary_pow.h +1 -1
  107. nuitka/build/include/nuitka/helper/operations_binary_rshift.h +1 -1
  108. nuitka/build/include/nuitka/helper/operations_binary_sub.h +1 -1
  109. nuitka/build/include/nuitka/helper/operations_binary_truediv.h +1 -1
  110. nuitka/build/include/nuitka/helper/operations_builtin_types.h +1 -1
  111. nuitka/build/include/nuitka/helper/operations_inplace_add.h +1 -1
  112. nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +1 -1
  113. nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +1 -1
  114. nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +1 -1
  115. nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +1 -1
  116. nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +1 -1
  117. nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +1 -1
  118. nuitka/build/include/nuitka/helper/operations_inplace_mod.h +1 -1
  119. nuitka/build/include/nuitka/helper/operations_inplace_mult.h +1 -1
  120. nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +1 -1
  121. nuitka/build/include/nuitka/helper/operations_inplace_pow.h +1 -1
  122. nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +1 -1
  123. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +1 -1
  124. nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +1 -1
  125. nuitka/build/include/nuitka/helper/raising.h +1 -1
  126. nuitka/build/include/nuitka/helper/rangeobjects.h +1 -1
  127. nuitka/build/include/nuitka/helper/richcomparisons.h +1 -1
  128. nuitka/build/include/nuitka/helper/sequences.h +1 -1
  129. nuitka/build/include/nuitka/helper/sets.h +1 -1
  130. nuitka/build/include/nuitka/helper/slices.h +1 -1
  131. nuitka/build/include/nuitka/helper/strings.h +1 -1
  132. nuitka/build/include/nuitka/helper/subscripts.h +1 -1
  133. nuitka/build/include/nuitka/helper/tuples.h +1 -1
  134. nuitka/build/include/nuitka/helpers.h +1 -43
  135. nuitka/build/include/nuitka/importing.h +1 -1
  136. nuitka/build/include/nuitka/jit_sources.h +1 -1
  137. nuitka/build/include/nuitka/prelude.h +10 -10
  138. nuitka/build/include/nuitka/printing.h +1 -1
  139. nuitka/build/include/nuitka/python_pgo.h +1 -1
  140. nuitka/build/include/nuitka/safe_string_ops.h +1 -1
  141. nuitka/build/include/nuitka/threading.h +1 -1
  142. nuitka/build/include/nuitka/tracing.h +1 -1
  143. nuitka/build/include/nuitka/type_aliases.h +2 -2
  144. nuitka/build/include/nuitka/unfreezing.h +1 -1
  145. nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
  146. nuitka/build/inline_copy/pefile/ordlookup/__init__.py +41 -0
  147. nuitka/build/inline_copy/pefile/ordlookup/oleaut32.py +400 -0
  148. nuitka/build/inline_copy/pefile/ordlookup/ws2_32.py +120 -0
  149. nuitka/build/inline_copy/pefile/pefile.py +8034 -0
  150. nuitka/build/static_src/CompiledAsyncgenType.c +80 -75
  151. nuitka/build/static_src/CompiledCellType.c +2 -1
  152. nuitka/build/static_src/CompiledCodeHelpers.c +10 -28
  153. nuitka/build/static_src/CompiledCoroutineType.c +30 -40
  154. nuitka/build/static_src/CompiledFrameType.c +63 -5
  155. nuitka/build/static_src/CompiledFunctionType.c +11 -13
  156. nuitka/build/static_src/CompiledGeneratorType.c +56 -13
  157. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +1 -1
  158. nuitka/build/static_src/CompiledMethodType.c +2 -1
  159. nuitka/build/static_src/GenerateHeadersMain.c +30 -0
  160. nuitka/build/static_src/HelpersAllocator.c +1 -1
  161. nuitka/build/static_src/HelpersAttributes.c +5 -2
  162. nuitka/build/static_src/HelpersBuiltin.c +1 -1
  163. nuitka/build/static_src/HelpersBuiltinTypeMethods.c +1 -1
  164. nuitka/build/static_src/HelpersBytes.c +1 -1
  165. nuitka/build/static_src/HelpersCalling.c +1 -1
  166. nuitka/build/static_src/HelpersCallingGenerated.c +6 -16
  167. nuitka/build/static_src/HelpersChecksumTools.c +1 -1
  168. nuitka/build/static_src/HelpersClasses.c +1 -1
  169. nuitka/build/static_src/HelpersComparisonDualEq.c +1 -1
  170. nuitka/build/static_src/HelpersComparisonDualGe.c +1 -1
  171. nuitka/build/static_src/HelpersComparisonDualGt.c +1 -1
  172. nuitka/build/static_src/HelpersComparisonDualLe.c +1 -1
  173. nuitka/build/static_src/HelpersComparisonDualLt.c +1 -1
  174. nuitka/build/static_src/HelpersComparisonDualNe.c +1 -1
  175. nuitka/build/static_src/HelpersComparisonEq.c +1 -1
  176. nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
  177. nuitka/build/static_src/HelpersComparisonGe.c +1 -1
  178. nuitka/build/static_src/HelpersComparisonGt.c +1 -1
  179. nuitka/build/static_src/HelpersComparisonLe.c +1 -1
  180. nuitka/build/static_src/HelpersComparisonLt.c +1 -1
  181. nuitka/build/static_src/HelpersComparisonNe.c +1 -1
  182. nuitka/build/static_src/HelpersConsole.c +2 -2
  183. nuitka/build/static_src/HelpersConstantsBlob.c +199 -50
  184. nuitka/build/static_src/HelpersDeepcopy.c +3 -1
  185. nuitka/build/static_src/HelpersDictionaries.c +1 -1
  186. nuitka/build/static_src/HelpersDictionariesGenerated.c +1 -1
  187. nuitka/build/static_src/HelpersDumpBacktraces.c +1 -1
  188. nuitka/build/static_src/HelpersEnvironmentVariables.c +1 -1
  189. nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +1 -1
  190. nuitka/build/static_src/HelpersExceptions.c +1 -1
  191. nuitka/build/static_src/HelpersFiles.c +18 -10
  192. nuitka/build/static_src/HelpersFilesystemPaths.c +36 -16
  193. nuitka/build/static_src/HelpersFloats.c +1 -1
  194. nuitka/build/static_src/HelpersHeapStorage.c +1 -1
  195. nuitka/build/static_src/HelpersImport.c +1 -1
  196. nuitka/build/static_src/HelpersImportHard.c +1 -1
  197. nuitka/build/static_src/HelpersJitSources.c +1 -1
  198. nuitka/build/static_src/HelpersLists.c +2 -1
  199. nuitka/build/static_src/HelpersListsGenerated.c +1 -1
  200. nuitka/build/static_src/HelpersMappings.c +1 -1
  201. nuitka/build/static_src/HelpersMatching.c +1 -1
  202. nuitka/build/static_src/HelpersOperationBinaryAdd.c +1 -1
  203. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +1 -1
  204. nuitka/build/static_src/HelpersOperationBinaryBitand.c +1 -1
  205. nuitka/build/static_src/HelpersOperationBinaryBitor.c +1 -1
  206. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +1 -1
  207. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +1 -1
  208. nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +1 -1
  209. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +1 -1
  210. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +1 -1
  211. nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +1 -1
  212. nuitka/build/static_src/HelpersOperationBinaryLshift.c +1 -1
  213. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -1
  214. nuitka/build/static_src/HelpersOperationBinaryMod.c +1 -1
  215. nuitka/build/static_src/HelpersOperationBinaryMult.c +1 -1
  216. nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +1 -1
  217. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +1 -1
  218. nuitka/build/static_src/HelpersOperationBinaryPow.c +1 -1
  219. nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +1 -1
  220. nuitka/build/static_src/HelpersOperationBinaryRshift.c +1 -1
  221. nuitka/build/static_src/HelpersOperationBinarySub.c +1 -1
  222. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +1 -1
  223. nuitka/build/static_src/HelpersOperationInplaceAdd.c +1 -1
  224. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
  225. nuitka/build/static_src/HelpersOperationInplaceBitand.c +1 -1
  226. nuitka/build/static_src/HelpersOperationInplaceBitor.c +1 -1
  227. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1 -1
  228. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +1 -1
  229. nuitka/build/static_src/HelpersOperationInplaceLshift.c +1 -1
  230. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -1
  231. nuitka/build/static_src/HelpersOperationInplaceMod.c +1 -1
  232. nuitka/build/static_src/HelpersOperationInplaceMult.c +1 -1
  233. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +1 -1
  234. nuitka/build/static_src/HelpersOperationInplacePow.c +1 -1
  235. nuitka/build/static_src/HelpersOperationInplaceRshift.c +1 -1
  236. nuitka/build/static_src/HelpersOperationInplaceSub.c +1 -1
  237. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +1 -1
  238. nuitka/build/static_src/HelpersProfiling.c +1 -1
  239. nuitka/build/static_src/HelpersPythonPgo.c +5 -2
  240. nuitka/build/static_src/HelpersRaising.c +1 -1
  241. nuitka/build/static_src/HelpersSafeStrings.c +1 -1
  242. nuitka/build/static_src/HelpersSequences.c +1 -1
  243. nuitka/build/static_src/HelpersSlices.c +1 -1
  244. nuitka/build/static_src/HelpersStrings.c +1 -1
  245. nuitka/build/static_src/HelpersTuples.c +1 -1
  246. nuitka/build/static_src/HelpersTypes.c +5 -5
  247. nuitka/build/static_src/InspectPatcher.c +2 -1
  248. nuitka/build/static_src/MainProgram.c +30 -6
  249. nuitka/build/static_src/MetaPathBasedLoader.c +19 -11
  250. nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +1 -1
  251. nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +1 -1
  252. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +17 -4
  253. nuitka/build/static_src/OnefileBootstrap.c +6 -4
  254. nuitka/build/static_src/OnefileSplashScreen.cpp +1 -1
  255. nuitka/code_generation/AsyncgenCodes.py +5 -6
  256. nuitka/code_generation/AttributeCodes.py +1 -1
  257. nuitka/code_generation/BinaryOperationHelperDefinitions.py +1 -1
  258. nuitka/code_generation/BranchCodes.py +1 -1
  259. nuitka/code_generation/BuiltinCodes.py +15 -5
  260. nuitka/code_generation/CallCodes.py +1 -1
  261. nuitka/code_generation/ClassCodes.py +1 -1
  262. nuitka/code_generation/CodeGeneration.py +23 -17
  263. nuitka/code_generation/CodeHelperSelection.py +1 -1
  264. nuitka/code_generation/CodeHelpers.py +1 -1
  265. nuitka/code_generation/CodeObjectCodes.py +19 -2
  266. nuitka/code_generation/ComparisonCodes.py +1 -1
  267. nuitka/code_generation/ComparisonHelperDefinitions.py +1 -1
  268. nuitka/code_generation/ConditionalCodes.py +1 -1
  269. nuitka/code_generation/ConstantCodes.py +1 -1
  270. nuitka/code_generation/Contexts.py +52 -39
  271. nuitka/code_generation/CoroutineCodes.py +4 -5
  272. nuitka/code_generation/CtypesCodes.py +1 -1
  273. nuitka/code_generation/DictCodes.py +1 -1
  274. nuitka/code_generation/Emission.py +1 -1
  275. nuitka/code_generation/ErrorCodes.py +1 -1
  276. nuitka/code_generation/EvalCodes.py +1 -1
  277. nuitka/code_generation/ExceptionCodes.py +1 -1
  278. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -1
  279. nuitka/code_generation/ExpressionCodes.py +1 -1
  280. nuitka/code_generation/FrameCodes.py +26 -17
  281. nuitka/code_generation/FunctionCodes.py +9 -15
  282. nuitka/code_generation/GeneratorCodes.py +9 -10
  283. nuitka/code_generation/GlobalConstants.py +6 -4
  284. nuitka/code_generation/GlobalsLocalsCodes.py +1 -1
  285. nuitka/code_generation/IdCodes.py +1 -1
  286. nuitka/code_generation/ImportCodes.py +1 -1
  287. nuitka/code_generation/Indentation.py +1 -1
  288. nuitka/code_generation/IndexCodes.py +1 -1
  289. nuitka/code_generation/InjectCCodes.py +1 -1
  290. nuitka/code_generation/IntegerCodes.py +1 -1
  291. nuitka/code_generation/IteratorCodes.py +1 -1
  292. nuitka/code_generation/JitCodes.py +1 -1
  293. nuitka/code_generation/LabelCodes.py +1 -1
  294. nuitka/code_generation/LineNumberCodes.py +1 -1
  295. nuitka/code_generation/ListCodes.py +1 -1
  296. nuitka/code_generation/LoaderCodes.py +1 -1
  297. nuitka/code_generation/LocalsDictCodes.py +1 -1
  298. nuitka/code_generation/LoopCodes.py +1 -1
  299. nuitka/code_generation/MatchCodes.py +1 -1
  300. nuitka/code_generation/ModuleCodes.py +31 -4
  301. nuitka/code_generation/Namify.py +4 -1
  302. nuitka/code_generation/NetworkxCodes.py +1 -1
  303. nuitka/code_generation/OperationCodes.py +1 -1
  304. nuitka/code_generation/PackageResourceCodes.py +4 -10
  305. nuitka/code_generation/PrintCodes.py +1 -1
  306. nuitka/code_generation/PythonAPICodes.py +1 -1
  307. nuitka/code_generation/RaisingCodes.py +1 -1
  308. nuitka/code_generation/Reports.py +1 -1
  309. nuitka/code_generation/ReturnCodes.py +1 -1
  310. nuitka/code_generation/SetCodes.py +1 -1
  311. nuitka/code_generation/SliceCodes.py +1 -1
  312. nuitka/code_generation/StringCodes.py +1 -1
  313. nuitka/code_generation/SubscriptCodes.py +1 -1
  314. nuitka/code_generation/TensorflowCodes.py +1 -1
  315. nuitka/code_generation/TryCodes.py +1 -1
  316. nuitka/code_generation/TupleCodes.py +1 -1
  317. nuitka/code_generation/TypeAliasCodes.py +4 -3
  318. nuitka/code_generation/VariableCodes.py +1 -1
  319. nuitka/code_generation/VariableDeclarations.py +1 -1
  320. nuitka/code_generation/YieldCodes.py +1 -1
  321. nuitka/code_generation/__init__.py +1 -1
  322. nuitka/code_generation/c_types/CTypeBases.py +1 -1
  323. nuitka/code_generation/c_types/CTypeBooleans.py +1 -1
  324. nuitka/code_generation/c_types/CTypeCFloats.py +1 -1
  325. nuitka/code_generation/c_types/CTypeCLongs.py +1 -1
  326. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +1 -1
  327. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +1 -1
  328. nuitka/code_generation/c_types/CTypeNuitkaInts.py +1 -1
  329. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
  330. nuitka/code_generation/c_types/CTypePyObjectPointers.py +1 -1
  331. nuitka/code_generation/c_types/CTypeVoids.py +1 -1
  332. nuitka/code_generation/c_types/__init__.py +1 -1
  333. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +1 -1
  334. nuitka/code_generation/templates/CodeTemplatesConstants.py +2 -2
  335. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +1 -1
  336. nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
  337. nuitka/code_generation/templates/CodeTemplatesFrames.py +21 -25
  338. nuitka/code_generation/templates/CodeTemplatesFunction.py +1 -1
  339. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +3 -3
  340. nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -1
  341. nuitka/code_generation/templates/CodeTemplatesLoader.py +26 -3
  342. nuitka/code_generation/templates/CodeTemplatesModules.py +21 -8
  343. nuitka/code_generation/templates/CodeTemplatesVariables.py +1 -1
  344. nuitka/code_generation/templates/TemplateDebugWrapper.py +1 -1
  345. nuitka/code_generation/templates/__init__.py +1 -1
  346. nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +1 -1
  347. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
  348. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +1 -1
  349. nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +21 -1
  350. nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +1 -1
  351. nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +1 -1
  352. nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +1 -1
  353. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +1 -1
  354. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
  355. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
  356. nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +1 -1
  357. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
  358. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +1 -1
  359. nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +1 -1
  360. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +1 -1
  361. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +1 -1
  362. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
  363. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
  364. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +1 -1
  365. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +1 -1
  366. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +1 -1
  367. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +1 -1
  368. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +1 -1
  369. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
  370. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
  371. nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +1 -1
  372. nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +1 -1
  373. nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +1 -1
  374. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +1 -1
  375. nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +1 -1
  376. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
  377. nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +1 -1
  378. nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +1 -1
  379. nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +1 -1
  380. nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +1 -1
  381. nuitka/containers/Namedtuples.py +1 -1
  382. nuitka/containers/OrderedSetsFallback.py +1 -1
  383. nuitka/containers/__init__.py +1 -1
  384. nuitka/distutils/Build.py +1 -1
  385. nuitka/distutils/DistutilCommands.py +2 -2
  386. nuitka/distutils/__init__.py +1 -1
  387. nuitka/finalizations/Finalization.py +1 -1
  388. nuitka/finalizations/FinalizeMarkups.py +1 -1
  389. nuitka/finalizations/__init__.py +1 -1
  390. nuitka/freezer/DependsExe.py +2 -1
  391. nuitka/freezer/DllDependenciesCommon.py +1 -1
  392. nuitka/freezer/DllDependenciesMacOS.py +8 -3
  393. nuitka/freezer/DllDependenciesPosix.py +23 -4
  394. nuitka/freezer/DllDependenciesWin32.py +112 -25
  395. nuitka/freezer/ImportDetection.py +1 -1
  396. nuitka/freezer/IncludedDataFiles.py +2 -2
  397. nuitka/freezer/IncludedEntryPoints.py +9 -1
  398. nuitka/freezer/Onefile.py +13 -15
  399. nuitka/freezer/Standalone.py +16 -4
  400. nuitka/freezer/__init__.py +1 -1
  401. nuitka/importing/IgnoreListing.py +1 -1
  402. nuitka/importing/ImportCache.py +1 -1
  403. nuitka/importing/ImportResolving.py +1 -1
  404. nuitka/importing/Importing.py +6 -4
  405. nuitka/importing/PreloadedPackages.py +1 -1
  406. nuitka/importing/Recursion.py +37 -12
  407. nuitka/importing/StandardLibrary.py +1 -1
  408. nuitka/importing/__init__.py +1 -1
  409. nuitka/nodes/AsyncgenNodes.py +1 -1
  410. nuitka/nodes/AttributeLookupNodes.py +1 -1
  411. nuitka/nodes/AttributeNodes.py +1 -1
  412. nuitka/nodes/AttributeNodesGenerated.py +1 -1
  413. nuitka/nodes/BuiltinAllNodes.py +1 -1
  414. nuitka/nodes/BuiltinAnyNodes.py +1 -1
  415. nuitka/nodes/BuiltinComplexNodes.py +1 -1
  416. nuitka/nodes/BuiltinDecodingNodes.py +1 -1
  417. nuitka/nodes/BuiltinDecoratorNodes.py +1 -1
  418. nuitka/nodes/BuiltinDictNodes.py +1 -1
  419. nuitka/nodes/BuiltinFormatNodes.py +1 -1
  420. nuitka/nodes/BuiltinHashNodes.py +1 -1
  421. nuitka/nodes/BuiltinInputNodes.py +1 -1
  422. nuitka/nodes/BuiltinIntegerNodes.py +1 -1
  423. nuitka/nodes/BuiltinIteratorNodes.py +1 -1
  424. nuitka/nodes/BuiltinLenNodes.py +1 -1
  425. nuitka/nodes/BuiltinNextNodes.py +1 -1
  426. nuitka/nodes/BuiltinOpenNodes.py +1 -1
  427. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +1 -1
  428. nuitka/nodes/BuiltinRangeNodes.py +1 -1
  429. nuitka/nodes/BuiltinRefNodes.py +1 -1
  430. nuitka/nodes/BuiltinSumNodes.py +1 -1
  431. nuitka/nodes/BuiltinTypeNodes.py +1 -1
  432. nuitka/nodes/BuiltinVarsNodes.py +1 -1
  433. nuitka/nodes/BytesNodes.py +1 -1
  434. nuitka/nodes/CallNodes.py +1 -1
  435. nuitka/nodes/Checkers.py +1 -1
  436. nuitka/nodes/ChildrenHavingMixins.py +240 -16
  437. nuitka/nodes/ClassNodes.py +1 -1
  438. nuitka/nodes/CodeObjectSpecs.py +4 -4
  439. nuitka/nodes/ComparisonNodes.py +1 -1
  440. nuitka/nodes/ConditionalNodes.py +1 -1
  441. nuitka/nodes/ConstantRefNodes.py +1 -1
  442. nuitka/nodes/ContainerMakingNodes.py +1 -1
  443. nuitka/nodes/ContainerOperationNodes.py +1 -1
  444. nuitka/nodes/CoroutineNodes.py +1 -1
  445. nuitka/nodes/CtypesNodes.py +1 -1
  446. nuitka/nodes/DictionaryNodes.py +1 -1
  447. nuitka/nodes/ExceptionNodes.py +1 -1
  448. nuitka/nodes/ExecEvalNodes.py +1 -1
  449. nuitka/nodes/ExpressionBases.py +1 -1
  450. nuitka/nodes/ExpressionBasesGenerated.py +1 -1
  451. nuitka/nodes/ExpressionShapeMixins.py +1 -1
  452. nuitka/nodes/FrameNodes.py +19 -7
  453. nuitka/nodes/FunctionAttributeNodes.py +1 -1
  454. nuitka/nodes/FunctionNodes.py +8 -1
  455. nuitka/nodes/FutureSpecs.py +34 -2
  456. nuitka/nodes/GeneratorNodes.py +1 -1
  457. nuitka/nodes/GlobalsLocalsNodes.py +1 -1
  458. nuitka/nodes/HardImportNodesGenerated.py +140 -56
  459. nuitka/nodes/ImportHardNodes.py +1 -1
  460. nuitka/nodes/ImportNodes.py +1 -1
  461. nuitka/nodes/IndicatorMixins.py +1 -1
  462. nuitka/nodes/InjectCNodes.py +1 -1
  463. nuitka/nodes/IterationHandles.py +1 -1
  464. nuitka/nodes/KeyValuePairNodes.py +1 -1
  465. nuitka/nodes/ListOperationNodes.py +1 -1
  466. nuitka/nodes/LocalsDictNodes.py +1 -1
  467. nuitka/nodes/LocalsScopes.py +1 -1
  468. nuitka/nodes/LoopNodes.py +1 -1
  469. nuitka/nodes/MatchNodes.py +1 -1
  470. nuitka/nodes/ModuleAttributeNodes.py +1 -1
  471. nuitka/nodes/ModuleNodes.py +23 -9
  472. nuitka/nodes/NetworkxNodes.py +1 -1
  473. nuitka/nodes/NodeBases.py +1 -1
  474. nuitka/nodes/NodeMakingHelpers.py +1 -1
  475. nuitka/nodes/NodeMetaClasses.py +1 -1
  476. nuitka/nodes/OperatorNodes.py +1 -1
  477. nuitka/nodes/OperatorNodesUnary.py +1 -1
  478. nuitka/nodes/OsSysNodes.py +1 -1
  479. nuitka/nodes/OutlineNodes.py +1 -1
  480. nuitka/nodes/PackageMetadataNodes.py +4 -2
  481. nuitka/nodes/PackageResourceNodes.py +42 -7
  482. nuitka/nodes/PrintNodes.py +1 -1
  483. nuitka/nodes/ReturnNodes.py +1 -1
  484. nuitka/nodes/SideEffectNodes.py +1 -1
  485. nuitka/nodes/SliceNodes.py +1 -1
  486. nuitka/nodes/StatementBasesGenerated.py +1 -1
  487. nuitka/nodes/StatementNodes.py +1 -1
  488. nuitka/nodes/StrNodes.py +1 -1
  489. nuitka/nodes/StringConcatenationNodes.py +1 -1
  490. nuitka/nodes/SubscriptNodes.py +1 -1
  491. nuitka/nodes/TensorflowNodes.py +1 -1
  492. nuitka/nodes/TryNodes.py +1 -1
  493. nuitka/nodes/TypeMatchNodes.py +1 -1
  494. nuitka/nodes/TypeNodes.py +4 -4
  495. nuitka/nodes/VariableAssignNodes.py +1 -1
  496. nuitka/nodes/VariableDelNodes.py +1 -1
  497. nuitka/nodes/VariableNameNodes.py +1 -1
  498. nuitka/nodes/VariableRefNodes.py +1 -1
  499. nuitka/nodes/VariableReleaseNodes.py +1 -1
  500. nuitka/nodes/YieldNodes.py +1 -1
  501. nuitka/nodes/__init__.py +1 -1
  502. nuitka/nodes/shapes/BuiltinTypeShapes.py +1 -1
  503. nuitka/nodes/shapes/ControlFlowDescriptions.py +1 -1
  504. nuitka/nodes/shapes/IteratorShapes.py +1 -1
  505. nuitka/nodes/shapes/ShapeMixins.py +1 -1
  506. nuitka/nodes/shapes/StandardShapes.py +1 -1
  507. nuitka/nodes/shapes/__init__.py +1 -1
  508. nuitka/optimizations/BytecodeDemotion.py +1 -1
  509. nuitka/optimizations/FunctionInlining.py +1 -1
  510. nuitka/optimizations/Graphs.py +1 -1
  511. nuitka/optimizations/Optimization.py +1 -1
  512. nuitka/optimizations/OptimizeBuiltinCalls.py +1 -1
  513. nuitka/optimizations/Tags.py +1 -1
  514. nuitka/optimizations/TraceCollections.py +1 -1
  515. nuitka/optimizations/ValueTraces.py +1 -1
  516. nuitka/optimizations/__init__.py +1 -1
  517. nuitka/pgo/PGO.py +1 -1
  518. nuitka/pgo/__init__.py +1 -1
  519. nuitka/plugins/PluginBase.py +91 -16
  520. nuitka/plugins/Plugins.py +58 -15
  521. nuitka/plugins/YamlPluginBase.py +1 -1
  522. nuitka/plugins/__init__.py +1 -1
  523. nuitka/plugins/standard/AntiBloatPlugin.py +138 -66
  524. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +2 -1
  525. nuitka/plugins/standard/DataFilesPlugin.py +2 -2
  526. nuitka/plugins/standard/DelvewheelPlugin.py +2 -1
  527. nuitka/plugins/standard/DillPlugin/DillPlugin.c +1 -1
  528. nuitka/plugins/standard/DillPlugin/dill-postLoad.py +1 -1
  529. nuitka/plugins/standard/DillPlugin.py +2 -2
  530. nuitka/plugins/standard/DllFilesPlugin.py +2 -12
  531. nuitka/plugins/standard/EnumPlugin.py +2 -2
  532. nuitka/plugins/standard/EventletPlugin.py +2 -1
  533. nuitka/plugins/standard/GeventPlugin.py +2 -1
  534. nuitka/plugins/standard/GiPlugin.py +2 -1
  535. nuitka/plugins/standard/GlfwPlugin.py +2 -1
  536. nuitka/plugins/standard/ImplicitImports.py +7 -6
  537. nuitka/plugins/standard/KivyPlugin.py +2 -1
  538. nuitka/plugins/standard/MatplotlibPlugin.py +2 -1
  539. nuitka/plugins/standard/MultiprocessingPlugin.py +2 -1
  540. nuitka/plugins/standard/NumpyPlugin.py +2 -1
  541. nuitka/plugins/standard/OptionsNannyPlugin.py +2 -2
  542. nuitka/plugins/standard/PbrPlugin.py +2 -2
  543. nuitka/plugins/standard/PkgResourcesPlugin.py +2 -1
  544. nuitka/plugins/standard/PlaywrightPlugin.py +10 -15
  545. nuitka/plugins/standard/PmwPlugin.py +2 -1
  546. nuitka/plugins/standard/PySidePyQtPlugin.py +25 -15
  547. nuitka/plugins/standard/PywebViewPlugin.py +2 -1
  548. nuitka/plugins/standard/SpacyPlugin.py +2 -1
  549. nuitka/plugins/standard/TensorflowPlugin.py +2 -1
  550. nuitka/plugins/standard/TkinterPlugin.py +15 -2
  551. nuitka/plugins/standard/TorchPlugin.py +2 -1
  552. nuitka/plugins/standard/TransformersPlugin.py +2 -2
  553. nuitka/plugins/standard/TrioPlugin.py +2 -1
  554. nuitka/plugins/standard/UpxPlugin.py +2 -1
  555. nuitka/plugins/standard/__init__.py +1 -1
  556. nuitka/plugins/standard/standard.nuitka-package.config.yml +257 -89
  557. nuitka/reports/CompilationReportReader.py +5 -1
  558. nuitka/reports/LicenseReport.rst.j2 +1 -1
  559. nuitka/reports/Reports.py +30 -3
  560. nuitka/reports/__init__.py +1 -1
  561. nuitka/specs/BuiltinBytesOperationSpecs.py +1 -1
  562. nuitka/specs/BuiltinDictOperationSpecs.py +1 -1
  563. nuitka/specs/BuiltinListOperationSpecs.py +1 -1
  564. nuitka/specs/BuiltinParameterSpecs.py +1 -1
  565. nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
  566. nuitka/specs/BuiltinTypeOperationSpecs.py +1 -1
  567. nuitka/specs/BuiltinUnicodeOperationSpecs.py +1 -1
  568. nuitka/specs/HardImportSpecs.py +10 -2
  569. nuitka/specs/ParameterSpecs.py +17 -2
  570. nuitka/specs/__init__.py +1 -1
  571. nuitka/tools/Basics.py +1 -1
  572. nuitka/tools/__init__.py +1 -1
  573. nuitka/tools/commercial/__init__.py +1 -1
  574. nuitka/tools/data_composer/DataComposer.py +125 -1
  575. nuitka/tools/data_composer/__init__.py +1 -1
  576. nuitka/tools/data_composer/__main__.py +1 -1
  577. nuitka/tools/environments/CreateEnvironment.py +1 -1
  578. nuitka/tools/environments/Virtualenv.py +1 -1
  579. nuitka/tools/environments/__init__.py +1 -1
  580. nuitka/tools/general/__init__.py +1 -1
  581. nuitka/tools/general/dll_report/__init__.py +1 -1
  582. nuitka/tools/general/dll_report/__main__.py +1 -1
  583. nuitka/tools/general/find_module/FindModuleCode.py +6 -3
  584. nuitka/tools/general/find_module/__init__.py +1 -1
  585. nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
  586. nuitka/tools/general/generate_header/__init__.py +19 -0
  587. nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
  588. nuitka/tools/onefile_compressor/__init__.py +1 -1
  589. nuitka/tools/onefile_compressor/__main__.py +1 -1
  590. nuitka/tools/podman/Podman.py +1 -1
  591. nuitka/tools/podman/__init__.py +1 -1
  592. nuitka/tools/podman/__main__.py +4 -2
  593. nuitka/tools/profiler/__init__.py +1 -1
  594. nuitka/tools/profiler/__main__.py +1 -1
  595. nuitka/tools/scanning/DisplayPackageDLLs.py +42 -20
  596. nuitka/tools/scanning/DisplayPackageData.py +1 -1
  597. nuitka/tools/scanning/__init__.py +1 -1
  598. nuitka/tools/specialize/CTypeDescriptions.py +1 -1
  599. nuitka/tools/specialize/Common.py +1 -1
  600. nuitka/tools/specialize/SpecializeC.py +1 -1
  601. nuitka/tools/specialize/SpecializePython.py +7 -3
  602. nuitka/tools/specialize/__init__.py +1 -1
  603. nuitka/tools/testing/Common.py +140 -19
  604. nuitka/tools/testing/Constructs.py +1 -1
  605. nuitka/tools/testing/OutputComparison.py +5 -4
  606. nuitka/tools/testing/Pythons.py +1 -1
  607. nuitka/tools/testing/RuntimeTracing.py +1 -1
  608. nuitka/tools/testing/SearchModes.py +1 -1
  609. nuitka/tools/testing/Valgrind.py +1 -1
  610. nuitka/tools/testing/__init__.py +1 -1
  611. nuitka/tools/testing/check_reference_counts/__init__.py +1 -1
  612. nuitka/tools/testing/check_reference_counts/__main__.py +6 -2
  613. nuitka/tools/testing/compare_with_cpython/__init__.py +1 -1
  614. nuitka/tools/testing/compare_with_cpython/__main__.py +51 -14
  615. nuitka/tools/testing/find_sxs_modules/__init__.py +1 -1
  616. nuitka/tools/testing/find_sxs_modules/__main__.py +1 -1
  617. nuitka/tools/testing/measure_construct_performance/__init__.py +1 -1
  618. nuitka/tools/testing/measure_construct_performance/__main__.py +1 -1
  619. nuitka/tools/testing/run_nuitka_tests/__init__.py +1 -1
  620. nuitka/tools/testing/run_nuitka_tests/__main__.py +1 -1
  621. nuitka/tools/watch/AutoStage.py +1 -1
  622. nuitka/tools/watch/Common.py +55 -0
  623. nuitka/tools/watch/Conda.py +125 -0
  624. nuitka/tools/watch/GitHub.py +1 -1
  625. nuitka/tools/watch/Pacman.py +73 -0
  626. nuitka/tools/watch/Pipenv.py +143 -0
  627. nuitka/tools/watch/__init__.py +1 -1
  628. nuitka/tools/watch/__main__.py +124 -266
  629. nuitka/tree/Building.py +5 -7
  630. nuitka/tree/ComplexCallHelperFunctions.py +1 -1
  631. nuitka/tree/Extractions.py +1 -1
  632. nuitka/tree/FutureSpecState.py +71 -0
  633. nuitka/tree/InternalModule.py +1 -1
  634. nuitka/tree/Operations.py +1 -1
  635. nuitka/tree/ReformulationAssertStatements.py +1 -1
  636. nuitka/tree/ReformulationAssignmentStatements.py +3 -3
  637. nuitka/tree/ReformulationBooleanExpressions.py +1 -1
  638. nuitka/tree/ReformulationCallExpressions.py +1 -1
  639. nuitka/tree/ReformulationClasses.py +1 -1
  640. nuitka/tree/ReformulationClasses3.py +1 -1
  641. nuitka/tree/ReformulationComparisonExpressions.py +1 -1
  642. nuitka/tree/ReformulationContractionExpressions.py +3 -1
  643. nuitka/tree/ReformulationDictionaryCreation.py +3 -3
  644. nuitka/tree/ReformulationExecStatements.py +1 -1
  645. nuitka/tree/ReformulationForLoopStatements.py +1 -1
  646. nuitka/tree/ReformulationFunctionStatements.py +2 -2
  647. nuitka/tree/ReformulationImportStatements.py +5 -52
  648. nuitka/tree/ReformulationLambdaExpressions.py +2 -1
  649. nuitka/tree/ReformulationMatchStatements.py +1 -1
  650. nuitka/tree/ReformulationMultidist.py +2 -2
  651. nuitka/tree/ReformulationNamespacePackages.py +28 -6
  652. nuitka/tree/ReformulationPrintStatements.py +1 -1
  653. nuitka/tree/ReformulationSequenceCreation.py +1 -1
  654. nuitka/tree/ReformulationSubscriptExpressions.py +1 -1
  655. nuitka/tree/ReformulationTryExceptStatements.py +1 -1
  656. nuitka/tree/ReformulationTryFinallyStatements.py +1 -1
  657. nuitka/tree/ReformulationWhileLoopStatements.py +1 -1
  658. nuitka/tree/ReformulationWithStatements.py +1 -1
  659. nuitka/tree/ReformulationYieldExpressions.py +1 -1
  660. nuitka/tree/SourceHandling.py +57 -18
  661. nuitka/tree/SyntaxErrors.py +1 -1
  662. nuitka/tree/TreeHelpers.py +24 -10
  663. nuitka/tree/VariableClosure.py +1 -1
  664. nuitka/tree/__init__.py +1 -1
  665. nuitka/utils/AppDirs.py +5 -2
  666. nuitka/utils/CStrings.py +1 -1
  667. nuitka/utils/CommandLineOptions.py +2 -2
  668. nuitka/utils/Distributions.py +197 -15
  669. nuitka/utils/Download.py +14 -6
  670. nuitka/utils/Execution.py +43 -14
  671. nuitka/utils/FileOperations.py +43 -10
  672. nuitka/utils/Hashing.py +1 -1
  673. nuitka/utils/Images.py +8 -2
  674. nuitka/utils/Importing.py +1 -1
  675. nuitka/utils/InlineCopies.py +1 -1
  676. nuitka/utils/InstalledPythons.py +1 -1
  677. nuitka/utils/InstanceCounters.py +1 -1
  678. nuitka/utils/Jinja2.py +1 -1
  679. nuitka/utils/Json.py +2 -2
  680. nuitka/utils/MacOSApp.py +4 -3
  681. nuitka/utils/MemoryUsage.py +1 -1
  682. nuitka/utils/ModuleNames.py +1 -1
  683. nuitka/utils/PackageResources.py +1 -1
  684. nuitka/utils/ReExecute.py +1 -1
  685. nuitka/utils/Rest.py +1 -1
  686. nuitka/utils/SharedLibraries.py +52 -7
  687. nuitka/utils/Shebang.py +1 -1
  688. nuitka/utils/Signing.py +2 -4
  689. nuitka/utils/SlotMetaClasses.py +1 -1
  690. nuitka/utils/StaticLibraries.py +29 -1
  691. nuitka/utils/ThreadedExecutor.py +1 -1
  692. nuitka/utils/Timing.py +1 -1
  693. nuitka/utils/Utils.py +1 -1
  694. nuitka/utils/WindowsFileUsage.py +1 -1
  695. nuitka/utils/WindowsResources.py +3 -1
  696. nuitka/utils/Yaml.py +1 -1
  697. nuitka/utils/__init__.py +1 -1
  698. Nuitka_winsvc-2.5.6.dist-info/RECORD +0 -978
  699. {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/LICENSE.txt +0 -0
  700. {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/entry_points.txt +0 -0
  701. {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- // Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
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 coroutine", asyncgen);
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 int _Nuitka_Asyncgen_init_hooks(PyThreadState *tstate, struct Nuitka_AsyncgenObject *asyncgen) {
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 1;
820
+ return true;
820
821
  }
821
822
 
822
823
  Py_DECREF(res);
823
824
  }
824
825
 
825
- return 0;
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,73 +965,51 @@ 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
- // Revive temporarily.
949
- assert(Py_REFCNT(asyncgen) == 0);
950
- Py_SET_REFCNT(asyncgen, 1);
951
-
952
- PyThreadState *tstate = PyThreadState_GET();
953
-
954
- // Save the current exception, if any, we must preserve it.
955
- struct Nuitka_ExceptionPreservationItem saved_exception_state;
956
-
957
- PyObject *finalizer = asyncgen->m_finalizer;
958
- if (finalizer != NULL && asyncgen->m_closed == false) {
959
- // Save the current exception, if any.
960
- FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
961
-
962
- PyObject *res = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, finalizer, (PyObject *)asyncgen);
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);
963
976
 
964
- if (unlikely(res == NULL)) {
965
- PyErr_WriteUnraisable((PyObject *)asyncgen);
966
- } else {
967
- Py_DECREF(res);
968
- }
977
+ Nuitka_GC_Track(asyncgen);
978
+ }
969
979
 
970
- RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
980
+ // TODO: Avoid this API call, it's bound to be slow on some platforms and
981
+ // does more checks than necessary for us.
982
+ if (PyObject_CallFinalizerFromDealloc((PyObject *)asyncgen)) {
971
983
  return;
972
984
  }
985
+ // if (!_PyGC_FINALIZED(asyncgen)) {
986
+ // Nuitka_Asyncgen_tp_finalize(asyncgen);
973
987
 
974
- FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
988
+ // _PyGC_SET_FINALIZED(asyncgen);
989
+ // }
975
990
 
976
- bool close_result = _Nuitka_Asyncgen_close(tstate, asyncgen);
991
+ Nuitka_GC_UnTrack(asyncgen);
977
992
 
978
- if (unlikely(close_result == false)) {
979
- PyErr_WriteUnraisable((PyObject *)asyncgen);
980
- }
993
+ Py_XDECREF(asyncgen->m_finalizer);
994
+ asyncgen->m_finalizer = NULL;
981
995
 
982
996
  Nuitka_Asyncgen_release_closure(asyncgen);
983
997
 
984
- // Allow for above code to resurrect the coroutine, do not release the object
985
- // like Py_DECREF would.
986
- Py_SET_REFCNT(asyncgen, Py_REFCNT(asyncgen) - 1);
987
- if (Py_REFCNT(asyncgen) >= 1) {
988
- return;
989
- }
990
-
991
998
  if (asyncgen->m_frame) {
992
999
  Nuitka_SetFrameGenerator(asyncgen->m_frame, NULL);
993
1000
  Py_DECREF(asyncgen->m_frame);
994
- asyncgen->m_frame = NULL;
995
1001
  }
996
1002
 
997
1003
  // 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
1004
  Py_DECREF(asyncgen->m_name);
1008
1005
  Py_DECREF(asyncgen->m_qualname);
1009
1006
 
1007
+ // TODO: Maybe push this into the freelist code and do
1008
+ // it on allocation.
1009
+ _PyGC_SET_UNFINALIZED((PyObject *)asyncgen);
1010
+
1010
1011
  /* Put the object into free list or release to GC */
1011
1012
  releaseToFreeList(free_list_asyncgens, asyncgen, MAX_ASYNCGEN_FREE_LIST_COUNT);
1012
-
1013
- RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
1014
1013
  }
1015
1014
 
1016
1015
  static PyObject *Nuitka_Asyncgen_tp_repr(struct Nuitka_AsyncgenObject *asyncgen) {
@@ -1310,8 +1309,8 @@ struct Nuitka_AsyncgenAsendObject {
1310
1309
 
1311
1310
  #if _DEBUG_ASYNCGEN
1312
1311
 
1313
- NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENASEND_STATUS(char const *descriptor, char const *context,
1314
- struct Nuitka_AsyncgenAsendObject *asyncgen_asend) {
1312
+ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGEN_ASEND_STATUS(char const *descriptor, char const *context,
1313
+ struct Nuitka_AsyncgenAsendObject *asyncgen_asend) {
1315
1314
  char const *status;
1316
1315
 
1317
1316
  switch (asyncgen_asend->m_state) {
@@ -1339,8 +1338,8 @@ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENASEND_STATUS(char const *descrip
1339
1338
  PRINT_NEW_LINE();
1340
1339
  }
1341
1340
 
1342
- #define PRINT_ASYNCGENASEND_STATUS(context, asyncgen_asend) \
1343
- _PRINT_ASYNCGENASEND_STATUS(__FUNCTION__, context, asyncgen_asend)
1341
+ #define PRINT_ASYNCGEN_ASEND_STATUS(context, asyncgen_asend) \
1342
+ _PRINT_ASYNCGEN_ASEND_STATUS(__FUNCTION__, context, asyncgen_asend)
1344
1343
 
1345
1344
  #endif
1346
1345
 
@@ -1447,7 +1446,7 @@ static int Nuitka_AsyncgenAsend_tp_traverse(struct Nuitka_AsyncgenAsendObject *a
1447
1446
 
1448
1447
  static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *asyncgen_asend, PyObject *arg) {
1449
1448
  #if _DEBUG_ASYNCGEN
1450
- PRINT_ASYNCGENASEND_STATUS("Enter", asyncgen_asend);
1449
+ PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
1451
1450
  PRINT_COROUTINE_VALUE("arg", arg);
1452
1451
  PRINT_NEW_LINE();
1453
1452
  #endif
@@ -1462,7 +1461,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
1462
1461
  #endif
1463
1462
 
1464
1463
  #if _DEBUG_ASYNCGEN
1465
- PRINT_ASYNCGENASEND_STATUS("Leave", asyncgen_asend);
1464
+ PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
1466
1465
  PRINT_STRING("Closed -> StopIteration\n");
1467
1466
  PRINT_CURRENT_EXCEPTION();
1468
1467
  PRINT_NEW_LINE();
@@ -1507,12 +1506,17 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
1507
1506
  PyObject *result = _Nuitka_Asyncgen_send(tstate, asyncgen_asend->m_gen, arg, false, &exception_state);
1508
1507
 
1509
1508
  #if _DEBUG_ASYNCGEN
1510
- PRINT_STRING("Returned from _Nuitka_Asyncgen_send\n");
1509
+ PRINT_ASYNCGEN_ASEND_STATUS("Returned from _Nuitka_Asyncgen_send", asyncgen_asend);
1511
1510
  PRINT_COROUTINE_VALUE("result", result);
1512
1511
  PRINT_CURRENT_EXCEPTION();
1513
1512
  #endif
1514
1513
 
1515
1514
  result = _Nuitka_Asyncgen_unwrap_value(tstate, asyncgen_asend->m_gen, result);
1515
+ #if _DEBUG_ASYNCGEN
1516
+ PRINT_ASYNCGEN_ASEND_STATUS("Returned from _Nuitka_Asyncgen_unwrap_value", asyncgen_asend);
1517
+ PRINT_COROUTINE_VALUE("result", result);
1518
+ PRINT_CURRENT_EXCEPTION();
1519
+ #endif
1516
1520
 
1517
1521
  #if _DEBUG_ASYNCGEN
1518
1522
  PRINT_COROUTINE_VALUE("result", result);
@@ -1525,7 +1529,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
1525
1529
  }
1526
1530
 
1527
1531
  #if _DEBUG_ASYNCGEN
1528
- PRINT_ASYNCGENASEND_STATUS("Leave", asyncgen_asend);
1532
+ PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
1529
1533
  PRINT_COROUTINE_VALUE("result", result);
1530
1534
  PRINT_NEW_LINE();
1531
1535
  #endif
@@ -1535,7 +1539,7 @@ static PyObject *Nuitka_AsyncgenAsend_send(struct Nuitka_AsyncgenAsendObject *as
1535
1539
 
1536
1540
  static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObject *asyncgen_asend) {
1537
1541
  #if _DEBUG_ASYNCGEN
1538
- PRINT_ASYNCGENASEND_STATUS("Enter", asyncgen_asend);
1542
+ PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
1539
1543
  PRINT_STRING("Deferring to Nuitka_AsyncgenAsend_send(Py_None)\n");
1540
1544
  PRINT_NEW_LINE();
1541
1545
  #endif
@@ -1543,7 +1547,7 @@ static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObj
1543
1547
  PyObject *result = Nuitka_AsyncgenAsend_send(asyncgen_asend, Py_None);
1544
1548
 
1545
1549
  #if _DEBUG_ASYNCGEN
1546
- PRINT_ASYNCGENASEND_STATUS("Leave", asyncgen_asend);
1550
+ PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
1547
1551
  PRINT_COROUTINE_VALUE("result", result);
1548
1552
  PRINT_NEW_LINE();
1549
1553
  #endif
@@ -1553,7 +1557,7 @@ static PyObject *Nuitka_AsyncgenAsend_tp_iternext(struct Nuitka_AsyncgenAsendObj
1553
1557
 
1554
1558
  static PyObject *Nuitka_AsyncgenAsend_throw(struct Nuitka_AsyncgenAsendObject *asyncgen_asend, PyObject *args) {
1555
1559
  #if _DEBUG_ASYNCGEN
1556
- PRINT_ASYNCGENASEND_STATUS("Enter", asyncgen_asend);
1560
+ PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
1557
1561
  PRINT_STRING("Nuitka_AsyncgenAsend_throw: args:");
1558
1562
  PRINT_ITEM(args);
1559
1563
  PRINT_NEW_LINE();
@@ -1601,7 +1605,7 @@ static PyObject *Nuitka_AsyncgenAsend_throw(struct Nuitka_AsyncgenAsendObject *a
1601
1605
  static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuitka_AsyncgenAsendObject *asyncgen_asend,
1602
1606
  struct Nuitka_ExceptionPreservationItem *exception_state) {
1603
1607
  #if _DEBUG_ASYNCGEN
1604
- PRINT_ASYNCGENASEND_STATUS("Enter", asyncgen_asend);
1608
+ PRINT_ASYNCGEN_ASEND_STATUS("Enter", asyncgen_asend);
1605
1609
  PRINT_EXCEPTION_STATE(exception_state);
1606
1610
  PRINT_CURRENT_EXCEPTION();
1607
1611
  PRINT_NEW_LINE();
@@ -1623,7 +1627,7 @@ static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuit
1623
1627
  }
1624
1628
 
1625
1629
  #if _DEBUG_ASYNCGEN
1626
- PRINT_ASYNCGENASEND_STATUS("Got result", asyncgen_asend);
1630
+ PRINT_ASYNCGEN_ASEND_STATUS("Got result", asyncgen_asend);
1627
1631
  PRINT_COROUTINE_VALUE("result", result);
1628
1632
  PRINT_CURRENT_EXCEPTION();
1629
1633
  #endif
@@ -1640,7 +1644,7 @@ static PyObject *_Nuitka_AsyncgenAsend_throw2(PyThreadState *tstate, struct Nuit
1640
1644
  }
1641
1645
 
1642
1646
  #if _DEBUG_ASYNCGEN
1643
- PRINT_ASYNCGENASEND_STATUS("Leave", asyncgen_asend);
1647
+ PRINT_ASYNCGEN_ASEND_STATUS("Leave", asyncgen_asend);
1644
1648
  PRINT_COROUTINE_VALUE("result", result);
1645
1649
  PRINT_CURRENT_EXCEPTION();
1646
1650
  PRINT_NEW_LINE();
@@ -1753,8 +1757,8 @@ struct Nuitka_AsyncgenAthrowObject {
1753
1757
 
1754
1758
  #if _DEBUG_ASYNCGEN
1755
1759
 
1756
- NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENATHROW_STATUS(char const *descriptor, char const *context,
1757
- struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow) {
1760
+ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGEN_ATHROW_STATUS(char const *descriptor, char const *context,
1761
+ struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow) {
1758
1762
  char const *status;
1759
1763
 
1760
1764
  switch (asyncgen_athrow->m_state) {
@@ -1782,8 +1786,8 @@ NUITKA_MAY_BE_UNUSED static void _PRINT_ASYNCGENATHROW_STATUS(char const *descri
1782
1786
  PRINT_NEW_LINE();
1783
1787
  }
1784
1788
 
1785
- #define PRINT_ASYNCGENATHROW_STATUS(context, coroutine) \
1786
- _PRINT_ASYNCGENATHROW_STATUS(__FUNCTION__, context, asyncgen_athrow)
1789
+ #define PRINT_ASYNCGEN_ATHROW_STATUS(context, coroutine) \
1790
+ _PRINT_ASYNCGEN_ATHROW_STATUS(__FUNCTION__, context, asyncgen_athrow)
1787
1791
 
1788
1792
  #endif
1789
1793
 
@@ -1818,7 +1822,7 @@ static int Nuitka_AsyncgenAthrow_traverse(struct Nuitka_AsyncgenAthrowObject *as
1818
1822
 
1819
1823
  static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow, PyObject *arg) {
1820
1824
  #if _DEBUG_ASYNCGEN
1821
- PRINT_ASYNCGENATHROW_STATUS("Enter", asyncgen_athrow);
1825
+ PRINT_ASYNCGEN_ATHROW_STATUS("Enter", asyncgen_athrow);
1822
1826
  PRINT_COROUTINE_VALUE("arg", arg);
1823
1827
  PRINT_NEW_LINE();
1824
1828
  #endif
@@ -1893,7 +1897,7 @@ static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *
1893
1897
  1, /* Do not close generator when PyExc_GeneratorExit is passed */
1894
1898
  &exception_state);
1895
1899
 
1896
- if (retval) {
1900
+ if (retval != NULL) {
1897
1901
  if (_PyAsyncGenWrappedValue_CheckExact(retval) || Nuitka_AsyncgenWrappedValue_CheckExact(retval)) {
1898
1902
  #if PYTHON_VERSION >= 0x380
1899
1903
  asyncgen_athrow->m_gen->m_running_async = false;
@@ -1943,13 +1947,14 @@ static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *
1943
1947
  struct Nuitka_ExceptionPreservationItem exception_state;
1944
1948
  INIT_ERROR_OCCURRED_STATE(&exception_state);
1945
1949
 
1950
+ Py_INCREF(arg);
1946
1951
  retval = _Nuitka_Asyncgen_send(tstate, asyncgen, arg, false, &exception_state);
1947
1952
 
1948
1953
  if (asyncgen_athrow->m_args) {
1949
1954
  return _Nuitka_Asyncgen_unwrap_value(tstate, asyncgen, retval);
1950
1955
  } else {
1951
1956
  /* We are here to close if no args. */
1952
- if (retval) {
1957
+ if (retval != NULL) {
1953
1958
  if (_PyAsyncGenWrappedValue_CheckExact(retval) || Nuitka_AsyncgenWrappedValue_CheckExact(retval)) {
1954
1959
  #if PYTHON_VERSION >= 0x380
1955
1960
  asyncgen_athrow->m_gen->m_running_async = false;
@@ -1994,7 +1999,7 @@ check_error:
1994
1999
 
1995
2000
  static PyObject *Nuitka_AsyncgenAthrow_throw(struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow, PyObject *args) {
1996
2001
  #if _DEBUG_ASYNCGEN
1997
- PRINT_ASYNCGENATHROW_STATUS("Enter", asyncgen_athrow);
2002
+ PRINT_ASYNCGEN_ATHROW_STATUS("Enter", asyncgen_athrow);
1998
2003
  PRINT_COROUTINE_VALUE("args", args);
1999
2004
  PRINT_NEW_LINE();
2000
2005
  #endif
@@ -1,4 +1,4 @@
1
- // Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
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 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
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
 
@@ -961,7 +961,7 @@ void PRINT_CURRENT_EXCEPTION(void) {
961
961
  #if PYTHON_VERSION < 0x3c0
962
962
  PRINT_EXCEPTION(tstate->curexc_type, tstate->curexc_value, (PyTracebackObject *)tstate->curexc_traceback);
963
963
  #else
964
- _PRINT_EXCEPTION1(tstate->exc_info->exc_value);
964
+ _PRINT_EXCEPTION1(tstate->current_exception);
965
965
  #endif
966
966
  }
967
967
 
@@ -972,7 +972,9 @@ void PRINT_PUBLISHED_EXCEPTION(void) {
972
972
  #if PYTHON_VERSION < 0x3b0
973
973
  PRINT_EXCEPTION(EXC_TYPE(tstate), EXC_VALUE(tstate), EXC_TRACEBACK(tstate));
974
974
  #else
975
- PRINT_EXCEPTION(EXC_TYPE(tstate), EXC_VALUE(tstate), GET_EXCEPTION_TRACEBACK(EXC_VALUE(tstate)));
975
+ PyObject *exc_value = EXC_VALUE(tstate);
976
+ PyTracebackObject *exc_tb = (exc_value != NULL && exc_value != Py_None) ? GET_EXCEPTION_TRACEBACK(exc_value) : NULL;
977
+ PRINT_EXCEPTION(EXC_TYPE(tstate), exc_value, exc_tb);
976
978
  #endif
977
979
  }
978
980
 
@@ -1595,25 +1597,6 @@ PyObject *JOIN_PATH2(PyObject *dirname, PyObject *filename) {
1595
1597
  return result;
1596
1598
  }
1597
1599
 
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
1600
  #if defined(_NUITKA_EXE)
1618
1601
 
1619
1602
  wchar_t const *getBinaryDirectoryWideChars(bool resolve_symlinks) {
@@ -1940,13 +1923,12 @@ PyObject *getDllFilenameObject(void) {
1940
1923
  PyObject *getContainingDirectoryObject(bool resolve_symlinks) {
1941
1924
  #if defined(_NUITKA_EXE)
1942
1925
  #if defined(_NUITKA_ONEFILE_MODE)
1943
- environment_char_t const *onefile_binary = getEnvironmentVariable("NUITKA_ONEFILE_BINARY");
1944
- if (onefile_binary != NULL) {
1945
- PyObject *result = Nuitka_String_FromFilename(onefile_binary);
1946
- unsetEnvironmentVariable("NUITKA_ONEFILE_BINARY");
1926
+ environment_char_t const *onefile_directory = getEnvironmentVariable("NUITKA_ONEFILE_DIRECTORY");
1927
+ if (onefile_directory != NULL) {
1928
+ PyObject *result = Nuitka_String_FromFilename(onefile_directory);
1929
+ unsetEnvironmentVariable("NUITKA_ONEFILE_DIRECTORY");
1947
1930
 
1948
- PyThreadState *tstate = PyThreadState_GET();
1949
- return OS_PATH_DIRNAME(tstate, result);
1931
+ return result;
1950
1932
  }
1951
1933
 
1952
1934
  return getBinaryDirectoryObject(resolve_symlinks);
@@ -1,4 +1,4 @@
1
- // Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
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,71 +1082,63 @@ 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 *free_list_coros = NULL;
1089
- static int free_list_coros_count = 0;
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);
1096
1097
 
1097
- // Revive temporarily.
1098
- assert(Py_REFCNT(coroutine) == 0);
1099
- Py_SET_REFCNT(coroutine, 1);
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);
1100
1103
 
1101
- PyThreadState *tstate = PyThreadState_GET();
1104
+ Nuitka_GC_Track(coroutine);
1105
+ }
1102
1106
 
1103
- // Save the current exception, if any, we must preserve it.
1104
- struct Nuitka_ExceptionPreservationItem saved_exception_state;
1105
- FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
1107
+ // TODO: Avoid this API call, it's bound to be slow on some platforms and
1108
+ // does more checks than necessary for us.
1109
+ if (PyObject_CallFinalizerFromDealloc((PyObject *)coroutine)) {
1110
+ return;
1111
+ }
1112
+
1113
+ // Now it is safe to release references and memory for it.
1114
+ Nuitka_GC_UnTrack(coroutine);
1106
1115
 
1107
1116
  #if _DEBUG_COROUTINE
1108
1117
  PRINT_COROUTINE_STATUS("Enter", coroutine);
1109
1118
  PRINT_NEW_LINE();
1110
1119
  #endif
1111
1120
 
1112
- bool close_result = _Nuitka_Coroutine_close(tstate, coroutine);
1113
-
1114
- if (unlikely(close_result == false)) {
1115
- PyErr_WriteUnraisable((PyObject *)coroutine);
1116
- }
1117
-
1118
1121
  Nuitka_Coroutine_release_closure(coroutine);
1119
1122
 
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
- }
1123
+ #if PYTHON_VERSION >= 0x370
1124
+ Py_XDECREF(coroutine->m_origin);
1125
+ coroutine->m_origin = NULL;
1126
+ #endif
1126
1127
 
1127
1128
  if (coroutine->m_frame) {
1128
1129
  Nuitka_SetFrameGenerator(coroutine->m_frame, NULL);
1129
1130
  Py_DECREF(coroutine->m_frame);
1130
- coroutine->m_frame = NULL;
1131
- }
1132
-
1133
- // Now it is safe to release references and memory for it.
1134
- Nuitka_GC_UnTrack(coroutine);
1135
-
1136
- if (coroutine->m_weakrefs != NULL) {
1137
- PyObject_ClearWeakRefs((PyObject *)coroutine);
1138
- assert(!HAS_ERROR_OCCURRED(tstate));
1139
1131
  }
1140
1132
 
1141
1133
  Py_DECREF(coroutine->m_name);
1142
1134
  Py_DECREF(coroutine->m_qualname);
1143
1135
 
1144
- #if PYTHON_VERSION >= 0x370
1145
- Py_XDECREF(coroutine->m_origin);
1146
- #endif
1136
+ // TODO: Maybe push this into the freelist code and do
1137
+ // it on allocation.
1138
+ _PyGC_SET_UNFINALIZED((PyObject *)coroutine);
1147
1139
 
1148
1140
  /* Put the object into free list or release to GC */
1149
- releaseToFreeList(free_list_coros, coroutine, MAX_COROUTINE_FREE_LIST_COUNT);
1150
-
1151
- RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
1141
+ releaseToFreeList(free_list_coroutines, coroutine, MAX_COROUTINE_FREE_LIST_COUNT);
1152
1142
  }
1153
1143
 
1154
1144
  // TODO: Set "__doc__" automatically for method clones of compiled types from
@@ -1435,7 +1425,7 @@ PyObject *Nuitka_Coroutine_New(PyThreadState *tstate, coroutine_code code, PyObj
1435
1425
  Py_ssize_t full_size = closure_given + (heap_storage_size + sizeof(void *) - 1) / sizeof(void *);
1436
1426
 
1437
1427
  // Macro to assign result memory from GC or free list.
1438
- allocateFromFreeList(free_list_coros, struct Nuitka_CoroutineObject, Nuitka_Coroutine_Type, full_size);
1428
+ allocateFromFreeList(free_list_coroutines, struct Nuitka_CoroutineObject, Nuitka_Coroutine_Type, full_size);
1439
1429
 
1440
1430
  // For quicker access of generator heap.
1441
1431
  result->m_heap_storage = &result->m_closure[closure_given];