Nuitka-winsvc 2.2.3__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.
- {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.dist-info}/METADATA +1 -1
- {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.dist-info}/RECORD +198 -197
- nuitka/Bytecodes.py +4 -2
- nuitka/HardImportRegistry.py +1 -0
- nuitka/MainControl.py +16 -10
- nuitka/ModuleRegistry.py +15 -0
- nuitka/OptionParsing.py +30 -8
- nuitka/Options.py +104 -44
- nuitka/PostProcessing.py +9 -8
- nuitka/PythonVersions.py +2 -1
- nuitka/Serialization.py +47 -30
- nuitka/Version.py +1 -1
- nuitka/build/Backend.scons +46 -19
- nuitka/build/CCompilerVersion.scons +3 -3
- nuitka/build/Onefile.scons +4 -4
- nuitka/build/SconsCaching.py +3 -2
- nuitka/build/SconsCompilerSettings.py +11 -5
- nuitka/build/SconsInterface.py +22 -6
- nuitka/build/SconsUtils.py +9 -1
- nuitka/build/include/nuitka/allocator.h +58 -2
- nuitka/build/include/nuitka/compiled_frame.h +48 -13
- nuitka/build/include/nuitka/compiled_function.h +4 -0
- nuitka/build/include/nuitka/constants.h +6 -0
- nuitka/build/include/nuitka/exception_groups.h +6 -6
- nuitka/build/include/nuitka/exceptions.h +3 -3
- nuitka/build/include/nuitka/freelists.h +11 -0
- nuitka/build/include/nuitka/helper/dictionaries.h +5 -4
- nuitka/build/include/nuitka/helper/lists.h +5 -5
- nuitka/build/include/nuitka/helper/lists_generated.h +12 -12
- nuitka/build/include/nuitka/helper/sequences.h +6 -0
- nuitka/build/include/nuitka/helper/slices.h +14 -8
- nuitka/build/include/nuitka/helper/subscripts.h +1 -184
- nuitka/build/include/nuitka/helper/tuples.h +42 -33
- nuitka/build/include/nuitka/importing.h +5 -0
- nuitka/build/include/nuitka/prelude.h +35 -2
- nuitka/build/include/nuitka/safe_string_ops.h +1 -0
- nuitka/build/include/nuitka/threading.h +13 -10
- nuitka/build/static_src/CompiledAsyncgenType.c +19 -8
- nuitka/build/static_src/CompiledCellType.c +1 -1
- nuitka/build/static_src/CompiledCodeHelpers.c +18 -16
- nuitka/build/static_src/CompiledCoroutineType.c +23 -19
- nuitka/build/static_src/CompiledFrameType.c +46 -34
- nuitka/build/static_src/CompiledFunctionType.c +55 -34
- nuitka/build/static_src/CompiledGeneratorType.c +21 -19
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +127 -130
- nuitka/build/static_src/CompiledMethodType.c +15 -17
- nuitka/build/static_src/HelpersAllocator.c +71 -0
- nuitka/build/static_src/HelpersAttributes.c +1 -1
- nuitka/build/static_src/HelpersBuiltin.c +5 -5
- nuitka/build/static_src/HelpersBytes.c +2 -2
- nuitka/build/static_src/HelpersCalling.c +3 -0
- nuitka/build/static_src/HelpersCallingGenerated.c +131 -131
- nuitka/build/static_src/HelpersComparisonEq.c +329 -329
- nuitka/build/static_src/HelpersComparisonEqUtils.c +3 -1
- nuitka/build/static_src/HelpersComparisonGe.c +322 -322
- nuitka/build/static_src/HelpersComparisonGt.c +321 -321
- nuitka/build/static_src/HelpersComparisonLe.c +322 -322
- nuitka/build/static_src/HelpersComparisonLt.c +321 -321
- nuitka/build/static_src/HelpersComparisonNe.c +329 -329
- nuitka/build/static_src/HelpersConsole.c +96 -0
- nuitka/build/static_src/HelpersConstantsBlob.c +10 -6
- nuitka/build/static_src/HelpersDeepcopy.c +10 -8
- nuitka/build/static_src/HelpersDictionaries.c +17 -11
- nuitka/build/static_src/HelpersDictionariesGenerated.c +65 -29
- nuitka/build/static_src/HelpersExceptions.c +107 -9
- nuitka/build/static_src/HelpersFilesystemPaths.c +64 -4
- nuitka/build/static_src/HelpersFloats.c +20 -14
- nuitka/build/static_src/HelpersImport.c +1 -1
- nuitka/build/static_src/HelpersJitSources.c +1 -1
- nuitka/build/static_src/HelpersLists.c +29 -19
- nuitka/build/static_src/HelpersListsGenerated.c +24 -24
- nuitka/build/static_src/HelpersMatching.c +32 -5
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +90 -63
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +4 -4
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +33 -33
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +33 -33
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +33 -33
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +30 -30
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +7 -7
- nuitka/build/static_src/HelpersOperationBinaryMod.c +90 -90
- nuitka/build/static_src/HelpersOperationBinaryMult.c +64 -58
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryPow.c +27 -27
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +30 -30
- nuitka/build/static_src/HelpersOperationBinarySub.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +24 -24
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +67 -49
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +25 -25
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +25 -25
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +25 -25
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +28 -28
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +18 -18
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +10 -10
- nuitka/build/static_src/HelpersOperationInplaceMod.c +70 -70
- nuitka/build/static_src/HelpersOperationInplaceMult.c +33 -33
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +28 -28
- nuitka/build/static_src/HelpersOperationInplacePow.c +28 -28
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +18 -18
- nuitka/build/static_src/HelpersOperationInplaceSub.c +28 -28
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +28 -28
- nuitka/build/static_src/HelpersRaising.c +10 -3
- nuitka/build/static_src/HelpersSafeStrings.c +14 -4
- nuitka/build/static_src/HelpersSlices.c +12 -5
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +20 -15
- nuitka/build/static_src/InspectPatcher.c +74 -6
- nuitka/build/static_src/MainProgram.c +90 -25
- nuitka/build/static_src/MetaPathBasedLoader.c +81 -45
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +2 -2
- nuitka/build/static_src/OnefileBootstrap.c +16 -17
- nuitka/code_generation/CodeGeneration.py +5 -2
- nuitka/code_generation/ConstantCodes.py +2 -2
- nuitka/code_generation/DictCodes.py +2 -2
- nuitka/code_generation/GlobalConstants.py +5 -0
- nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
- nuitka/code_generation/ListCodes.py +2 -2
- nuitka/code_generation/LocalsDictCodes.py +1 -1
- nuitka/code_generation/ModuleCodes.py +19 -0
- nuitka/code_generation/PackageResourceCodes.py +14 -0
- nuitka/code_generation/SliceCodes.py +3 -3
- nuitka/code_generation/SubscriptCodes.py +5 -13
- nuitka/code_generation/TupleCodes.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +7 -7
- nuitka/code_generation/templates/CodeTemplatesConstants.py +7 -5
- nuitka/code_generation/templates/CodeTemplatesLoader.py +2 -0
- nuitka/code_generation/templates/CodeTemplatesModules.py +78 -54
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +8 -8
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +5 -5
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +2 -2
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +2 -2
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +57 -21
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +5 -5
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +18 -18
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +11 -11
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +11 -11
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +10 -10
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +4 -1
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +4 -1
- nuitka/finalizations/FinalizeMarkups.py +0 -18
- nuitka/freezer/DependsExe.py +9 -4
- nuitka/freezer/DllDependenciesMacOS.py +1 -1
- nuitka/freezer/DllDependenciesWin32.py +1 -1
- nuitka/freezer/ImportDetection.py +1 -0
- nuitka/freezer/IncludedDataFiles.py +13 -4
- nuitka/freezer/Onefile.py +0 -1
- nuitka/freezer/Standalone.py +3 -1
- nuitka/importing/ImportCache.py +3 -2
- nuitka/importing/Importing.py +16 -3
- nuitka/importing/StandardLibrary.py +4 -0
- nuitka/nodes/ChildrenHavingMixins.py +2 -0
- nuitka/nodes/ExpressionBasesGenerated.py +4 -0
- nuitka/nodes/HardImportNodesGenerated.py +83 -0
- nuitka/nodes/ModuleNodes.py +10 -2
- nuitka/nodes/OsSysNodes.py +16 -0
- nuitka/nodes/SubscriptNodes.py +3 -3
- nuitka/plugins/PluginBase.py +2 -0
- nuitka/plugins/standard/DataFilesPlugin.py +22 -1
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +3 -3
- nuitka/plugins/standard/OptionsNannyPlugin.py +9 -41
- nuitka/plugins/standard/PkgResourcesPlugin.py +8 -2
- nuitka/plugins/standard/PySidePyQtPlugin.py +3 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +18 -12
- nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +2 -2
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +2 -2
- nuitka/specs/HardImportSpecs.py +3 -0
- nuitka/specs/ParameterSpecs.py +26 -15
- nuitka/tools/general/find_module/FindModuleCode.py +3 -2
- nuitka/tools/specialize/CTypeDescriptions.py +11 -9
- nuitka/tools/testing/Common.py +12 -5
- nuitka/tools/testing/SearchModes.py +5 -1
- nuitka/tools/watch/GitHub.py +1 -7
- nuitka/tree/Building.py +9 -6
- nuitka/tree/ReformulationMatchStatements.py +39 -3
- nuitka/tree/TreeHelpers.py +8 -0
- nuitka/utils/CStrings.py +7 -0
- nuitka/utils/Execution.py +10 -1
- nuitka/utils/FileOperations.py +21 -13
- nuitka/utils/Importing.py +24 -0
- nuitka/utils/ReExecute.py +7 -3
- nuitka/utils/SharedLibraries.py +17 -0
- nuitka/utils/Yaml.py +9 -1
- {Nuitka_winsvc-2.2.3.data → Nuitka_winsvc-2.3.data}/scripts/nuitka-run.bat +0 -0
- {Nuitka_winsvc-2.2.3.data → Nuitka_winsvc-2.3.data}/scripts/nuitka.bat +0 -0
- {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.dist-info}/WHEEL +0 -0
- {Nuitka_winsvc-2.2.3.dist-info → Nuitka_winsvc-2.3.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.2.3.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
|
-
|
|
118
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
|
|
@@ -1459,6 +1459,9 @@ it for full compatible behavior with the uncompiled code to debug it."""
|
|
|
1459
1459
|
|
|
1460
1460
|
return (False, "Not included due to all Qt bindings disallowed.")
|
|
1461
1461
|
|
|
1462
|
+
def getEvaluationConditionControlTags(self):
|
|
1463
|
+
return {"use_noqt": True}
|
|
1464
|
+
|
|
1462
1465
|
|
|
1463
1466
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
1464
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:
|
|
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
|
-
|
|
3705
|
+
macos_bundle: 'recommend'
|
|
3700
3706
|
|
|
3701
3707
|
- module-name: 'pygame_menu' # checksum: 3f9f0b7d
|
|
3702
3708
|
data-files:
|
|
@@ -3814,7 +3820,7 @@
|
|
|
3814
3820
|
dirs:
|
|
3815
3821
|
- 'proj_dir'
|
|
3816
3822
|
|
|
3817
|
-
- module-name: 'PyQt5' # checksum:
|
|
3823
|
+
- module-name: 'PyQt5' # checksum: 8ca4bbdf
|
|
3818
3824
|
data-files:
|
|
3819
3825
|
empty_dirs:
|
|
3820
3826
|
- 'Qt5'
|
|
@@ -3823,7 +3829,7 @@
|
|
|
3823
3829
|
options:
|
|
3824
3830
|
checks:
|
|
3825
3831
|
- description: 'PyQt5 is a GUI framework'
|
|
3826
|
-
|
|
3832
|
+
macos_bundle: 'recommend'
|
|
3827
3833
|
when: 'use_pyqt5'
|
|
3828
3834
|
- description: 'PyQt5 cannot be used without bundle'
|
|
3829
3835
|
macos_bundle: 'yes'
|
|
@@ -3836,11 +3842,11 @@
|
|
|
3836
3842
|
- acceptable-missing-dlls:
|
|
3837
3843
|
- 'libqpdf'
|
|
3838
3844
|
|
|
3839
|
-
- module-name: 'PyQt6' # checksum:
|
|
3845
|
+
- module-name: 'PyQt6' # checksum: 9ddfb6bb
|
|
3840
3846
|
options:
|
|
3841
3847
|
checks:
|
|
3842
3848
|
- description: 'PyQt6 is a GUI framework'
|
|
3843
|
-
|
|
3849
|
+
macos_bundle: 'recommend'
|
|
3844
3850
|
when: 'use_pyqt6'
|
|
3845
3851
|
- description: 'PyQt6 on macOS is not supported, use PySide6 instead'
|
|
3846
3852
|
support_info: 'error'
|
|
@@ -3990,7 +3996,7 @@
|
|
|
3990
3996
|
prefixes:
|
|
3991
3997
|
- 'libcvhf'
|
|
3992
3998
|
|
|
3993
|
-
- module-name: 'PySide2' # checksum:
|
|
3999
|
+
- module-name: 'PySide2' # checksum: c07d1551
|
|
3994
4000
|
implicit-imports:
|
|
3995
4001
|
- post-import-code:
|
|
3996
4002
|
- |
|
|
@@ -4009,7 +4015,7 @@
|
|
|
4009
4015
|
options:
|
|
4010
4016
|
checks:
|
|
4011
4017
|
- description: 'PySide2 is a GUI framework'
|
|
4012
|
-
|
|
4018
|
+
macos_bundle: 'recommend'
|
|
4013
4019
|
when: 'use_pyside2'
|
|
4014
4020
|
- description: 'PySide2 cannot be signed unless onefile'
|
|
4015
4021
|
macos_bundle_as_onefile: 'yes'
|
|
@@ -4018,7 +4024,7 @@
|
|
|
4018
4024
|
- find-dlls-near-module:
|
|
4019
4025
|
- 'shiboken2'
|
|
4020
4026
|
|
|
4021
|
-
- module-name: 'PySide6' # checksum:
|
|
4027
|
+
- module-name: 'PySide6' # checksum: a87b6b1
|
|
4022
4028
|
implicit-imports:
|
|
4023
4029
|
- post-import-code:
|
|
4024
4030
|
- |
|
|
@@ -4056,7 +4062,7 @@
|
|
|
4056
4062
|
options:
|
|
4057
4063
|
checks:
|
|
4058
4064
|
- description: 'PySide6 is a GUI framework'
|
|
4059
|
-
|
|
4065
|
+
macos_bundle: 'recommend'
|
|
4060
4066
|
when: 'use_pyside6'
|
|
4061
4067
|
|
|
4062
4068
|
import-hacks:
|
|
@@ -7372,11 +7378,11 @@
|
|
|
7372
7378
|
- depends:
|
|
7373
7379
|
- '._noop'
|
|
7374
7380
|
|
|
7375
|
-
- module-name: 'wx' # checksum:
|
|
7381
|
+
- module-name: 'wx' # checksum: 9a4d4164
|
|
7376
7382
|
options:
|
|
7377
7383
|
checks:
|
|
7378
7384
|
- description: 'wx will crash in console mode during startup'
|
|
7379
|
-
|
|
7385
|
+
macos_bundle: 'yes'
|
|
7380
7386
|
when: 'macos'
|
|
7381
7387
|
- description: 'wx requires program to be in bundle form'
|
|
7382
7388
|
macos_bundle: 'yes'
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
change_function:
|
|
60
60
|
'test': "'(lambda: None)'"
|
|
61
61
|
|
|
62
|
-
- module-name: 'Tkinter' # checksum:
|
|
62
|
+
- module-name: 'Tkinter' # checksum: 6eaa6fb1
|
|
63
63
|
options:
|
|
64
64
|
checks:
|
|
65
|
-
-
|
|
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:
|
|
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
|
-
-
|
|
341
|
+
- macos_bundle: 'recommend'
|
|
342
342
|
when: 'plugin("tk-inter")'
|
|
343
343
|
|
|
344
344
|
- module-name: 'tokenize' # checksum: 6a44b57d
|
nuitka/specs/HardImportSpecs.py
CHANGED
|
@@ -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
|
)
|
nuitka/specs/ParameterSpecs.py
CHANGED
|
@@ -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
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
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
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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
|
-
|
|
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 =
|
|
80
|
+
candidate = getPackageDirFilename(module_filename)
|
|
80
81
|
|
|
81
|
-
if
|
|
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 "
|
|
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 += "
|
|
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
|
nuitka/tools/testing/Common.py
CHANGED
|
@@ -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
|
|
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=
|
|
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
|
|
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 = (
|
|
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):
|
nuitka/tools/watch/GitHub.py
CHANGED
|
@@ -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
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
nuitka/tree/TreeHelpers.py
CHANGED
|
@@ -62,6 +62,9 @@ def extractDocFromBody(node):
|
|
|
62
62
|
if Options.hasPythonFlagNoDocStrings():
|
|
63
63
|
doc = None
|
|
64
64
|
|
|
65
|
+
if doc is not None and python_version >= 0x3D0:
|
|
66
|
+
doc = doc.lstrip()
|
|
67
|
+
|
|
65
68
|
return body, doc
|
|
66
69
|
|
|
67
70
|
|
|
@@ -291,6 +294,8 @@ def setBuildingDispatchers(path_args3, path_args2, path_args1):
|
|
|
291
294
|
|
|
292
295
|
|
|
293
296
|
def buildNode(provider, node, source_ref, allow_none=False):
|
|
297
|
+
# too many exception handlers, pylint: disable=too-many-branches
|
|
298
|
+
|
|
294
299
|
if node is None and allow_none:
|
|
295
300
|
return None
|
|
296
301
|
|
|
@@ -330,6 +335,9 @@ def buildNode(provider, node, source_ref, allow_none=False):
|
|
|
330
335
|
# we got interrupted.
|
|
331
336
|
optimization_logger.info("Interrupted at '%s'." % source_ref)
|
|
332
337
|
raise
|
|
338
|
+
except SystemExit:
|
|
339
|
+
optimization_logger.warning("Problem at '%s'." % source_ref.getAsString())
|
|
340
|
+
raise
|
|
333
341
|
except:
|
|
334
342
|
optimization_logger.warning(
|
|
335
343
|
"Problem at '%s' with %s." % (source_ref.getAsString(), ast.dump(node))
|