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
@@ -360,6 +360,8 @@ def _getComparisonEqShapeGeneric(self, right_shape):
360
360
 
361
361
 
362
362
  class ShapeTypeNoneType(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
363
+ __slots__ = ()
364
+
363
365
  typical_value = None
364
366
 
365
367
  @staticmethod
@@ -440,6 +442,8 @@ tshape_none = ShapeTypeNoneType()
440
442
 
441
443
 
442
444
  class ShapeTypeBool(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
445
+ __slots__ = ()
446
+
443
447
  typical_value = True
444
448
 
445
449
  @staticmethod
@@ -493,6 +497,8 @@ tshape_bool = ShapeTypeBool()
493
497
 
494
498
 
495
499
  class ShapeTypeInt(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
500
+ __slots__ = ()
501
+
496
502
  typical_value = 7
497
503
 
498
504
  @staticmethod
@@ -550,6 +556,8 @@ if python_version < 0x300:
550
556
  _the_typical_long_value = long(7) # pylint: disable=I0021,undefined-variable
551
557
 
552
558
  class ShapeTypeLong(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
559
+ __slots__ = ()
560
+
553
561
  typical_value = _the_typical_long_value
554
562
 
555
563
  @staticmethod
@@ -599,6 +607,8 @@ if python_version < 0x300:
599
607
  tshape_long = ShapeTypeLong()
600
608
 
601
609
  class ShapeTypeLongDerived(ShapeTypeUnknown):
610
+ __slots__ = ()
611
+
602
612
  @staticmethod
603
613
  def getTypeName():
604
614
  return None
@@ -606,6 +616,8 @@ if python_version < 0x300:
606
616
  tshape_long_derived = ShapeTypeLongDerived()
607
617
 
608
618
  class ShapeTypeIntOrLong(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
619
+ __slots__ = ()
620
+
609
621
  if isExperimental("nuitka_ilong"):
610
622
 
611
623
  @staticmethod
@@ -668,13 +680,15 @@ else:
668
680
 
669
681
  # TODO: Make this Python2 only, and use ShapeTypeIntDerived for Python3
670
682
  class ShapeTypeIntOrLongDerived(ShapeTypeUnknown):
671
- pass
683
+ __slots__ = ()
672
684
 
673
685
 
674
686
  tshape_int_or_long_derived = ShapeTypeIntOrLongDerived()
675
687
 
676
688
 
677
689
  class ShapeTypeFloat(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
690
+ __slots__ = ()
691
+
678
692
  typical_value = 0.1
679
693
 
680
694
  @staticmethod
@@ -722,13 +736,15 @@ tshape_float = ShapeTypeFloat()
722
736
 
723
737
 
724
738
  class ShapeTypeFloatDerived(ShapeTypeUnknown):
725
- pass
739
+ __slots__ = ()
726
740
 
727
741
 
728
742
  tshape_float_derived = ShapeTypeFloatDerived()
729
743
 
730
744
 
731
745
  class ShapeTypeComplex(ShapeNotContainerMixin, ShapeNumberMixin, ShapeBase):
746
+ __slots__ = ()
747
+
732
748
  typical_value = 0j
733
749
 
734
750
  @staticmethod
@@ -756,6 +772,8 @@ tshape_complex = ShapeTypeComplex()
756
772
 
757
773
 
758
774
  class ShapeTypeTuple(ShapeContainerMixin, ShapeNotNumberMixin, ShapeBase):
775
+ __slots__ = ()
776
+
759
777
  typical_value = ()
760
778
 
761
779
  @staticmethod
@@ -797,6 +815,8 @@ tshape_tuple = ShapeTypeTuple()
797
815
 
798
816
 
799
817
  class ShapeTypeNamedTuple(ShapeContainerMixin, ShapeNotNumberMixin, ShapeBase):
818
+ __slots__ = ()
819
+
800
820
  @staticmethod
801
821
  def getTypeName():
802
822
  return "namedtuple"
@@ -837,6 +857,8 @@ tshape_namedtuple = ShapeTypeNamedTuple()
837
857
 
838
858
 
839
859
  class ShapeTypeTupleIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
860
+ __slots__ = ()
861
+
840
862
  typical_value = iter(tshape_tuple.typical_value)
841
863
 
842
864
  @staticmethod
@@ -852,6 +874,8 @@ tshape_tuple_iterator = ShapeTypeTupleIterator()
852
874
 
853
875
 
854
876
  class ShapeTypeList(ShapeContainerMutableMixin, ShapeNotNumberMixin, ShapeBase):
877
+ __slots__ = ()
878
+
855
879
  typical_value = []
856
880
 
857
881
  @staticmethod
@@ -909,6 +933,8 @@ tshape_list = ShapeTypeList()
909
933
 
910
934
 
911
935
  class ShapeTypeListIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
936
+ __slots__ = ()
937
+
912
938
  typical_value = iter(tshape_list.typical_value)
913
939
 
914
940
  @staticmethod
@@ -924,6 +950,8 @@ tshape_list_iterator = ShapeTypeListIterator()
924
950
 
925
951
 
926
952
  class ShapeTypeSet(ShapeContainerMutableMixin, ShapeNotNumberMixin, ShapeBase):
953
+ __slots__ = ()
954
+
927
955
  typical_value = set()
928
956
 
929
957
  @staticmethod
@@ -963,6 +991,8 @@ tshape_set = ShapeTypeSet()
963
991
 
964
992
 
965
993
  class ShapeTypeSetIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
994
+ __slots__ = ()
995
+
966
996
  typical_value = iter(tshape_set.typical_value)
967
997
 
968
998
  @staticmethod
@@ -978,6 +1008,8 @@ tshape_set_iterator = ShapeTypeSetIterator()
978
1008
 
979
1009
 
980
1010
  class ShapeTypeFrozenset(ShapeContainerImmutableMixin, ShapeNotNumberMixin, ShapeBase):
1011
+ __slots__ = ()
1012
+
981
1013
  typical_value = frozenset()
982
1014
 
983
1015
  @staticmethod
@@ -1015,6 +1047,8 @@ _the_empty_dict = {}
1015
1047
 
1016
1048
 
1017
1049
  class ShapeTypeDict(ShapeContainerMutableMixin, ShapeNotNumberMixin, ShapeBase):
1050
+ __slots__ = ()
1051
+
1018
1052
  typical_value = _the_empty_dict
1019
1053
 
1020
1054
  @staticmethod
@@ -1063,6 +1097,8 @@ tshape_dict = ShapeTypeDict()
1063
1097
 
1064
1098
 
1065
1099
  class ShapeTypeDictIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1100
+ __slots__ = ()
1101
+
1066
1102
  typical_value = iter(tshape_dict.typical_value)
1067
1103
 
1068
1104
  @staticmethod
@@ -1080,6 +1116,8 @@ tshape_dict_iterator = ShapeTypeDictIterator()
1080
1116
 
1081
1117
 
1082
1118
  class ShapeTypeStr(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1119
+ __slots__ = ()
1120
+
1083
1121
  typical_value = "a"
1084
1122
 
1085
1123
  @staticmethod
@@ -1177,13 +1215,15 @@ tshape_str = ShapeTypeStr()
1177
1215
 
1178
1216
 
1179
1217
  class TypeShapeStrDerived(ShapeTypeUnknown):
1180
- pass
1218
+ __slots__ = ()
1181
1219
 
1182
1220
 
1183
1221
  tshape_str_derived = TypeShapeStrDerived()
1184
1222
 
1185
1223
 
1186
1224
  class ShapeTypeStrIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1225
+ __slots__ = ()
1226
+
1187
1227
  typical_value = iter(tshape_str.typical_value)
1188
1228
 
1189
1229
  @staticmethod
@@ -1201,6 +1241,8 @@ tshape_str_iterator = ShapeTypeStrIterator()
1201
1241
  if python_version < 0x300:
1202
1242
 
1203
1243
  class ShapeTypeUnicode(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1244
+ __slots__ = ()
1245
+
1204
1246
  typical_value = the_empty_unicode
1205
1247
 
1206
1248
  @staticmethod
@@ -1290,11 +1332,13 @@ if python_version < 0x300:
1290
1332
  tshape_unicode = ShapeTypeUnicode()
1291
1333
 
1292
1334
  class ShapeTypeUnicodeDerived(ShapeTypeUnknown):
1293
- pass
1335
+ __slots__ = ()
1294
1336
 
1295
1337
  tshape_unicode_derived = ShapeTypeUnicodeDerived()
1296
1338
 
1297
1339
  class ShapeTypeUnicodeIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1340
+ __slots__ = ()
1341
+
1298
1342
  typical_value = iter(tshape_unicode.typical_value)
1299
1343
 
1300
1344
  @staticmethod
@@ -1315,6 +1359,8 @@ else:
1315
1359
  if python_version < 0x300:
1316
1360
 
1317
1361
  class ShapeTypeStrOrUnicode(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1362
+ __slots__ = ()
1363
+
1318
1364
  @staticmethod
1319
1365
  def emitAlternatives(emit):
1320
1366
  emit(tshape_str)
@@ -1380,7 +1426,7 @@ if python_version < 0x300:
1380
1426
  tshape_str_or_unicode = ShapeTypeStrOrUnicode()
1381
1427
 
1382
1428
  class ShapeTypeStrOrUnicodeDerived(ShapeTypeUnknown):
1383
- pass
1429
+ __slots__ = ()
1384
1430
 
1385
1431
  tshape_str_or_unicode_derived = ShapeTypeStrOrUnicodeDerived()
1386
1432
 
@@ -1391,6 +1437,8 @@ else:
1391
1437
  if python_version >= 0x300:
1392
1438
 
1393
1439
  class ShapeTypeBytes(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1440
+ __slots__ = ()
1441
+
1394
1442
  typical_value = b"b"
1395
1443
 
1396
1444
  @staticmethod
@@ -1476,11 +1524,12 @@ if python_version >= 0x300:
1476
1524
  tshape_bytes = ShapeTypeBytes()
1477
1525
 
1478
1526
  class TypeShapeBytesDerived(ShapeTypeUnknown):
1479
- pass
1527
+ __slots__ = ()
1480
1528
 
1481
1529
  tshape_bytes_derived = TypeShapeBytesDerived()
1482
1530
 
1483
1531
  class TypeShapeBytesIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1532
+ __slots__ = ()
1484
1533
  typical_value = iter(tshape_bytes.typical_value)
1485
1534
 
1486
1535
  @staticmethod
@@ -1500,6 +1549,8 @@ _the_typical_bytearray_value = bytearray(b"b")
1500
1549
 
1501
1550
 
1502
1551
  class ShapeTypeBytearray(ShapeContainerMutableMixin, ShapeNotNumberMixin, ShapeBase):
1552
+ __slots__ = ()
1553
+
1503
1554
  typical_value = _the_typical_bytearray_value
1504
1555
 
1505
1556
  @staticmethod
@@ -1555,6 +1606,8 @@ tshape_bytearray = ShapeTypeBytearray()
1555
1606
 
1556
1607
 
1557
1608
  class ShapeTypeBytearrayIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1609
+ __slots__ = ()
1610
+
1558
1611
  typical_value = iter(tshape_bytearray.typical_value)
1559
1612
 
1560
1613
  @staticmethod
@@ -1570,6 +1623,8 @@ tshape_bytearray_iterator = ShapeTypeBytearrayIterator()
1570
1623
 
1571
1624
 
1572
1625
  class ShapeTypeEllipsis(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1626
+ __slots__ = ()
1627
+
1573
1628
  typical_value = Ellipsis
1574
1629
 
1575
1630
  @staticmethod
@@ -1595,6 +1650,8 @@ _the_typical_slice_value = slice(7)
1595
1650
 
1596
1651
 
1597
1652
  class ShapeTypeSlice(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1653
+ __slots__ = ()
1654
+
1598
1655
  typical_value = _the_typical_slice_value
1599
1656
 
1600
1657
  @staticmethod
@@ -1624,6 +1681,8 @@ _the_typical_xrange_value = (
1624
1681
 
1625
1682
 
1626
1683
  class ShapeTypeXrange(ShapeContainerImmutableMixin, ShapeNotNumberMixin, ShapeBase):
1684
+ __slots__ = ()
1685
+
1627
1686
  typical_value = _the_typical_xrange_value
1628
1687
 
1629
1688
  @staticmethod
@@ -1668,6 +1727,8 @@ tshape_xrange = ShapeTypeXrange()
1668
1727
 
1669
1728
 
1670
1729
  class ShapeTypeXrangeIterator(ShapeIteratorMixin, ShapeNotNumberMixin, ShapeBase):
1730
+ __slots__ = ()
1731
+
1671
1732
  typical_value = iter(tshape_xrange.typical_value)
1672
1733
 
1673
1734
  @staticmethod
@@ -1683,6 +1744,8 @@ tshape_xrange_iterator = ShapeTypeXrangeIterator()
1683
1744
 
1684
1745
 
1685
1746
  class ShapeTypeType(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1747
+ __slots__ = ()
1748
+
1686
1749
  typical_value = int
1687
1750
 
1688
1751
  @staticmethod
@@ -1711,6 +1774,8 @@ tshape_type = ShapeTypeType()
1711
1774
 
1712
1775
 
1713
1776
  class ShapeTypeModule(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1777
+ __slots__ = ()
1778
+
1714
1779
  typical_value = __import__("sys")
1715
1780
 
1716
1781
  @staticmethod
@@ -1730,6 +1795,7 @@ tshape_module = ShapeTypeModule()
1730
1795
 
1731
1796
 
1732
1797
  class ShapeTypeFunction(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1798
+ __slots__ = ()
1733
1799
  # TODO: Add typical value.
1734
1800
 
1735
1801
  @staticmethod
@@ -1745,6 +1811,8 @@ tshape_function = ShapeTypeFunction()
1745
1811
 
1746
1812
 
1747
1813
  class ShapeTypeBuiltinModule(ShapeTypeModule):
1814
+ __slots__ = ()
1815
+
1748
1816
  typical_value = __import__("_ctypes")
1749
1817
 
1750
1818
 
@@ -1752,6 +1820,7 @@ tshape_module_builtin = ShapeTypeBuiltinModule()
1752
1820
 
1753
1821
 
1754
1822
  class ShapeTypeFile(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1823
+ __slots__ = ()
1755
1824
  # TODO: That need not really be a file, find something better.
1756
1825
  typical_value = __import__("sys").stdout
1757
1826
 
@@ -1781,6 +1850,8 @@ tshape_file = ShapeTypeFile()
1781
1850
 
1782
1851
 
1783
1852
  class ShapeTypeStaticmethod(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1853
+ __slots__ = ()
1854
+
1784
1855
  # TODO: Add typical value.
1785
1856
 
1786
1857
  @staticmethod
@@ -1794,6 +1865,7 @@ tshape_staticmethod = ShapeTypeStaticmethod()
1794
1865
 
1795
1866
 
1796
1867
  class ShapeTypeClassmethod(ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase):
1868
+ __slots__ = ()
1797
1869
  # TODO: Add typical value.
1798
1870
 
1799
1871
  @staticmethod
@@ -4161,6 +4233,9 @@ if python_version >= 0x390:
4161
4233
  class ShapeTypeBuiltinExceptionClass(
4162
4234
  ShapeNotContainerMixin, ShapeNotNumberMixin, ShapeBase
4163
4235
  ):
4236
+ __slots__ = ()
4237
+
4238
+ # TODO: Add a typical value, that should be easy.
4164
4239
  typical_value = None
4165
4240
 
4166
4241
 
@@ -28,6 +28,9 @@ from .ControlFlowDescriptions import (
28
28
  class ShapeContainerMixin(object):
29
29
  """Mixin that defines the common container shape functions."""
30
30
 
31
+ # Mixins are required to define empty slots
32
+ __slots__ = ()
33
+
31
34
  @staticmethod
32
35
  def hasShapeSlotBool():
33
36
  return True
@@ -62,18 +65,27 @@ class ShapeContainerMixin(object):
62
65
 
63
66
 
64
67
  class ShapeContainerMutableMixin(ShapeContainerMixin):
68
+ # Mixins are required to define empty slots
69
+ __slots__ = ()
70
+
65
71
  @staticmethod
66
72
  def hasShapeSlotHash():
67
73
  return False
68
74
 
69
75
 
70
76
  class ShapeContainerImmutableMixin(ShapeContainerMixin):
77
+ # Mixins are required to define empty slots
78
+ __slots__ = ()
79
+
71
80
  @staticmethod
72
81
  def hasShapeSlotHash():
73
82
  return True
74
83
 
75
84
 
76
85
  class ShapeNotContainerMixin(object):
86
+ # Mixins are required to define empty slots
87
+ __slots__ = ()
88
+
77
89
  @staticmethod
78
90
  def hasShapeSlotBool():
79
91
  return True
@@ -106,6 +118,9 @@ class ShapeNotContainerMixin(object):
106
118
  class ShapeNotNumberMixin(object):
107
119
  """Mixin that defines the number slots to be set."""
108
120
 
121
+ # Mixins are required to define empty slots
122
+ __slots__ = ()
123
+
109
124
  @staticmethod
110
125
  def hasShapeSlotBool():
111
126
  return True
@@ -138,6 +153,9 @@ class ShapeNotNumberMixin(object):
138
153
  class ShapeNumberMixin(object):
139
154
  """Mixin that defines the number slots to be set."""
140
155
 
156
+ # Mixins are required to define empty slots
157
+ __slots__ = ()
158
+
141
159
  @staticmethod
142
160
  def hasShapeSlotBool():
143
161
  return True
@@ -180,6 +198,9 @@ class ShapeNumberMixin(object):
180
198
 
181
199
 
182
200
  class ShapeIteratorMixin(ShapeNotContainerMixin):
201
+ # Mixins are required to define empty slots
202
+ __slots__ = ()
203
+
183
204
  @staticmethod
184
205
  def isShapeIterator():
185
206
  return True
@@ -19,17 +19,19 @@
19
19
 
20
20
  from abc import abstractmethod
21
21
 
22
- from nuitka.__past__ import getMetaClassBase
23
22
  from nuitka.code_generation.c_types.CTypePyObjectPointers import (
24
23
  CTypePyObjectPtr,
25
24
  )
26
25
  from nuitka.code_generation.Reports import onMissingOperation
26
+ from nuitka.utils.SlotMetaClasses import getMetaClassBase
27
27
 
28
28
  from .ControlFlowDescriptions import ControlFlowDescriptionFullEscape
29
29
  from .ShapeMixins import ShapeIteratorMixin
30
30
 
31
31
 
32
- class ShapeBase(getMetaClassBase("Shape")):
32
+ class ShapeBase(getMetaClassBase("Shape", require_slots=True)):
33
+ __slots__ = ()
34
+
33
35
  def __repr__(self):
34
36
  return "<%s %s %s>" % (
35
37
  self.__class__.__name__,
@@ -493,6 +495,8 @@ class ShapeBase(getMetaClassBase("Shape")):
493
495
 
494
496
 
495
497
  class ShapeTypeUnknown(ShapeBase):
498
+ __slots__ = ()
499
+
496
500
  @staticmethod
497
501
  def getOperationBinaryAddShape(right_shape):
498
502
  return operation_result_unknown
@@ -566,7 +570,7 @@ tshape_unknown = ShapeTypeUnknown()
566
570
 
567
571
 
568
572
  class ShapeTypeUninitialized(ShapeTypeUnknown):
569
- pass
573
+ __slots__ = ()
570
574
 
571
575
 
572
576
  tshape_uninitialized = ShapeTypeUninitialized()
@@ -626,6 +630,8 @@ class ShapeLargeConstantValuePredictable(ShapeLargeConstantValue):
626
630
  class ShapeIterator(ShapeBase, ShapeIteratorMixin):
627
631
  """Iterator created by iter with 2 arguments, TODO: could be way more specific."""
628
632
 
633
+ __slots__ = ()
634
+
629
635
  @staticmethod
630
636
  def isShapeIterator():
631
637
  return None
@@ -882,7 +882,7 @@ def eval_extractor(node):
882
882
  )
883
883
 
884
884
  source_variable = outline_body.allocateTempVariable(
885
- temp_scope=None, name="source"
885
+ temp_scope=None, name="source", temp_type="object"
886
886
  )
887
887
 
888
888
  final.setChildStatements(
@@ -31,6 +31,8 @@ from nuitka import Variables
31
31
  from nuitka.__past__ import iterItems # Python3 compatibility.
32
32
  from nuitka.containers.OrderedDicts import OrderedDict
33
33
  from nuitka.containers.OrderedSets import OrderedSet
34
+ from nuitka.importing.Importing import locateModule, makeModuleUsageAttempt
35
+ from nuitka.importing.Recursion import decideRecursion
34
36
  from nuitka.ModuleRegistry import addUsedModule
35
37
  from nuitka.nodes.NodeMakingHelpers import getComputationResult
36
38
  from nuitka.nodes.shapes.StandardShapes import tshape_uninitialized
@@ -526,6 +528,26 @@ class TraceCollectionBase(object):
526
528
 
527
529
  return variable_trace
528
530
 
531
+ def onVariableSetAliasing(self, variable, version, assign_node, source):
532
+ other_variable_trace = source.variable_trace
533
+
534
+ if other_variable_trace.__class__ is ValueTraceAssignUnescapable:
535
+ return self.onVariableSetToUnescapableValue(
536
+ variable=variable, version=version, assign_node=assign_node
537
+ )
538
+ elif other_variable_trace.__class__ is ValueTraceAssignVeryTrusted:
539
+ return self.onVariableSetToVeryTrustedValue(
540
+ variable=variable, version=version, assign_node=assign_node
541
+ )
542
+ else:
543
+ result = self.onVariableSet(
544
+ variable=variable, version=version, assign_node=assign_node
545
+ )
546
+
547
+ self.removeKnowledge(source)
548
+
549
+ return result
550
+
529
551
  def onVariableSetToUnescapableValue(self, variable, version, assign_node):
530
552
  variable_trace = ValueTraceAssignUnescapable(
531
553
  owner=self.owner,
@@ -1126,6 +1148,59 @@ class TraceCollectionModule(CollectionStartPointMixin, TraceCollectionBase):
1126
1148
  return self.module_usage_attempts
1127
1149
 
1128
1150
  def onModuleUsageAttempt(self, module_usage_attempt):
1151
+ if module_usage_attempt.finding != "not-found":
1152
+ decision, _reason = decideRecursion(
1153
+ using_module_name=self.owner.getFullName(),
1154
+ module_name=module_usage_attempt.module_name,
1155
+ module_filename=module_usage_attempt.filename,
1156
+ module_kind=module_usage_attempt.module_kind,
1157
+ )
1158
+
1159
+ # When sub-package module import is rejected for whatever reason,
1160
+ # still this implies an attempt of the parent, because nothing else
1161
+ # will do it otherwise, it of course may also be rejected, but if it
1162
+ # is not, otherwise it will be missing.
1163
+ #
1164
+ # A common case of this happening are extension modules in
1165
+ # accelerated mode, for standalone this will of course be rare.
1166
+ if decision is False:
1167
+ parent_package_name = module_usage_attempt.module_name.getPackageName()
1168
+
1169
+ if parent_package_name is not None:
1170
+ (
1171
+ package_module_name,
1172
+ module_filename,
1173
+ module_kind,
1174
+ finding,
1175
+ ) = locateModule(
1176
+ module_name=parent_package_name,
1177
+ parent_package=None,
1178
+ level=0,
1179
+ )
1180
+
1181
+ # Should not be possible to happen.
1182
+ assert finding != "not-found", package_module_name
1183
+
1184
+ decision, _reason = decideRecursion(
1185
+ using_module_name=self.owner.getFullName(),
1186
+ module_name=package_module_name,
1187
+ module_filename=module_filename,
1188
+ module_kind=module_kind,
1189
+ )
1190
+
1191
+ if decision is True:
1192
+ self.onModuleUsageAttempt(
1193
+ makeModuleUsageAttempt(
1194
+ module_name=package_module_name,
1195
+ filename=module_filename,
1196
+ finding=finding,
1197
+ module_kind=module_kind,
1198
+ level=0,
1199
+ source_ref=module_usage_attempt.source_ref,
1200
+ reason="parent import",
1201
+ )
1202
+ )
1203
+
1129
1204
  self.module_usage_attempts.add(module_usage_attempt)
1130
1205
 
1131
1206
  def getUsedDistributions(self):
nuitka/pgo/PGO.py CHANGED
@@ -44,6 +44,14 @@ def _readStringValue(input_file):
44
44
  return _pgo_strings[_readCIntValue(input_file)]
45
45
 
46
46
 
47
+ def _readModuleIdentifierValue(input_file):
48
+ module_identifier = _readStringValue(input_file)
49
+ if str is not bytes:
50
+ module_identifier = module_identifier.decode("utf8")
51
+
52
+ return module_identifier
53
+
54
+
47
55
  def readPGOInputFile(input_filename):
48
56
  """Read PGO information produced by a PGO run."""
49
57
 
@@ -84,21 +92,21 @@ def readPGOInputFile(input_filename):
84
92
  # Which probe is it.
85
93
  probe_name = _readStringValue(input_file)
86
94
 
87
- if probe_name == "ModuleEnter":
88
- module_name = _readStringValue(input_file)
95
+ if probe_name == b"ModuleEnter":
96
+ module_name = _readModuleIdentifierValue(input_file)
89
97
  arg = _readCIntValue(input_file)
90
98
 
91
99
  _module_entries[module_name] = arg
92
- elif probe_name == "ModuleExit":
93
- module_name = _readStringValue(input_file)
100
+ elif probe_name == b"ModuleExit":
101
+ module_name = _readModuleIdentifierValue(input_file)
94
102
  had_error = _readCIntValue(input_file) != 0
95
103
 
96
104
  _module_exits[module_name] = had_error
97
- elif probe_name == "END":
105
+ elif probe_name == b"END":
98
106
  break
99
107
  else:
100
108
  pgo_logger.sysexit(
101
- "Error, unknown problem '%s' encountered." % probe_name
109
+ "Error, unknown probe '%s' encountered." % probe_name
102
110
  )
103
111
 
104
112
  _pgo_active = True