summaryrefslogtreecommitdiffstats
path: root/dom/bindings/mozwebidlcodegen
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/bindings/mozwebidlcodegen
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/bindings/mozwebidlcodegen')
-rw-r--r--dom/bindings/mozwebidlcodegen/__init__.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/dom/bindings/mozwebidlcodegen/__init__.py b/dom/bindings/mozwebidlcodegen/__init__.py
index 8b6e62f345..3e8c6aa420 100644
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -14,7 +14,6 @@ import os
from copy import deepcopy
import mozpack.path as mozpath
-import six
from mach.mixin.logging import LoggingMixin
from mozbuild.makeutil import Makefile
from mozbuild.pythonutil import iter_modules_in_path
@@ -339,10 +338,8 @@ class WebIDLCodegenManager(LoggingMixin):
if self._make_deps_path:
mk = Makefile()
codegen_rule = mk.create_rule([self._make_deps_target])
- codegen_rule.add_dependencies(
- six.ensure_text(s) for s in global_hashes.keys()
- )
- codegen_rule.add_dependencies(six.ensure_text(p) for p in self._input_paths)
+ codegen_rule.add_dependencies(global_hashes.keys())
+ codegen_rule.add_dependencies(self._input_paths)
with FileAvoidWrite(self._make_deps_path) as fh:
mk.dump(fh)
@@ -359,7 +356,12 @@ class WebIDLCodegenManager(LoggingMixin):
example_paths = self._example_paths(interface)
for path in example_paths:
- print("Generating {}".format(path))
+ self.log(
+ logging.INFO,
+ "webidl_generate_example_files",
+ {"filename": path},
+ "Generating WebIDL example files derived from {filename}",
+ )
return self._maybe_write_codegen(root, *example_paths)
@@ -380,7 +382,7 @@ class WebIDLCodegenManager(LoggingMixin):
for path in sorted(self._input_paths):
with io.open(path, "r", encoding="utf-8") as fh:
data = fh.read()
- hashes[path] = hashlib.sha1(six.ensure_binary(data)).hexdigest()
+ hashes[path] = hashlib.sha1(data.encode()).hexdigest()
parser.parse(data, path)
# Only these directories may contain WebIDL files with interfaces
@@ -494,7 +496,7 @@ class WebIDLCodegenManager(LoggingMixin):
for name in changedDictionaryNames:
d = self._config.getDictionaryIfExists(name)
if d:
- changed_inputs.add(d.filename())
+ changed_inputs.add(d.filename)
# Only use paths that are known to our current state.
# This filters out files that were deleted or changed type (e.g. from