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
@@ -36,6 +36,7 @@ from nuitka.Options import shallMakeModule
36
36
  from nuitka.PythonVersions import python_version
37
37
  from nuitka.specs.BuiltinParameterSpecs import extractBuiltinArgs
38
38
  from nuitka.specs.HardImportSpecs import (
39
+ builtins_open_since_3_spec,
39
40
  ctypes_cdll_before_38_spec,
40
41
  ctypes_cdll_since_38_spec,
41
42
  importlib_metadata_backport_distribution_spec,
@@ -79,6 +80,7 @@ from .ChildrenHavingMixins import (
79
80
  ChildHavingPMixin,
80
81
  ChildHavingRequirementsTupleMixin,
81
82
  ChildHavingSMixin,
83
+ ChildrenHavingFileModeOptionalBufferingOptionalEncodingOptionalErrorsOptionalNewlineOptionalClosefdOptionalOpenerOptionalMixin,
82
84
  ChildrenHavingGroupNameOptionalMixin,
83
85
  ChildrenHavingNameModeOptionalHandleOptionalUseErrnoOptionalUseLasterrorOptionalMixin,
84
86
  ChildrenHavingNameModeOptionalHandleOptionalUseErrnoOptionalUseLasterrorOptionalWinmodeOptionalMixin,
@@ -98,6 +100,126 @@ from .ImportHardNodes import ExpressionImportModuleNameHardExistsSpecificBase
98
100
  hard_import_node_classes = {}
99
101
 
100
102
 
103
+ class ExpressionBuiltinsOpenRef(ExpressionImportModuleNameHardExistsSpecificBase):
104
+ """Function reference builtins.open"""
105
+
106
+ kind = "EXPRESSION_BUILTINS_OPEN_REF"
107
+
108
+ def __init__(self, source_ref):
109
+ ExpressionImportModuleNameHardExistsSpecificBase.__init__(
110
+ self,
111
+ module_name="builtins",
112
+ import_name="open",
113
+ module_guaranteed=True,
114
+ source_ref=source_ref,
115
+ )
116
+
117
+ def computeExpressionCall(self, call_node, call_args, call_kw, trace_collection):
118
+ # Anything may happen on call trace before this. On next pass, if
119
+ # replaced, we might be better but not now.
120
+ trace_collection.onExceptionRaiseExit(BaseException)
121
+
122
+ from .BuiltinOpenNodes import makeExpressionBuiltinsOpenCall
123
+
124
+ result = extractBuiltinArgs(
125
+ node=call_node,
126
+ builtin_class=makeExpressionBuiltinsOpenCall,
127
+ builtin_spec=builtins_open_since_3_spec,
128
+ )
129
+
130
+ return (
131
+ result,
132
+ "new_expression",
133
+ "Call to 'builtins.open' recognized.",
134
+ )
135
+
136
+
137
+ hard_import_node_classes[ExpressionBuiltinsOpenRef] = builtins_open_since_3_spec
138
+
139
+
140
+ class ExpressionBuiltinsOpenCallBase(
141
+ ChildrenHavingFileModeOptionalBufferingOptionalEncodingOptionalErrorsOptionalNewlineOptionalClosefdOptionalOpenerOptionalMixin,
142
+ ExpressionBase,
143
+ ):
144
+ """Base class for BuiltinsOpenCall
145
+
146
+ Generated boiler plate code.
147
+ """
148
+
149
+ named_children = (
150
+ "file",
151
+ "mode|optional",
152
+ "buffering|optional",
153
+ "encoding|optional",
154
+ "errors|optional",
155
+ "newline|optional",
156
+ "closefd|optional",
157
+ "opener|optional",
158
+ )
159
+
160
+ __slots__ = ("attempted",)
161
+
162
+ spec = builtins_open_since_3_spec
163
+
164
+ def __init__(
165
+ self,
166
+ file,
167
+ mode,
168
+ buffering,
169
+ encoding,
170
+ errors,
171
+ newline,
172
+ closefd,
173
+ opener,
174
+ source_ref,
175
+ ):
176
+ ChildrenHavingFileModeOptionalBufferingOptionalEncodingOptionalErrorsOptionalNewlineOptionalClosefdOptionalOpenerOptionalMixin.__init__(
177
+ self,
178
+ file=file,
179
+ mode=mode,
180
+ buffering=buffering,
181
+ encoding=encoding,
182
+ errors=errors,
183
+ newline=newline,
184
+ closefd=closefd,
185
+ opener=opener,
186
+ )
187
+
188
+ ExpressionBase.__init__(self, source_ref)
189
+
190
+ self.attempted = False
191
+
192
+ def computeExpression(self, trace_collection):
193
+ if self.attempted or not builtins_open_since_3_spec.isCompileTimeComputable(
194
+ (
195
+ self.subnode_file,
196
+ self.subnode_mode,
197
+ self.subnode_buffering,
198
+ self.subnode_encoding,
199
+ self.subnode_errors,
200
+ self.subnode_newline,
201
+ self.subnode_closefd,
202
+ self.subnode_opener,
203
+ )
204
+ ):
205
+ trace_collection.onExceptionRaiseExit(BaseException)
206
+
207
+ return self, None, None
208
+
209
+ try:
210
+ return self.replaceWithCompileTimeValue(trace_collection)
211
+ finally:
212
+ self.attempted = True
213
+
214
+ @abstractmethod
215
+ def replaceWithCompileTimeValue(self, trace_collection):
216
+ pass
217
+
218
+ @staticmethod
219
+ def mayRaiseExceptionOperation():
220
+ return True
221
+
222
+
101
223
  class ExpressionCtypesCdllRef(ExpressionImportModuleNameHardExistsSpecificBase):
102
224
  """Function reference ctypes.CDLL"""
103
225
 
@@ -190,8 +312,7 @@ class ExpressionCtypesCdllSince38CallBase(
190
312
 
191
313
  ExpressionBase.__init__(self, source_ref)
192
314
 
193
- # In module mode, we expect a changing environment, cannot optimize this
194
- self.attempted = shallMakeModule()
315
+ self.attempted = False
195
316
 
196
317
  def computeExpression(self, trace_collection):
197
318
  if self.attempted or not ctypes_cdll_since_38_spec.isCompileTimeComputable(
@@ -257,8 +378,7 @@ class ExpressionCtypesCdllBefore38CallBase(
257
378
 
258
379
  ExpressionBase.__init__(self, source_ref)
259
380
 
260
- # In module mode, we expect a changing environment, cannot optimize this
261
- self.attempted = shallMakeModule()
381
+ self.attempted = False
262
382
 
263
383
  def computeExpression(self, trace_collection):
264
384
  if self.attempted or not ctypes_cdll_before_38_spec.isCompileTimeComputable(
@@ -725,8 +845,7 @@ class ExpressionImportlibMetadataDistributionCallBase(
725
845
 
726
846
  ExpressionBase.__init__(self, source_ref)
727
847
 
728
- # In module mode, we expect a changing environment, cannot optimize this
729
- self.attempted = shallMakeModule()
848
+ self.attempted = False
730
849
 
731
850
  def computeExpression(self, trace_collection):
732
851
  if (
@@ -838,8 +957,7 @@ class ExpressionImportlibMetadataEntryPointsSince310CallBase(
838
957
 
839
958
  ExpressionBase.__init__(self, source_ref)
840
959
 
841
- # In module mode, we expect a changing environment, cannot optimize this
842
- self.attempted = shallMakeModule()
960
+ self.attempted = False
843
961
 
844
962
  def computeExpression(self, trace_collection):
845
963
  if (
@@ -883,8 +1001,7 @@ class ExpressionImportlibMetadataEntryPointsBefore310CallBase(
883
1001
  def __init__(self, source_ref):
884
1002
  ExpressionBase.__init__(self, source_ref)
885
1003
 
886
- # In module mode, we expect a changing environment, cannot optimize this
887
- self.attempted = shallMakeModule()
1004
+ self.attempted = False
888
1005
 
889
1006
  def finalize(self):
890
1007
  del self.parent
@@ -974,8 +1091,7 @@ class ExpressionImportlibMetadataMetadataCallBase(
974
1091
 
975
1092
  ExpressionBase.__init__(self, source_ref)
976
1093
 
977
- # In module mode, we expect a changing environment, cannot optimize this
978
- self.attempted = shallMakeModule()
1094
+ self.attempted = False
979
1095
 
980
1096
  def computeExpression(self, trace_collection):
981
1097
  if (
@@ -1067,8 +1183,7 @@ class ExpressionImportlibMetadataVersionCallBase(
1067
1183
 
1068
1184
  ExpressionBase.__init__(self, source_ref)
1069
1185
 
1070
- # In module mode, we expect a changing environment, cannot optimize this
1071
- self.attempted = shallMakeModule()
1186
+ self.attempted = False
1072
1187
 
1073
1188
  def computeExpression(self, trace_collection):
1074
1189
  if (
@@ -1459,8 +1574,7 @@ class ExpressionImportlibResourcesFilesCallBase(
1459
1574
 
1460
1575
  ExpressionBase.__init__(self, source_ref)
1461
1576
 
1462
- # In module mode, we expect a changing environment, cannot optimize this
1463
- self.attempted = shallMakeModule()
1577
+ self.attempted = False
1464
1578
 
1465
1579
  def computeExpression(self, trace_collection):
1466
1580
  if (
@@ -1556,8 +1670,7 @@ class ExpressionImportlibResourcesReadBinaryCallBase(
1556
1670
 
1557
1671
  ExpressionBase.__init__(self, source_ref)
1558
1672
 
1559
- # In module mode, we expect a changing environment, cannot optimize this
1560
- self.attempted = shallMakeModule()
1673
+ self.attempted = False
1561
1674
 
1562
1675
  def computeExpression(self, trace_collection):
1563
1676
  if (
@@ -1662,8 +1775,7 @@ class ExpressionImportlibResourcesReadTextCallBase(
1662
1775
 
1663
1776
  ExpressionBase.__init__(self, source_ref)
1664
1777
 
1665
- # In module mode, we expect a changing environment, cannot optimize this
1666
- self.attempted = shallMakeModule()
1778
+ self.attempted = False
1667
1779
 
1668
1780
  def computeExpression(self, trace_collection):
1669
1781
  if (
@@ -1752,8 +1864,7 @@ class ExpressionOsListdirCallBase(ChildHavingPathOptionalMixin, ExpressionBase):
1752
1864
 
1753
1865
  ExpressionBase.__init__(self, source_ref)
1754
1866
 
1755
- # In module mode, we expect a changing environment, cannot optimize this
1756
- self.attempted = shallMakeModule()
1867
+ self.attempted = False
1757
1868
 
1758
1869
  def computeExpression(self, trace_collection):
1759
1870
  if self.attempted or not os_listdir_spec.isCompileTimeComputable(
@@ -1834,8 +1945,7 @@ class ExpressionOsPathAbspathCallBase(ChildHavingPathMixin, ExpressionBase):
1834
1945
 
1835
1946
  ExpressionBase.__init__(self, source_ref)
1836
1947
 
1837
- # In module mode, we expect a changing environment, cannot optimize this
1838
- self.attempted = shallMakeModule()
1948
+ self.attempted = False
1839
1949
 
1840
1950
  def computeExpression(self, trace_collection):
1841
1951
  if self.attempted or not os_path_abspath_spec.isCompileTimeComputable(
@@ -1916,8 +2026,7 @@ class ExpressionOsPathBasenameCallBase(ChildHavingPMixin, ExpressionBase):
1916
2026
 
1917
2027
  ExpressionBase.__init__(self, source_ref)
1918
2028
 
1919
- # In module mode, we expect a changing environment, cannot optimize this
1920
- self.attempted = shallMakeModule()
2029
+ self.attempted = False
1921
2030
 
1922
2031
  def computeExpression(self, trace_collection):
1923
2032
  if self.attempted or not os_path_basename_spec.isCompileTimeComputable(
@@ -1998,8 +2107,7 @@ class ExpressionOsPathExistsCallBase(ChildHavingPathMixin, ExpressionBase):
1998
2107
 
1999
2108
  ExpressionBase.__init__(self, source_ref)
2000
2109
 
2001
- # In module mode, we expect a changing environment, cannot optimize this
2002
- self.attempted = shallMakeModule()
2110
+ self.attempted = False
2003
2111
 
2004
2112
  def computeExpression(self, trace_collection):
2005
2113
  if self.attempted or not os_path_exists_spec.isCompileTimeComputable(
@@ -2082,8 +2190,7 @@ class ExpressionOsPathIsabsCallBase(
2082
2190
 
2083
2191
  ExpressionBase.__init__(self, source_ref)
2084
2192
 
2085
- # In module mode, we expect a changing environment, cannot optimize this
2086
- self.attempted = shallMakeModule()
2193
+ self.attempted = False
2087
2194
 
2088
2195
  def computeExpression(self, trace_collection):
2089
2196
  if self.attempted or not os_path_isabs_spec.isCompileTimeComputable(
@@ -2164,8 +2271,7 @@ class ExpressionOsPathIsdirCallBase(ChildHavingPathMixin, ExpressionBase):
2164
2271
 
2165
2272
  ExpressionBase.__init__(self, source_ref)
2166
2273
 
2167
- # In module mode, we expect a changing environment, cannot optimize this
2168
- self.attempted = shallMakeModule()
2274
+ self.attempted = False
2169
2275
 
2170
2276
  def computeExpression(self, trace_collection):
2171
2277
  if self.attempted or not os_path_isdir_spec.isCompileTimeComputable(
@@ -2246,8 +2352,7 @@ class ExpressionOsPathIsfileCallBase(ChildHavingPathMixin, ExpressionBase):
2246
2352
 
2247
2353
  ExpressionBase.__init__(self, source_ref)
2248
2354
 
2249
- # In module mode, we expect a changing environment, cannot optimize this
2250
- self.attempted = shallMakeModule()
2355
+ self.attempted = False
2251
2356
 
2252
2357
  def computeExpression(self, trace_collection):
2253
2358
  if self.attempted or not os_path_isfile_spec.isCompileTimeComputable(
@@ -2321,8 +2426,7 @@ class ExpressionOsUnameCallBase(ExpressionBase):
2321
2426
  def __init__(self, source_ref):
2322
2427
  ExpressionBase.__init__(self, source_ref)
2323
2428
 
2324
- # In module mode, we expect a changing environment, cannot optimize this
2325
- self.attempted = shallMakeModule()
2429
+ self.attempted = False
2326
2430
 
2327
2431
  def finalize(self):
2328
2432
  del self.parent
@@ -2889,8 +2993,7 @@ class ExpressionPkgutilGetDataCallBase(
2889
2993
 
2890
2994
  ExpressionBase.__init__(self, source_ref)
2891
2995
 
2892
- # In module mode, we expect a changing environment, cannot optimize this
2893
- self.attempted = shallMakeModule()
2996
+ self.attempted = False
2894
2997
 
2895
2998
  def computeExpression(self, trace_collection):
2896
2999
  if self.attempted or not pkgutil_get_data_spec.isCompileTimeComputable(
@@ -33,9 +33,6 @@ class ExpressionImportHardBase(ExpressionBase):
33
33
 
34
34
  self.module_name = ModuleName(module_name)
35
35
 
36
- self.finding = None
37
- self.module_filename = None
38
-
39
36
  (
40
37
  _module_name,
41
38
  self.module_filename,
@@ -86,11 +83,6 @@ class ExpressionImportModuleNameHardBase(ExpressionImportHardBase):
86
83
  "module_guaranteed": self.module_guaranteed,
87
84
  }
88
85
 
89
- # Derived ones have the same interface.
90
- @staticmethod
91
- def isExpressionImportModuleNameHard():
92
- return True
93
-
94
86
  @staticmethod
95
87
  def hasVeryTrustedValue():
96
88
  return True