diff options
Diffstat (limited to 'user/mozjs/python3.patch')
-rw-r--r-- | user/mozjs/python3.patch | 331 |
1 files changed, 0 insertions, 331 deletions
diff --git a/user/mozjs/python3.patch b/user/mozjs/python3.patch index 2ff9dcfa6..65fc9da53 100644 --- a/user/mozjs/python3.patch +++ b/user/mozjs/python3.patch @@ -424,17 +424,6 @@ return bool(self._set) def __iter__(self): ---- mozjs-52.4.0/python/mozbuild/mozbuild/milestone.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozbuild/milestone.py (refactored) -@@ -2,7 +2,7 @@ - # 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 absolute_import, print_function, unicode_literals -+ - - import argparse - import os --- mozjs-52.4.0/python/mozbuild/mozbuild/mozconfig.py (original) +++ mozjs-52.4.0/python/mozbuild/mozbuild/mozconfig.py (refactored) @@ -2,7 +2,7 @@ @@ -962,26 +951,6 @@ - print('%s=%s' % (key, value)) +for key, value in list(os.environ.items()): + print(('%s=%s' % (key, value))) ---- mozjs-52.4.0/python/mozbuild/mozbuild/action/explode_aar.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozbuild/action/explode_aar.py (refactored) -@@ -2,7 +2,7 @@ - # 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 absolute_import, print_function, unicode_literals -+ - - import argparse - import errno -@@ -44,7 +44,7 @@ - assets = mozpath.join(destdir, 'assets') - try: - os.rmdir(assets) -- except OSError, e: -+ except OSError as e: - if e.errno in (errno.ENOTEMPTY, errno.ENOENT): - pass - else: --- mozjs-52.4.0/python/mozbuild/mozbuild/action/file_generate.py (original) +++ mozjs-52.4.0/python/mozbuild/mozbuild/action/file_generate.py (refactored) @@ -6,7 +6,7 @@ @@ -1201,17 +1170,6 @@ from mozpack.files import FileFinder from mozpack.copier import Jarrer ---- mozjs-52.4.0/python/mozbuild/mozbuild/backend/android_eclipse.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozbuild/backend/android_eclipse.py (refactored) -@@ -2,7 +2,7 @@ - # 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 absolute_import, unicode_literals -+ - - import itertools - import os --- mozjs-52.4.0/python/mozbuild/mozbuild/backend/base.py (original) +++ mozjs-52.4.0/python/mozbuild/mozbuild/backend/base.py (refactored) @@ -2,7 +2,7 @@ @@ -3235,21 +3193,6 @@ os.path.join(os.path.abspath(mozbuild_path), '__init__.py'), os.path.join(os.path.abspath(mozbuild_path), 'pythonutil.py'), os.path.join(os.path.abspath(mozbuild_path), 'test', 'test_pythonutil.py'), ---- mozjs-52.4.0/python/mozbuild/mozbuild/test/test_testing.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/test_testing.py (refactored) -@@ -2,9 +2,9 @@ - # 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 cPickle as pickle -+ -+ -+import pickle as pickle - import os - import shutil - import tempfile --- mozjs-52.4.0/python/mozbuild/mozbuild/test/test_util.py (original) +++ mozjs-52.4.0/python/mozbuild/mozbuild/test/test_util.py (refactored) @@ -3,7 +3,7 @@ @@ -3488,17 +3431,6 @@ import os import unittest ---- mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (refactored) -@@ -2,7 +2,7 @@ - # 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 json - import os --- mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_build.py (original) +++ mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_build.py (refactored) @@ -2,7 +2,7 @@ @@ -7145,26 +7077,6 @@ import posixpath import os ---- mozjs-52.4.0/python/mozbuild/mozpack/unify.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozpack/unify.py (refactored) -@@ -2,7 +2,7 @@ - # 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 absolute_import -+ - - from mozpack.files import ( - BaseFinder, -@@ -73,7 +73,7 @@ - creating the instance. - skip_if_older is ignored. - ''' -- assert isinstance(dest, basestring) -+ assert isinstance(dest, str) - tmpfiles = [] - try: - for e in self._executables: --- mozjs-52.4.0/python/mozbuild/mozpack/chrome/flags.py (original) +++ mozjs-52.4.0/python/mozbuild/mozpack/chrome/flags.py (refactored) @@ -2,7 +2,7 @@ @@ -7615,17 +7527,6 @@ ) ---- mozjs-52.4.0/python/mozbuild/mozpack/test/test_unify.py (original) -+++ mozjs-52.4.0/python/mozbuild/mozpack/test/test_unify.py (refactored) -@@ -13,7 +13,7 @@ - from mozpack.files import FileFinder - from mozpack.mozjar import JarWriter - from mozpack.test.test_files import MockDest --from cStringIO import StringIO -+from io import StringIO - import os - import sys - from mozpack.errors import ( --- mozjs-52.4.0/python/mozbuild/mozpack/test/support/minify_js_verify.py (original) +++ mozjs-52.4.0/python/mozbuild/mozpack/test/support/minify_js_verify.py (refactored) @@ -2,7 +2,7 @@ @@ -7837,42 +7738,6 @@ diff -aur mozjs-52.4.0/python/mozbuild/mozbuild/makeutil.py mozjs-fixed/python/m self._commands.extend(commands) return self -diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py ---- mozjs-52.4.0/python/which/which.py 2017-04-11 02:13:24.000000000 +0000 -+++ mozjs-fixed/python/which/which.py 2018-07-10 08:11:01.570000000 +0000 -@@ -280,17 +280,17 @@ - try: - optlist, args = getopt.getopt(argv[1:], 'haVvqp:e:', - ['help', 'all', 'version', 'verbose', 'quiet', 'path=', 'exts=']) -- except getopt.GetoptError, msg: -+ except getopt.GetoptError as msg: - sys.stderr.write("which: error: %s. Your invocation was: %s\n"\ - % (msg, argv)) - sys.stderr.write("Try 'which --help'.\n") - return 1 - for opt, optarg in optlist: - if opt in ('-h', '--help'): -- print _cmdlnUsage -+ print(_cmdlnUsage) - return 0 - elif opt in ('-V', '--version'): -- print "which %s" % __version__ -+ print("which %s" % __version__) - return 0 - elif opt in ('-a', '--all'): - all = 1 -@@ -318,9 +318,9 @@ - nmatches = 0 - for match in whichgen(arg, path=altpath, verbose=verbose, exts=exts): - if verbose: -- print "%s (%s)" % match -+ print("%s (%s)" % match) - else: -- print match -+ print(match) - nmatches += 1 - if not all: - break diff -aur mozjs-52.4.0/testing/mozbase/mozprocess/mozprocess/processhandler.py mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py --- mozjs-52.4.0/testing/mozbase/mozprocess/mozprocess/processhandler.py 2017-04-11 02:13:06.000000000 +0000 +++ mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py 2018-07-10 08:13:15.440000000 +0000 @@ -8117,18 +7982,6 @@ diff -aur mozjs-52.4.0/python/mozbuild/mozbuild/virtualenv.py mozjs-fixed/python log_handle.write('You are running Python %s.\n' % our) if os.name in ('nt', 'ce'): -diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py ---- mozjs-52.4.0/python/which/which.py 2018-07-10 10:29:50.380000000 +0000 -+++ mozjs-fixed/python/which/which.py 2018-07-10 10:20:16.770000000 +0000 -@@ -243,7 +243,7 @@ - If no match is found for the command, a WhichError is raised. - """ - try: -- match = whichgen(command, path, verbose, exts).next() -+ match = next(whichgen(command, path, verbose, exts)) - except StopIteration: - raise WhichError("Could not find '%s' on the path." % command) - return match --- mozjs-52.4.0/build/moz.configure/old.configure.old 2018-07-10 10:32:48.550000000 +0000 +++ mozjs-52.4.0/build/moz.configure/old.configure 2018-07-10 10:35:32.440000000 +0000 @@ -107,7 +107,7 @@ @@ -8252,57 +8105,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py from mozbuild.config_status import config_status # Some values in sanitized_config also have more complex types, such as ---- mozjs-52.4.0/python/blessings/blessings/__init__.py.old 2017-04-11 02:13:23.000000000 +0000 -+++ mozjs-52.4.0/python/blessings/blessings/__init__.py 2018-07-10 10:56:52.820000000 +0000 -@@ -333,7 +333,7 @@ - 'shadow', 'standout', 'subscript', 'superscript'])) - - --class ParametrizingString(unicode): -+class ParametrizingString(str): - """A Unicode string which can be called to parametrize it as a terminal capability""" - def __new__(cls, formatting, normal=None): - """Instantiate. -@@ -343,7 +343,7 @@ - "normal" capability. - - """ -- new = unicode.__new__(cls, formatting) -+ new = str.__new__(cls, formatting) - new._normal = normal - return new - -@@ -375,10 +375,10 @@ - raise - - --class FormattingString(unicode): -+class FormattingString(str): - """A Unicode string which can be called upon a piece of text to wrap it in formatting""" - def __new__(cls, formatting, normal): -- new = unicode.__new__(cls, formatting) -+ new = str.__new__(cls, formatting) - new._normal = normal - return new - -@@ -393,7 +393,7 @@ - return self + text + self._normal - - --class NullCallableString(unicode): -+class NullCallableString(str): - """A dummy class to stand in for ``FormattingString`` and ``ParametrizingString`` - - A callable bytestring that returns an empty Unicode when called with an int -@@ -402,7 +402,7 @@ - - """ - def __new__(cls): -- new = unicode.__new__(cls, u'') -+ new = str.__new__(cls, u'') - return new - - def __call__(self, arg): --- mozjs-52.4.0/testing/mozbase/mozfile/mozfile/mozfile.py (original) +++ mozjs-52.4.0/testing/mozbase/mozfile/mozfile/mozfile.py (refactored) @@ -6,7 +6,7 @@ @@ -8599,56 +8401,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py cls._walk_directories(directories, callback, pattern=pattern, ignore=ignore) ---- mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/cli.py (original) -+++ mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/cli.py (refactored) -@@ -81,7 +81,7 @@ - # parse the arguments - try: - kwargs, tags, args = parse_args(args) -- except ParserError, e: -+ except ParserError as e: - self._parser.error(e.message) - - # make sure we have some manifests, otherwise it will -@@ -132,7 +132,7 @@ - manifest = convert(args, pattern=options.pattern, ignore=options.ignore, - write=options.in_place) - if manifest: -- print manifest -+ print(manifest) - - - class WriteCLI(CLICommand): -@@ -146,7 +146,7 @@ - # parse the arguments - try: - kwargs, tags, args = parse_args(args) -- except ParserError, e: -+ except ParserError as e: - self._parser.error(e.message) - - # make sure we have some manifests, otherwise it will -@@ -175,9 +175,9 @@ - commands[args[0]](self._parser).parser().print_help() - else: - self._parser.print_help() -- print '\nCommands:' -+ print('\nCommands:') - for command in sorted(commands): -- print ' %s : %s' % (command, commands[command].__doc__.strip()) -+ print(' %s : %s' % (command, commands[command].__doc__.strip())) - - - class UpdateCLI(CLICommand): -@@ -190,7 +190,7 @@ - # parse the arguments - try: - kwargs, tags, args = parse_args(args) -- except ParserError, e: -+ except ParserError as e: - self._parser.error(e.message) - - # make sure we have some manifests, otherwise it will --- mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/expression.py (original) +++ mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/expression.py (refactored) @@ -275,7 +275,7 @@ @@ -9378,61 +9130,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py lines.append("{0:6}: {1}".format(v, k)) lines.sort() ---- mozjs-52.4.0/config/link.py (original) -+++ mozjs-52.4.0/config/link.py (refactored) -@@ -18,7 +18,7 @@ - time.sleep(0.5) - idleTime += 0.5 - if idleTime > 20 * 60: -- print "Still linking, 20 minutes passed..." -+ print("Still linking, 20 minutes passed...") - sys.stdout.flush() - idleTime = 0 - -@@ -42,6 +42,6 @@ - - if __name__ == "__main__": - if len(sys.argv) < 2: -- print >>sys.stderr, "Usage: link.py <commandline>" -+ print("Usage: link.py <commandline>", file=sys.stderr) - sys.exit(1) - sys.exit(wrap_linker(sys.argv[1:])) ---- mozjs-52.4.0/config/mozunit.py (original) -+++ mozjs-52.4.0/config/mozunit.py (refactored) -@@ -140,7 +140,7 @@ - ''' - def __init__(self, files = {}): - self.files = {} -- for name, content in files.iteritems(): -+ for name, content in files.items(): - self.files[normcase(os.path.abspath(name))] = content - - def __call__(self, name, mode = 'r'): -@@ -158,19 +158,19 @@ - return file - - def __enter__(self): -- import __builtin__ -- self.open = __builtin__.open -+ import builtins -+ self.open = builtins.open - self._orig_path_exists = os.path.exists - self._orig_path_isdir = os.path.isdir - self._orig_path_isfile = os.path.isfile -- __builtin__.open = self -+ builtins.open = self - os.path.exists = self._wrapped_exists - os.path.isdir = self._wrapped_isdir - os.path.isfile = self._wrapped_isfile - - def __exit__(self, type, value, traceback): -- import __builtin__ -- __builtin__.open = self.open -+ import builtins -+ builtins.open = self.open - os.path.exists = self._orig_path_exists - os.path.isdir = self._orig_path_isdir - os.path.isfile = self._orig_path_isfile --- mozjs-52.4.0/config/nsinstall.py (original) +++ mozjs-52.4.0/config/nsinstall.py (refactored) @@ -9,7 +9,7 @@ @@ -9782,34 +9479,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py sys.stderr.flush() if proc.returncode: return proc.returncode ---- mozjs-52.4.0/js/src/jsautokw.py.old 2017-04-11 02:13:16.000000000 +0000 -+++ mozjs-52.4.0/js/src/jsautokw.py 2018-07-11 05:11:27.080000000 +0000 -@@ -80,14 +80,14 @@ - per_column = column_dict.setdefault(keyword[column], []) - per_column.append(item) - -- return sorted(column_dict.items(), key=lambda (char, keyword): ord(char)) -+ return sorted(list(column_dict.items()), key=lambda char_keyword: ord(char_keyword[0])) - - def generate_letter_switch(opt, unprocessed_columns, keyword_list, - columns=None): - assert(len(keyword_list) != 0); - - if not columns: -- columns = range(0, unprocessed_columns) -+ columns = list(range(0, unprocessed_columns)) - - if len(keyword_list) == 1: - index, keyword = keyword_list[0] -@@ -161,7 +161,7 @@ - per_length = length_dict.setdefault(len(keyword), []) - per_length.append(item) - -- return sorted(length_dict.items(), key=lambda (length, keyword): length) -+ return sorted(list(length_dict.items()), key=lambda length_keyword: length_keyword[0]) - - def generate_switch(opt, keyword_list): - assert(len(keyword_list) != 0); --- mozjs-52.4.0/js/src/builtin/embedjs.py (original) +++ mozjs-52.4.0/js/src/builtin/embedjs.py (refactored) @@ -36,7 +36,7 @@ |