Nuitka-winsvc 2.2.2__cp311-cp311-win_amd64.whl → 2.3__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.
Files changed (199) hide show
  1. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/RECORD +199 -198
  3. nuitka/Bytecodes.py +4 -2
  4. nuitka/HardImportRegistry.py +1 -0
  5. nuitka/MainControl.py +16 -10
  6. nuitka/ModuleRegistry.py +15 -0
  7. nuitka/OptionParsing.py +30 -8
  8. nuitka/Options.py +104 -44
  9. nuitka/PostProcessing.py +9 -8
  10. nuitka/PythonVersions.py +2 -1
  11. nuitka/Serialization.py +47 -30
  12. nuitka/Version.py +1 -1
  13. nuitka/build/Backend.scons +46 -19
  14. nuitka/build/CCompilerVersion.scons +3 -3
  15. nuitka/build/Onefile.scons +4 -4
  16. nuitka/build/SconsCaching.py +3 -2
  17. nuitka/build/SconsCompilerSettings.py +11 -5
  18. nuitka/build/SconsInterface.py +22 -6
  19. nuitka/build/SconsUtils.py +9 -1
  20. nuitka/build/include/nuitka/allocator.h +58 -2
  21. nuitka/build/include/nuitka/compiled_frame.h +48 -13
  22. nuitka/build/include/nuitka/compiled_function.h +4 -0
  23. nuitka/build/include/nuitka/constants.h +6 -0
  24. nuitka/build/include/nuitka/exception_groups.h +6 -6
  25. nuitka/build/include/nuitka/exceptions.h +3 -3
  26. nuitka/build/include/nuitka/freelists.h +11 -0
  27. nuitka/build/include/nuitka/helper/dictionaries.h +5 -4
  28. nuitka/build/include/nuitka/helper/lists.h +5 -5
  29. nuitka/build/include/nuitka/helper/lists_generated.h +12 -12
  30. nuitka/build/include/nuitka/helper/sequences.h +6 -0
  31. nuitka/build/include/nuitka/helper/slices.h +14 -8
  32. nuitka/build/include/nuitka/helper/subscripts.h +1 -184
  33. nuitka/build/include/nuitka/helper/tuples.h +42 -33
  34. nuitka/build/include/nuitka/importing.h +5 -0
  35. nuitka/build/include/nuitka/prelude.h +35 -2
  36. nuitka/build/include/nuitka/safe_string_ops.h +1 -0
  37. nuitka/build/include/nuitka/threading.h +13 -10
  38. nuitka/build/static_src/CompiledAsyncgenType.c +19 -8
  39. nuitka/build/static_src/CompiledCellType.c +1 -1
  40. nuitka/build/static_src/CompiledCodeHelpers.c +18 -16
  41. nuitka/build/static_src/CompiledCoroutineType.c +23 -19
  42. nuitka/build/static_src/CompiledFrameType.c +46 -34
  43. nuitka/build/static_src/CompiledFunctionType.c +55 -34
  44. nuitka/build/static_src/CompiledGeneratorType.c +21 -19
  45. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +127 -130
  46. nuitka/build/static_src/CompiledMethodType.c +15 -17
  47. nuitka/build/static_src/HelpersAllocator.c +71 -0
  48. nuitka/build/static_src/HelpersAttributes.c +1 -1
  49. nuitka/build/static_src/HelpersBuiltin.c +5 -5
  50. nuitka/build/static_src/HelpersBytes.c +2 -2
  51. nuitka/build/static_src/HelpersCalling.c +3 -0
  52. nuitka/build/static_src/HelpersCallingGenerated.c +131 -131
  53. nuitka/build/static_src/HelpersComparisonEq.c +329 -329
  54. nuitka/build/static_src/HelpersComparisonEqUtils.c +3 -1
  55. nuitka/build/static_src/HelpersComparisonGe.c +322 -322
  56. nuitka/build/static_src/HelpersComparisonGt.c +321 -321
  57. nuitka/build/static_src/HelpersComparisonLe.c +322 -322
  58. nuitka/build/static_src/HelpersComparisonLt.c +321 -321
  59. nuitka/build/static_src/HelpersComparisonNe.c +329 -329
  60. nuitka/build/static_src/HelpersConsole.c +96 -0
  61. nuitka/build/static_src/HelpersConstantsBlob.c +10 -6
  62. nuitka/build/static_src/HelpersDeepcopy.c +10 -8
  63. nuitka/build/static_src/HelpersDictionaries.c +17 -11
  64. nuitka/build/static_src/HelpersDictionariesGenerated.c +65 -29
  65. nuitka/build/static_src/HelpersExceptions.c +107 -9
  66. nuitka/build/static_src/HelpersFilesystemPaths.c +64 -4
  67. nuitka/build/static_src/HelpersFloats.c +20 -14
  68. nuitka/build/static_src/HelpersImport.c +1 -1
  69. nuitka/build/static_src/HelpersJitSources.c +1 -1
  70. nuitka/build/static_src/HelpersLists.c +29 -19
  71. nuitka/build/static_src/HelpersListsGenerated.c +24 -24
  72. nuitka/build/static_src/HelpersMatching.c +32 -5
  73. nuitka/build/static_src/HelpersOperationBinaryAdd.c +90 -63
  74. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +4 -4
  75. nuitka/build/static_src/HelpersOperationBinaryBitand.c +33 -33
  76. nuitka/build/static_src/HelpersOperationBinaryBitor.c +33 -33
  77. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +33 -33
  78. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +24 -24
  79. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +24 -24
  80. nuitka/build/static_src/HelpersOperationBinaryLshift.c +30 -30
  81. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +7 -7
  82. nuitka/build/static_src/HelpersOperationBinaryMod.c +90 -90
  83. nuitka/build/static_src/HelpersOperationBinaryMult.c +64 -58
  84. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +24 -24
  85. nuitka/build/static_src/HelpersOperationBinaryPow.c +27 -27
  86. nuitka/build/static_src/HelpersOperationBinaryRshift.c +30 -30
  87. nuitka/build/static_src/HelpersOperationBinarySub.c +24 -24
  88. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +24 -24
  89. nuitka/build/static_src/HelpersOperationInplaceAdd.c +67 -49
  90. nuitka/build/static_src/HelpersOperationInplaceBitand.c +25 -25
  91. nuitka/build/static_src/HelpersOperationInplaceBitor.c +25 -25
  92. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +25 -25
  93. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +28 -28
  94. nuitka/build/static_src/HelpersOperationInplaceLshift.c +18 -18
  95. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +10 -10
  96. nuitka/build/static_src/HelpersOperationInplaceMod.c +70 -70
  97. nuitka/build/static_src/HelpersOperationInplaceMult.c +33 -33
  98. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +28 -28
  99. nuitka/build/static_src/HelpersOperationInplacePow.c +28 -28
  100. nuitka/build/static_src/HelpersOperationInplaceRshift.c +18 -18
  101. nuitka/build/static_src/HelpersOperationInplaceSub.c +28 -28
  102. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +28 -28
  103. nuitka/build/static_src/HelpersRaising.c +10 -3
  104. nuitka/build/static_src/HelpersSafeStrings.c +14 -4
  105. nuitka/build/static_src/HelpersSlices.c +12 -5
  106. nuitka/build/static_src/HelpersStrings.c +1 -1
  107. nuitka/build/static_src/HelpersTuples.c +20 -15
  108. nuitka/build/static_src/InspectPatcher.c +74 -6
  109. nuitka/build/static_src/MainProgram.c +90 -25
  110. nuitka/build/static_src/MetaPathBasedLoader.c +81 -45
  111. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +2 -2
  112. nuitka/build/static_src/OnefileBootstrap.c +17 -20
  113. nuitka/code_generation/CodeGeneration.py +5 -2
  114. nuitka/code_generation/ConstantCodes.py +2 -2
  115. nuitka/code_generation/DictCodes.py +2 -2
  116. nuitka/code_generation/GlobalConstants.py +5 -0
  117. nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
  118. nuitka/code_generation/ListCodes.py +2 -2
  119. nuitka/code_generation/LocalsDictCodes.py +1 -1
  120. nuitka/code_generation/ModuleCodes.py +19 -0
  121. nuitka/code_generation/PackageResourceCodes.py +14 -0
  122. nuitka/code_generation/SliceCodes.py +3 -3
  123. nuitka/code_generation/SubscriptCodes.py +5 -13
  124. nuitka/code_generation/TupleCodes.py +1 -1
  125. nuitka/code_generation/c_types/CTypePyObjectPointers.py +7 -7
  126. nuitka/code_generation/templates/CodeTemplatesConstants.py +7 -5
  127. nuitka/code_generation/templates/CodeTemplatesLoader.py +2 -0
  128. nuitka/code_generation/templates/CodeTemplatesModules.py +78 -54
  129. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
  130. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +8 -8
  131. nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +5 -5
  132. nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +2 -2
  133. nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +2 -2
  134. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +57 -21
  135. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
  136. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +5 -5
  137. nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +18 -18
  138. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +11 -11
  139. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +3 -3
  140. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +3 -3
  141. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +7 -7
  142. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +3 -3
  143. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +11 -11
  144. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
  145. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +10 -10
  146. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
  147. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +3 -3
  148. nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +4 -1
  149. nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +4 -1
  150. nuitka/finalizations/FinalizeMarkups.py +0 -18
  151. nuitka/freezer/DependsExe.py +9 -4
  152. nuitka/freezer/DllDependenciesMacOS.py +1 -1
  153. nuitka/freezer/DllDependenciesWin32.py +1 -1
  154. nuitka/freezer/ImportDetection.py +1 -0
  155. nuitka/freezer/IncludedDataFiles.py +13 -4
  156. nuitka/freezer/Onefile.py +0 -1
  157. nuitka/freezer/Standalone.py +3 -1
  158. nuitka/importing/ImportCache.py +3 -2
  159. nuitka/importing/Importing.py +16 -3
  160. nuitka/importing/StandardLibrary.py +4 -0
  161. nuitka/nodes/ChildrenHavingMixins.py +2 -0
  162. nuitka/nodes/ExpressionBasesGenerated.py +4 -0
  163. nuitka/nodes/HardImportNodesGenerated.py +83 -0
  164. nuitka/nodes/ModuleNodes.py +10 -2
  165. nuitka/nodes/OsSysNodes.py +16 -0
  166. nuitka/nodes/SubscriptNodes.py +3 -3
  167. nuitka/plugins/PluginBase.py +2 -0
  168. nuitka/plugins/standard/DataFilesPlugin.py +22 -1
  169. nuitka/plugins/standard/DillPlugin/DillPlugin.c +3 -3
  170. nuitka/plugins/standard/OptionsNannyPlugin.py +9 -41
  171. nuitka/plugins/standard/PkgResourcesPlugin.py +8 -2
  172. nuitka/plugins/standard/PySidePyQtPlugin.py +4 -0
  173. nuitka/plugins/standard/standard.nuitka-package.config.yml +29 -13
  174. nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +2 -2
  175. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +2 -2
  176. nuitka/specs/HardImportSpecs.py +3 -0
  177. nuitka/specs/ParameterSpecs.py +26 -15
  178. nuitka/tools/general/find_module/FindModuleCode.py +3 -2
  179. nuitka/tools/specialize/CTypeDescriptions.py +11 -9
  180. nuitka/tools/testing/Common.py +12 -5
  181. nuitka/tools/testing/SearchModes.py +5 -1
  182. nuitka/tools/watch/GitHub.py +1 -7
  183. nuitka/tree/Building.py +9 -6
  184. nuitka/tree/ReformulationMatchStatements.py +39 -3
  185. nuitka/tree/TreeHelpers.py +8 -0
  186. nuitka/utils/CStrings.py +7 -0
  187. nuitka/utils/Execution.py +10 -1
  188. nuitka/utils/FileOperations.py +21 -13
  189. nuitka/utils/Images.py +1 -1
  190. nuitka/utils/Importing.py +24 -0
  191. nuitka/utils/ReExecute.py +7 -3
  192. nuitka/utils/SharedLibraries.py +17 -0
  193. nuitka/utils/Yaml.py +9 -1
  194. {Nuitka_winsvc-2.2.2.data → Nuitka_winsvc-2.3.data}/scripts/nuitka-run.bat +0 -0
  195. {Nuitka_winsvc-2.2.2.data → Nuitka_winsvc-2.3.data}/scripts/nuitka.bat +0 -0
  196. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/LICENSE.txt +0 -0
  197. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/WHEEL +0 -0
  198. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/entry_points.txt +0 -0
  199. {Nuitka_winsvc-2.2.2.dist-info → Nuitka_winsvc-2.3.dist-info}/top_level.txt +0 -0
@@ -11,9 +11,7 @@ console is disabled. This reads Yaml configuration.
11
11
  from nuitka.Options import (
12
12
  isOnefileMode,
13
13
  isStandaloneMode,
14
- mayDisableConsoleWindow,
15
14
  shallCreateAppBundle,
16
- shallDisableConsoleWindow,
17
15
  )
18
16
  from nuitka.plugins.PluginBase import NuitkaYamlPluginBase
19
17
  from nuitka.utils.Utils import isMacOS
@@ -72,37 +70,6 @@ class NuitkaPluginOptionsNanny(NuitkaYamlPluginBase):
72
70
  % full_name.asString()
73
71
  )
74
72
 
75
- def _checkConsoleMode(self, full_name, console):
76
- if console == "no":
77
- if shallDisableConsoleWindow() is not True:
78
- self.sysexit(
79
- "Error, when using '%s', you have to use '--disable-console' option."
80
- % full_name
81
- )
82
- elif console == "yes":
83
- pass
84
- elif console == "recommend":
85
- if shallDisableConsoleWindow() is None:
86
- if isMacOS():
87
- downside_message = """\
88
- Otherwise high resolution will not be available and a terminal window will open"""
89
- else:
90
- downside_message = """\
91
- Otherwise a terminal window will open"""
92
-
93
- self.info(
94
- """\
95
- Note, when using '%s', consider using '--disable-console' option. %s. However \
96
- for debugging, terminal output is the easiest way to see informative traceback \
97
- and error information, so delay this until your program is working and remove \
98
- once you find it non-working, and use '--enable-console' to make it explicit \
99
- and not see this message."""
100
- % (full_name, downside_message)
101
- )
102
-
103
- else:
104
- self.sysexitIllegalOptionValue(full_name, "console", console)
105
-
106
73
  def _checkMacOSBundleMode(self, full_name, macos_bundle):
107
74
  if macos_bundle == "yes":
108
75
  if isStandaloneMode() and not shallCreateAppBundle():
@@ -114,8 +81,15 @@ Error, package '%s' requires '--macos-create-app-bundle' to be used or else it c
114
81
  elif macos_bundle == "no":
115
82
  pass
116
83
  elif macos_bundle == "recommend":
117
- # TODO: Not really recommending with a message it yet.
118
- pass
84
+ self.info(
85
+ """\
86
+ Note, when using '%s', consider using '--macos-create-app-bundle' option. \
87
+ Otherwise high resolution will not be available and a terminal window will \
88
+ open. However for debugging, terminal output is the easiest way to see \
89
+ informative traceback and error information, so launch it from there if \
90
+ possible."""
91
+ % full_name
92
+ )
119
93
  else:
120
94
  self.sysexitIllegalOptionValue(full_name, "macos_bundle", macos_bundle)
121
95
 
@@ -151,12 +125,6 @@ Error, package '%s' requires '--onefile' to be used on top of '--macos-create-ap
151
125
  condition=condition,
152
126
  )
153
127
 
154
- if mayDisableConsoleWindow():
155
- self._checkConsoleMode(
156
- full_name=full_name,
157
- console=check.get("console", "yes"),
158
- )
159
-
160
128
  if isMacOS():
161
129
  self._checkMacOSBundleMode(
162
130
  full_name=full_name,
@@ -52,8 +52,14 @@ class NuitkaPluginResources(NuitkaPluginBase):
52
52
 
53
53
  for entry_point in dist.entry_points:
54
54
  if entry_point.group == group and entry_point.name == name:
55
- module_name = entry_point.module
56
- main_name = entry_point.attr
55
+ try:
56
+ module_name = entry_point.module
57
+ main_name = entry_point.attr
58
+ except AttributeError:
59
+ match = entry_point.pattern.match(entry_point.value)
60
+
61
+ module_name = match.group("module")
62
+ main_name = match.group("attr")
57
63
 
58
64
  break
59
65
 
@@ -406,6 +406,7 @@ import %(binding_name)s.QtCore
406
406
  ".mesh",
407
407
  ".frag",
408
408
  "qmldir",
409
+ ".webp",
409
410
  )
410
411
 
411
412
  if dlls:
@@ -1458,6 +1459,9 @@ it for full compatible behavior with the uncompiled code to debug it."""
1458
1459
 
1459
1460
  return (False, "Not included due to all Qt bindings disallowed.")
1460
1461
 
1462
+ def getEvaluationConditionControlTags(self):
1463
+ return {"use_noqt": True}
1464
+
1461
1465
 
1462
1466
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
1463
1467
  # integrates with CPython, but also works on its own.
@@ -1273,6 +1273,12 @@
1273
1273
  macos_bundle: 'yes'
1274
1274
  when: 'macos'
1275
1275
 
1276
+ - module-name: 'freetype' # checksum: 5a9431c2
1277
+ dlls:
1278
+ - from_filenames:
1279
+ prefixes:
1280
+ - 'libfreetype'
1281
+
1276
1282
  - module-name: 'frozendict' # checksum: 85584475
1277
1283
  data-files:
1278
1284
  patterns:
@@ -3688,7 +3694,7 @@
3688
3694
  dirs:
3689
3695
  - '.'
3690
3696
 
3691
- - module-name: 'pygame' # checksum: 74ba6d7b
3697
+ - module-name: 'pygame' # checksum: 5fbb83cf
3692
3698
  data-files:
3693
3699
  patterns:
3694
3700
  - 'freesansbold.ttf'
@@ -3696,7 +3702,7 @@
3696
3702
  options:
3697
3703
  checks:
3698
3704
  - description: 'PyGame is a GUI framework'
3699
- console: 'recommend'
3705
+ macos_bundle: 'recommend'
3700
3706
 
3701
3707
  - module-name: 'pygame_menu' # checksum: 3f9f0b7d
3702
3708
  data-files:
@@ -3755,11 +3761,19 @@
3755
3761
  - depends:
3756
3762
  - 'pymssql._mssql'
3757
3763
 
3758
- - module-name: 'pyocd' # checksum: 5c06f0b9
3764
+ - module-name: 'pyocd' # checksum: f450220c
3759
3765
  data-files:
3760
3766
  patterns:
3761
3767
  - 'debug/sequences/*.lark'
3762
3768
  - 'debug/svd/*.zip'
3769
+ include-metadata:
3770
+ - 'pyocd'
3771
+ implicit-imports:
3772
+ - depends:
3773
+ - 'pyocd.probe.*'
3774
+ - 'pyocd.rtos.*'
3775
+ - 'pylink-square'
3776
+ - 'pyusb'
3763
3777
 
3764
3778
  - module-name: 'pyodbc' # checksum: 893567d5
3765
3779
  implicit-imports:
@@ -3806,7 +3820,7 @@
3806
3820
  dirs:
3807
3821
  - 'proj_dir'
3808
3822
 
3809
- - module-name: 'PyQt5' # checksum: c7182cc5
3823
+ - module-name: 'PyQt5' # checksum: 8ca4bbdf
3810
3824
  data-files:
3811
3825
  empty_dirs:
3812
3826
  - 'Qt5'
@@ -3815,7 +3829,7 @@
3815
3829
  options:
3816
3830
  checks:
3817
3831
  - description: 'PyQt5 is a GUI framework'
3818
- console: 'recommend'
3832
+ macos_bundle: 'recommend'
3819
3833
  when: 'use_pyqt5'
3820
3834
  - description: 'PyQt5 cannot be used without bundle'
3821
3835
  macos_bundle: 'yes'
@@ -3828,11 +3842,11 @@
3828
3842
  - acceptable-missing-dlls:
3829
3843
  - 'libqpdf'
3830
3844
 
3831
- - module-name: 'PyQt6' # checksum: 884033ec
3845
+ - module-name: 'PyQt6' # checksum: 9ddfb6bb
3832
3846
  options:
3833
3847
  checks:
3834
3848
  - description: 'PyQt6 is a GUI framework'
3835
- console: 'recommend'
3849
+ macos_bundle: 'recommend'
3836
3850
  when: 'use_pyqt6'
3837
3851
  - description: 'PyQt6 on macOS is not supported, use PySide6 instead'
3838
3852
  support_info: 'error'
@@ -3982,7 +3996,7 @@
3982
3996
  prefixes:
3983
3997
  - 'libcvhf'
3984
3998
 
3985
- - module-name: 'PySide2' # checksum: 4e71be92
3999
+ - module-name: 'PySide2' # checksum: c07d1551
3986
4000
  implicit-imports:
3987
4001
  - post-import-code:
3988
4002
  - |
@@ -4001,7 +4015,7 @@
4001
4015
  options:
4002
4016
  checks:
4003
4017
  - description: 'PySide2 is a GUI framework'
4004
- console: 'recommend'
4018
+ macos_bundle: 'recommend'
4005
4019
  when: 'use_pyside2'
4006
4020
  - description: 'PySide2 cannot be signed unless onefile'
4007
4021
  macos_bundle_as_onefile: 'yes'
@@ -4010,7 +4024,7 @@
4010
4024
  - find-dlls-near-module:
4011
4025
  - 'shiboken2'
4012
4026
 
4013
- - module-name: 'PySide6' # checksum: db68a9cc
4027
+ - module-name: 'PySide6' # checksum: a87b6b1
4014
4028
  implicit-imports:
4015
4029
  - post-import-code:
4016
4030
  - |
@@ -4048,7 +4062,7 @@
4048
4062
  options:
4049
4063
  checks:
4050
4064
  - description: 'PySide6 is a GUI framework'
4051
- console: 'recommend'
4065
+ macos_bundle: 'recommend'
4052
4066
  when: 'use_pyside6'
4053
4067
 
4054
4068
  import-hacks:
@@ -4061,6 +4075,8 @@
4061
4075
  - 'libqpdf'
4062
4076
  - 'libqtquick3dhelpersimplplugin'
4063
4077
  - 'libquick3dspatialaudioplugin'
4078
+ - 'libqtvkbcomponentsplugin'
4079
+ - 'libqtvkbsettingsplugin'
4064
4080
 
4065
4081
  - module-name: 'PySide6.QtCore' # checksum: be0d99ac
4066
4082
  implicit-imports:
@@ -7362,11 +7378,11 @@
7362
7378
  - depends:
7363
7379
  - '._noop'
7364
7380
 
7365
- - module-name: 'wx' # checksum: 154e95cb
7381
+ - module-name: 'wx' # checksum: 9a4d4164
7366
7382
  options:
7367
7383
  checks:
7368
7384
  - description: 'wx will crash in console mode during startup'
7369
- console: 'yes'
7385
+ macos_bundle: 'yes'
7370
7386
  when: 'macos'
7371
7387
  - description: 'wx requires program to be in bundle form'
7372
7388
  macos_bundle: 'yes'
@@ -59,10 +59,10 @@
59
59
  change_function:
60
60
  'test': "'(lambda: None)'"
61
61
 
62
- - module-name: 'Tkinter' # checksum: 16ff58dd
62
+ - module-name: 'Tkinter' # checksum: 6eaa6fb1
63
63
  options:
64
64
  checks:
65
- - console: 'recommend'
65
+ - macos_bundle: 'recommend'
66
66
  when: 'plugin("tk-inter")'
67
67
 
68
68
  - module-name: 'xml.sax.xmlreader' # checksum: 167cb032
@@ -320,7 +320,7 @@
320
320
  change_function:
321
321
  '_test': "'(lambda: None)'"
322
322
 
323
- - module-name: 'tkinter' # checksum: cef6b613
323
+ - module-name: 'tkinter' # checksum: 481f7b98
324
324
  anti-bloat:
325
325
  - description: 'enhanced tk-inter in case of missing tcl'
326
326
  context:
@@ -338,7 +338,7 @@
338
338
  when: 'not deployment and not plugin("tk-inter")'
339
339
  options:
340
340
  checks:
341
- - console: 'recommend'
341
+ - macos_bundle: 'recommend'
342
342
  when: 'plugin("tk-inter")'
343
343
 
344
344
  - module-name: 'tokenize' # checksum: 6a44b57d
@@ -131,6 +131,9 @@ os_path_basename_spec = BuiltinParameterSpec(
131
131
  "os.path.basename", ("p",), default_count=0
132
132
  )
133
133
  os_path_dirname_spec = BuiltinParameterSpec("os.path.dirname", ("p",), default_count=0)
134
+ os_path_normpath_spec = BuiltinParameterSpec(
135
+ "os.path.normpath", ("path",), default_count=0
136
+ )
134
137
  os_path_abspath_spec = BuiltinParameterSpec(
135
138
  "os.path.abspath", ("path",), default_count=0
136
139
  )
@@ -391,24 +391,30 @@ def matchCall(
391
391
  try:
392
392
  arg_index = (args + kw_only_args).index(pair[0])
393
393
  except ValueError:
394
- if improved or python_version >= 0x370:
395
- message = "'%s' is an invalid keyword argument for %s()" % (
396
- pair[0],
397
- func_name,
398
- )
394
+ if python_version < 0x370 and not improved:
395
+ template = "'%(arg_name)s' is an invalid keyword argument for this function"
396
+ elif python_version < 0x3D0 and not improved:
397
+ template = "'%(arg_name)s' is an invalid keyword argument for %(func_name)s()"
399
398
  else:
400
- message = (
401
- "'%s' is an invalid keyword argument for this function"
402
- % pair[0]
403
- )
399
+ template = "%(func_name)s() got an unexpected keyword argument '%(arg_name)s'"
400
+
401
+ message = template % {
402
+ "arg_name": pair[0],
403
+ "func_name": func_name,
404
+ }
404
405
 
405
406
  raise TooManyArguments(TypeError(message))
406
407
 
407
408
  if arg_index < num_pos_only:
408
- message = "'%s' is an invalid keyword argument for %s()" % (
409
- pair[0],
410
- func_name,
411
- )
409
+ if python_version < 0x3D0:
410
+ template = "'%(arg_name)s' is an invalid keyword argument for %(func_name)s()"
411
+ else:
412
+ template = "%(func_name)s() got an unexpected keyword argument '%(arg_name)s'"
413
+
414
+ message = template % {
415
+ "arg_name": pair[0],
416
+ "func_name": func_name,
417
+ }
412
418
 
413
419
  raise TooManyArguments(TypeError(message))
414
420
 
@@ -446,9 +452,14 @@ def matchCall(
446
452
  )
447
453
  )
448
454
 
455
+ if python_version < 0x3D0:
456
+ template = "%s() takes at most %d %s (%d given)"
457
+ else:
458
+ template = "%s expected at most %d %s, got %d"
459
+
449
460
  raise TooManyArguments(
450
461
  TypeError(
451
- "%s() takes at most %d %s (%d given)"
462
+ template
452
463
  % (
453
464
  func_name,
454
465
  num_args,
@@ -507,7 +518,7 @@ def matchCall(
507
518
  elif pairs:
508
519
  unexpected = next(iter(dict(pairs)))
509
520
 
510
- if improved:
521
+ if improved or python_version >= 0x3D0:
511
522
  message = "%s() got an unexpected keyword argument '%s'" % (
512
523
  func_name,
513
524
  unexpected,
@@ -20,6 +20,7 @@ from nuitka.importing.Importing import (
20
20
  from nuitka.Tracing import tools_logger
21
21
  from nuitka.utils.Execution import callProcess, getExecutablePath
22
22
  from nuitka.utils.FileOperations import relpath
23
+ from nuitka.utils.Importing import getPackageDirFilename
23
24
  from nuitka.utils.Utils import isWin32Windows
24
25
 
25
26
 
@@ -76,9 +77,9 @@ def editModuleCode(module_search_desc):
76
77
  tools_logger.sysexit("Error, did not find '%s' module" % module_name)
77
78
  else:
78
79
  if os.path.isdir(module_filename):
79
- candidate = os.path.join(module_filename, ("__init__.py"))
80
+ candidate = getPackageDirFilename(module_filename)
80
81
 
81
- if os.path.isfile(candidate):
82
+ if candidate is not None:
82
83
  module_filename = candidate
83
84
 
84
85
  if os.path.isdir(module_filename):
@@ -670,8 +670,11 @@ return %(return_value)s;""" % {
670
670
  )
671
671
 
672
672
  @staticmethod
673
- def getTakeReferenceStatement(operand):
674
- return "Py_INCREF(%s);" % operand
673
+ def getTakeReferenceStatement(operand, immortal):
674
+ return "%s(%s);" % (
675
+ ("Py_INCREF_IMMORTAL" if immortal else "Py_INCREF"),
676
+ operand,
677
+ )
675
678
 
676
679
  @classmethod
677
680
  def hasReferenceCounting(cls):
@@ -764,10 +767,9 @@ return %(return_value)s;""" % {
764
767
  @classmethod
765
768
  def getAssignFromBoolExpressionCode(cls, result, operand, give_ref):
766
769
  if cls.type_name == "object":
767
- # TODO: Python3?
768
770
  code = "%s = BOOL_FROM(%s);" % (result, operand)
769
771
  if give_ref:
770
- code += "Py_INCREF(%s);" % result
772
+ code += "Py_INCREF_IMMORTAL(%s);" % result
771
773
 
772
774
  return code
773
775
  elif cls.type_name == "nbool":
@@ -903,7 +905,7 @@ Py_INCREF(%(result)s);""" % {
903
905
  def getAssignConversionCode(cls, result, left, value):
904
906
  def _getObjectObject():
905
907
  code = "%s = %s;" % (result, value)
906
- code += cls.getTakeReferenceStatement(result)
908
+ code += cls.getTakeReferenceStatement(result, immortal=False)
907
909
 
908
910
  return code
909
911
 
@@ -964,7 +966,7 @@ assert(%(type_name)s_CheckExact(%(operand)s));""" % {
964
966
  pass
965
967
 
966
968
  @staticmethod
967
- def getTakeReferenceStatement(operand):
969
+ def getTakeReferenceStatement(operand, immortal):
968
970
  return ""
969
971
 
970
972
 
@@ -1598,7 +1600,7 @@ class CBoolDesc(ConcreteCTypeBase):
1598
1600
  return "CHECK_IF_TRUE(%s) == 1" % operand
1599
1601
 
1600
1602
  @staticmethod
1601
- def getTakeReferenceStatement(operand):
1603
+ def getTakeReferenceStatement(operand, immortal):
1602
1604
  return ""
1603
1605
 
1604
1606
  @staticmethod
@@ -1644,7 +1646,7 @@ class NBoolDesc(ConcreteCTypeBase):
1644
1646
  return cls.getToValueFromBoolExpression("CHECK_IF_TRUE(%s)" % operand)
1645
1647
 
1646
1648
  @staticmethod
1647
- def getTakeReferenceStatement(operand):
1649
+ def getTakeReferenceStatement(operand, immortal):
1648
1650
  return ""
1649
1651
 
1650
1652
  @staticmethod
@@ -1695,7 +1697,7 @@ class NVoidDesc(ConcreteCTypeBase):
1695
1697
  return "NUITKA_VOID_OK"
1696
1698
 
1697
1699
  @staticmethod
1698
- def getTakeReferenceStatement(operand):
1700
+ def getTakeReferenceStatement(operand, immortal):
1699
1701
  return ""
1700
1702
 
1701
1703
  @staticmethod
@@ -41,7 +41,7 @@ from nuitka.utils.FileOperations import (
41
41
  )
42
42
  from nuitka.utils.InstalledPythons import findInstalledPython
43
43
  from nuitka.utils.Jinja2 import getTemplate
44
- from nuitka.utils.Utils import getOS, isMacOS, isWin32Windows
44
+ from nuitka.utils.Utils import isFreeBSD, isLinux, isMacOS, isWin32Windows
45
45
 
46
46
  from .SearchModes import (
47
47
  SearchModeByPattern,
@@ -205,7 +205,7 @@ def getTempDir():
205
205
  os.path.dirname(os.path.abspath(sys.modules["__main__"].__file__))
206
206
  )
207
207
  + "-",
208
- dir=tempfile.gettempdir() if not os.path.exists("/var/tmp") else "/var/tmp",
208
+ dir=None if not (isLinux() and os.path.exists("/var/tmp")) else "/var/tmp",
209
209
  )
210
210
 
211
211
  def removeTempDir():
@@ -520,7 +520,7 @@ def displayRuntimeTraces(logger, path):
520
520
 
521
521
  if os.name == "posix":
522
522
  # Run with traces to help debugging, specifically in CI environment.
523
- if getOS() in ("Darwin", "FreeBSD"):
523
+ if isMacOS() or isFreeBSD():
524
524
  test_logger.info("dtruss:")
525
525
  os.system("sudo dtruss %s" % path)
526
526
  else:
@@ -731,6 +731,7 @@ def checkReferenceCount(checked_function, max_rounds=20, explain=False):
731
731
 
732
732
  def createSearchMode():
733
733
  # Dealing with many options, pylint: disable=too-many-branches
734
+ # Return driven, pylint: disable=too-many-return-statements
734
735
 
735
736
  parser = OptionParser()
736
737
 
@@ -804,7 +805,9 @@ Defaults to off.""",
804
805
  else:
805
806
  return SearchModeImmediate()
806
807
  elif mode == "resume":
807
- return SearchModeResume(sys.modules["__main__"].__file__)
808
+ return SearchModeResume(sys.modules["__main__"].__file__, skip=False)
809
+ elif mode == "skip":
810
+ return SearchModeResume(sys.modules["__main__"].__file__, skip=True)
808
811
  elif mode == "only":
809
812
  if options.pattern:
810
813
  pattern = options.pattern.replace("/", os.path.sep)
@@ -1882,7 +1885,11 @@ def getLocalWebServerDir(base_dir):
1882
1885
  web_dir = os.path.join(getTempDir(), "local-web-server", base_dir)
1883
1886
 
1884
1887
  if _web_server_process is None:
1885
- web_server_directory_supporting_pythons = ("3.11", "3.10", "3.9", "3.8", "3.7")
1888
+ web_server_directory_supporting_pythons = tuple(
1889
+ python_version
1890
+ for python_version in getTestExecutionPythonVersions()
1891
+ if python_version not in ("3.6", "3.5", "3.4", "2.7", "2.6")
1892
+ )
1886
1893
 
1887
1894
  web_server_python = findInstalledPython(
1888
1895
  python_versions=web_server_directory_supporting_pythons,
@@ -109,7 +109,7 @@ class SearchModeByPattern(SearchModeBase):
109
109
 
110
110
 
111
111
  class SearchModeResume(SearchModeBase):
112
- def __init__(self, tests_path):
112
+ def __init__(self, tests_path, skip):
113
113
  SearchModeBase.__init__(self)
114
114
 
115
115
  tests_path = os.path.normcase(os.path.abspath(tests_path))
@@ -134,6 +134,7 @@ class SearchModeResume(SearchModeBase):
134
134
  self.resume_from = None
135
135
 
136
136
  self.active = not self.resume_from
137
+ self.skip = skip
137
138
 
138
139
  def consider(self, dirname, filename):
139
140
  parts = [dirname, filename]
@@ -152,6 +153,9 @@ class SearchModeResume(SearchModeBase):
152
153
  if areSamePaths(path, self.resume_from):
153
154
  self.active = True
154
155
 
156
+ if self.skip:
157
+ return False
158
+
155
159
  return self.active
156
160
 
157
161
  def finish(self):
@@ -6,11 +6,7 @@
6
6
  import os
7
7
  import sys
8
8
 
9
- from nuitka.tools.quality.Git import (
10
- getCurrentBranchName,
11
- getModifiedPaths,
12
- getRemoteURL,
13
- )
9
+ from nuitka.tools.quality.Git import getModifiedPaths, getRemoteURL
14
10
  from nuitka.Tracing import tools_logger
15
11
  from nuitka.utils.Execution import callProcess, check_call
16
12
 
@@ -21,8 +17,6 @@ def checkInNuitkaWatch():
21
17
  "git@github.com:Nuitka/Nuitka-Watch.git",
22
18
  "https://github.com/Nuitka/Nuitka-Watch",
23
19
  ), remote_url
24
- branch_name = getCurrentBranchName()
25
- assert branch_name == "main", branch_name
26
20
  assert os.path.exists(".git")
27
21
 
28
22
 
nuitka/tree/Building.py CHANGED
@@ -131,6 +131,7 @@ from nuitka.Tracing import (
131
131
  )
132
132
  from nuitka.utils import MemoryUsage
133
133
  from nuitka.utils.ModuleNames import ModuleName
134
+ from nuitka.utils.Utils import withNoSyntaxWarning
134
135
 
135
136
  from . import SyntaxErrors
136
137
  from .ReformulationAssertStatements import buildAssertNode
@@ -1074,6 +1075,7 @@ def _createModule(
1074
1075
  if module_kind == "extension":
1075
1076
  result = PythonExtensionModule(
1076
1077
  module_name=module_name,
1078
+ module_filename=module_filename,
1077
1079
  reason=reason,
1078
1080
  technical=is_stdlib and module_name in detectEarlyImports(),
1079
1081
  source_ref=source_ref,
@@ -1366,12 +1368,13 @@ def buildModule(
1366
1368
  )
1367
1369
 
1368
1370
  try:
1369
- ast_tree = parseSourceCodeToAst(
1370
- source_code=source_code,
1371
- module_name=module_name,
1372
- filename=source_filename,
1373
- line_offset=0,
1374
- )
1371
+ with withNoSyntaxWarning():
1372
+ ast_tree = parseSourceCodeToAst(
1373
+ source_code=source_code,
1374
+ module_name=module_name,
1375
+ filename=source_filename,
1376
+ line_offset=0,
1377
+ )
1375
1378
  except (SyntaxError, IndentationError) as e:
1376
1379
  # Do not hide SyntaxError if asked not to.
1377
1380
  if not hide_syntax_error:
@@ -14,16 +14,18 @@ from nuitka.nodes.AttributeNodes import (
14
14
  ExpressionAttributeCheck,
15
15
  makeExpressionAttributeLookup,
16
16
  )
17
+ from nuitka.nodes.BuiltinDictNodes import ExpressionBuiltinDict
17
18
  from nuitka.nodes.BuiltinLenNodes import ExpressionBuiltinLen
18
19
  from nuitka.nodes.BuiltinTypeNodes import ExpressionBuiltinList
19
20
  from nuitka.nodes.ComparisonNodes import makeComparisonExpression
20
21
  from nuitka.nodes.ConditionalNodes import makeStatementConditional
21
22
  from nuitka.nodes.ConstantRefNodes import makeConstantRefNode
23
+ from nuitka.nodes.DictionaryNodes import StatementDictOperationRemove
22
24
  from nuitka.nodes.MatchNodes import ExpressionMatchArgs
23
25
  from nuitka.nodes.OutlineNodes import ExpressionOutlineBody
24
26
  from nuitka.nodes.ReturnNodes import makeStatementReturnConstant
25
27
  from nuitka.nodes.SubscriptNodes import (
26
- ExpressionSubscriptCheck,
28
+ ExpressionMatchSubscriptCheck,
27
29
  ExpressionSubscriptLookup,
28
30
  )
29
31
  from nuitka.nodes.TypeMatchNodes import (
@@ -32,7 +34,10 @@ from nuitka.nodes.TypeMatchNodes import (
32
34
  )
33
35
  from nuitka.nodes.TypeNodes import ExpressionBuiltinIsinstance
34
36
  from nuitka.nodes.VariableAssignNodes import makeStatementAssignmentVariable
35
- from nuitka.nodes.VariableNameNodes import StatementAssignmentVariableName
37
+ from nuitka.nodes.VariableNameNodes import (
38
+ ExpressionVariableNameRef,
39
+ StatementAssignmentVariableName,
40
+ )
36
41
  from nuitka.nodes.VariableRefNodes import ExpressionTempVariableRef
37
42
  from nuitka.nodes.VariableReleaseNodes import makeStatementReleaseVariable
38
43
 
@@ -252,7 +257,7 @@ def _buildMatchMapping(provider, pattern, make_against, source_ref):
252
257
 
253
258
  for key, kwd_pattern in zip(pattern.keys, pattern.patterns):
254
259
  conditions.append(
255
- ExpressionSubscriptCheck(
260
+ ExpressionMatchSubscriptCheck(
256
261
  expression=make_against(),
257
262
  subscript=buildNode(provider, key, source_ref),
258
263
  source_ref=source_ref,
@@ -277,6 +282,37 @@ def _buildMatchMapping(provider, pattern, make_against, source_ref):
277
282
  if item_assignments:
278
283
  assignments.extend(item_assignments)
279
284
 
285
+ if pattern.rest:
286
+ assert type(pattern.rest) is str, pattern.rest
287
+
288
+ assignments.append(
289
+ StatementAssignmentVariableName(
290
+ provider=provider,
291
+ variable_name=pattern.rest,
292
+ source=ExpressionBuiltinDict(
293
+ pos_arg=make_against(),
294
+ pairs=(),
295
+ source_ref=source_ref,
296
+ ),
297
+ source_ref=source_ref,
298
+ )
299
+ )
300
+
301
+ for key in pattern.keys:
302
+ assert type(key) is ast.Constant, key
303
+
304
+ assignments.append(
305
+ StatementDictOperationRemove(
306
+ dict_arg=ExpressionVariableNameRef(
307
+ provider=provider,
308
+ variable_name=pattern.rest,
309
+ source_ref=source_ref,
310
+ ),
311
+ key=buildNode(provider, key, source_ref),
312
+ source_ref=source_ref,
313
+ )
314
+ )
315
+
280
316
  return conditions, assignments
281
317
 
282
318