commit 5f99e760b9dcf1c9248534d7609ce644f96ca438 Author: megastallman Date: Thu Feb 26 09:41:37 2026 +0100 Co-Authored-By: Claude Sonnet 4.6 diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index 896d028c42..a79642e1bd 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -2,7 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -from __future__ import unicode_literals import os, sys diff --git a/build/pypng/iccp.py b/build/pypng/iccp.py index 190db734c6..5ee07b5ac9 100644 --- a/build/pypng/iccp.py +++ b/build/pypng/iccp.py @@ -346,9 +346,9 @@ def tagblock(tag): def iccp(out, inp): profile = Profile().fromString(*profileFromPNG(inp)) - print >>out, profile.d - print >>out, map(lambda x: x[0], profile.rawtagtable) - print >>out, profile.tag + print(profile.d, file=out) + print(map(lambda x: x[0], profile.rawtagtable, file=out)) + print(profile.tag, file=out) def profileFromPNG(inp): """Extract profile from PNG file. Return (*profile*, *name*) diff --git a/configure.py b/configure.py index 64bf38b53e..9f9bf1d2e1 100644 --- a/configure.py +++ b/configure.py @@ -4,7 +4,7 @@ from __future__ import print_function, unicode_literals -import imp +import importlib.util import os import sys @@ -14,9 +14,11 @@ sys.path.append(os.path.join(base_dir, 'platform', 'python', 'mozbuild')) from mozbuild.configure import ConfigureSandbox # We can't just import config_status since configure is shadowed by this file! -f, pathname, desc = imp.find_module('configure', - [os.path.join(base_dir, 'platform')]) -config_status = imp.load_module('configure', f, pathname, desc).config_status +_configure_path = os.path.join(base_dir, 'platform', 'configure.py') +_spec = importlib.util.spec_from_file_location('_platform_configure', _configure_path) +_mod = importlib.util.module_from_spec(_spec) +_spec.loader.exec_module(_mod) +config_status = _mod.config_status def main(argv): config = {}