Nuitka-winsvc 1.6.6__cp310-cp310-win_amd64.whl → 1.7.5__cp310-cp310-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 (84) hide show
  1. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/RECORD +84 -81
  3. nuitka/Builtins.py +7 -1
  4. nuitka/MainControl.py +4 -0
  5. nuitka/OptionParsing.py +5 -3
  6. nuitka/Options.py +17 -2
  7. nuitka/Serialization.py +28 -5
  8. nuitka/Version.py +2 -2
  9. nuitka/build/Backend.scons +16 -3
  10. nuitka/build/CCompilerVersion.scons +1 -1
  11. nuitka/build/DataComposerInterface.py +15 -9
  12. nuitka/build/Onefile.scons +1 -1
  13. nuitka/build/SconsCompilerSettings.py +1 -0
  14. nuitka/build/SconsProgress.py +11 -2
  15. nuitka/build/SconsSpawn.py +15 -15
  16. nuitka/build/include/nuitka/builtins.h +2 -0
  17. nuitka/build/include/nuitka/filesystem_paths.h +4 -0
  18. nuitka/build/include/nuitka/helper/attributes.h +3 -0
  19. nuitka/build/include/nuitka/helper/import_hard.h +6 -0
  20. nuitka/build/include/nuitka/helpers.h +1 -1
  21. nuitka/build/include/nuitka/safe_string_ops.h +10 -3
  22. nuitka/build/static_src/CompiledCodeHelpers.c +0 -200
  23. nuitka/build/static_src/HelpersAttributes.c +185 -8
  24. nuitka/build/static_src/HelpersFilesystemPaths.c +528 -7
  25. nuitka/build/static_src/HelpersImportHard.c +38 -0
  26. nuitka/build/static_src/HelpersSafeStrings.c +6 -278
  27. nuitka/build/static_src/MainProgram.c +273 -73
  28. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +6 -0
  29. nuitka/build/static_src/OnefileBootstrap.c +19 -36
  30. nuitka/build/static_src/OnefileSplashScreen.cpp +1 -0
  31. nuitka/code_generation/AttributeCodes.py +42 -23
  32. nuitka/code_generation/CodeGeneration.py +4 -0
  33. nuitka/code_generation/FunctionCodes.py +18 -3
  34. nuitka/code_generation/GlobalConstants.py +8 -1
  35. nuitka/code_generation/PackageResourceCodes.py +40 -0
  36. nuitka/code_generation/templates/CodeTemplatesModules.py +1 -7
  37. nuitka/freezer/DllDependenciesMacOS.py +18 -1
  38. nuitka/freezer/IncludedDataFiles.py +6 -10
  39. nuitka/importing/ImportResolving.py +6 -0
  40. nuitka/importing/Recursion.py +24 -68
  41. nuitka/nodes/AttributeNodes.py +72 -19
  42. nuitka/nodes/ChildrenHavingMixins.py +203 -234
  43. nuitka/nodes/ExpressionBasesGenerated.py +136 -0
  44. nuitka/nodes/HardImportNodesGenerated.py +94 -0
  45. nuitka/nodes/ImportHardNodes.py +3 -3
  46. nuitka/nodes/ImportNodes.py +14 -4
  47. nuitka/nodes/ModuleNodes.py +4 -2
  48. nuitka/nodes/PackageMetadataNodes.py +12 -10
  49. nuitka/nodes/PackageResourceNodes.py +115 -0
  50. nuitka/nodes/TypeNodes.py +5 -1
  51. nuitka/plugins/PluginBase.py +32 -8
  52. nuitka/plugins/Plugins.py +44 -7
  53. nuitka/plugins/standard/AntiBloatPlugin.py +166 -72
  54. nuitka/plugins/standard/DataFilesPlugin.py +10 -0
  55. nuitka/plugins/standard/DllFilesPlugin.py +1 -2
  56. nuitka/plugins/standard/MatplotlibPlugin.py +24 -22
  57. nuitka/plugins/standard/MultiprocessingPlugin.py +5 -12
  58. nuitka/plugins/standard/OptionsNannyPlugin.py +2 -2
  59. nuitka/plugins/standard/PySidePyQtPlugin.py +18 -6
  60. nuitka/plugins/standard/PywebViewPlugin.py +4 -2
  61. nuitka/plugins/standard/TkinterPlugin.py +3 -0
  62. nuitka/plugins/standard/TransformersPlugin.py +11 -1
  63. nuitka/plugins/standard/TrioPlugin.py +6 -66
  64. nuitka/plugins/standard/standard.nuitka-package.config.yml +367 -21
  65. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +16 -4
  66. nuitka/specs/HardImportSpecs.py +6 -0
  67. nuitka/tools/data_composer/DataComposer.py +25 -27
  68. nuitka/tools/general/find_module/FindModuleCode.py +5 -2
  69. nuitka/tools/podman/Podman.py +53 -0
  70. nuitka/tools/podman/__init__.py +18 -0
  71. nuitka/tools/podman/__main__.py +255 -0
  72. nuitka/tools/specialize/SpecializePython.py +37 -3
  73. nuitka/tools/testing/RuntimeTracing.py +4 -0
  74. nuitka/tree/Building.py +1 -1
  75. nuitka/tree/ReformulationFunctionStatements.py +137 -10
  76. nuitka/utils/Execution.py +11 -1
  77. nuitka/utils/ModuleNames.py +1 -1
  78. nuitka/utils/SharedLibraries.py +7 -7
  79. {Nuitka_winsvc-1.6.6.data → Nuitka_winsvc-1.7.5.data}/scripts/nuitka-run.bat +0 -0
  80. {Nuitka_winsvc-1.6.6.data → Nuitka_winsvc-1.7.5.data}/scripts/nuitka.bat +0 -0
  81. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/LICENSE.txt +0 -0
  82. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/WHEEL +0 -0
  83. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/entry_points.txt +0 -0
  84. {Nuitka_winsvc-1.6.6.dist-info → Nuitka_winsvc-1.7.5.dist-info}/top_level.txt +0 -0
@@ -93,9 +93,10 @@
93
93
  - description: 'avoid socket module usage'
94
94
  replacements_plain:
95
95
  'import socket': ''
96
- change_function:
97
- 'make_msgid': 'un-callable'
98
- when: 'not use_socket'
96
+ 'socket.': '__import__("socket").'
97
+ no-auto-follow:
98
+ - 'socket'
99
+ when: 'not has_builtin_module("_socket")'
99
100
 
100
101
  - module-name: 'encodings'
101
102
  implicit-imports:
@@ -161,7 +162,6 @@
161
162
 
162
163
  - module-name: 'lib2to3.pgen2'
163
164
  data-files:
164
- dest_path: 'lib2to3'
165
165
  patterns:
166
166
  - '../*.pickle'
167
167
  when: 'not debian_python'
@@ -172,6 +172,11 @@
172
172
  change_function:
173
173
  'test': "'(lambda: None)'"
174
174
 
175
+ - module-name: 'lib2to3.refactor'
176
+ implicit-imports:
177
+ - depends:
178
+ - 'lib2to3.fixes.*'
179
+
175
180
  - module-name: 'locale'
176
181
  anti-bloat:
177
182
  - description: 'remove module ability to run as a binary'
@@ -190,6 +195,13 @@
190
195
  change_function:
191
196
  '_main': "'(lambda: None)'"
192
197
 
198
+ - module-name: 'multiprocessing.resource_tracker'
199
+ anti-bloat:
200
+ - description: "workaround for starting 'multiprocessing resource tracker"
201
+ replacements_plain:
202
+ "args += ['-c', cmd % r]": "args += ['--multiprocessing-resource-tracker', str(r)]"
203
+ when: 'not module_mode'
204
+
193
205
  - module-name: 'pathlib'
194
206
  implicit-imports:
195
207
  - depends:
@@ -104,6 +104,12 @@ importlib_resources_read_text_spec = BuiltinParameterSpec(
104
104
  default_count=2,
105
105
  type_shape=tshape_str,
106
106
  )
107
+ importlib_resources_files_spec = BuiltinParameterSpec(
108
+ "importlib.resources.files",
109
+ ("package",),
110
+ default_count=0,
111
+ )
112
+
107
113
 
108
114
  # os/sys functions:
109
115
  os_uname_spec = BuiltinParameterSpec(
@@ -24,14 +24,7 @@ import struct
24
24
  import sys
25
25
  from math import copysign, isinf, isnan
26
26
 
27
- from nuitka.__past__ import (
28
- BytesIO,
29
- GenericAlias,
30
- long,
31
- to_byte,
32
- unicode,
33
- xrange,
34
- )
27
+ from nuitka.__past__ import BytesIO, long, to_byte, unicode, xrange
35
28
  from nuitka.build.DataComposerInterface import deriveModuleConstantsBlobName
36
29
  from nuitka.Builtins import builtin_exception_values_list, builtin_named_values
37
30
  from nuitka.PythonVersions import (
@@ -43,6 +36,7 @@ from nuitka.PythonVersions import (
43
36
  from nuitka.Serialization import (
44
37
  BlobData,
45
38
  BuiltinAnonValue,
39
+ BuiltinGenericAliasValue,
46
40
  BuiltinSpecialValue,
47
41
  BuiltinUnionTypeValue,
48
42
  ConstantStreamReader,
@@ -282,11 +276,11 @@ def _writeConstantValue(output, constant_value):
282
276
  output.write(b"X")
283
277
  output.write(struct.pack("i", len(constant_value)))
284
278
  output.write(constant_value)
285
- elif constant_type is GenericAlias:
279
+ elif constant_type is BuiltinGenericAliasValue:
286
280
  output.write(b"G")
287
281
  _last_written = None
288
- _writeConstantValue(output, constant_value.__origin__)
289
- _writeConstantValue(output, constant_value.__args__)
282
+ _writeConstantValue(output, constant_value.origin)
283
+ _writeConstantValue(output, constant_value.args)
290
284
  elif constant_type is BuiltinUnionTypeValue:
291
285
  output.write(b"H")
292
286
  _last_written = None
@@ -340,7 +334,7 @@ def _writeConstantStream(constants_reader):
340
334
  # TODO: Debug mode only?
341
335
  result.write(b".")
342
336
 
343
- return count, struct.pack("h", count) + result.getvalue()
337
+ return count, struct.pack("H", count) + result.getvalue()
344
338
 
345
339
 
346
340
  crc32 = 0
@@ -401,26 +395,30 @@ def main():
401
395
  for fullpath, filename in const_files:
402
396
  data_composer_logger.info("Working on constant file '%s'." % filename)
403
397
 
404
- with open(fullpath, "rb") as const_file:
405
- constants_reader = ConstantStreamReader(const_file)
406
- count, part = _writeConstantStream(constants_reader)
407
- total += count
398
+ try:
399
+ with open(fullpath, "rb") as const_file:
400
+ constants_reader = ConstantStreamReader(const_file)
401
+ count, part = _writeConstantStream(constants_reader)
402
+ total += count
408
403
 
409
- name = deriveModuleConstantsBlobName(filename)
404
+ name = deriveModuleConstantsBlobName(filename)
410
405
 
411
- # Make sure that is not repeated.
412
- assert name not in names, name
413
- names.add(name)
406
+ # Make sure that is not repeated.
407
+ assert name not in names, name
408
+ names.add(name)
414
409
 
415
- data_composer_logger.info(
416
- "Storing %r chunk with %s values size %r." % (name, count, len(part))
417
- )
410
+ data_composer_logger.info(
411
+ "Storing %r chunk with %s values size %r." % (name, count, len(part))
412
+ )
418
413
 
419
- if str is not bytes:
420
- # Encoding needs to match generated source code output.
421
- name = name.encode("latin1")
414
+ if str is not bytes:
415
+ # Encoding needs to match generated source code output.
416
+ name = name.encode("latin1")
422
417
 
423
- desc.append((name, part))
418
+ desc.append((name, part))
419
+ except Exception:
420
+ data_composer_logger.warning("Problem with constant file '%s'." % filename)
421
+ raise
424
422
 
425
423
  data_composer_logger.info("Total amount of constants is %d." % total)
426
424
 
@@ -58,7 +58,9 @@ def editModuleCode(module_search_desc):
58
58
 
59
59
  candidate = module_search_desc
60
60
 
61
- while not candidate.endswith(".DIS"):
61
+ while not candidate.endswith(".DIS") and not os.path.basename(
62
+ candidate
63
+ ).startswith("ONEFIL"):
62
64
  candidate = os.path.dirname(candidate)
63
65
 
64
66
  module_name = relpath(module_search_desc, start=candidate).replace(
@@ -105,4 +107,5 @@ def editModuleCode(module_search_desc):
105
107
  "code.cmd" if isWin32Windows() else "code"
106
108
  )
107
109
 
108
- callProcess([visual_code_binary, module_filename])
110
+ if visual_code_binary:
111
+ callProcess([visual_code_binary, module_filename])
@@ -0,0 +1,53 @@
1
+ # Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com
2
+ #
3
+ # Part of "Nuitka", an optimizing Python compiler that is compatible and
4
+ # integrates with CPython, but also works on its own.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ """ Podman container usage tools. """
19
+
20
+ from nuitka.utils.Execution import getExecutablePath
21
+ from nuitka.utils.Utils import (
22
+ isDebianBasedLinux,
23
+ isFedoraBasedLinux,
24
+ isLinux,
25
+ isWin32Windows,
26
+ )
27
+
28
+
29
+ def getPodmanExecutablePath(logger):
30
+ result = getExecutablePath("podman")
31
+
32
+ if getExecutablePath("podman") is None:
33
+ if isWin32Windows():
34
+ logger.sysexit(
35
+ """\
36
+ Cannot find 'podman'. Install it from \
37
+ 'https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md'."""
38
+ )
39
+ elif isLinux():
40
+ if isDebianBasedLinux():
41
+ logger.sysexit(
42
+ "Cannot find 'podman'. Install it with 'apt-get install podman'."
43
+ )
44
+ elif isFedoraBasedLinux():
45
+ logger.sysexit(
46
+ "Cannot find 'podman'. Install it with 'dnf install podman'."
47
+ )
48
+ else:
49
+ logger.sysexit(
50
+ "Cannot find 'podman'. Install it with your package manager."
51
+ )
52
+
53
+ return result
@@ -0,0 +1,18 @@
1
+ # Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com
2
+ #
3
+ # Part of "Nuitka", an optimizing Python compiler that is compatible and
4
+ # integrates with CPython, but also works on its own.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ """ Dummy file to make this directory a package. """
@@ -0,0 +1,255 @@
1
+ # Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com
2
+ #
3
+ # Part of "Nuitka", an optimizing Python compiler that is compatible and
4
+ # integrates with CPython, but also works on its own.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ """ Launcher for running a script inside a container
19
+
20
+ """
21
+
22
+ import os
23
+ import shutil
24
+ import sys
25
+ from optparse import OptionParser
26
+
27
+ from nuitka.tools.release.Release import getBranchName
28
+ from nuitka.Tracing import OurLogger
29
+ from nuitka.utils.Execution import callProcess
30
+
31
+ from .Podman import getPodmanExecutablePath
32
+
33
+ containers_logger = OurLogger("Nuitka-Containers", base_style="blue")
34
+
35
+
36
+ def parseOptions():
37
+ parser = OptionParser()
38
+
39
+ parser.add_option(
40
+ "--container-id",
41
+ action="store",
42
+ dest="container_id",
43
+ default="CI",
44
+ help="""
45
+ Name of the container to use. Defaults to "CI" which is used for testing
46
+ Nuitka with Linux.
47
+ """,
48
+ )
49
+
50
+ parser.add_option(
51
+ "--no-build-container",
52
+ action="store_true",
53
+ dest="no_build_container",
54
+ help="""
55
+ Do not update the the container, use it if updating was done recently.
56
+ """,
57
+ )
58
+
59
+ parser.add_option(
60
+ "--command",
61
+ action="store",
62
+ dest="command",
63
+ help="""
64
+ Command to execute, all in one value.
65
+ """,
66
+ )
67
+
68
+ parser.add_option(
69
+ "--podman-path",
70
+ action="store",
71
+ dest="podman_path",
72
+ default=None,
73
+ help="""
74
+ Podman binary in case you do not have it in your path.
75
+ """,
76
+ )
77
+
78
+ parser.add_option(
79
+ "--shared-path",
80
+ action="append",
81
+ dest="shared_paths",
82
+ default=[],
83
+ help="""
84
+ Path to share with container, use "--shared-path=src=dst" format for directory names.
85
+ """,
86
+ )
87
+
88
+ parser.add_option(
89
+ "--network",
90
+ action="store_true",
91
+ dest="network",
92
+ default=False,
93
+ help="""
94
+ This container run should be allowed to use network.
95
+ """,
96
+ )
97
+
98
+ parser.add_option(
99
+ "--pbuilder",
100
+ action="store_true",
101
+ dest="pbuilder",
102
+ default=False,
103
+ help="""
104
+ This container run should be allowed to use pbuilder.
105
+ """,
106
+ )
107
+
108
+ options, positional_args = parser.parse_args()
109
+
110
+ if positional_args:
111
+ containers_logger.sysexit(
112
+ "This command takes no positional arguments, check help output."
113
+ )
114
+
115
+ if options.podman_path is None:
116
+ options.podman_path = getPodmanExecutablePath(containers_logger)
117
+
118
+ assert options.podman_path is not None
119
+
120
+ return options
121
+
122
+
123
+ def updateContainer(podman_path, container_tag_name, container_file_path):
124
+ requirements_file = os.path.join(
125
+ os.path.dirname(__file__), "..", "..", "..", "requirements-devel.txt"
126
+ )
127
+
128
+ if not os.path.exists(requirements_file):
129
+ containers_logger.sysexit(
130
+ "Error, cannot find expected requirements-devel.txt file."
131
+ )
132
+
133
+ containers_logger.info("Updating container '%s'..." % container_tag_name)
134
+
135
+ requirements_tmp_file = os.path.join(
136
+ os.path.dirname(container_file_path), "requirements-devel.txt"
137
+ )
138
+
139
+ shutil.copy(requirements_file, requirements_tmp_file)
140
+
141
+ try:
142
+ command = [
143
+ podman_path,
144
+ "build",
145
+ # Tolerate errors checking for image download, and use old one
146
+ "--quiet",
147
+ "--pull=newer",
148
+ "--tag",
149
+ container_tag_name,
150
+ "-f",
151
+ container_file_path,
152
+ ]
153
+
154
+ exit_code = callProcess(command)
155
+
156
+ if exit_code:
157
+ containers_logger.sysexit(
158
+ "Failed to update container with exit code '%d'." % exit_code,
159
+ exit_code=exit_code,
160
+ )
161
+
162
+ containers_logger.info(
163
+ "Updated container '%s' successfully." % container_tag_name
164
+ )
165
+
166
+ finally:
167
+ os.unlink(requirements_tmp_file)
168
+
169
+
170
+ def main():
171
+ options = parseOptions()
172
+
173
+ containers_logger.info(
174
+ "Running in container '%s' this command: %s"
175
+ % (options.container_id, options.command)
176
+ )
177
+
178
+ container_file_path = os.path.join(
179
+ os.path.dirname(__file__), "containers", options.container_id + ".containerfile"
180
+ )
181
+
182
+ if not os.path.isfile(container_file_path):
183
+ containers_logger.sysexit(
184
+ "Error, no container ID '%s' found" % options.container_id
185
+ )
186
+
187
+ container_tag_name = "nuitka-build-%s-%s:latest" % (
188
+ options.container_id.lower(),
189
+ getBranchName(),
190
+ )
191
+
192
+ if not options.no_build_container:
193
+ updateContainer(
194
+ podman_path=options.podman_path,
195
+ container_tag_name=container_tag_name,
196
+ container_file_path=container_file_path,
197
+ )
198
+
199
+ command = [
200
+ options.podman_path,
201
+ "run",
202
+ "--mount",
203
+ "type=bind,source=.,dst=/src,relabel=shared",
204
+ ]
205
+
206
+ if options.network:
207
+ command.append("--add-host=ssh.nuitka.net:116.202.30.188")
208
+ else:
209
+ command.append("--network=none")
210
+
211
+ # May need to allow pbuilder to create device nodes, makes the container insecure
212
+ # though.
213
+ if options.pbuilder:
214
+ command += ["--privileged"]
215
+
216
+ dst_paths = []
217
+
218
+ for path_desc in options.shared_paths:
219
+ if path_desc.count("=") == 1:
220
+ src_path, dst_path = path_desc.split("=")
221
+ flags = ""
222
+ else:
223
+ src_path, dst_path, flags = path_desc.split("=", 2)
224
+ flags = "," + flags
225
+
226
+ src_path = os.path.expanduser(src_path)
227
+
228
+ dst_paths.append(dst_path)
229
+
230
+ command += [
231
+ "--mount",
232
+ "type=bind,source=%s,dst=%s,relabel=shared%s" % (src_path, dst_path, flags),
233
+ ]
234
+
235
+ # Interactive if possible only.
236
+ if sys.stdout.isatty():
237
+ command.append("-it")
238
+
239
+ command += [
240
+ container_tag_name,
241
+ "bash",
242
+ "-l",
243
+ "-c",
244
+ "cd /src;" + options.command + "; exit $?",
245
+ ]
246
+
247
+ exit_code = callProcess(command, shell=False, logger=containers_logger)
248
+
249
+ containers_logger.sysexit(
250
+ "Finished container run with exit code '%d'." % exit_code, exit_code=exit_code
251
+ )
252
+
253
+
254
+ if __name__ == "__main__":
255
+ main()
@@ -42,6 +42,7 @@ import nuitka.specs.BuiltinStrOperationSpecs
42
42
  import nuitka.specs.BuiltinTypeOperationSpecs
43
43
  import nuitka.specs.HardImportSpecs
44
44
  import nuitka.tree.Building
45
+ from nuitka.containers.OrderedSets import OrderedSet
45
46
  from nuitka.nodes.ImportNodes import hard_modules_non_stdlib
46
47
  from nuitka.nodes.NodeMetaClasses import NodeCheckMetaClass
47
48
  from nuitka.nodes.shapes.BuiltinTypeShapes import (
@@ -521,7 +522,12 @@ def makeMixinName(
521
522
  for named_child in named_children
522
523
  )
523
524
 
524
- mixin_name += "_".join(sorted(auto_compute_handling)).title().replace("_", "")
525
+ mixin_name += (
526
+ "_".join(sorted(auto_compute_handling))
527
+ .title()
528
+ .replace("_", "")
529
+ .replace(":", "")
530
+ )
525
531
 
526
532
  mixin_name += "_".join(sorted(node_attributes)).title().replace("_", "")
527
533
 
@@ -725,7 +731,8 @@ addFromNodes()
725
731
 
726
732
 
727
733
  def makeChildrenHavingMixinNodes():
728
- # Complex stuff with many details due to 2 files and modes, pylint: disable=too-many-locals
734
+ # Complex stuff with many details due to 2 files and modes,
735
+ # pylint: disable=too-many-locals,too-many-statements
729
736
 
730
737
  filename_python = "nuitka/nodes/ChildrenHavingMixins.py"
731
738
  filename_python2 = "nuitka/nodes/ExpressionBasesGenerated.py"
@@ -833,10 +840,36 @@ from nuitka.nodes.Checkers import (
833
840
  return result
834
841
 
835
842
  is_compute_final = pop("final")
843
+
836
844
  is_compute_no_raise = pop("no_raise")
845
+ is_compute_raise = pop("raise")
846
+ is_compute_raise_operation = pop("raise_operation")
847
+ assert (
848
+ is_compute_no_raise + is_compute_raise + is_compute_raise_operation < 2
849
+ )
850
+
851
+ if is_compute_raise:
852
+ raise_mode = "raise"
853
+ elif is_compute_no_raise:
854
+ raise_mode = "no_raise"
855
+ elif is_compute_raise_operation:
856
+ raise_mode = "raise_operation"
857
+ else:
858
+ raise_mode = None
859
+
837
860
  is_compute_statement = pop("operation")
838
861
  has_post_node_init = pop("post_init")
839
862
 
863
+ awaited_constant_attributes = OrderedSet(
864
+ value.split(":", 1)[1]
865
+ for value in auto_compute_handling_set
866
+ if value.startswith("wait_constant:")
867
+ )
868
+
869
+ auto_compute_handling_set -= {
870
+ "wait_constant:%s" % value for value in awaited_constant_attributes
871
+ }
872
+
840
873
  assert not auto_compute_handling_set, auto_compute_handling_set
841
874
 
842
875
  code = template.render(
@@ -852,8 +885,9 @@ from nuitka.nodes.Checkers import (
852
885
  ),
853
886
  intended_for=intended_for,
854
887
  is_compute_final=is_compute_final,
855
- is_compute_no_raise=is_compute_no_raise,
888
+ raise_mode=raise_mode,
856
889
  is_compute_statement=is_compute_statement,
890
+ awaited_constant_attributes=awaited_constant_attributes,
857
891
  has_post_node_init=has_post_node_init,
858
892
  node_attributes=node_attributes,
859
893
  len=len,
@@ -132,6 +132,10 @@ def _takeSystemCallTraceOutput(logger, path, command):
132
132
  if line.startswith((b"stat(", b"newfstatat(")) and b"S_IFDIR" in line:
133
133
  continue
134
134
 
135
+ # Don't consider files not found.
136
+ if line.startswith(b"stat64(") and b"= -1" in line:
137
+ continue
138
+
135
139
  result.extend(
136
140
  os.path.abspath(match)
137
141
  for match in re.findall(b'"(.*?)(?:\\\\0)?"', line)
nuitka/tree/Building.py CHANGED
@@ -1313,7 +1313,7 @@ def buildModule(
1313
1313
  plugins_logger.warning(line)
1314
1314
 
1315
1315
  if len(contributing_plugins) == 1:
1316
- contributing_plugins[0].sysexit(
1316
+ next(iter(contributing_plugins)).sysexit(
1317
1317
  "Making changes to '%s' that cause SyntaxError '%s'"
1318
1318
  % (module_name, e)
1319
1319
  )