Nuitka-winsvc 2.4.11__cp311-cp311-win_amd64.whl → 2.5.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.

Files changed (304) hide show
  1. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/METADATA +56 -109
  2. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/RECORD +304 -280
  3. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/WHEEL +1 -1
  4. nuitka/Builtins.py +31 -0
  5. nuitka/HardImportRegistry.py +8 -0
  6. nuitka/MainControl.py +9 -4
  7. nuitka/OptionParsing.py +108 -54
  8. nuitka/Options.py +69 -13
  9. nuitka/OutputDirectories.py +7 -2
  10. nuitka/PostProcessing.py +69 -38
  11. nuitka/Progress.py +16 -1
  12. nuitka/PythonVersions.py +2 -1
  13. nuitka/Serialization.py +4 -2
  14. nuitka/Tracing.py +69 -1
  15. nuitka/Version.py +2 -2
  16. nuitka/build/Backend.scons +45 -5
  17. nuitka/build/CCompilerVersion.scons +6 -0
  18. nuitka/build/Onefile.scons +6 -0
  19. nuitka/build/SconsCaching.py +4 -0
  20. nuitka/build/SconsCompilerSettings.py +14 -3
  21. nuitka/build/SconsInterface.py +3 -0
  22. nuitka/build/SconsUtils.py +5 -0
  23. nuitka/build/include/nuitka/allocator.h +124 -1
  24. nuitka/build/include/nuitka/calling.h +6 -6
  25. nuitka/build/include/nuitka/compiled_asyncgen.h +10 -7
  26. nuitka/build/include/nuitka/compiled_frame.h +2 -1
  27. nuitka/build/include/nuitka/constants.h +8 -0
  28. nuitka/build/include/nuitka/debug_settings.h +60 -0
  29. nuitka/build/include/nuitka/exceptions.h +264 -121
  30. nuitka/build/include/nuitka/helper/attributes.h +0 -4
  31. nuitka/build/include/nuitka/helper/calling_generated.h +52 -52
  32. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
  33. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
  34. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
  35. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
  36. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
  37. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
  38. nuitka/build/include/nuitka/helper/dictionaries.h +75 -31
  39. nuitka/build/include/nuitka/helper/ints.h +86 -37
  40. nuitka/build/include/nuitka/helper/iterators.h +82 -34
  41. nuitka/build/include/nuitka/helper/operations.h +3 -0
  42. nuitka/build/include/nuitka/helper/operations_binary_add.h +6 -0
  43. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
  44. nuitka/build/include/nuitka/helper/operations_binary_sub.h +6 -0
  45. nuitka/build/include/nuitka/helper/operations_inplace_add.h +3 -0
  46. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +3 -0
  47. nuitka/build/include/nuitka/helper/raising.h +47 -28
  48. nuitka/build/include/nuitka/helper/richcomparisons.h +7 -0
  49. nuitka/build/include/nuitka/helper/tuples.h +12 -0
  50. nuitka/build/include/nuitka/helpers.h +12 -2
  51. nuitka/build/include/nuitka/prelude.h +36 -25
  52. nuitka/build/include/nuitka/printing.h +9 -7
  53. nuitka/build/include/nuitka/threading.h +15 -1
  54. nuitka/build/include/nuitka/type_aliases.h +3 -0
  55. nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
  56. nuitka/build/inline_copy/stubgen/six.py +998 -0
  57. nuitka/build/inline_copy/stubgen/stubgen.py +307 -0
  58. nuitka/build/static_src/CompiledAsyncgenType.c +45 -39
  59. nuitka/build/static_src/CompiledCellType.c +6 -4
  60. nuitka/build/static_src/CompiledCodeHelpers.c +106 -40
  61. nuitka/build/static_src/CompiledCoroutineType.c +41 -31
  62. nuitka/build/static_src/CompiledFrameType.c +110 -79
  63. nuitka/build/static_src/CompiledFunctionType.c +173 -151
  64. nuitka/build/static_src/CompiledGeneratorType.c +51 -49
  65. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +433 -46
  66. nuitka/build/static_src/CompiledMethodType.c +6 -12
  67. nuitka/build/static_src/HelpersAllocator.c +266 -28
  68. nuitka/build/static_src/HelpersAttributes.c +0 -21
  69. nuitka/build/static_src/HelpersBuiltin.c +23 -14
  70. nuitka/build/static_src/HelpersCalling.c +7 -7
  71. nuitka/build/static_src/HelpersCallingGenerated.c +70 -70
  72. nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
  73. nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
  74. nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
  75. nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
  76. nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
  77. nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
  78. nuitka/build/static_src/HelpersComparisonEq.c +18 -4
  79. nuitka/build/static_src/HelpersComparisonGe.c +18 -4
  80. nuitka/build/static_src/HelpersComparisonGt.c +18 -4
  81. nuitka/build/static_src/HelpersComparisonLe.c +18 -4
  82. nuitka/build/static_src/HelpersComparisonLt.c +18 -4
  83. nuitka/build/static_src/HelpersComparisonNe.c +18 -4
  84. nuitka/build/static_src/HelpersConsole.c +34 -8
  85. nuitka/build/static_src/HelpersConstantsBlob.c +4 -2
  86. nuitka/build/static_src/HelpersDeepcopy.c +1 -0
  87. nuitka/build/static_src/HelpersDictionaries.c +195 -36
  88. nuitka/build/static_src/HelpersDictionariesGenerated.c +12 -107
  89. nuitka/build/static_src/HelpersExceptions.c +24 -50
  90. nuitka/build/static_src/HelpersFiles.c +79 -5
  91. nuitka/build/static_src/HelpersImport.c +13 -9
  92. nuitka/build/static_src/HelpersImportHard.c +23 -46
  93. nuitka/build/static_src/HelpersLists.c +98 -9
  94. nuitka/build/static_src/HelpersOperationBinaryAdd.c +224 -6
  95. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +3 -0
  96. nuitka/build/static_src/HelpersOperationBinaryBitand.c +5 -5
  97. nuitka/build/static_src/HelpersOperationBinaryBitor.c +5 -5
  98. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +5 -5
  99. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +8 -2
  100. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
  101. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +14 -8
  102. nuitka/build/static_src/HelpersOperationBinaryLshift.c +36 -36
  103. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -0
  104. nuitka/build/static_src/HelpersOperationBinaryMod.c +22 -10
  105. nuitka/build/static_src/HelpersOperationBinaryMult.c +17 -7
  106. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +14 -8
  107. nuitka/build/static_src/HelpersOperationBinaryPow.c +24 -24
  108. nuitka/build/static_src/HelpersOperationBinaryRshift.c +4 -4
  109. nuitka/build/static_src/HelpersOperationBinarySub.c +229 -8
  110. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +8 -2
  111. nuitka/build/static_src/HelpersOperationInplaceAdd.c +162 -10
  112. nuitka/build/static_src/HelpersOperationInplaceBitand.c +5 -5
  113. nuitka/build/static_src/HelpersOperationInplaceBitor.c +5 -5
  114. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +5 -5
  115. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +11 -6
  116. nuitka/build/static_src/HelpersOperationInplaceLshift.c +20 -20
  117. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -0
  118. nuitka/build/static_src/HelpersOperationInplaceMod.c +11 -6
  119. nuitka/build/static_src/HelpersOperationInplaceMult.c +11 -6
  120. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +11 -6
  121. nuitka/build/static_src/HelpersOperationInplacePow.c +20 -20
  122. nuitka/build/static_src/HelpersOperationInplaceRshift.c +4 -4
  123. nuitka/build/static_src/HelpersOperationInplaceSub.c +163 -10
  124. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +6 -1
  125. nuitka/build/static_src/HelpersProfiling.c +1 -1
  126. nuitka/build/static_src/HelpersRaising.c +255 -310
  127. nuitka/build/static_src/HelpersStrings.c +1 -1
  128. nuitka/build/static_src/HelpersTuples.c +2 -2
  129. nuitka/build/static_src/HelpersTypes.c +98 -2
  130. nuitka/build/static_src/MainProgram.c +132 -28
  131. nuitka/build/static_src/MetaPathBasedLoader.c +18 -19
  132. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +134 -11
  133. nuitka/build/static_src/OnefileBootstrap.c +6 -1
  134. nuitka/code_generation/AsyncgenCodes.py +2 -6
  135. nuitka/code_generation/BinaryOperationHelperDefinitions.py +269 -167
  136. nuitka/code_generation/BuiltinCodes.py +9 -1
  137. nuitka/code_generation/CallCodes.py +16 -16
  138. nuitka/code_generation/CodeGeneration.py +14 -2
  139. nuitka/code_generation/CodeHelperSelection.py +1 -1
  140. nuitka/code_generation/CodeHelpers.py +4 -1
  141. nuitka/code_generation/CodeObjectCodes.py +2 -2
  142. nuitka/code_generation/ComparisonCodes.py +13 -2
  143. nuitka/code_generation/ComparisonHelperDefinitions.py +23 -8
  144. nuitka/code_generation/Contexts.py +28 -16
  145. nuitka/code_generation/CoroutineCodes.py +2 -6
  146. nuitka/code_generation/DictCodes.py +3 -3
  147. nuitka/code_generation/ErrorCodes.py +34 -50
  148. nuitka/code_generation/ExceptionCodes.py +165 -96
  149. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +25 -10
  150. nuitka/code_generation/FrameCodes.py +4 -11
  151. nuitka/code_generation/FunctionCodes.py +2 -6
  152. nuitka/code_generation/GeneratorCodes.py +2 -6
  153. nuitka/code_generation/GlobalConstants.py +8 -2
  154. nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
  155. nuitka/code_generation/IteratorCodes.py +67 -54
  156. nuitka/code_generation/LineNumberCodes.py +1 -3
  157. nuitka/code_generation/ModuleCodes.py +28 -4
  158. nuitka/code_generation/OperationCodes.py +51 -20
  159. nuitka/code_generation/PackageResourceCodes.py +37 -0
  160. nuitka/code_generation/RaisingCodes.py +164 -90
  161. nuitka/code_generation/Reports.py +13 -5
  162. nuitka/code_generation/ReturnCodes.py +2 -16
  163. nuitka/code_generation/TryCodes.py +12 -24
  164. nuitka/code_generation/TypeAliasCodes.py +48 -0
  165. nuitka/code_generation/VariableCodes.py +99 -40
  166. nuitka/code_generation/VariableDeclarations.py +8 -8
  167. nuitka/code_generation/YieldCodes.py +1 -1
  168. nuitka/code_generation/c_types/CTypeBases.py +10 -2
  169. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +3 -0
  170. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +3 -4
  171. nuitka/code_generation/c_types/CTypeNuitkaInts.py +70 -25
  172. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
  173. nuitka/code_generation/c_types/CTypePyObjectPointers.py +16 -6
  174. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +2 -2
  175. nuitka/code_generation/templates/CodeTemplatesConstants.py +11 -3
  176. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +2 -2
  177. nuitka/code_generation/templates/CodeTemplatesExceptions.py +15 -16
  178. nuitka/code_generation/templates/CodeTemplatesFrames.py +18 -10
  179. nuitka/code_generation/templates/CodeTemplatesFunction.py +2 -2
  180. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +2 -2
  181. nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -35
  182. nuitka/code_generation/templates/CodeTemplatesModules.py +34 -4
  183. nuitka/code_generation/templates/CodeTemplatesVariables.py +76 -0
  184. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +3 -3
  185. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +3 -3
  186. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +4 -106
  187. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -2
  188. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
  189. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
  190. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +9 -9
  191. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
  192. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
  193. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
  194. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +9 -9
  195. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +7 -7
  196. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +9 -9
  197. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
  198. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -4
  199. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
  200. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +31 -31
  201. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
  202. nuitka/containers/Namedtuples.py +6 -0
  203. nuitka/containers/OrderedSets.py +105 -5
  204. nuitka/distutils/Build.py +14 -0
  205. nuitka/distutils/DistutilCommands.py +50 -10
  206. nuitka/finalizations/Finalization.py +3 -3
  207. nuitka/finalizations/FinalizeMarkups.py +10 -14
  208. nuitka/freezer/DependsExe.py +5 -2
  209. nuitka/freezer/DllDependenciesMacOS.py +18 -1
  210. nuitka/freezer/DllDependenciesWin32.py +26 -12
  211. nuitka/freezer/ImportDetection.py +6 -0
  212. nuitka/freezer/IncludedDataFiles.py +37 -6
  213. nuitka/freezer/Onefile.py +1 -0
  214. nuitka/freezer/Standalone.py +72 -18
  215. nuitka/importing/Importing.py +33 -6
  216. nuitka/importing/Recursion.py +5 -2
  217. nuitka/importing/StandardLibrary.py +57 -59
  218. nuitka/nodes/AsyncgenNodes.py +3 -6
  219. nuitka/nodes/BuiltinIteratorNodes.py +2 -2
  220. nuitka/nodes/BuiltinRefNodes.py +14 -30
  221. nuitka/nodes/ChildrenHavingMixins.py +439 -46
  222. nuitka/nodes/ConditionalNodes.py +3 -2
  223. nuitka/nodes/CoroutineNodes.py +3 -6
  224. nuitka/nodes/DictionaryNodes.py +1 -1
  225. nuitka/nodes/ExceptionNodes.py +102 -26
  226. nuitka/nodes/ExpressionBasesGenerated.py +288 -4
  227. nuitka/nodes/FrameNodes.py +22 -11
  228. nuitka/nodes/FunctionNodes.py +3 -3
  229. nuitka/nodes/GeneratorNodes.py +3 -6
  230. nuitka/nodes/HardImportNodesGenerated.py +182 -0
  231. nuitka/nodes/ImportNodes.py +2 -2
  232. nuitka/nodes/NodeBases.py +28 -1
  233. nuitka/nodes/NodeMakingHelpers.py +71 -50
  234. nuitka/nodes/OperatorNodesUnary.py +128 -3
  235. nuitka/nodes/OsSysNodes.py +37 -6
  236. nuitka/nodes/OutlineNodes.py +2 -2
  237. nuitka/nodes/StatementBasesGenerated.py +0 -2
  238. nuitka/nodes/StatementNodes.py +8 -7
  239. nuitka/nodes/SubscriptNodes.py +1 -1
  240. nuitka/nodes/TypeNodes.py +28 -1
  241. nuitka/nodes/VariableAssignNodes.py +2 -1
  242. nuitka/nodes/shapes/BuiltinTypeShapes.py +24 -7
  243. nuitka/nodes/shapes/IteratorShapes.py +71 -0
  244. nuitka/nodes/shapes/ShapeMixins.py +18 -0
  245. nuitka/nodes/shapes/StandardShapes.py +47 -44
  246. nuitka/optimizations/BytecodeDemotion.py +2 -1
  247. nuitka/plugins/PluginBase.py +64 -22
  248. nuitka/plugins/Plugins.py +16 -3
  249. nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
  250. nuitka/plugins/standard/DllFilesPlugin.py +78 -2
  251. nuitka/plugins/standard/ImplicitImports.py +5 -15
  252. nuitka/plugins/standard/KivyPlugin.py +3 -12
  253. nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
  254. nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
  255. nuitka/plugins/standard/OptionsNannyPlugin.py +5 -4
  256. nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
  257. nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
  258. nuitka/plugins/standard/TkinterPlugin.py +23 -3
  259. nuitka/plugins/standard/TransformersPlugin.py +70 -275
  260. nuitka/plugins/standard/standard.nuitka-package.config.yml +413 -30
  261. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +35 -2
  262. nuitka/reports/CompilationReportReader.py +12 -0
  263. nuitka/reports/Reports.py +11 -0
  264. nuitka/specs/BuiltinParameterSpecs.py +5 -1
  265. nuitka/specs/HardImportSpecs.py +7 -0
  266. nuitka/specs/ParameterSpecs.py +4 -4
  267. nuitka/tools/environments/Virtualenv.py +13 -5
  268. nuitka/tools/general/dll_report/__main__.py +10 -1
  269. nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
  270. nuitka/tools/podman/__main__.py +4 -2
  271. nuitka/tools/specialize/CTypeDescriptions.py +158 -9
  272. nuitka/tools/specialize/SpecializeC.py +218 -56
  273. nuitka/tools/testing/Common.py +69 -62
  274. nuitka/tools/testing/compare_with_cpython/__main__.py +3 -1
  275. nuitka/tools/testing/measure_construct_performance/__main__.py +1 -8
  276. nuitka/tools/testing/run_nuitka_tests/__main__.py +77 -11
  277. nuitka/tools/watch/AutoStage.py +1 -0
  278. nuitka/tree/Building.py +10 -37
  279. nuitka/tree/ComplexCallHelperFunctions.py +4 -0
  280. nuitka/tree/ReformulationAssertStatements.py +31 -14
  281. nuitka/tree/ReformulationAssignmentStatements.py +5 -1
  282. nuitka/tree/ReformulationClasses3.py +94 -19
  283. nuitka/tree/ReformulationDictionaryCreation.py +1 -0
  284. nuitka/tree/ReformulationFunctionStatements.py +1 -1
  285. nuitka/tree/ReformulationMatchStatements.py +3 -1
  286. nuitka/tree/ReformulationYieldExpressions.py +23 -5
  287. nuitka/utils/CommandLineOptions.py +27 -3
  288. nuitka/utils/Download.py +2 -2
  289. nuitka/utils/Execution.py +36 -31
  290. nuitka/utils/FileOperations.py +18 -39
  291. nuitka/utils/Hashing.py +5 -1
  292. nuitka/utils/Importing.py +2 -14
  293. nuitka/utils/InlineCopies.py +52 -0
  294. nuitka/utils/InstalledPythons.py +9 -4
  295. nuitka/utils/Json.py +2 -2
  296. nuitka/utils/PackageResources.py +44 -0
  297. nuitka/utils/SharedLibraries.py +24 -0
  298. nuitka/utils/Signing.py +9 -1
  299. nuitka/utils/Utils.py +1 -0
  300. {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka-run.cmd +0 -0
  301. {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka.cmd +0 -0
  302. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/LICENSE.txt +0 -0
  303. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/entry_points.txt +0 -0
  304. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/top_level.txt +0 -0
@@ -7,21 +7,6 @@
7
7
 
8
8
  /* WARNING, this code is GENERATED. Modify the template HelperDictionaryCopy.c.j2 instead! */
9
9
 
10
- // Usable fraction of keys.
11
- #define DK_USABLE_FRACTION(n) (((n) << 1) / 3)
12
-
13
- #if PYTHON_VERSION < 0x3b0
14
- typedef PyObject *PyDictValues;
15
- #endif
16
-
17
- #if PYTHON_VERSION < 0x360
18
- #define DK_ENTRIES_SIZE(keys) (keys->dk_size)
19
- #elif PYTHON_VERSION < 0x3b0
20
- #define DK_ENTRIES_SIZE(keys) DK_USABLE_FRACTION(DK_SIZE(keys))
21
- #else
22
- #define DK_ENTRIES_SIZE(keys) (keys->dk_nentries)
23
- #endif
24
-
25
10
  // More than 2/3 of the keys are used, i.e. no space is wasted.
26
11
  #if PYTHON_VERSION < 0x360
27
12
  #define IS_COMPACT(dict_mp) (dict_mp->ma_used >= (dict_mp->ma_keys->dk_size * 2) / 3)
@@ -49,91 +34,6 @@ static inline PyDictValues *_Nuitka_PyDict_new_values(Py_ssize_t size) {
49
34
  #endif
50
35
  }
51
36
 
52
- #if PYTHON_VERSION >= 0x300
53
- static PyDictObject *_Nuitka_AllocatePyDictObject(PyThreadState *tstate) {
54
- PyDictObject *result_mp;
55
-
56
- #if NUITKA_DICT_HAS_FREELIST
57
- // This is the CPython name, spell-checker: ignore numfree
58
-
59
- #if PYTHON_VERSION < 0x3d0
60
- PyDictObject **items = tstate->interp->dict_state.free_list;
61
- int *numfree = &tstate->interp->dict_state.numfree;
62
- #else
63
- struct _Py_object_freelists *freelists = _Nuitka_object_freelists_GET(tstate);
64
- struct _Py_dict_freelist *state = &freelists->dicts;
65
- PyDictObject **items = state->items;
66
- int *numfree = &state->numfree;
67
- #endif
68
-
69
- if (*numfree) {
70
- (*numfree) -= 1;
71
- result_mp = items[*numfree];
72
-
73
- Nuitka_Py_NewReference((PyObject *)result_mp);
74
-
75
- assert(PyDict_CheckExact((PyObject *)result_mp));
76
- assert(result_mp != NULL);
77
- } else
78
- #endif
79
- {
80
- result_mp = (PyDictObject *)Nuitka_GC_New(&PyDict_Type);
81
- }
82
-
83
- return result_mp;
84
- }
85
- #endif
86
-
87
- #if PYTHON_VERSION >= 0x360
88
- static PyDictKeysObject *_Nuitka_AllocatePyDictKeysObject(PyThreadState *tstate, Py_ssize_t keys_size) {
89
- // CPython names, spell-checker: ignore numfree,dictkeys
90
- PyDictKeysObject *dk;
91
-
92
- // TODO: Cannot always use cached objects. Need to also consider
93
- // "log2_size == PyDict_LOG_MINSIZE && unicode" as a criterion,
94
- // seems it can only be used for the smallest keys type.
95
- #if NUITKA_DICT_HAS_FREELIST && 0
96
- #if PYTHON_VERSION < 0x3d0
97
- PyDictKeysObject **items = tstate->interp->dict_state.keys_free_list;
98
- int *numfree = &tstate->interp->dict_state.keys_numfree;
99
- #else
100
- struct _Py_object_freelists *freelists = _Nuitka_object_freelists_GET(tstate);
101
- struct _Py_dictkeys_freelist *state = &freelists->dictkeys;
102
- PyDictKeysObject **items = state->items;
103
- int *numfree = &state->numfree;
104
- #endif
105
-
106
- if (*numfree) {
107
- (*numfree) -= 1;
108
- dk = items[*numfree];
109
- } else
110
- #endif
111
- {
112
- dk = (PyDictKeysObject *)NuitkaObject_Malloc(keys_size);
113
- }
114
-
115
- return dk;
116
- }
117
- #endif
118
-
119
- #if PYTHON_VERSION >= 0x360 && !defined(_NUITKA_EXPERIMENTAL_DISABLE_DICT_OPT)
120
- static Py_ssize_t _Nuitka_Py_PyDict_KeysSize(PyDictKeysObject *keys) {
121
- #if PYTHON_VERSION < 0x360
122
- return sizeof(PyDictKeysObject) + (DK_SIZE(keys) - 1) * sizeof(PyDictKeyEntry);
123
- #elif PYTHON_VERSION < 0x370
124
- return (sizeof(PyDictKeysObject) - Py_MEMBER_SIZE(PyDictKeysObject, dk_indices) + DK_IXSIZE(keys) * DK_SIZE(keys) +
125
- DK_USABLE_FRACTION(DK_SIZE(keys)) * sizeof(PyDictKeyEntry));
126
- #elif PYTHON_VERSION < 0x3b0
127
- return (sizeof(PyDictKeysObject) + DK_IXSIZE(keys) * DK_SIZE(keys) +
128
- DK_USABLE_FRACTION(DK_SIZE(keys)) * sizeof(PyDictKeyEntry));
129
- #else
130
- size_t entry_size = keys->dk_kind == DICT_KEYS_GENERAL ? sizeof(PyDictKeyEntry) : sizeof(PyDictUnicodeEntry);
131
- return (sizeof(PyDictKeysObject) + ((size_t)1 << keys->dk_log2_index_bytes) +
132
- DK_USABLE_FRACTION(DK_SIZE(keys)) * entry_size);
133
- #endif
134
- }
135
- #endif
136
-
137
37
  PyObject *DICT_COPY(PyThreadState *tstate, PyObject *dict_value) {
138
38
  #if _NUITKA_EXPERIMENTAL_DISABLE_DICT_OPT
139
39
  CHECK_OBJECT(dict_value);
@@ -170,13 +70,16 @@ PyObject *DICT_COPY(PyThreadState *tstate, PyObject *dict_value) {
170
70
  }
171
71
  #else
172
72
  /* Python 3 */
173
- #ifndef PY_NOGIL
174
73
  if (_PyDict_HasSplitTable(dict_mp)) {
175
74
  PyDictObject *result_mp = _Nuitka_AllocatePyDictObject(tstate);
176
75
  assert(result_mp != NULL);
177
76
  result = (PyObject *)result_mp;
178
77
 
78
+ #if PYTHON_VERSION < 0x3b0
179
79
  Py_ssize_t size = DK_ENTRIES_SIZE(dict_mp->ma_keys);
80
+ #else
81
+ Py_ssize_t size = dict_mp->ma_keys->dk_nentries + dict_mp->ma_keys->dk_usable;
82
+ #endif
180
83
 
181
84
  PyDictValues *new_values = _Nuitka_PyDict_new_values(size);
182
85
  assert(new_values != NULL);
@@ -211,7 +114,6 @@ PyObject *DICT_COPY(PyThreadState *tstate, PyObject *dict_value) {
211
114
 
212
115
  Nuitka_GC_Track(result_mp);
213
116
  } else
214
- #endif
215
117
  #if PYTHON_VERSION >= 0x360
216
118
  // Fast dictionary copy if it has at least 2/3 space usage. This is most relevant
217
119
  // for the DICT_COPY, where it might even be the intention to trigger a shrink with
@@ -386,13 +288,16 @@ PyObject *DEEP_COPY_DICT(PyThreadState *tstate, PyObject *dict_value) {
386
288
  }
387
289
  #else
388
290
  /* Python 3 */
389
- #ifndef PY_NOGIL
390
291
  if (_PyDict_HasSplitTable(dict_mp)) {
391
292
  PyDictObject *result_mp = _Nuitka_AllocatePyDictObject(tstate);
392
293
  assert(result_mp != NULL);
393
294
  result = (PyObject *)result_mp;
394
295
 
296
+ #if PYTHON_VERSION < 0x3b0
395
297
  Py_ssize_t size = DK_ENTRIES_SIZE(dict_mp->ma_keys);
298
+ #else
299
+ Py_ssize_t size = dict_mp->ma_keys->dk_nentries + dict_mp->ma_keys->dk_usable;
300
+ #endif
396
301
 
397
302
  PyDictValues *new_values = _Nuitka_PyDict_new_values(size);
398
303
  assert(new_values != NULL);
@@ -427,7 +332,6 @@ PyObject *DEEP_COPY_DICT(PyThreadState *tstate, PyObject *dict_value) {
427
332
 
428
333
  Nuitka_GC_Track(result_mp);
429
334
  } else
430
- #endif
431
335
  #if PYTHON_VERSION >= 0x360
432
336
  // Fast dictionary copy if it has at least 2/3 space usage. This is most relevant
433
337
  // for the DICT_COPY, where it might even be the intention to trigger a shrink with
@@ -613,14 +517,16 @@ static PyObject *COPY_DICT_KW(PyThreadState *tstate, PyObject *dict_value) {
613
517
  }
614
518
  #else
615
519
  /* Python 3 */
616
- #ifndef PY_NOGIL
617
520
  if (_PyDict_HasSplitTable(dict_mp)) {
618
521
  PyDictObject *result_mp = _Nuitka_AllocatePyDictObject(tstate);
619
522
  assert(result_mp != NULL);
620
523
  result = (PyObject *)result_mp;
621
524
 
525
+ #if PYTHON_VERSION < 0x3b0
622
526
  Py_ssize_t size = DK_ENTRIES_SIZE(dict_mp->ma_keys);
623
-
527
+ #else
528
+ Py_ssize_t size = dict_mp->ma_keys->dk_nentries + dict_mp->ma_keys->dk_usable;
529
+ #endif
624
530
  #if PYTHON_VERSION < 0x3b0
625
531
  for (Py_ssize_t i = 0; i < size; i++) {
626
532
  PyDictKeyEntry *entry = &DK_ENTRIES(dict_mp->ma_keys)[i];
@@ -678,7 +584,6 @@ static PyObject *COPY_DICT_KW(PyThreadState *tstate, PyObject *dict_value) {
678
584
 
679
585
  Nuitka_GC_Track(result_mp);
680
586
  } else
681
- #endif
682
587
  #if PYTHON_VERSION >= 0x360
683
588
  // Fast dictionary copy if it has at least 2/3 space usage. This is most relevant
684
589
  // for the DICT_COPY, where it might even be the intention to trigger a shrink with
@@ -42,36 +42,36 @@ void SET_CURRENT_EXCEPTION_TYPE_COMPLAINT_NICE(char const *format, PyObject *mis
42
42
  SET_CURRENT_EXCEPTION_TYPE0_FORMAT1(PyExc_TypeError, format, TYPE_NAME_DESC(mistyped));
43
43
  }
44
44
 
45
- void FORMAT_UNBOUND_LOCAL_ERROR(PyObject **exception_type, PyObject **exception_value, PyObject *variable_name) {
46
- *exception_type = PyExc_UnboundLocalError;
47
- Py_INCREF(*exception_type);
48
-
45
+ void FORMAT_UNBOUND_LOCAL_ERROR(PyThreadState *tstate, struct Nuitka_ExceptionPreservationItem *exception_state,
46
+ PyObject *variable_name) {
49
47
  #if PYTHON_VERSION < 0x300
50
48
  char const *message = "local variable '%s' referenced before assignment";
51
- *exception_value = Nuitka_String_FromFormat(message, Nuitka_String_AsString_Unchecked(variable_name));
49
+ PyObject *exception_value = Nuitka_String_FromFormat(message, Nuitka_String_AsString_Unchecked(variable_name));
52
50
  #elif PYTHON_VERSION < 0x3b0
53
51
  char const *message = "local variable '%U' referenced before assignment";
54
- *exception_value = Nuitka_String_FromFormat(message, variable_name);
52
+ PyObject *exception_value = Nuitka_String_FromFormat(message, variable_name);
55
53
  #else
56
54
  char const *message = "cannot access local variable '%U' where it is not associated with a value";
57
- *exception_value = Nuitka_String_FromFormat(message, variable_name);
55
+ PyObject *exception_value = Nuitka_String_FromFormat(message, variable_name);
58
56
  #endif
59
57
 
60
- CHECK_OBJECT(*exception_value);
58
+ CHECK_OBJECT(exception_value);
59
+ SET_EXCEPTION_PRESERVATION_STATE_FROM_TYPE0_VALUE1(tstate, exception_state, PyExc_UnboundLocalError,
60
+ exception_value);
61
61
  }
62
62
 
63
- void FORMAT_UNBOUND_CLOSURE_ERROR(PyObject **exception_type, PyObject **exception_value, PyObject *variable_name) {
64
- *exception_type = PyExc_NameError;
65
- Py_INCREF(*exception_type);
66
-
63
+ void FORMAT_UNBOUND_CLOSURE_ERROR(PyThreadState *tstate, struct Nuitka_ExceptionPreservationItem *exception_state,
64
+ PyObject *variable_name) {
67
65
  #if PYTHON_VERSION < 0x3b0
68
66
  char const *message = "free variable '%s' referenced before assignment in enclosing scope";
69
67
  #else
70
68
  char const *message = "cannot access free variable '%s' where it is not associated with a value in enclosing scope";
71
69
  #endif
72
70
 
73
- *exception_value = Nuitka_String_FromFormat(message, Nuitka_String_AsString_Unchecked(variable_name));
74
- CHECK_OBJECT(*exception_value);
71
+ PyObject *exception_value = Nuitka_String_FromFormat(message, Nuitka_String_AsString_Unchecked(variable_name));
72
+ CHECK_OBJECT(exception_value);
73
+
74
+ SET_EXCEPTION_PRESERVATION_STATE_FROM_TYPE0_VALUE1(tstate, exception_state, PyExc_NameError, exception_value);
75
75
  }
76
76
 
77
77
  static PyObject *_Nuitka_Err_CreateException(PyThreadState *tstate, PyObject *exception_type, PyObject *value) {
@@ -80,7 +80,7 @@ static PyObject *_Nuitka_Err_CreateException(PyThreadState *tstate, PyObject *ex
80
80
  if (value == NULL || value == Py_None) {
81
81
  exc = CALL_FUNCTION_NO_ARGS(tstate, exception_type);
82
82
  } else if (PyTuple_Check(value)) {
83
- exc = CALL_FUNCTION_WITH_POSARGS(tstate, exception_type, value);
83
+ exc = CALL_FUNCTION_WITH_POS_ARGS(tstate, exception_type, value);
84
84
  } else {
85
85
  exc = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, exception_type, value);
86
86
  }
@@ -98,6 +98,10 @@ static PyObject *_Nuitka_Err_CreateException(PyThreadState *tstate, PyObject *ex
98
98
  return exc;
99
99
  }
100
100
 
101
+ PyObject *MAKE_EXCEPTION_WITH_VALUE(PyThreadState *tstate, PyObject *exception_type, PyObject *value) {
102
+ return _Nuitka_Err_CreateException(tstate, exception_type, value);
103
+ }
104
+
101
105
  // Our replacement for PyErr_NormalizeException, that however does not attempt
102
106
  // to deal with recursion, i.e. exception during normalization, we just avoid
103
107
  // the API call overhead in the normal case.
@@ -169,7 +173,11 @@ error:
169
173
 
170
174
  initial_tb = *tb;
171
175
 
172
- FETCH_ERROR_OCCURRED(tstate, exc, val, tb);
176
+ struct Nuitka_ExceptionPreservationItem exception_state;
177
+ FETCH_ERROR_OCCURRED_STATE(tstate, &exception_state);
178
+
179
+ ASSIGN_ARGS_FROM_EXCEPTION_PRESERVATION_STATE(&exception_state, exc, val, tb);
180
+ RELEASE_ERROR_OCCURRED_STATE(&exception_state);
173
181
 
174
182
  assert(*exc != NULL);
175
183
  if (initial_tb != NULL) {
@@ -274,40 +282,6 @@ error:
274
282
 
275
283
  #endif
276
284
 
277
- // Raise NameError for a given variable name.
278
- void SET_CURRENT_EXCEPTION_NAME_ERROR(PyThreadState *tstate, PyObject *variable_name) {
279
- #if PYTHON_VERSION >= 0x300
280
- PyObject *exception_value_str = Nuitka_String_FromFormat("name '%U' is not defined", variable_name);
281
- #else
282
- PyObject *exception_value_str =
283
- Nuitka_String_FromFormat("name '%s' is not defined", Nuitka_String_AsString_Unchecked(variable_name));
284
- #endif
285
- PyObject *exception_value = MAKE_EXCEPTION_FROM_TYPE_ARG0(tstate, PyExc_NameError, exception_value_str);
286
- Py_DECREF(exception_value_str);
287
-
288
- #if PYTHON_VERSION >= 0x300
289
- CHAIN_EXCEPTION(tstate, exception_value);
290
- #endif
291
-
292
- SET_CURRENT_EXCEPTION_TYPE0_VALUE1(tstate, PyExc_NameError, exception_value);
293
- }
294
-
295
- // Raise NameError with "global" for a given variable name.
296
- #if PYTHON_VERSION < 0x340
297
- void SET_CURRENT_EXCEPTION_GLOBAL_NAME_ERROR(PyThreadState *tstate, PyObject *variable_name) {
298
- #if PYTHON_VERSION >= 0x300
299
- PyObject *exception_value_str = Nuitka_String_FromFormat("global name '%U' is not defined", variable_name);
300
- #else
301
- PyObject *exception_value_str =
302
- Nuitka_String_FromFormat("global name '%s' is not defined", Nuitka_String_AsString_Unchecked(variable_name));
303
- #endif
304
- PyObject *exception_value = MAKE_EXCEPTION_FROM_TYPE_ARG0(tstate, PyExc_NameError, exception_value_str);
305
- Py_DECREF(exception_value_str);
306
-
307
- SET_CURRENT_EXCEPTION_TYPE0_VALUE1(tstate, PyExc_NameError, exception_value);
308
- }
309
- #endif
310
-
311
285
  // Part of "Nuitka", an optimizing Python compiler that is compatible and
312
286
  // integrates with CPython, but also works on its own.
313
287
  //
@@ -83,10 +83,10 @@ PyObject *BUILTIN_OPEN_BINARY_READ_SIMPLE(PyThreadState *tstate, PyObject *filen
83
83
  }
84
84
 
85
85
  PyObject *GET_FILE_BYTES(PyThreadState *tstate, PyObject *filename) {
86
- PyObject *result;
86
+ PyObject *read_result;
87
87
 
88
- if (TRACE_FILE_READ(tstate, filename, &result)) {
89
- return result;
88
+ if (TRACE_FILE_READ(tstate, filename, &read_result)) {
89
+ return read_result;
90
90
  }
91
91
 
92
92
  PyObject *data_file = BUILTIN_OPEN_BINARY_READ_SIMPLE(tstate, filename);
@@ -103,9 +103,32 @@ PyObject *GET_FILE_BYTES(PyThreadState *tstate, PyObject *filename) {
103
103
  return NULL;
104
104
  }
105
105
 
106
- result = CALL_FUNCTION_NO_ARGS(tstate, read_method);
106
+ PyObject *close_method = LOOKUP_ATTRIBUTE(tstate, data_file, const_str_plain_close);
107
+
108
+ if (unlikely(close_method == NULL)) {
109
+ Py_DECREF(read_method);
110
+ return NULL;
111
+ }
112
+
113
+ read_result = CALL_FUNCTION_NO_ARGS(tstate, read_method);
107
114
  Py_DECREF(read_method);
108
- return result;
115
+
116
+ if (unlikely(read_result == NULL)) {
117
+ Py_DECREF(close_method);
118
+ return NULL;
119
+ }
120
+
121
+ PyObject *close_result = CALL_FUNCTION_NO_ARGS(tstate, close_method);
122
+ Py_DECREF(close_method);
123
+
124
+ if (unlikely(close_result == NULL)) {
125
+ Py_DECREF(read_result);
126
+ return NULL;
127
+ }
128
+
129
+ Py_DECREF(close_result);
130
+
131
+ return read_result;
109
132
  }
110
133
 
111
134
  // TODO: Don't we have this generated.
@@ -185,6 +208,57 @@ PyObject *OS_LISTDIR(PyThreadState *tstate, PyObject *path) {
185
208
  return result;
186
209
  }
187
210
 
211
+ extern PyObject *OS_STAT(PyThreadState *tstate, PyObject *path, PyObject *dir_fd, PyObject *follow_symlinks) {
212
+ assert(path != NULL);
213
+
214
+ PyObject *result;
215
+
216
+ if (TRACE_FILE_STAT(tstate, path, dir_fd, follow_symlinks, &result)) {
217
+ return result;
218
+ }
219
+
220
+ PyObject *stat_func = LOOKUP_ATTRIBUTE(tstate, IMPORT_HARD_OS(), const_str_plain_stat);
221
+
222
+ #if PYTHON_VERSION < 0x300
223
+ assert(dir_fd == NULL);
224
+
225
+ result = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, stat_func, path);
226
+ #else
227
+
228
+ PyObject *args[] = {path, dir_fd, follow_symlinks};
229
+
230
+ char const *arg_names[] = {"path", "dir_fd", "follow_symlinks"};
231
+ result = CALL_BUILTIN_KW_ARGS(tstate, stat_func, args, arg_names, 3, 2);
232
+ #endif
233
+
234
+ Py_DECREF(stat_func);
235
+ return result;
236
+ }
237
+
238
+ extern PyObject *OS_LSTAT(PyThreadState *tstate, PyObject *path, PyObject *dir_fd) {
239
+ #if PYTHON_VERSION < 0x300
240
+ assert(path != NULL);
241
+ PyObject *result;
242
+
243
+ if (TRACE_FILE_STAT(tstate, path, dir_fd, false, &result)) {
244
+ return result;
245
+ }
246
+
247
+ assert(path != NULL);
248
+ assert(dir_fd == NULL);
249
+ PyObject *stat_func = LOOKUP_ATTRIBUTE(tstate, IMPORT_HARD_OS(), const_str_plain_lstat);
250
+
251
+ result = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, stat_func, path);
252
+
253
+ Py_DECREF(stat_func);
254
+ return result;
255
+ #else
256
+ PyObject *follow_symlinks = Py_False;
257
+
258
+ return OS_STAT(tstate, path, dir_fd, follow_symlinks);
259
+ #endif
260
+ }
261
+
188
262
  PyObject *OS_PATH_BASENAME(PyThreadState *tstate, PyObject *filename) {
189
263
  CHECK_OBJECT(filename);
190
264
 
@@ -31,7 +31,7 @@ PyObject *IMPORT_MODULE_KW(PyThreadState *tstate, PyObject *module_name, PyObjec
31
31
 
32
32
  NUITKA_ASSIGN_BUILTIN(__import__);
33
33
 
34
- PyObject *import_result = CALL_FUNCTION_WITH_KEYARGS(tstate, NUITKA_ACCESS_BUILTIN(__import__), kw_args);
34
+ PyObject *import_result = CALL_FUNCTION_WITH_KW_ARGS(tstate, NUITKA_ACCESS_BUILTIN(__import__), kw_args);
35
35
 
36
36
  Py_DECREF(kw_args);
37
37
 
@@ -143,19 +143,23 @@ bool IMPORT_MODULE_STAR(PyThreadState *tstate, PyObject *target, bool is_module,
143
143
  }
144
144
 
145
145
  all_case = true;
146
- } else if (EXCEPTION_MATCH_BOOL_SINGLE(tstate, GET_ERROR_OCCURRED(tstate), PyExc_AttributeError)) {
147
- CLEAR_ERROR_OCCURRED(tstate);
146
+ } else {
147
+ assert(HAS_ERROR_OCCURRED(tstate));
148
148
 
149
- iter = MAKE_ITERATOR(tstate, PyModule_GetDict(module));
150
- CHECK_OBJECT(iter);
149
+ if (EXCEPTION_MATCH_BOOL_SINGLE(tstate, GET_ERROR_OCCURRED(tstate), PyExc_AttributeError)) {
150
+ CLEAR_ERROR_OCCURRED(tstate);
151
151
 
152
- all_case = false;
153
- } else {
154
- return false;
152
+ iter = MAKE_ITERATOR(tstate, PyModule_GetDict(module));
153
+ CHECK_OBJECT(iter);
154
+
155
+ all_case = false;
156
+ } else {
157
+ return false;
158
+ }
155
159
  }
156
160
 
157
161
  for (;;) {
158
- PyObject *item = ITERATOR_NEXT(iter);
162
+ PyObject *item = ITERATOR_NEXT_ITERATOR(iter);
159
163
  if (item == NULL) {
160
164
  break;
161
165
  }
@@ -18,8 +18,7 @@ PyObject *IMPORT_HARD___FUTURE__(void) {
18
18
  #ifndef __NUITKA_NO_ASSERT__
19
19
  PyErr_PrintEx(0);
20
20
  #endif
21
- NUITKA_CANNOT_GET_HERE("failed hard import of '__future__'");
22
- abort();
21
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of '__future__'");
23
22
  }
24
23
  }
25
24
 
@@ -38,8 +37,7 @@ PyObject *IMPORT_HARD__FROZEN_IMPORTLIB(void) {
38
37
  #ifndef __NUITKA_NO_ASSERT__
39
38
  PyErr_PrintEx(0);
40
39
  #endif
41
- NUITKA_CANNOT_GET_HERE("failed hard import of '_frozen_importlib'");
42
- abort();
40
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of '_frozen_importlib'");
43
41
  }
44
42
  }
45
43
 
@@ -59,8 +57,7 @@ PyObject *IMPORT_HARD__FROZEN_IMPORTLIB_EXTERNAL(void) {
59
57
  #ifndef __NUITKA_NO_ASSERT__
60
58
  PyErr_PrintEx(0);
61
59
  #endif
62
- NUITKA_CANNOT_GET_HERE("failed hard import of '_frozen_importlib_external'");
63
- abort();
60
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of '_frozen_importlib_external'");
64
61
  }
65
62
  }
66
63
 
@@ -79,8 +76,7 @@ PyObject *IMPORT_HARD__IO(void) {
79
76
  #ifndef __NUITKA_NO_ASSERT__
80
77
  PyErr_PrintEx(0);
81
78
  #endif
82
- NUITKA_CANNOT_GET_HERE("failed hard import of '_io'");
83
- abort();
79
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of '_io'");
84
80
  }
85
81
  }
86
82
 
@@ -98,8 +94,7 @@ PyObject *IMPORT_HARD_BUILTINS(void) {
98
94
  #ifndef __NUITKA_NO_ASSERT__
99
95
  PyErr_PrintEx(0);
100
96
  #endif
101
- NUITKA_CANNOT_GET_HERE("failed hard import of 'builtins'");
102
- abort();
97
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'builtins'");
103
98
  }
104
99
  }
105
100
 
@@ -117,8 +112,7 @@ PyObject *IMPORT_HARD_CTYPES(void) {
117
112
  #ifndef __NUITKA_NO_ASSERT__
118
113
  PyErr_PrintEx(0);
119
114
  #endif
120
- NUITKA_CANNOT_GET_HERE("failed hard import of 'ctypes'");
121
- abort();
115
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'ctypes'");
122
116
  }
123
117
  }
124
118
 
@@ -136,8 +130,7 @@ PyObject *IMPORT_HARD_CTYPES__MACHOLIB(void) {
136
130
  #ifndef __NUITKA_NO_ASSERT__
137
131
  PyErr_PrintEx(0);
138
132
  #endif
139
- NUITKA_CANNOT_GET_HERE("failed hard import of 'ctypes.macholib'");
140
- abort();
133
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'ctypes.macholib'");
141
134
  }
142
135
  }
143
136
 
@@ -156,8 +149,7 @@ PyObject *IMPORT_HARD_CTYPES__WINTYPES(void) {
156
149
  #ifndef __NUITKA_NO_ASSERT__
157
150
  PyErr_PrintEx(0);
158
151
  #endif
159
- NUITKA_CANNOT_GET_HERE("failed hard import of 'ctypes.wintypes'");
160
- abort();
152
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'ctypes.wintypes'");
161
153
  }
162
154
  }
163
155
 
@@ -176,8 +168,7 @@ PyObject *IMPORT_HARD_FUNCTOOLS(void) {
176
168
  #ifndef __NUITKA_NO_ASSERT__
177
169
  PyErr_PrintEx(0);
178
170
  #endif
179
- NUITKA_CANNOT_GET_HERE("failed hard import of 'functools'");
180
- abort();
171
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'functools'");
181
172
  }
182
173
  }
183
174
 
@@ -195,8 +186,7 @@ PyObject *IMPORT_HARD_IMPORTLIB(void) {
195
186
  #ifndef __NUITKA_NO_ASSERT__
196
187
  PyErr_PrintEx(0);
197
188
  #endif
198
- NUITKA_CANNOT_GET_HERE("failed hard import of 'importlib'");
199
- abort();
189
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'importlib'");
200
190
  }
201
191
  }
202
192
 
@@ -215,8 +205,7 @@ PyObject *IMPORT_HARD_IMPORTLIB__METADATA(void) {
215
205
  #ifndef __NUITKA_NO_ASSERT__
216
206
  PyErr_PrintEx(0);
217
207
  #endif
218
- NUITKA_CANNOT_GET_HERE("failed hard import of 'importlib.metadata'");
219
- abort();
208
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'importlib.metadata'");
220
209
  }
221
210
  }
222
211
 
@@ -236,8 +225,7 @@ PyObject *IMPORT_HARD_IMPORTLIB__RESOURCES(void) {
236
225
  #ifndef __NUITKA_NO_ASSERT__
237
226
  PyErr_PrintEx(0);
238
227
  #endif
239
- NUITKA_CANNOT_GET_HERE("failed hard import of 'importlib.resources'");
240
- abort();
228
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'importlib.resources'");
241
229
  }
242
230
  }
243
231
 
@@ -286,8 +274,7 @@ PyObject *IMPORT_HARD_IO(void) {
286
274
  #ifndef __NUITKA_NO_ASSERT__
287
275
  PyErr_PrintEx(0);
288
276
  #endif
289
- NUITKA_CANNOT_GET_HERE("failed hard import of 'io'");
290
- abort();
277
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'io'");
291
278
  }
292
279
  }
293
280
 
@@ -305,8 +292,7 @@ PyObject *IMPORT_HARD_NTPATH(void) {
305
292
  #ifndef __NUITKA_NO_ASSERT__
306
293
  PyErr_PrintEx(0);
307
294
  #endif
308
- NUITKA_CANNOT_GET_HERE("failed hard import of 'ntpath'");
309
- abort();
295
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'ntpath'");
310
296
  }
311
297
  }
312
298
 
@@ -324,8 +310,7 @@ PyObject *IMPORT_HARD_OS(void) {
324
310
  #ifndef __NUITKA_NO_ASSERT__
325
311
  PyErr_PrintEx(0);
326
312
  #endif
327
- NUITKA_CANNOT_GET_HERE("failed hard import of 'os'");
328
- abort();
313
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'os'");
329
314
  }
330
315
  }
331
316
 
@@ -358,8 +343,7 @@ PyObject *IMPORT_HARD_PKGUTIL(void) {
358
343
  #ifndef __NUITKA_NO_ASSERT__
359
344
  PyErr_PrintEx(0);
360
345
  #endif
361
- NUITKA_CANNOT_GET_HERE("failed hard import of 'pkgutil'");
362
- abort();
346
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'pkgutil'");
363
347
  }
364
348
  }
365
349
 
@@ -377,8 +361,7 @@ PyObject *IMPORT_HARD_POSIXPATH(void) {
377
361
  #ifndef __NUITKA_NO_ASSERT__
378
362
  PyErr_PrintEx(0);
379
363
  #endif
380
- NUITKA_CANNOT_GET_HERE("failed hard import of 'posixpath'");
381
- abort();
364
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'posixpath'");
382
365
  }
383
366
  }
384
367
 
@@ -411,8 +394,7 @@ PyObject *IMPORT_HARD_SYS(void) {
411
394
  #ifndef __NUITKA_NO_ASSERT__
412
395
  PyErr_PrintEx(0);
413
396
  #endif
414
- NUITKA_CANNOT_GET_HERE("failed hard import of 'sys'");
415
- abort();
397
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'sys'");
416
398
  }
417
399
  }
418
400
 
@@ -430,8 +412,7 @@ PyObject *IMPORT_HARD_SYSCONFIG(void) {
430
412
  #ifndef __NUITKA_NO_ASSERT__
431
413
  PyErr_PrintEx(0);
432
414
  #endif
433
- NUITKA_CANNOT_GET_HERE("failed hard import of 'sysconfig'");
434
- abort();
415
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'sysconfig'");
435
416
  }
436
417
  }
437
418
 
@@ -464,8 +445,7 @@ PyObject *IMPORT_HARD_TYPES(void) {
464
445
  #ifndef __NUITKA_NO_ASSERT__
465
446
  PyErr_PrintEx(0);
466
447
  #endif
467
- NUITKA_CANNOT_GET_HERE("failed hard import of 'types'");
468
- abort();
448
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'types'");
469
449
  }
470
450
  }
471
451
 
@@ -484,8 +464,7 @@ PyObject *IMPORT_HARD_TYPING(void) {
484
464
  #ifndef __NUITKA_NO_ASSERT__
485
465
  PyErr_PrintEx(0);
486
466
  #endif
487
- NUITKA_CANNOT_GET_HERE("failed hard import of 'typing'");
488
- abort();
467
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'typing'");
489
468
  }
490
469
  }
491
470
 
@@ -504,8 +483,7 @@ PyObject *IMPORT_HARD_UNITTEST(void) {
504
483
  #ifndef __NUITKA_NO_ASSERT__
505
484
  PyErr_PrintEx(0);
506
485
  #endif
507
- NUITKA_CANNOT_GET_HERE("failed hard import of 'unittest'");
508
- abort();
486
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'unittest'");
509
487
  }
510
488
  }
511
489
 
@@ -524,8 +502,7 @@ PyObject *IMPORT_HARD_UNITTEST__MOCK(void) {
524
502
  #ifndef __NUITKA_NO_ASSERT__
525
503
  PyErr_PrintEx(0);
526
504
  #endif
527
- NUITKA_CANNOT_GET_HERE("failed hard import of 'unittest.mock'");
528
- abort();
505
+ NUITKA_ERROR_EXIT("Unexpected failure of hard import of 'unittest.mock'");
529
506
  }
530
507
  }
531
508