Nuitka-winsvc 2.4.8__cp311-cp311-win_amd64.whl → 2.5.1__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Nuitka-winsvc might be problematic. Click here for more details.

Files changed (294) hide show
  1. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/METADATA +2 -1
  2. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/RECORD +294 -271
  3. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/WHEEL +1 -1
  4. nuitka/Builtins.py +31 -0
  5. nuitka/HardImportRegistry.py +8 -0
  6. nuitka/MainControl.py +9 -4
  7. nuitka/OptionParsing.py +105 -52
  8. nuitka/Options.py +73 -16
  9. nuitka/OutputDirectories.py +7 -2
  10. nuitka/PostProcessing.py +69 -38
  11. nuitka/Progress.py +16 -1
  12. nuitka/PythonVersions.py +2 -1
  13. nuitka/Serialization.py +4 -2
  14. nuitka/Tracing.py +69 -1
  15. nuitka/Version.py +2 -2
  16. nuitka/build/Backend.scons +45 -5
  17. nuitka/build/CCompilerVersion.scons +6 -0
  18. nuitka/build/Onefile.scons +6 -0
  19. nuitka/build/SconsCaching.py +12 -2
  20. nuitka/build/SconsCompilerSettings.py +17 -6
  21. nuitka/build/SconsInterface.py +1 -0
  22. nuitka/build/SconsUtils.py +5 -0
  23. nuitka/build/include/nuitka/allocator.h +124 -1
  24. nuitka/build/include/nuitka/calling.h +6 -6
  25. nuitka/build/include/nuitka/compiled_asyncgen.h +10 -7
  26. nuitka/build/include/nuitka/compiled_frame.h +2 -1
  27. nuitka/build/include/nuitka/constants.h +6 -0
  28. nuitka/build/include/nuitka/debug_settings.h +60 -0
  29. nuitka/build/include/nuitka/exceptions.h +264 -121
  30. nuitka/build/include/nuitka/helper/attributes.h +0 -4
  31. nuitka/build/include/nuitka/helper/calling_generated.h +52 -52
  32. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
  33. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
  34. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
  35. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
  36. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
  37. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
  38. nuitka/build/include/nuitka/helper/dictionaries.h +65 -29
  39. nuitka/build/include/nuitka/helper/ints.h +86 -37
  40. nuitka/build/include/nuitka/helper/iterators.h +82 -34
  41. nuitka/build/include/nuitka/helper/operations.h +3 -0
  42. nuitka/build/include/nuitka/helper/operations_binary_add.h +6 -0
  43. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
  44. nuitka/build/include/nuitka/helper/operations_binary_sub.h +6 -0
  45. nuitka/build/include/nuitka/helper/operations_inplace_add.h +3 -0
  46. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +3 -0
  47. nuitka/build/include/nuitka/helper/raising.h +47 -28
  48. nuitka/build/include/nuitka/helper/richcomparisons.h +7 -0
  49. nuitka/build/include/nuitka/helpers.h +12 -2
  50. nuitka/build/include/nuitka/prelude.h +35 -25
  51. nuitka/build/include/nuitka/printing.h +9 -7
  52. nuitka/build/include/nuitka/threading.h +15 -1
  53. nuitka/build/include/nuitka/type_aliases.h +3 -0
  54. nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
  55. nuitka/build/inline_copy/stubgen/six.py +998 -0
  56. nuitka/build/inline_copy/stubgen/stubgen.py +307 -0
  57. nuitka/build/static_src/CompiledAsyncgenType.c +45 -39
  58. nuitka/build/static_src/CompiledCellType.c +6 -4
  59. nuitka/build/static_src/CompiledCodeHelpers.c +104 -40
  60. nuitka/build/static_src/CompiledCoroutineType.c +40 -30
  61. nuitka/build/static_src/CompiledFrameType.c +110 -79
  62. nuitka/build/static_src/CompiledFunctionType.c +173 -151
  63. nuitka/build/static_src/CompiledGeneratorType.c +51 -49
  64. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +424 -46
  65. nuitka/build/static_src/CompiledMethodType.c +10 -13
  66. nuitka/build/static_src/HelpersAllocator.c +270 -32
  67. nuitka/build/static_src/HelpersAttributes.c +0 -21
  68. nuitka/build/static_src/HelpersBuiltin.c +22 -13
  69. nuitka/build/static_src/HelpersCalling.c +7 -7
  70. nuitka/build/static_src/HelpersCallingGenerated.c +70 -70
  71. nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
  72. nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
  73. nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
  74. nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
  75. nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
  76. nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
  77. nuitka/build/static_src/HelpersComparisonEq.c +18 -4
  78. nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -0
  79. nuitka/build/static_src/HelpersComparisonGe.c +18 -4
  80. nuitka/build/static_src/HelpersComparisonGt.c +18 -4
  81. nuitka/build/static_src/HelpersComparisonLe.c +18 -4
  82. nuitka/build/static_src/HelpersComparisonLt.c +18 -4
  83. nuitka/build/static_src/HelpersComparisonNe.c +18 -4
  84. nuitka/build/static_src/HelpersConsole.c +34 -8
  85. nuitka/build/static_src/HelpersConstantsBlob.c +10 -4
  86. nuitka/build/static_src/HelpersDictionaries.c +181 -34
  87. nuitka/build/static_src/HelpersDictionariesGenerated.c +0 -106
  88. nuitka/build/static_src/HelpersExceptions.c +24 -50
  89. nuitka/build/static_src/HelpersFiles.c +79 -5
  90. nuitka/build/static_src/HelpersImport.c +13 -9
  91. nuitka/build/static_src/HelpersImportHard.c +23 -46
  92. nuitka/build/static_src/HelpersLists.c +98 -9
  93. nuitka/build/static_src/HelpersMatching.c +1 -1
  94. nuitka/build/static_src/HelpersOperationBinaryAdd.c +224 -6
  95. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +3 -0
  96. nuitka/build/static_src/HelpersOperationBinaryBitand.c +5 -5
  97. nuitka/build/static_src/HelpersOperationBinaryBitor.c +5 -5
  98. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +5 -5
  99. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +8 -2
  100. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
  101. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +14 -8
  102. nuitka/build/static_src/HelpersOperationBinaryLshift.c +36 -36
  103. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -0
  104. nuitka/build/static_src/HelpersOperationBinaryMod.c +22 -10
  105. nuitka/build/static_src/HelpersOperationBinaryMult.c +17 -7
  106. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +14 -8
  107. nuitka/build/static_src/HelpersOperationBinaryPow.c +24 -24
  108. nuitka/build/static_src/HelpersOperationBinaryRshift.c +4 -4
  109. nuitka/build/static_src/HelpersOperationBinarySub.c +229 -8
  110. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +8 -2
  111. nuitka/build/static_src/HelpersOperationInplaceAdd.c +162 -10
  112. nuitka/build/static_src/HelpersOperationInplaceBitand.c +5 -5
  113. nuitka/build/static_src/HelpersOperationInplaceBitor.c +5 -5
  114. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +5 -5
  115. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +11 -6
  116. nuitka/build/static_src/HelpersOperationInplaceLshift.c +20 -20
  117. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -0
  118. nuitka/build/static_src/HelpersOperationInplaceMod.c +11 -6
  119. nuitka/build/static_src/HelpersOperationInplaceMult.c +11 -6
  120. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +11 -6
  121. nuitka/build/static_src/HelpersOperationInplacePow.c +20 -20
  122. nuitka/build/static_src/HelpersOperationInplaceRshift.c +4 -4
  123. nuitka/build/static_src/HelpersOperationInplaceSub.c +163 -10
  124. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +6 -1
  125. nuitka/build/static_src/HelpersProfiling.c +1 -1
  126. nuitka/build/static_src/HelpersRaising.c +255 -310
  127. nuitka/build/static_src/HelpersStrings.c +1 -1
  128. nuitka/build/static_src/HelpersTuples.c +1 -1
  129. nuitka/build/static_src/HelpersTypes.c +98 -2
  130. nuitka/build/static_src/MainProgram.c +117 -29
  131. nuitka/build/static_src/MetaPathBasedLoader.c +18 -19
  132. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +134 -11
  133. nuitka/build/static_src/OnefileBootstrap.c +6 -1
  134. nuitka/code_generation/AsyncgenCodes.py +2 -6
  135. nuitka/code_generation/BinaryOperationHelperDefinitions.py +269 -167
  136. nuitka/code_generation/BuiltinCodes.py +9 -1
  137. nuitka/code_generation/CallCodes.py +16 -16
  138. nuitka/code_generation/CodeGeneration.py +14 -2
  139. nuitka/code_generation/CodeHelperSelection.py +1 -1
  140. nuitka/code_generation/CodeHelpers.py +4 -1
  141. nuitka/code_generation/CodeObjectCodes.py +2 -2
  142. nuitka/code_generation/ComparisonCodes.py +13 -2
  143. nuitka/code_generation/ComparisonHelperDefinitions.py +23 -8
  144. nuitka/code_generation/Contexts.py +28 -16
  145. nuitka/code_generation/CoroutineCodes.py +2 -6
  146. nuitka/code_generation/DictCodes.py +3 -3
  147. nuitka/code_generation/ErrorCodes.py +34 -50
  148. nuitka/code_generation/ExceptionCodes.py +165 -96
  149. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +25 -10
  150. nuitka/code_generation/FrameCodes.py +4 -11
  151. nuitka/code_generation/FunctionCodes.py +2 -6
  152. nuitka/code_generation/GeneratorCodes.py +2 -6
  153. nuitka/code_generation/GlobalConstants.py +8 -2
  154. nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
  155. nuitka/code_generation/IteratorCodes.py +67 -54
  156. nuitka/code_generation/LineNumberCodes.py +1 -3
  157. nuitka/code_generation/ModuleCodes.py +28 -4
  158. nuitka/code_generation/OperationCodes.py +51 -20
  159. nuitka/code_generation/PackageResourceCodes.py +37 -0
  160. nuitka/code_generation/RaisingCodes.py +164 -90
  161. nuitka/code_generation/Reports.py +13 -5
  162. nuitka/code_generation/ReturnCodes.py +2 -16
  163. nuitka/code_generation/TryCodes.py +12 -24
  164. nuitka/code_generation/TypeAliasCodes.py +48 -0
  165. nuitka/code_generation/VariableCodes.py +99 -40
  166. nuitka/code_generation/VariableDeclarations.py +8 -8
  167. nuitka/code_generation/YieldCodes.py +1 -1
  168. nuitka/code_generation/c_types/CTypeBases.py +10 -2
  169. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +3 -0
  170. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +3 -4
  171. nuitka/code_generation/c_types/CTypeNuitkaInts.py +70 -25
  172. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
  173. nuitka/code_generation/c_types/CTypePyObjectPointers.py +16 -6
  174. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +2 -2
  175. nuitka/code_generation/templates/CodeTemplatesConstants.py +11 -3
  176. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +2 -2
  177. nuitka/code_generation/templates/CodeTemplatesExceptions.py +15 -16
  178. nuitka/code_generation/templates/CodeTemplatesFrames.py +18 -10
  179. nuitka/code_generation/templates/CodeTemplatesFunction.py +2 -2
  180. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +2 -2
  181. nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -35
  182. nuitka/code_generation/templates/CodeTemplatesModules.py +34 -4
  183. nuitka/code_generation/templates/CodeTemplatesVariables.py +73 -0
  184. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +3 -3
  185. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +3 -3
  186. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +0 -105
  187. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -2
  188. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
  189. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
  190. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +9 -9
  191. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
  192. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
  193. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
  194. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +9 -9
  195. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +7 -7
  196. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +9 -9
  197. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
  198. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -4
  199. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
  200. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +31 -31
  201. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
  202. nuitka/containers/Namedtuples.py +6 -0
  203. nuitka/containers/OrderedSets.py +105 -5
  204. nuitka/distutils/Build.py +14 -0
  205. nuitka/distutils/DistutilCommands.py +50 -10
  206. nuitka/finalizations/Finalization.py +3 -3
  207. nuitka/finalizations/FinalizeMarkups.py +10 -14
  208. nuitka/freezer/DependsExe.py +13 -3
  209. nuitka/freezer/DllDependenciesMacOS.py +18 -1
  210. nuitka/freezer/DllDependenciesWin32.py +26 -12
  211. nuitka/freezer/ImportDetection.py +3 -0
  212. nuitka/freezer/IncludedDataFiles.py +31 -8
  213. nuitka/freezer/IncludedEntryPoints.py +3 -2
  214. nuitka/freezer/Standalone.py +76 -18
  215. nuitka/importing/Importing.py +33 -6
  216. nuitka/importing/Recursion.py +12 -1
  217. nuitka/importing/StandardLibrary.py +57 -59
  218. nuitka/nodes/AsyncgenNodes.py +3 -6
  219. nuitka/nodes/BuiltinIteratorNodes.py +1 -1
  220. nuitka/nodes/BuiltinRefNodes.py +14 -30
  221. nuitka/nodes/ChildrenHavingMixins.py +439 -46
  222. nuitka/nodes/ConditionalNodes.py +3 -2
  223. nuitka/nodes/CoroutineNodes.py +3 -6
  224. nuitka/nodes/ExceptionNodes.py +102 -26
  225. nuitka/nodes/ExpressionBasesGenerated.py +288 -4
  226. nuitka/nodes/FrameNodes.py +22 -11
  227. nuitka/nodes/FunctionNodes.py +3 -3
  228. nuitka/nodes/GeneratorNodes.py +3 -6
  229. nuitka/nodes/HardImportNodesGenerated.py +182 -0
  230. nuitka/nodes/ImportNodes.py +2 -2
  231. nuitka/nodes/NodeBases.py +28 -1
  232. nuitka/nodes/NodeMakingHelpers.py +71 -50
  233. nuitka/nodes/OperatorNodesUnary.py +128 -3
  234. nuitka/nodes/OsSysNodes.py +37 -6
  235. nuitka/nodes/OutlineNodes.py +2 -2
  236. nuitka/nodes/StatementBasesGenerated.py +0 -2
  237. nuitka/nodes/StatementNodes.py +8 -7
  238. nuitka/nodes/SubscriptNodes.py +1 -1
  239. nuitka/nodes/TypeNodes.py +28 -1
  240. nuitka/nodes/shapes/BuiltinTypeShapes.py +24 -7
  241. nuitka/nodes/shapes/ShapeMixins.py +17 -0
  242. nuitka/nodes/shapes/StandardShapes.py +53 -1
  243. nuitka/optimizations/BytecodeDemotion.py +2 -1
  244. nuitka/plugins/PluginBase.py +64 -22
  245. nuitka/plugins/Plugins.py +6 -3
  246. nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
  247. nuitka/plugins/standard/ImplicitImports.py +1 -13
  248. nuitka/plugins/standard/KivyPlugin.py +3 -12
  249. nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
  250. nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
  251. nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
  252. nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
  253. nuitka/plugins/standard/TkinterPlugin.py +0 -56
  254. nuitka/plugins/standard/TransformersPlugin.py +70 -275
  255. nuitka/plugins/standard/standard.nuitka-package.config.yml +510 -28
  256. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +35 -2
  257. nuitka/reports/CompilationReportReader.py +12 -0
  258. nuitka/reports/Reports.py +11 -0
  259. nuitka/specs/BuiltinParameterSpecs.py +5 -1
  260. nuitka/specs/HardImportSpecs.py +7 -0
  261. nuitka/specs/ParameterSpecs.py +4 -4
  262. nuitka/tools/general/dll_report/__main__.py +10 -1
  263. nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
  264. nuitka/tools/specialize/CTypeDescriptions.py +158 -9
  265. nuitka/tools/specialize/SpecializeC.py +218 -56
  266. nuitka/tools/testing/Common.py +70 -63
  267. nuitka/tools/testing/compare_with_cpython/__main__.py +3 -1
  268. nuitka/tools/testing/measure_construct_performance/__main__.py +1 -8
  269. nuitka/tools/testing/run_nuitka_tests/__main__.py +77 -11
  270. nuitka/tools/watch/AutoStage.py +1 -0
  271. nuitka/tree/Building.py +10 -37
  272. nuitka/tree/ComplexCallHelperFunctions.py +4 -0
  273. nuitka/tree/ReformulationAssertStatements.py +31 -14
  274. nuitka/tree/ReformulationAssignmentStatements.py +5 -1
  275. nuitka/tree/ReformulationClasses3.py +94 -19
  276. nuitka/tree/ReformulationDictionaryCreation.py +1 -0
  277. nuitka/tree/ReformulationFunctionStatements.py +1 -1
  278. nuitka/tree/ReformulationMatchStatements.py +3 -1
  279. nuitka/tree/ReformulationYieldExpressions.py +23 -5
  280. nuitka/utils/CommandLineOptions.py +27 -3
  281. nuitka/utils/Download.py +2 -2
  282. nuitka/utils/Execution.py +36 -31
  283. nuitka/utils/FileOperations.py +39 -54
  284. nuitka/utils/Importing.py +2 -14
  285. nuitka/utils/InlineCopies.py +52 -0
  286. nuitka/utils/InstalledPythons.py +9 -4
  287. nuitka/utils/Json.py +2 -2
  288. nuitka/utils/PackageResources.py +44 -0
  289. nuitka/utils/Utils.py +17 -0
  290. {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka-run.cmd +0 -0
  291. {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka.cmd +0 -0
  292. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/LICENSE.txt +0 -0
  293. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/entry_points.txt +0 -0
  294. {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/top_level.txt +0 -0
@@ -252,6 +252,30 @@
252
252
  change_function:
253
253
  '_main': "'(lambda: None)'"
254
254
 
255
+ - module-name: 'multiprocessing' # checksum: 96475306
256
+ anti-bloat:
257
+ - description: "workaround for 'sys.frozen' not being set"
258
+ replacements_plain:
259
+ "getattr(sys, 'frozen', False)": 'True'
260
+
261
+ - module-name: 'multiprocessing.context' # checksum: 96475306
262
+ anti-bloat:
263
+ - description: "workaround for 'sys.frozen' not being set"
264
+ replacements_plain:
265
+ "getattr(sys, 'frozen', False)": 'True'
266
+
267
+ - module-name: 'multiprocessing.forking' # checksum: 96475306
268
+ anti-bloat:
269
+ - description: "workaround for 'sys.frozen' not being set"
270
+ replacements_plain:
271
+ "getattr(sys, 'frozen', False)": 'True'
272
+
273
+ - module-name: 'multiprocessing.popen_spawn_win32' # checksum: 96475306
274
+ anti-bloat:
275
+ - description: "workaround for 'sys.frozen' not being set"
276
+ replacements_plain:
277
+ "getattr(sys, 'frozen', False)": 'True'
278
+
255
279
  - module-name: 'multiprocessing.resource_tracker' # checksum: e8bba98a
256
280
  anti-bloat:
257
281
  - description: "workaround for starting 'multiprocessing resource tracker"
@@ -259,6 +283,12 @@
259
283
  "args += ['-c', cmd % r]": "args += ['--multiprocessing-resource-tracker', str(r)]"
260
284
  when: 'not module_mode'
261
285
 
286
+ - module-name: 'multiprocessing.spawn' # checksum: 96475306
287
+ anti-bloat:
288
+ - description: "workaround for 'sys.frozen' not being set"
289
+ replacements_plain:
290
+ "getattr(sys, 'frozen', False)": 'True'
291
+
262
292
  - module-name: 'opcode' # checksum: bef1771d
263
293
  implicit-imports:
264
294
  # Overcome default non-inclusion of this module, required now
@@ -410,10 +440,13 @@
410
440
  - depends:
411
441
  - 'xml.sax.expatreader'
412
442
 
413
- - module-name: 'xmlrpc.server' # checksum: 105ff40e
443
+ - module-name: 'xmlrpc.server' # checksum: 57da2566
414
444
  anti-bloat:
415
- - replacements_plain:
445
+ - description: 'avoid using pydoc'
446
+ replacements_plain:
416
447
  'import pydoc': ''
448
+ change_class:
449
+ 'ServerHTMLDoc': 'un-usable'
417
450
  when: 'not use_pydoc'
418
451
 
419
452
  - module-name: 'zipapp' # checksum: 6a44b57d
@@ -51,6 +51,18 @@ def getCompilationOutputBinary(compilation_report, prefixes):
51
51
  )
52
52
 
53
53
 
54
+ def getEmbeddedDataFilenames(compilation_report):
55
+ result = []
56
+
57
+ for datafile_node in compilation_report.findall("data_file"):
58
+ if "embed-run-time" in datafile_node.attrib["tags"].split(
59
+ ","
60
+ ) or "embed-compile-time" in datafile_node.attrib["tags"].split(","):
61
+ result.append(datafile_node.attrib["name"])
62
+
63
+ return result
64
+
65
+
54
66
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
55
67
  # integrates with CPython, but also works on its own.
56
68
  #
nuitka/reports/Reports.py CHANGED
@@ -20,6 +20,7 @@ from nuitka.code_generation.ConstantCodes import getDistributionMetadataValues
20
20
  from nuitka.containers.OrderedSets import OrderedSet
21
21
  from nuitka.freezer.IncludedDataFiles import getIncludedDataFiles
22
22
  from nuitka.freezer.IncludedEntryPoints import getStandaloneEntryPoints
23
+ from nuitka.freezer.Standalone import getRemovedUsedDllsInfo
23
24
  from nuitka.importing.Importing import getPackageSearchPath
24
25
  from nuitka.importing.Recursion import getRecursionDecisions
25
26
  from nuitka.ModuleRegistry import (
@@ -640,6 +641,16 @@ def writeCompilationReport(report_filename, report_input_data, diffable):
640
641
  # TODO: No reason yet.
641
642
  )
642
643
 
644
+ for standalone_entry_point, (reason, removed_dll_paths) in getRemovedUsedDllsInfo():
645
+ for removed_dll_path in removed_dll_paths:
646
+ TreeXML.appendTreeElement(
647
+ root,
648
+ "excluded_dll",
649
+ name=_getCompilationReportPath(removed_dll_path),
650
+ used_by=standalone_entry_point.dest_path,
651
+ reason=reason,
652
+ )
653
+
643
654
  if not diffable:
644
655
  data_composer_values = getDataComposerReportValues()
645
656
 
@@ -240,6 +240,10 @@ def makeBuiltinExceptionParameterSpec(exception_name):
240
240
  return BuiltinParameterSpecExceptionsKwOnly(
241
241
  exception_name=exception_name, kw_only_args=("name", "path")
242
242
  )
243
+ elif exception_name == "AttributeError" and python_version >= 0x3A0:
244
+ return BuiltinParameterSpecExceptionsKwOnly(
245
+ exception_name=exception_name, kw_only_args=("name", "obj")
246
+ )
243
247
  else:
244
248
  return BuiltinParameterSpecExceptions(exception_name=exception_name)
245
249
 
@@ -461,7 +465,7 @@ builtin_issubclass_spec = BuiltinParameterSpecNoKeywords(
461
465
 
462
466
  class BuiltinBytearraySpec(BuiltinParameterSpecPosArgs):
463
467
  def isCompileTimeComputable(self, values):
464
- # For bytearrays, we need to avoid the case of large bytearray
468
+ # For bytearray objects, we need to avoid the case of large bytearray
465
469
  # construction from an integer at compile time.
466
470
 
467
471
  result = BuiltinParameterSpec.isCompileTimeComputable(self, values=values)
@@ -143,6 +143,13 @@ os_path_isabs_spec = BuiltinParameterSpec(
143
143
 
144
144
  os_listdir_spec = BuiltinParameterSpec("os.listdir", ("path",), default_count=1)
145
145
 
146
+ os_stat_spec = BuiltinParameterSpec(
147
+ "os.stat", ("path",), kw_only_args=("dir_fd", "follow_symlinks"), default_count=2
148
+ )
149
+ os_lstat_spec = BuiltinParameterSpec(
150
+ "os.lstat", ("path",), kw_only_args=("dir_fd",), default_count=1
151
+ )
152
+
146
153
  ctypes_cdll_since_38_spec = BuiltinParameterSpec(
147
154
  "ctypes.CDLL",
148
155
  (
@@ -350,9 +350,9 @@ def matchCall(
350
350
  assigned_tuple_params.append(arg)
351
351
  value = iter(value.getIterationValues())
352
352
 
353
- for i, subarg in enumerate(arg):
353
+ for i, sub_arg in enumerate(arg):
354
354
  try:
355
- subvalue = next(value)
355
+ sub_value = next(value)
356
356
  except StopIteration:
357
357
  raise TooManyArguments(
358
358
  ValueError(
@@ -362,7 +362,7 @@ def matchCall(
362
362
  )
363
363
 
364
364
  # Recurse into tuple argument values, could be more tuples.
365
- assign(subarg, subvalue)
365
+ assign(sub_arg, sub_value)
366
366
 
367
367
  # Check that not too many values we provided.
368
368
  try:
@@ -379,7 +379,7 @@ def matchCall(
379
379
  return arg in assigned_tuple_params
380
380
 
381
381
  num_pos = len(positional)
382
- num_total = num_pos + len(pairs)
382
+ num_total = num_pos + len([p for p in pairs if p[0] not in kw_only_args])
383
383
  num_args = len(args)
384
384
 
385
385
  for arg, value in zip(args, positional):
@@ -20,7 +20,15 @@ from nuitka.utils.Timing import TimerReport
20
20
  def main():
21
21
  parser = OptionParser()
22
22
 
23
- _options, positional_args = parser.parse_args()
23
+ parser.add_option(
24
+ "--no-use-path",
25
+ action="store_false",
26
+ dest="use_path",
27
+ default=True,
28
+ help="""Do NOT use PATH to locate DLL dependencies.""",
29
+ )
30
+
31
+ options, positional_args = parser.parse_args()
24
32
 
25
33
  if not positional_args:
26
34
  sys.exit("No DLLs given.")
@@ -45,6 +53,7 @@ def main():
45
53
  original_dir=os.path.dirname(filename),
46
54
  binary_filename=filename,
47
55
  package_name=None,
56
+ use_path=options.use_path,
48
57
  use_cache=False,
49
58
  update_cache=False,
50
59
  )
@@ -201,7 +201,7 @@ def _getCacheFilename(binary_filename, low_memory):
201
201
  hash_value.updateFromValues(version_string)
202
202
 
203
203
  # Take zstandard version and compression level into account.
204
- from zstandard import __version__
204
+ from zstandard import __version__ # pylint: disable=I0021,import-error
205
205
 
206
206
  hash_value.updateFromValues(__version__, getCompressorLevel(low_memory))
207
207
 
@@ -9,6 +9,9 @@ import math
9
9
  from abc import abstractmethod
10
10
 
11
11
  from nuitka.__past__ import long
12
+ from nuitka.code_generation.BinaryOperationHelperDefinitions import (
13
+ isCommutativeType,
14
+ )
12
15
  from nuitka.code_generation.Namify import namifyConstant
13
16
  from nuitka.utils.SlotMetaClasses import getMetaClassBase
14
17
 
@@ -562,12 +565,11 @@ return %(return_value)s;""" % {
562
565
  else:
563
566
  return object_desc
564
567
 
565
- def isSimilarOrSameTypesAsOneOf(self, *others):
566
- for other in others:
567
- assert other is not None
568
+ def isSimilarOrSameTypesAsOneOf(self, other):
569
+ assert other is not None
568
570
 
569
- if self is other or other in related_types.get(self, ()):
570
- return True
571
+ if self is other or other in related_types.get(self, ()):
572
+ return True
571
573
 
572
574
  return False
573
575
 
@@ -709,6 +711,10 @@ return %(return_value)s;""" % {
709
711
  return "Py_INCREF(%s); %s = %s;" % (operand, result, operand)
710
712
  else:
711
713
  return "%s = %s;" % (result, operand)
714
+ elif cls.isDualType():
715
+ ref_taking = "Py_INCREF(%s); " if take_ref else ""
716
+
717
+ return "%sSET_NILONG_OBJECT_VALUE(%s, %s);" % (ref_taking, result, operand)
712
718
  else:
713
719
  if take_ref:
714
720
  return """%s = %s; """ % (
@@ -759,7 +765,7 @@ return %(return_value)s;""" % {
759
765
  # Need to not use that, but pick one.
760
766
  assert False
761
767
  elif cls.type_name == "int":
762
- return "%s = PyInt_FromLong(%s);" % (result, operand)
768
+ return "%s = Nuitka_PyInt_FromLong(%s);" % (result, operand)
763
769
  elif cls.type_name == "long":
764
770
  return "%s = Nuitka_LongFromCLong(%s);" % (result, operand)
765
771
  elif cls.type_name == "nbool":
@@ -767,6 +773,8 @@ return %(return_value)s;""" % {
767
773
  result,
768
774
  cls.getToValueFromBoolExpression("%s != 0" % operand),
769
775
  )
776
+ elif cls.type_name == "nilong":
777
+ return "SET_NILONG_C_VALUE(%s, %s);" % (result, operand)
770
778
  else:
771
779
  assert False, cls
772
780
 
@@ -945,6 +953,14 @@ Py_INCREF(%(result)s);""" % {
945
953
  else:
946
954
  assert False, cls.type_name
947
955
 
956
+ @classmethod
957
+ def isDualType(cls):
958
+ return False
959
+
960
+ @classmethod
961
+ def isCommutativeType(cls):
962
+ return isCommutativeType(cls.getHelperCodeName())
963
+
948
964
 
949
965
  class ConcreteTypeBase(TypeDescBase):
950
966
  type_decl = "PyObject *"
@@ -1447,6 +1463,12 @@ class ObjectDesc(TypeDescBase):
1447
1463
  def getNoSequenceSlotAccessTestCode(self, type_name):
1448
1464
  return "%s->tp_as_sequence == NULL" % type_name
1449
1465
 
1466
+ @classmethod
1467
+ def getDualValidityCheckCode(cls, value_choice, operand):
1468
+ # Virtual method, pylint: disable=unused-argument
1469
+ assert value_choice == "C", value_choice
1470
+ return "false"
1471
+
1450
1472
 
1451
1473
  object_desc = ObjectDesc()
1452
1474
 
@@ -1472,6 +1494,25 @@ class ConcreteCTypeBase(TypeDescBase):
1472
1494
  def hasPreferredSlot(right, slot):
1473
1495
  return False
1474
1496
 
1497
+ @classmethod
1498
+ def isDualType(cls):
1499
+ return False
1500
+
1501
+ @classmethod
1502
+ def getDualValidityCheckCode(cls, value_choice, operand):
1503
+ # Virtual method, pylint: disable=unused-argument
1504
+ assert value_choice == "C", value_choice
1505
+ return "true"
1506
+
1507
+ def getDualType(self, value_choice):
1508
+ assert value_choice == "C", value_choice
1509
+ return self
1510
+
1511
+ @classmethod
1512
+ def getDualTypeAccessCode(cls, value_choice, operand):
1513
+ assert value_choice == "C", (value_choice, cls)
1514
+ return operand
1515
+
1475
1516
 
1476
1517
  class CLongDesc(ConcreteCTypeBase):
1477
1518
  type_name = "clong"
@@ -1496,7 +1537,7 @@ class CLongDesc(ConcreteCTypeBase):
1496
1537
 
1497
1538
  @staticmethod
1498
1539
  def getAsObjectValueExpression(operand):
1499
- return "PyLong_FromLong(%s)" % operand
1540
+ return "Nuitka_PyLong_FromLong(%s)" % operand
1500
1541
 
1501
1542
  @staticmethod
1502
1543
  def releaseAsObjectValueStatement(operand):
@@ -1663,6 +1704,108 @@ class NBoolDesc(ConcreteCTypeBase):
1663
1704
  n_bool_desc = NBoolDesc()
1664
1705
 
1665
1706
 
1707
+ class DualTypeBase(ConcreteCTypeBase):
1708
+ @classmethod
1709
+ def getDualValidityCheckCode(cls, value_choice, operand):
1710
+ if value_choice == "C":
1711
+ helper = "IS_%s_C_VALUE_VALID" % cls.type_name.upper()
1712
+ elif value_choice == "Python":
1713
+ helper = "IS_%s_OBJECT_VALUE_VALID" % cls.type_name.upper()
1714
+ else:
1715
+ assert False
1716
+
1717
+ return "%s(%s)" % (helper, operand)
1718
+
1719
+ @classmethod
1720
+ def getDualType(cls, value_choice):
1721
+ if value_choice == "C":
1722
+ return cls.type_dual_types[1]
1723
+ elif value_choice == "Python":
1724
+ return cls.type_dual_types[0]
1725
+ else:
1726
+ assert False
1727
+
1728
+ @classmethod
1729
+ def getDualTypeAccessCode(cls, value_choice, operand):
1730
+ if value_choice == "C":
1731
+ return "%s->c_value" % operand
1732
+ elif value_choice == "Python":
1733
+ return "%s->python_value" % operand
1734
+ else:
1735
+ assert False
1736
+
1737
+ @classmethod
1738
+ def getSetDualValueCode(cls, value_choice, target, value):
1739
+ if value_choice == "C":
1740
+ helper = "SET_%s_C_VALUE" % cls.type_name.upper()
1741
+ elif value_choice == "Python":
1742
+ helper = "SET_%s_OBJECT_VALUE" % cls.type_name.upper()
1743
+ else:
1744
+ assert False
1745
+
1746
+ return "%s(%s, %s);" % (helper, target, value)
1747
+
1748
+ @classmethod
1749
+ def isDualType(cls):
1750
+ return True
1751
+
1752
+ @classmethod
1753
+ def getDualTypeEnsurePythonObjectCode(cls, operand):
1754
+ return "ENFORCE_%s_OBJECT_VALUE(%s);" % (cls.type_name.upper(), operand)
1755
+
1756
+
1757
+ class NILongDesc(DualTypeBase):
1758
+ type_name = "nilong"
1759
+ type_desc = "Nuitka int/long/C long value"
1760
+ type_decl = "nuitka_ilong *"
1761
+
1762
+ type_dual_types = long_desc, c_long_desc
1763
+
1764
+ @classmethod
1765
+ def getCheckValueCode(cls, operand):
1766
+ return "CHECK_NILONG_OBJECT(%s);" % operand
1767
+
1768
+ @classmethod
1769
+ def getTypeValueExpression(cls, operand):
1770
+ assert False
1771
+ return "NULL"
1772
+
1773
+ @classmethod
1774
+ def getNewStyleNumberTypeCheckExpression(cls, operand):
1775
+ return "0"
1776
+
1777
+ @staticmethod
1778
+ def getAsLongValueExpression(operand):
1779
+ return "GET_NILONG_C_VALUE(%s)" % operand
1780
+
1781
+ @staticmethod
1782
+ def getAsObjectValueExpression(operand):
1783
+ return "GET_NILONG_OBJECT_VALUE(%s)" % operand
1784
+
1785
+ @staticmethod
1786
+ def getToValueFromBoolExpression(operand):
1787
+ assert False
1788
+ return "%s ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE" % operand
1789
+
1790
+ @classmethod
1791
+ def getToValueFromObjectExpression(cls, operand):
1792
+ # TODO: Seems wrong, int return values only happen to match nuitka_bool here
1793
+ return cls.getToValueFromBoolExpression("CHECK_IF_TRUE(%s)" % operand)
1794
+
1795
+ @staticmethod
1796
+ def getTakeReferenceStatement(operand, immortal):
1797
+ assert False
1798
+ return ""
1799
+
1800
+ @staticmethod
1801
+ def getExceptionResultIndicatorValue():
1802
+ assert False
1803
+ return "NUITKA_BOOL_EXCEPTION"
1804
+
1805
+
1806
+ n_ilong_desc = NILongDesc()
1807
+
1808
+
1666
1809
  class NVoidDesc(ConcreteCTypeBase):
1667
1810
  type_name = "nvoid"
1668
1811
  type_desc = "Nuitka C void value"
@@ -1755,12 +1898,18 @@ related_types = {}
1755
1898
 
1756
1899
 
1757
1900
  def _addRelatedTypes(type_desc_1, type_desc_2):
1758
- related_types[type_desc_1] = (type_desc_2,)
1759
- related_types[type_desc_2] = (type_desc_1,)
1901
+ if type_desc_1 not in related_types:
1902
+ related_types[type_desc_1] = set()
1903
+ if type_desc_2 not in related_types:
1904
+ related_types[type_desc_2] = set()
1905
+
1906
+ related_types[type_desc_1].add(type_desc_2)
1907
+ related_types[type_desc_2].add(type_desc_1)
1760
1908
 
1761
1909
 
1762
1910
  _addRelatedTypes(int_desc, c_long_desc)
1763
1911
  _addRelatedTypes(long_desc, c_digit_desc)
1912
+ _addRelatedTypes(long_desc, c_long_desc)
1764
1913
  _addRelatedTypes(float_desc, c_float_desc)
1765
1914
 
1766
1915
  # Part of "Nuitka", an optimizing Python compiler that is compatible and