Nuitka-winsvc 1.8.6__cp312-cp312-win_amd64.whl → 1.9.3__cp312-cp312-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.
Files changed (214) hide show
  1. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/RECORD +212 -203
  3. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/WHEEL +1 -1
  4. nuitka/BytecodeCaching.py +4 -1
  5. nuitka/HardImportRegistry.py +348 -0
  6. nuitka/MainControl.py +45 -25
  7. nuitka/OptionParsing.py +31 -20
  8. nuitka/Options.py +47 -16
  9. nuitka/Progress.py +32 -2
  10. nuitka/PythonFlavors.py +1 -1
  11. nuitka/PythonVersions.py +61 -0
  12. nuitka/Tracing.py +25 -12
  13. nuitka/TreeXML.py +5 -5
  14. nuitka/Variables.py +15 -24
  15. nuitka/Version.py +16 -6
  16. nuitka/__main__.py +15 -0
  17. nuitka/__past__.py +15 -17
  18. nuitka/build/Backend.scons +44 -35
  19. nuitka/build/CCompilerVersion.scons +10 -9
  20. nuitka/build/Onefile.scons +11 -26
  21. nuitka/build/SconsCaching.py +2 -0
  22. nuitka/build/SconsCompilerSettings.py +72 -22
  23. nuitka/build/SconsHacks.py +1 -0
  24. nuitka/build/SconsInterface.py +5 -0
  25. nuitka/build/SconsSpawn.py +16 -3
  26. nuitka/build/SconsUtils.py +11 -12
  27. nuitka/build/include/nuitka/checksum_tools.h +0 -4
  28. nuitka/build/include/nuitka/compiled_asyncgen.h +1 -1
  29. nuitka/build/include/nuitka/compiled_coroutine.h +1 -1
  30. nuitka/build/include/nuitka/compiled_frame.h +7 -4
  31. nuitka/build/include/nuitka/compiled_function.h +13 -3
  32. nuitka/build/include/nuitka/compiled_generator.h +1 -1
  33. nuitka/build/include/nuitka/constants.h +2 -0
  34. nuitka/build/include/nuitka/environment_variables.h +45 -0
  35. nuitka/build/include/nuitka/exceptions.h +32 -4
  36. nuitka/build/include/nuitka/filesystem_paths.h +6 -1
  37. nuitka/build/include/nuitka/freelists.h +11 -1
  38. nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
  39. nuitka/build/include/nuitka/helper/import_hard.h +3 -0
  40. nuitka/build/include/nuitka/helpers.h +2 -0
  41. nuitka/build/include/nuitka/importing.h +3 -0
  42. nuitka/build/include/nuitka/prelude.h +17 -6
  43. nuitka/build/include/nuitka/unfreezing.h +1 -1
  44. nuitka/build/inline_copy/bin/scons.py +14 -0
  45. nuitka/build/inline_copy/tqdm/tqdm/__init__.py +2 -2
  46. nuitka/build/inline_copy/tqdm/tqdm/utils.py +14 -8
  47. nuitka/build/inline_copy/zlib/LICENSE +22 -0
  48. nuitka/build/inline_copy/zlib/crc32.c +1049 -0
  49. nuitka/build/inline_copy/zlib/crc32.h +9446 -0
  50. nuitka/build/inline_copy/zlib/zconf.h +551 -0
  51. nuitka/build/inline_copy/zlib/zlib.h +1938 -0
  52. nuitka/build/inline_copy/zlib/zutil.h +275 -0
  53. nuitka/build/static_src/CompiledAsyncgenType.c +41 -41
  54. nuitka/build/static_src/CompiledCodeHelpers.c +14 -7
  55. nuitka/build/static_src/CompiledCoroutineType.c +60 -51
  56. nuitka/build/static_src/CompiledFrameType.c +12 -12
  57. nuitka/build/static_src/CompiledFunctionType.c +149 -28
  58. nuitka/build/static_src/CompiledGeneratorType.c +64 -65
  59. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +1 -1
  60. nuitka/build/static_src/CompiledMethodType.c +5 -3
  61. nuitka/build/static_src/HelperEnvironmentVariables.c +120 -0
  62. nuitka/build/static_src/HelpersAttributes.c +1 -1
  63. nuitka/build/static_src/HelpersBuiltin.c +1 -1
  64. nuitka/build/static_src/HelpersChecksumTools.c +19 -4
  65. nuitka/build/static_src/HelpersComparisonEq.c +4 -4
  66. nuitka/build/static_src/HelpersComparisonNe.c +4 -4
  67. nuitka/build/static_src/HelpersConstantsBlob.c +40 -23
  68. nuitka/build/static_src/HelpersDictionaries.c +3 -1
  69. nuitka/build/static_src/HelpersDictionariesGenerated.c +9 -9
  70. nuitka/build/static_src/HelpersFilesystemPaths.c +12 -2
  71. nuitka/build/static_src/HelpersImport.c +29 -1
  72. nuitka/build/static_src/HelpersImportHard.c +19 -0
  73. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +5 -4
  74. nuitka/build/static_src/HelpersPythonPgo.c +5 -5
  75. nuitka/build/static_src/HelpersSafeStrings.c +2 -1
  76. nuitka/build/static_src/HelpersStrings.c +12 -10
  77. nuitka/build/static_src/HelpersTypes.c +1 -1
  78. nuitka/build/static_src/InspectPatcher.c +3 -2
  79. nuitka/build/static_src/MainProgram.c +182 -214
  80. nuitka/build/static_src/MetaPathBasedLoader.c +36 -23
  81. nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +4 -2
  82. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +38 -2
  83. nuitka/build/static_src/OnefileBootstrap.c +124 -93
  84. nuitka/code_generation/CodeGeneration.py +4 -2
  85. nuitka/code_generation/CodeObjectCodes.py +5 -1
  86. nuitka/code_generation/ConstantCodes.py +4 -0
  87. nuitka/code_generation/Contexts.py +111 -3
  88. nuitka/code_generation/DictCodes.py +5 -5
  89. nuitka/code_generation/FunctionCodes.py +4 -2
  90. nuitka/code_generation/GlobalConstants.py +10 -0
  91. nuitka/code_generation/ImportCodes.py +69 -33
  92. nuitka/code_generation/ModuleCodes.py +4 -1
  93. nuitka/code_generation/Namify.py +6 -5
  94. nuitka/code_generation/YieldCodes.py +3 -3
  95. nuitka/code_generation/templates/CodeTemplatesModules.py +61 -95
  96. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +3 -3
  97. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +2 -2
  98. nuitka/distutils/DistutilCommands.py +3 -0
  99. nuitka/finalizations/FinalizeMarkups.py +1 -1
  100. nuitka/freezer/DependsExe.py +2 -1
  101. nuitka/freezer/DllDependenciesPosix.py +11 -1
  102. nuitka/freezer/IncludedEntryPoints.py +54 -16
  103. nuitka/freezer/Onefile.py +7 -3
  104. nuitka/freezer/Standalone.py +39 -17
  105. nuitka/importing/Importing.py +195 -62
  106. nuitka/importing/PreloadedPackages.py +2 -1
  107. nuitka/importing/Recursion.py +98 -27
  108. nuitka/importing/StandardLibrary.py +7 -4
  109. nuitka/nodes/BuiltinOpenNodes.py +28 -1
  110. nuitka/nodes/BuiltinRangeNodes.py +2 -2
  111. nuitka/nodes/BuiltinSumNodes.py +1 -1
  112. nuitka/nodes/ChildrenHavingMixins.py +326 -2
  113. nuitka/nodes/HardImportNodesGenerated.py +141 -38
  114. nuitka/nodes/ImportHardNodes.py +0 -8
  115. nuitka/nodes/ImportNodes.py +267 -361
  116. nuitka/nodes/IterationHandles.py +36 -17
  117. nuitka/nodes/LocalsScopes.py +3 -1
  118. nuitka/nodes/NodeBases.py +8 -14
  119. nuitka/nodes/OperatorNodes.py +9 -9
  120. nuitka/nodes/OutlineNodes.py +3 -3
  121. nuitka/nodes/PackageMetadataNodes.py +19 -9
  122. nuitka/nodes/SliceNodes.py +1 -1
  123. nuitka/nodes/VariableAssignNodes.py +25 -15
  124. nuitka/nodes/VariableRefNodes.py +7 -7
  125. nuitka/nodes/YieldNodes.py +2 -2
  126. nuitka/nodes/shapes/BuiltinTypeShapes.py +81 -6
  127. nuitka/nodes/shapes/ShapeMixins.py +21 -0
  128. nuitka/nodes/shapes/StandardShapes.py +9 -3
  129. nuitka/optimizations/OptimizeBuiltinCalls.py +1 -1
  130. nuitka/optimizations/TraceCollections.py +75 -0
  131. nuitka/pgo/PGO.py +14 -6
  132. nuitka/plugins/PluginBase.py +83 -11
  133. nuitka/plugins/Plugins.py +78 -35
  134. nuitka/plugins/standard/AntiBloatPlugin.py +46 -1
  135. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +1 -1
  136. nuitka/plugins/standard/DelvewheelPlugin.py +2 -1
  137. nuitka/plugins/standard/DillPlugin.py +3 -99
  138. nuitka/plugins/standard/DllFilesPlugin.py +45 -0
  139. nuitka/plugins/standard/GiPlugin.py +23 -10
  140. nuitka/plugins/standard/GlfwPlugin.py +1 -0
  141. nuitka/plugins/standard/ImplicitImports.py +267 -15
  142. nuitka/plugins/standard/KivyPlugin.py +1 -0
  143. nuitka/plugins/standard/MatplotlibPlugin.py +43 -25
  144. nuitka/plugins/standard/OptionsNannyPlugin.py +5 -6
  145. nuitka/plugins/standard/PkgResourcesPlugin.py +1 -1
  146. nuitka/plugins/standard/PmwPlugin.py +1 -1
  147. nuitka/plugins/standard/PySidePyQtPlugin.py +37 -20
  148. nuitka/plugins/standard/TkinterPlugin.py +44 -30
  149. nuitka/plugins/standard/TransformersPlugin.py +3 -1
  150. nuitka/plugins/standard/standard.nuitka-package.config.yml +522 -86
  151. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +8 -1
  152. nuitka/reports/CompilationReportReader.py +53 -0
  153. nuitka/reports/LicenseReport.rst.j2 +4 -4
  154. nuitka/reports/Reports.py +129 -47
  155. nuitka/specs/HardImportSpecs.py +6 -0
  156. nuitka/tools/data_composer/DataComposer.py +29 -17
  157. nuitka/tools/onefile_compressor/OnefileCompressor.py +173 -110
  158. nuitka/tools/podman/__main__.py +17 -2
  159. nuitka/tools/scanning/DisplayPackageDLLs.py +11 -2
  160. nuitka/tools/scanning/DisplayPackageData.py +1 -1
  161. nuitka/tools/specialize/CTypeDescriptions.py +36 -27
  162. nuitka/tools/specialize/SpecializeC.py +1 -1
  163. nuitka/tools/specialize/SpecializePython.py +16 -0
  164. nuitka/tools/testing/Common.py +3 -4
  165. nuitka/tools/testing/OutputComparison.py +23 -0
  166. nuitka/tools/testing/SearchModes.py +2 -2
  167. nuitka/tools/testing/compare_with_cpython/__main__.py +13 -4
  168. nuitka/tools/testing/measure_construct_performance/__main__.py +2 -5
  169. nuitka/tools/watch/__main__.py +194 -56
  170. nuitka/tree/Building.py +8 -2
  171. nuitka/tree/ComplexCallHelperFunctions.py +45 -15
  172. nuitka/tree/ReformulationAssignmentStatements.py +18 -12
  173. nuitka/tree/ReformulationCallExpressions.py +1 -1
  174. nuitka/tree/ReformulationClasses.py +11 -5
  175. nuitka/tree/ReformulationClasses3.py +30 -12
  176. nuitka/tree/ReformulationComparisonExpressions.py +4 -2
  177. nuitka/tree/ReformulationContractionExpressions.py +19 -11
  178. nuitka/tree/ReformulationDictionaryCreation.py +9 -3
  179. nuitka/tree/ReformulationExecStatements.py +6 -6
  180. nuitka/tree/ReformulationForLoopStatements.py +5 -5
  181. nuitka/tree/ReformulationFunctionStatements.py +6 -2
  182. nuitka/tree/ReformulationImportStatements.py +7 -2
  183. nuitka/tree/ReformulationLambdaExpressions.py +1 -1
  184. nuitka/tree/ReformulationMatchStatements.py +3 -1
  185. nuitka/tree/ReformulationNamespacePackages.py +7 -3
  186. nuitka/tree/ReformulationPrintStatements.py +1 -1
  187. nuitka/tree/ReformulationSequenceCreation.py +18 -6
  188. nuitka/tree/ReformulationWithStatements.py +8 -8
  189. nuitka/tree/ReformulationYieldExpressions.py +2 -2
  190. nuitka/tree/SourceHandling.py +27 -5
  191. nuitka/tree/VariableClosure.py +11 -1
  192. nuitka/utils/AppDirs.py +2 -2
  193. nuitka/utils/CStrings.py +39 -3
  194. nuitka/utils/CommandLineOptions.py +42 -1
  195. nuitka/utils/Distributions.py +305 -38
  196. nuitka/utils/Download.py +27 -8
  197. nuitka/utils/FileOperations.py +103 -20
  198. nuitka/utils/Hashing.py +2 -3
  199. nuitka/utils/Importing.py +60 -3
  200. nuitka/utils/InstalledPythons.py +31 -36
  201. nuitka/utils/Jinja2.py +11 -5
  202. nuitka/utils/ModuleNames.py +11 -3
  203. nuitka/utils/ReExecute.py +7 -0
  204. nuitka/utils/SharedLibraries.py +38 -14
  205. nuitka/utils/SlotMetaClasses.py +55 -0
  206. nuitka/utils/Utils.py +10 -0
  207. nuitka/utils/Yaml.py +9 -1
  208. nuitka/build/inline_copy/tqdm/tqdm/_tqdm_gui.py +0 -9
  209. nuitka/build/inline_copy/tqdm/tqdm/gui.py +0 -191
  210. {Nuitka_winsvc-1.8.6.data → Nuitka_winsvc-1.9.3.data}/scripts/nuitka-run.bat +0 -0
  211. {Nuitka_winsvc-1.8.6.data → Nuitka_winsvc-1.9.3.data}/scripts/nuitka.bat +0 -0
  212. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/LICENSE.txt +0 -0
  213. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/entry_points.txt +0 -0
  214. {Nuitka_winsvc-1.8.6.dist-info → Nuitka_winsvc-1.9.3.dist-info}/top_level.txt +0 -0
@@ -531,10 +531,18 @@ def _makeIteratingLoopStatement(tmp_iter_variable, tmp_item_variable, statements
531
531
  def _makeStarDictArgumentToDictStatement(result, called_variable, star_dict_variable):
532
532
  temp_scope = result.allocateTempScope("mapping")
533
533
 
534
- tmp_dict_variable = result.allocateTempVariable(temp_scope, "dict")
535
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
536
- tmp_keys_variable = result.allocateTempVariable(temp_scope, "keys")
537
- tmp_key_variable = result.allocateTempVariable(temp_scope, "key")
534
+ tmp_dict_variable = result.allocateTempVariable(
535
+ temp_scope, "dict", temp_type="object"
536
+ )
537
+ tmp_iter_variable = result.allocateTempVariable(
538
+ temp_scope, "iter", temp_type="object"
539
+ )
540
+ tmp_keys_variable = result.allocateTempVariable(
541
+ temp_scope, "keys", temp_type="object"
542
+ )
543
+ tmp_key_variable = result.allocateTempVariable(
544
+ temp_scope, "key", temp_type="object"
545
+ )
538
546
 
539
547
  loop_body = []
540
548
 
@@ -773,9 +781,15 @@ def _makeStarDictArgumentMergeToKwStatement(
773
781
  # This is plain terribly complex
774
782
  temp_scope = result.allocateTempScope("dict")
775
783
 
776
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
777
- tmp_keys_variable = result.allocateTempVariable(temp_scope, "keys")
778
- tmp_key_variable = result.allocateTempVariable(temp_scope, "key_xxx")
784
+ tmp_iter_variable = result.allocateTempVariable(
785
+ temp_scope, "iter", temp_type="object"
786
+ )
787
+ tmp_keys_variable = result.allocateTempVariable(
788
+ temp_scope, "keys", temp_type="object"
789
+ )
790
+ tmp_key_variable = result.allocateTempVariable(
791
+ temp_scope, "key_xxx", temp_type="object"
792
+ )
779
793
 
780
794
  tmp_variables = [tmp_iter_variable, tmp_keys_variable, tmp_key_variable]
781
795
  mapping_loop_body = (
@@ -855,9 +869,15 @@ def _makeStarDictArgumentMergeToKwStatement(
855
869
 
856
870
  temp_scope = result.allocateTempScope("dict")
857
871
 
858
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
859
- tmp_item_variable = result.allocateTempVariable(temp_scope, "item")
860
- tmp_key_variable = result.allocateTempVariable(temp_scope, "key")
872
+ tmp_iter_variable = result.allocateTempVariable(
873
+ temp_scope, "iter", temp_type="object"
874
+ )
875
+ tmp_item_variable = result.allocateTempVariable(
876
+ temp_scope, "item", temp_type="object"
877
+ )
878
+ tmp_key_variable = result.allocateTempVariable(
879
+ temp_scope, "key", temp_type="object"
880
+ )
861
881
 
862
882
  tmp_variables += [tmp_iter_variable, tmp_item_variable, tmp_key_variable]
863
883
  dict_loop_body = (
@@ -1978,11 +1998,21 @@ def getFunctionCallHelperDictionaryUnpacking():
1978
1998
 
1979
1999
  temp_scope = None
1980
2000
 
1981
- tmp_result_variable = result.allocateTempVariable(temp_scope, "dict")
1982
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "dicts_iter")
1983
- tmp_item_variable = result.allocateTempVariable(temp_scope, "args_item")
1984
- tmp_iter2_variable = result.allocateTempVariable(temp_scope, "dict_iter")
1985
- tmp_key_variable = result.allocateTempVariable(temp_scope, "dict_key")
2001
+ tmp_result_variable = result.allocateTempVariable(
2002
+ temp_scope, "dict", temp_type="object"
2003
+ )
2004
+ tmp_iter_variable = result.allocateTempVariable(
2005
+ temp_scope, "dicts_iter", temp_type="object"
2006
+ )
2007
+ tmp_item_variable = result.allocateTempVariable(
2008
+ temp_scope, "args_item", temp_type="object"
2009
+ )
2010
+ tmp_iter2_variable = result.allocateTempVariable(
2011
+ temp_scope, "dict_iter", temp_type="object"
2012
+ )
2013
+ tmp_key_variable = result.allocateTempVariable(
2014
+ temp_scope, "dict_key", temp_type="object"
2015
+ )
1986
2016
 
1987
2017
  update_body = (
1988
2018
  makeStatementConditional(
@@ -207,12 +207,14 @@ def buildAssignmentStatementsFromDecoded(provider, kind, detail, source, source_
207
207
  temp_scope = provider.allocateTempScope("tuple_unpack")
208
208
 
209
209
  source_iter_var = provider.allocateTempVariable(
210
- temp_scope=temp_scope, name="source_iter"
210
+ temp_scope=temp_scope, name="source_iter", temp_type="object"
211
211
  )
212
212
 
213
213
  element_vars = [
214
214
  provider.allocateTempVariable(
215
- temp_scope=temp_scope, name="element_%d" % (element_index + 1)
215
+ temp_scope=temp_scope,
216
+ name="element_%d" % (element_index + 1),
217
+ temp_type="object",
216
218
  )
217
219
  for element_index in range(len(detail))
218
220
  ]
@@ -562,7 +564,7 @@ def buildAssignNode(provider, node, source_ref):
562
564
  temp_scope = provider.allocateTempScope("assign_unpack")
563
565
 
564
566
  tmp_source = provider.allocateTempVariable(
565
- temp_scope=temp_scope, name="assign_source"
567
+ temp_scope=temp_scope, name="assign_source", temp_type="object"
566
568
  )
567
569
 
568
570
  statements = [
@@ -798,7 +800,9 @@ def _buildInplaceAssignAttributeNode(
798
800
  ):
799
801
  temp_scope = provider.allocateTempScope("inplace_assign")
800
802
 
801
- tmp_variable = provider.allocateTempVariable(temp_scope=temp_scope, name="value")
803
+ tmp_variable = provider.allocateTempVariable(
804
+ temp_scope=temp_scope, name="value", temp_type="object"
805
+ )
802
806
 
803
807
  # First assign the target value to a temporary variable.
804
808
  preserve_to_tmp = makeStatementAssignmentVariable(
@@ -1131,13 +1135,13 @@ def buildInplaceAssignNode(provider, node, source_ref):
1131
1135
  temp_scope = provider.allocateTempScope("inplace_assign_subscr")
1132
1136
 
1133
1137
  tmp_variable1 = provider.allocateTempVariable(
1134
- temp_scope=temp_scope, name="target"
1138
+ temp_scope=temp_scope, name="target", temp_type="object"
1135
1139
  )
1136
1140
  tmp_variable2 = provider.allocateTempVariable(
1137
- temp_scope=temp_scope, name="subscript"
1141
+ temp_scope=temp_scope, name="subscript", temp_type="object"
1138
1142
  )
1139
1143
  tmp_variable3 = provider.allocateTempVariable(
1140
- temp_scope=temp_scope, name="value"
1144
+ temp_scope=temp_scope, name="value", temp_type="object"
1141
1145
  )
1142
1146
 
1143
1147
  statements = _buildInplaceAssignSubscriptNode(
@@ -1157,24 +1161,24 @@ def buildInplaceAssignNode(provider, node, source_ref):
1157
1161
  temp_scope = provider.allocateTempScope("inplace_assign_slice")
1158
1162
 
1159
1163
  tmp_variable1 = provider.allocateTempVariable(
1160
- temp_scope=temp_scope, name="target"
1164
+ temp_scope=temp_scope, name="target", temp_type="object"
1161
1165
  )
1162
1166
  if lower is not None:
1163
1167
  tmp_variable2 = provider.allocateTempVariable(
1164
- temp_scope=temp_scope, name="lower"
1168
+ temp_scope=temp_scope, name="lower", temp_type="object"
1165
1169
  )
1166
1170
  else:
1167
1171
  tmp_variable2 = None
1168
1172
 
1169
1173
  if upper is not None:
1170
1174
  tmp_variable3 = provider.allocateTempVariable(
1171
- temp_scope=temp_scope, name="upper"
1175
+ temp_scope=temp_scope, name="upper", temp_type="object"
1172
1176
  )
1173
1177
  else:
1174
1178
  tmp_variable3 = None
1175
1179
 
1176
1180
  tmp_variable4 = provider.allocateTempVariable(
1177
- temp_scope=temp_scope, name="value"
1181
+ temp_scope=temp_scope, name="value", temp_type="object"
1178
1182
  )
1179
1183
 
1180
1184
  statements = _buildInplaceAssignSliceNode(
@@ -1203,7 +1207,9 @@ def buildNamedExprNode(provider, node, source_ref):
1203
1207
  provider=provider, name="assignment_expr", source_ref=source_ref
1204
1208
  )
1205
1209
 
1206
- tmp_value = outline_body.allocateTempVariable(temp_scope=None, name="value")
1210
+ tmp_value = outline_body.allocateTempVariable(
1211
+ temp_scope=None, name="value", temp_type="object"
1212
+ )
1207
1213
 
1208
1214
  value = buildNode(provider=provider, node=node.value, source_ref=source_ref)
1209
1215
 
@@ -107,7 +107,7 @@ def buildCallNode(provider, node, source_ref):
107
107
  )
108
108
 
109
109
  tmp_called = outline_body.allocateTempVariable(
110
- temp_scope=None, name="called"
110
+ temp_scope=None, name="called", temp_type="object"
111
111
  )
112
112
 
113
113
  helper_args = [
@@ -170,17 +170,23 @@ def buildClassNode2(provider, node, source_ref):
170
170
 
171
171
  temp_scope = provider.allocateTempScope("class_creation")
172
172
 
173
- tmp_bases = provider.allocateTempVariable(temp_scope, "bases")
174
- tmp_class_dict = provider.allocateTempVariable(temp_scope, "class_dict")
175
- tmp_metaclass = provider.allocateTempVariable(temp_scope, "metaclass")
176
- tmp_class = provider.allocateTempVariable(temp_scope, "class")
173
+ tmp_bases = provider.allocateTempVariable(temp_scope, "bases", temp_type="object")
174
+ tmp_class_dict = provider.allocateTempVariable(
175
+ temp_scope, "class_dict", temp_type="object"
176
+ )
177
+ tmp_metaclass = provider.allocateTempVariable(
178
+ temp_scope, "metaclass", temp_type="object"
179
+ )
180
+ tmp_class = provider.allocateTempVariable(temp_scope, "class", temp_type="object")
177
181
 
178
182
  select_metaclass = ExpressionOutlineBody(
179
183
  provider=provider, name="select_metaclass", body=None, source_ref=source_ref
180
184
  )
181
185
 
182
186
  if node.bases:
183
- tmp_base = select_metaclass.allocateTempVariable(temp_scope=None, name="base")
187
+ tmp_base = select_metaclass.allocateTempVariable(
188
+ temp_scope=None, name="base", temp_type="object"
189
+ )
184
190
 
185
191
  statements = (
186
192
  makeStatementAssignmentVariable(
@@ -146,12 +146,14 @@ def buildClassNode3(provider, node, source_ref):
146
146
  temp_scope = provider.allocateTempScope(name="class_creation")
147
147
 
148
148
  tmp_class_decl_dict = provider.allocateTempVariable(
149
- temp_scope=temp_scope, name="class_decl_dict"
149
+ temp_scope=temp_scope, name="class_decl_dict", temp_type="object"
150
150
  )
151
151
  tmp_metaclass = provider.allocateTempVariable(
152
- temp_scope=temp_scope, name="metaclass"
152
+ temp_scope=temp_scope, name="metaclass", temp_type="object"
153
+ )
154
+ tmp_prepared = provider.allocateTempVariable(
155
+ temp_scope=temp_scope, name="prepared", temp_type="object"
153
156
  )
154
- tmp_prepared = provider.allocateTempVariable(temp_scope=temp_scope, name="prepared")
155
157
 
156
158
  class_creation_function = ExpressionClassBodyP3(
157
159
  provider=provider, name=node.name, doc=class_doc, source_ref=source_ref
@@ -273,11 +275,13 @@ def buildClassNode3(provider, node, source_ref):
273
275
  statements.append(body)
274
276
 
275
277
  if node.bases:
276
- tmp_bases = provider.allocateTempVariable(temp_scope=temp_scope, name="bases")
278
+ tmp_bases = provider.allocateTempVariable(
279
+ temp_scope=temp_scope, name="bases", temp_type="object"
280
+ )
277
281
 
278
282
  if python_version >= 0x370:
279
283
  tmp_bases_orig = provider.allocateTempVariable(
280
- temp_scope=temp_scope, name="bases_orig"
284
+ temp_scope=temp_scope, name="bases_orig", temp_type="object"
281
285
  )
282
286
 
283
287
  def makeBasesRef():
@@ -677,9 +681,15 @@ def getClassBasesMroConversionHelper():
677
681
 
678
682
  temp_scope = None
679
683
 
680
- tmp_result_variable = result.allocateTempVariable(temp_scope, "list")
681
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
682
- tmp_item_variable = result.allocateTempVariable(temp_scope, "base")
684
+ tmp_result_variable = result.allocateTempVariable(
685
+ temp_scope, "list", temp_type="object"
686
+ )
687
+ tmp_iter_variable = result.allocateTempVariable(
688
+ temp_scope, "iter", temp_type="object"
689
+ )
690
+ tmp_item_variable = result.allocateTempVariable(
691
+ temp_scope, "base", temp_type="object"
692
+ )
683
693
 
684
694
  args_variable = result.getVariableForAssignment(variable_name="bases")
685
695
 
@@ -891,10 +901,18 @@ def getClassSelectMetaClassHelper():
891
901
 
892
902
  temp_scope = None
893
903
 
894
- tmp_winner_variable = result.allocateTempVariable(temp_scope, "winner")
895
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
896
- tmp_item_variable = result.allocateTempVariable(temp_scope, "base")
897
- tmp_item_type_variable = result.allocateTempVariable(temp_scope, "base_type")
904
+ tmp_winner_variable = result.allocateTempVariable(
905
+ temp_scope, "winner", temp_type="object"
906
+ )
907
+ tmp_iter_variable = result.allocateTempVariable(
908
+ temp_scope, "iter", temp_type="object"
909
+ )
910
+ tmp_item_variable = result.allocateTempVariable(
911
+ temp_scope, "base", temp_type="object"
912
+ )
913
+ tmp_item_type_variable = result.allocateTempVariable(
914
+ temp_scope, "base_type", temp_type="object"
915
+ )
898
916
 
899
917
  # For non-types, the metaclass cannot be overruled by bases.
900
918
  non_type_case = StatementReturn(
@@ -82,12 +82,14 @@ def buildComplexComparisonNode(provider, left, rights, comparators, source_ref):
82
82
  )
83
83
 
84
84
  variables = [
85
- outline_body.allocateTempVariable(temp_scope=None, name="operand_%d" % count)
85
+ outline_body.allocateTempVariable(
86
+ temp_scope=None, name="operand_%d" % count, temp_type="object"
87
+ )
86
88
  for count in range(2, len(rights) + 2)
87
89
  ]
88
90
 
89
91
  tmp_variable = outline_body.allocateTempVariable(
90
- temp_scope=None, name="comparison_result"
92
+ temp_scope=None, name="comparison_result", temp_type="object"
91
93
  )
92
94
 
93
95
  def makeTempAssignment(count, value):
@@ -73,7 +73,7 @@ from nuitka.nodes.VariableReleaseNodes import (
73
73
  )
74
74
  from nuitka.nodes.YieldNodes import (
75
75
  ExpressionYield,
76
- ExpressionYieldFromWaitable,
76
+ ExpressionYieldFromAwaitable,
77
77
  )
78
78
  from nuitka.PythonVersions import python_version
79
79
 
@@ -100,7 +100,7 @@ def _makeIteratorCreation(provider, qual, for_asyncgen, source_ref):
100
100
  )
101
101
 
102
102
  if not for_asyncgen or python_version < 0x370:
103
- result = ExpressionYieldFromWaitable(
103
+ result = ExpressionYieldFromAwaitable(
104
104
  expression=result, source_ref=source_ref
105
105
  )
106
106
 
@@ -114,7 +114,7 @@ def _makeIteratorCreation(provider, qual, for_asyncgen, source_ref):
114
114
 
115
115
  def _makeIteratorNext(qual, iterator_ref, source_ref):
116
116
  if getattr(qual, "is_async", 0):
117
- return ExpressionYieldFromWaitable(
117
+ return ExpressionYieldFromAwaitable(
118
118
  expression=ExpressionAsyncNext(value=iterator_ref, source_ref=source_ref),
119
119
  source_ref=source_ref,
120
120
  )
@@ -140,10 +140,12 @@ def _buildPython2ListContraction(provider, node, source_ref):
140
140
  provider=provider, name="list_contraction", source_ref=source_ref
141
141
  )
142
142
 
143
- iter_tmp = function_body.allocateTempVariable(temp_scope=None, name=".0")
143
+ iter_tmp = function_body.allocateTempVariable(
144
+ temp_scope=None, name=".0", temp_type="object"
145
+ )
144
146
 
145
147
  container_tmp = function_body.allocateTempVariable(
146
- temp_scope=None, name="contraction_result"
148
+ temp_scope=None, name="contraction_result", temp_type="object"
147
149
  )
148
150
 
149
151
  statements, release_statements = _buildContractionBodyNode(
@@ -233,7 +235,9 @@ def buildGeneratorExpressionNode(provider, node, source_ref):
233
235
  provider=provider, name="genexpr", source_ref=source_ref
234
236
  )
235
237
 
236
- iter_tmp = function_body.allocateTempVariable(temp_scope=None, name=".0")
238
+ iter_tmp = function_body.allocateTempVariable(
239
+ temp_scope=None, name=".0", temp_type="object"
240
+ )
237
241
 
238
242
  parent_module = provider.getParentModule()
239
243
 
@@ -460,7 +464,7 @@ def _buildContractionBodyNode(
460
464
 
461
465
  for count, qual in enumerate(reversed(node.generators)):
462
466
  tmp_value_variable = function_body.allocateTempVariable(
463
- temp_scope=temp_scope, name="iter_value_%d" % count
467
+ temp_scope=temp_scope, name="iter_value_%d" % count, temp_type="object"
464
468
  )
465
469
 
466
470
  tmp_variables.append(tmp_value_variable)
@@ -473,7 +477,7 @@ def _buildContractionBodyNode(
473
477
  iterator_ref = makeVariableRefNode(variable=iter_tmp, source_ref=source_ref)
474
478
 
475
479
  if for_asyncgen and python_version >= 0x370:
476
- iterator_ref = ExpressionYieldFromWaitable(
480
+ iterator_ref = ExpressionYieldFromAwaitable(
477
481
  expression=iterator_ref, source_ref=source_ref
478
482
  )
479
483
 
@@ -490,7 +494,9 @@ def _buildContractionBodyNode(
490
494
  )
491
495
 
492
496
  tmp_iter_variable = function_body.allocateTempVariable(
493
- temp_scope=temp_scope, name="contraction_iter_%d" % count
497
+ temp_scope=temp_scope,
498
+ name="contraction_iter_%d" % count,
499
+ temp_type="object",
494
500
  )
495
501
 
496
502
  tmp_variables.append(tmp_iter_variable)
@@ -589,10 +595,12 @@ def _buildContractionNode(provider, node, name, emit_class, start_value, source_
589
595
  provider=provider, name=intern(name[1:-1]), source_ref=source_ref
590
596
  )
591
597
 
592
- iter_tmp = function_body.allocateTempVariable(temp_scope=None, name=".0")
598
+ iter_tmp = function_body.allocateTempVariable(
599
+ temp_scope=None, name=".0", temp_type="object"
600
+ )
593
601
 
594
602
  container_tmp = function_body.allocateTempVariable(
595
- temp_scope=None, name="contraction"
603
+ temp_scope=None, name="contraction", temp_type="object"
596
604
  )
597
605
 
598
606
  statements, release_statements = _buildContractionBodyNode(
@@ -117,9 +117,15 @@ def getDictUnpackingHelper():
117
117
 
118
118
  temp_scope = None
119
119
 
120
- tmp_result_variable = result.allocateTempVariable(temp_scope, "dict")
121
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
122
- tmp_item_variable = result.allocateTempVariable(temp_scope, "keys")
120
+ tmp_result_variable = result.allocateTempVariable(
121
+ temp_scope, "dict", temp_type="object"
122
+ )
123
+ tmp_iter_variable = result.allocateTempVariable(
124
+ temp_scope, "iter", temp_type="object"
125
+ )
126
+ tmp_item_variable = result.allocateTempVariable(
127
+ temp_scope, "keys", temp_type="object"
128
+ )
123
129
 
124
130
  loop_body = makeStatementsSequenceFromStatements(
125
131
  makeTryExceptSingleHandlerNode(
@@ -62,11 +62,11 @@ def wrapEvalGlobalsAndLocals(
62
62
  locals_scope = provider.getLocalsScope()
63
63
 
64
64
  globals_keeper_variable = provider.allocateTempVariable(
65
- temp_scope=temp_scope, name="globals"
65
+ temp_scope=temp_scope, name="globals", temp_type="object"
66
66
  )
67
67
 
68
68
  locals_keeper_variable = provider.allocateTempVariable(
69
- temp_scope=temp_scope, name="locals"
69
+ temp_scope=temp_scope, name="locals", temp_type="object"
70
70
  )
71
71
 
72
72
  if locals_node is None:
@@ -223,19 +223,19 @@ exec: arg 1 must be a string, file, or code object""",
223
223
  source_code = buildNode(provider, body, source_ref)
224
224
 
225
225
  source_variable = provider.allocateTempVariable(
226
- temp_scope=temp_scope, name="exec_source"
226
+ temp_scope=temp_scope, name="exec_source", temp_type="object"
227
227
  )
228
228
 
229
229
  globals_keeper_variable = provider.allocateTempVariable(
230
- temp_scope=temp_scope, name="globals"
230
+ temp_scope=temp_scope, name="globals", temp_type="object"
231
231
  )
232
232
 
233
233
  locals_keeper_variable = provider.allocateTempVariable(
234
- temp_scope=temp_scope, name="locals"
234
+ temp_scope=temp_scope, name="locals", temp_type="object"
235
235
  )
236
236
 
237
237
  plain_indicator_variable = provider.allocateTempVariable(
238
- temp_scope=temp_scope, name="plain"
238
+ temp_scope=temp_scope, name="plain", temp_type="bool"
239
239
  )
240
240
 
241
241
  tried = (
@@ -36,7 +36,7 @@ from nuitka.nodes.StatementNodes import StatementsSequence
36
36
  from nuitka.nodes.VariableAssignNodes import makeStatementAssignmentVariable
37
37
  from nuitka.nodes.VariableRefNodes import ExpressionTempVariableRef
38
38
  from nuitka.nodes.VariableReleaseNodes import makeStatementReleaseVariable
39
- from nuitka.nodes.YieldNodes import ExpressionYieldFromWaitable
39
+ from nuitka.nodes.YieldNodes import ExpressionYieldFromAwaitable
40
40
 
41
41
  from .ReformulationAssignmentStatements import buildAssignmentStatements
42
42
  from .ReformulationTryExceptStatements import makeTryExceptSingleHandlerNode
@@ -66,10 +66,10 @@ def _buildForLoopNode(provider, node, sync, source_ref):
66
66
  temp_scope = provider.allocateTempScope("for_loop")
67
67
 
68
68
  tmp_iter_variable = provider.allocateTempVariable(
69
- temp_scope=temp_scope, name="for_iterator"
69
+ temp_scope=temp_scope, name="for_iterator", temp_type="object"
70
70
  )
71
71
  tmp_value_variable = provider.allocateTempVariable(
72
- temp_scope=temp_scope, name="iter_value"
72
+ temp_scope=temp_scope, name="iter_value", temp_type="object"
73
73
  )
74
74
 
75
75
  else_block = buildStatementsNode(
@@ -108,7 +108,7 @@ def _buildForLoopNode(provider, node, sync, source_ref):
108
108
  source_ref=source_ref,
109
109
  )
110
110
  else:
111
- next_node = ExpressionYieldFromWaitable(
111
+ next_node = ExpressionYieldFromAwaitable(
112
112
  expression=ExpressionAsyncNext(
113
113
  value=ExpressionTempVariableRef(
114
114
  variable=tmp_iter_variable, source_ref=source_ref
@@ -170,7 +170,7 @@ def _buildForLoopNode(provider, node, sync, source_ref):
170
170
  value=source, source_ref=source.getSourceReference()
171
171
  )
172
172
  else:
173
- iter_source = ExpressionYieldFromWaitable(
173
+ iter_source = ExpressionYieldFromAwaitable(
174
174
  expression=ExpressionAsyncIter(
175
175
  value=source, source_ref=source.getSourceReference()
176
176
  ),
@@ -252,6 +252,8 @@ def buildFunctionNode(provider, node, source_ref):
252
252
  )
253
253
 
254
254
  if compilation_mode != "compiled":
255
+ node.name = mangleName(node.name, provider)
256
+
255
257
  return _buildBytecodeOrSourceFunction(
256
258
  provider=provider,
257
259
  node=node,
@@ -588,7 +590,7 @@ def buildParameterAnnotations(provider, node, source_ref):
588
590
  # Too many branches, because there is too many cases, pylint: disable=too-many-branches
589
591
 
590
592
  # The ast uses funny names a bunch.
591
- # spell-checker: ignore varnames,elts,posonlyargs,kwonlyargs,varargannotation,vararg
593
+ # spell-checker: ignore elts,posonlyargs,kwonlyargs,varargannotation,vararg
592
594
  # spell-checker: ignore kwargannotation
593
595
 
594
596
  # Build annotations. We are hiding here, that it is a Python3 only feature.
@@ -681,7 +683,9 @@ def _wrapFunctionWithSpecialNestedArgs(
681
683
 
682
684
  sub_special_index = 0
683
685
 
684
- iter_var = outer_body.allocateTempVariable(None, "arg_iter_%d" % len(iter_vars))
686
+ iter_var = outer_body.allocateTempVariable(
687
+ temp_scope=None, name="arg_iter_%d" % len(iter_vars), temp_type="object"
688
+ )
685
689
  iter_vars.append(iter_var)
686
690
 
687
691
  statements.append(
@@ -220,7 +220,10 @@ def buildImportFromNode(provider, node, source_ref):
220
220
  else:
221
221
  if module_name == "__future__":
222
222
  imported_from_module = makeExpressionImportModuleFixed(
223
- module_name="__future__", source_ref=source_ref
223
+ using_module_name=provider.getParentModule().getFullName(),
224
+ module_name="__future__",
225
+ value_name="__future__",
226
+ source_ref=source_ref,
224
227
  )
225
228
  else:
226
229
  imported_from_module = ExpressionBuiltinImport(
@@ -239,7 +242,9 @@ def buildImportFromNode(provider, node, source_ref):
239
242
 
240
243
  if multi_names:
241
244
  tmp_import_from = provider.allocateTempVariable(
242
- temp_scope=provider.allocateTempScope("import_from"), name="module"
245
+ temp_scope=provider.allocateTempScope("import_from"),
246
+ name="module",
247
+ temp_type="object",
243
248
  )
244
249
 
245
250
  statements.append(
@@ -116,7 +116,7 @@ def buildLambdaNode(provider, node, source_ref):
116
116
  if function_kind == "Generator":
117
117
  if python_version < 0x270:
118
118
  tmp_return_value = code_body.allocateTempVariable(
119
- temp_scope=None, name="yield_return"
119
+ temp_scope=None, name="yield_return", temp_type="object"
120
120
  )
121
121
 
122
122
  statements = (
@@ -533,7 +533,9 @@ def buildMatchNode(provider, node, source_ref):
533
533
  temp_scope = provider.allocateTempScope("match_statement")
534
534
 
535
535
  # The value matched against, must be released in the end.
536
- tmp_subject = provider.allocateTempVariable(temp_scope, "subject")
536
+ tmp_subject = provider.allocateTempVariable(
537
+ temp_scope, "subject", temp_type="object"
538
+ )
537
539
 
538
540
  # Indicator variable, will end up with C bool type, and need not be released.
539
541
  tmp_indicator_variable = provider.allocateTempVariable(
@@ -152,15 +152,19 @@ def createPathAssignment(package, source_ref):
152
152
 
153
153
 
154
154
  def createPython3NamespacePath(package, source_ref):
155
+ module_name = (
156
+ "_frozen_importlib" if python_version < 0x350 else "_frozen_importlib_external"
157
+ )
158
+
155
159
  return StatementAssignmentVariableName(
156
160
  provider=package,
157
161
  variable_name="__path__",
158
162
  source=ExpressionCallNoKeywords(
159
163
  called=ExpressionImportName(
160
164
  module=makeExpressionImportModuleFixed(
161
- module_name="_frozen_importlib"
162
- if python_version < 0x350
163
- else "_frozen_importlib_external",
165
+ using_module_name=package.getFullName(),
166
+ module_name=module_name,
167
+ value_name=module_name,
164
168
  source_ref=source_ref,
165
169
  ),
166
170
  import_name="_NamespacePath",
@@ -46,7 +46,7 @@ def buildPrintNode(provider, node, source_ref):
46
46
  temp_scope = provider.allocateTempScope("print")
47
47
 
48
48
  tmp_target_variable = provider.allocateTempVariable(
49
- temp_scope=temp_scope, name="target"
49
+ temp_scope=temp_scope, name="target", temp_type="object"
50
50
  )
51
51
 
52
52
  target_default_statement = makeStatementAssignmentVariable(
@@ -157,9 +157,15 @@ def getListUnpackingHelper():
157
157
 
158
158
  temp_scope = None
159
159
 
160
- tmp_result_variable = result.allocateTempVariable(temp_scope, "list")
161
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
162
- tmp_item_variable = result.allocateTempVariable(temp_scope, "keys")
160
+ tmp_result_variable = result.allocateTempVariable(
161
+ temp_scope, "list", temp_type="object"
162
+ )
163
+ tmp_iter_variable = result.allocateTempVariable(
164
+ temp_scope, "iter", temp_type="object"
165
+ )
166
+ tmp_item_variable = result.allocateTempVariable(
167
+ temp_scope, "keys", temp_type="object"
168
+ )
163
169
 
164
170
  if python_version < 0x390:
165
171
  list_operation_extend = ExpressionListOperationExtend
@@ -268,9 +274,15 @@ def getSetUnpackingHelper():
268
274
 
269
275
  temp_scope = None
270
276
 
271
- tmp_result_variable = result.allocateTempVariable(temp_scope, "set")
272
- tmp_iter_variable = result.allocateTempVariable(temp_scope, "iter")
273
- tmp_item_variable = result.allocateTempVariable(temp_scope, "keys")
277
+ tmp_result_variable = result.allocateTempVariable(
278
+ temp_scope, "set", temp_type="object"
279
+ )
280
+ tmp_iter_variable = result.allocateTempVariable(
281
+ temp_scope, "iter", temp_type="object"
282
+ )
283
+ tmp_item_variable = result.allocateTempVariable(
284
+ temp_scope, "keys", temp_type="object"
285
+ )
274
286
 
275
287
  loop_body = makeStatementsSequenceFromStatements(
276
288
  makeTryExceptSingleHandlerNode(