Backed out 3 changesets (bug 1559975) for linting failure at WebIDL.py on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 19 Jul 2019 18:25:10 +0300
changeset 483508 44e8fbdf5cbd72ed09fc4589d7119c29f051ee72
parent 483507 5394db272ad1f848f19ad15cc995dd8d85aa4c60
child 483509 86aaa1298ed03445bab82eeb6d7d11cafdeace59
push id113731
push usermalexandru@mozilla.com
push dateFri, 19 Jul 2019 22:25:42 +0000
treeherdermozilla-inbound@26dac8f2958e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1559975
milestone70.0a1
backs outa7154744a5d774d3a9980604b61b24db459c2558
4005ac2741701dfb42559375a912e1e5ac48693f
68ed1ccb592109648545d6deefc168b2c8290761
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1559975) for linting failure at WebIDL.py on a CLOSED TREE. Backed out changeset a7154744a5d7 (bug 1559975) Backed out changeset 4005ac274170 (bug 1559975) Backed out changeset 68ed1ccb5921 (bug 1559975)
dom/bindings/Codegen.py
dom/bindings/mozwebidlcodegen/__init__.py
layout/style/GenerateCSSPropsGenerated.py
testing/mochitest/bisection.py
testing/mochitest/runjunit.py
testing/mochitest/runrobocop.py
testing/mochitest/runtests.py
tools/lint/py3.yml
tools/rewriting/ThirdPartyPaths.txt
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1125,22 +1125,21 @@ class CGHeaders(CGWrapper):
         implementationIncludes |= set(self.getDeclarationFilename(i) for i in
                                       interfacesImplementingSelf)
 
         # Now find all the things we'll need as arguments because we
         # need to wrap or unwrap them.
         bindingHeaders = set()
         declareIncludes = set(declareIncludes)
 
-        def addHeadersForType(typeAndPossibleDictionary):
+        def addHeadersForType((t, dictionary)):
             """
             Add the relevant headers for this type.  We use dictionary, if
             passed, to decide what to do with interface types.
             """
-            t, dictionary = typeAndPossibleDictionary
             # Dictionaries have members that need to be actually
             # declared, not just forward-declared.
             if dictionary:
                 headerSet = declareIncludes
             else:
                 headerSet = bindingHeaders
             # Strip off outer layers and add headers they might (conservatively:
             # only nullable non-pointer types need Nullable.h, and only
@@ -8092,17 +8091,17 @@ class CGPerSignatureCall(CGThing):
             # 'obj' in this dictionary is the thing whose compartment we are
             # trying to do the to-JS conversion in.  We're going to put that
             # thing in a variable named "conversionScope" if setSlot is true.
             # Otherwise, just use "obj" for lack of anything better.
             'obj': "conversionScope" if self.setSlot else "obj"
         }
         try:
             wrapCode += wrapForType(self.returnType, self.descriptor, resultTemplateValues)
-        except MethodNotNewObjectError as err:
+        except MethodNotNewObjectError, err:
             assert not returnsNewObject
             raise TypeError("%s being returned from non-NewObject method or property %s.%s" %
                             (err.typename,
                              self.descriptor.interface.identifier.name,
                              self.idlNode.identifier.name))
         if self.setSlot:
             if self.idlNode.isStatic():
                 raise TypeError(
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -1,16 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
 # This module contains code for managing WebIDL files and bindings for
 # the build system.
 
-from __future__ import print_function, unicode_literals
+from __future__ import unicode_literals
 
 import errno
 import hashlib
 import json
 import logging
 import os
 
 from copy import deepcopy
@@ -309,17 +309,17 @@ class WebIDLCodegenManager(LoggingMixin)
     def generate_example_files(self, interface):
         """Generates example files for a given interface."""
         from Codegen import CGExampleRoot
 
         root = CGExampleRoot(self.config, interface)
 
         example_paths = self._example_paths(interface)
         for path in example_paths:
-            print("Generating {}".format(path))
+            print "Generating %s" % path
 
         return self._maybe_write_codegen(root, *example_paths)
 
     def _parse_webidl(self):
         import WebIDL
         from Configuration import Configuration
 
         self.log(logging.INFO, 'webidl_parse',
--- a/layout/style/GenerateCSSPropsGenerated.py
+++ b/layout/style/GenerateCSSPropsGenerated.py
@@ -46,17 +46,17 @@ def generate(output, dataFile):
             output.write("  nullptr,  // {}\n".format(p.name))
         else:
             output.write('  "{}",\n'.format(p.idlname))
     output.write("};\n\n")
 
     # Generate kIDLNameSortPositionTable
     ps = sorted(properties, key=lambda p: p.idlname)
     ps = [(p, position) for position, p in enumerate(ps)]
-    ps.sort(key=lambda item: item[0].index)
+    ps.sort(key=lambda (p, position): p.index)
     output.write("const int32_t nsCSSProps::"
                  "kIDLNameSortPositionTable[eCSSProperty_COUNT] = {\n")
     for (p, position) in ps:
         output.write("  {},\n".format(position))
     output.write("};\n\n")
 
     # Generate preferences table
     output.write("const nsCSSProps::PropertyPref "
--- a/testing/mochitest/bisection.py
+++ b/testing/mochitest/bisection.py
@@ -1,10 +1,8 @@
-from __future__ import print_function
-
 import math
 import mozinfo
 
 
 class Bisect(object):
 
     "Class for creating, bisecting and summarizing for --bisect-chunk option."
 
@@ -272,11 +270,11 @@ class Bisect(object):
                 self.summary.append(
                     "TEST-UNEXPECTED-FAIL | %s | Bleedthrough detected, this test is the "
                     "root cause for many of the above failures" %
                     self.contents['testsToRun'][0])
                 return -1
 
     def print_summary(self):
         "This method is used to print the recorded summary."
-        print("Bisection summary:")
+        print "Bisection summary:"
         for line in self.summary:
-            print(line)
+            print line
--- a/testing/mochitest/runjunit.py
+++ b/testing/mochitest/runjunit.py
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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 print_function
-
 import argparse
 import os
 import posixpath
 import re
 import shutil
 import sys
 import tempfile
 import traceback
@@ -303,18 +301,18 @@ class JUnitTestRunner(MochitestDesktop):
         try:
             dump_dir = tempfile.mkdtemp()
             remote_dir = posixpath.join(self.remote_profile, 'minidumps')
             if not self.device.is_dir(remote_dir):
                 # If crash reporting is enabled (MOZ_CRASHREPORTER=1), the
                 # minidumps directory is automatically created when the app
                 # (first) starts, so its lack of presence is a hint that
                 # something went wrong.
-                print("Automation Error: " +
-                      "No crash directory ({}) found on remote device".format(remote_dir))
+                print "Automation Error: No crash directory (%s) found on remote device" % \
+                    remote_dir
                 return True
             self.device.pull(remote_dir, dump_dir)
             crashed = mozcrash.log_crashes(self.log, dump_dir, symbols_path,
                                            test=self.current_full_name)
         finally:
             try:
                 shutil.rmtree(dump_dir)
             except Exception:
--- a/testing/mochitest/runrobocop.py
+++ b/testing/mochitest/runrobocop.py
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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 print_function
-
 import json
 import os
 import posixpath
 import sys
 import tempfile
 import traceback
 from collections import defaultdict
 
@@ -551,19 +549,19 @@ class RobocopTestRunner(MochitestDesktop
             result = self.runSingleTest(test)
             if worstTestResult is None or worstTestResult == 0:
                 worstTestResult = result
         if worstTestResult is None:
             self.log.warning(
                 "No tests run. Did you pass an invalid TEST_PATH?")
             worstTestResult = 1
         else:
-            print("INFO | runtests.py | Test summary: start.")
+            print "INFO | runtests.py | Test summary: start."
             logResult = self.logTestSummary()
-            print("INFO | runtests.py | Test summary: end.")
+            print "INFO | runtests.py | Test summary: end."
             if worstTestResult == 0:
                 worstTestResult = logResult
         return worstTestResult
 
 
 def run_test_harness(parser, options):
     parser.validate(options)
 
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -2357,17 +2357,17 @@ toolbar#nav-bar {
 
         finally:
             # cleanup
             if os.path.exists(processLog):
                 os.remove(processLog)
 
         if marionette_exception is not None:
             exc, value, tb = marionette_exception
-            raise exc(value).with_traceback(tb)
+            raise exc, value, tb
 
         return status, self.lastTestSeen
 
     def initializeLooping(self, options):
         """
           This method is used to clear the contents before each run of for loop.
           This method is used for --run-by-dir and --bisect-chunk.
         """
--- a/tools/lint/py3.yml
+++ b/tools/lint/py3.yml
@@ -1,28 +1,30 @@
 ---
 py3:
     description: Python 3 compatibility check
     include: ['.']
     exclude:
         - browser/app
         - build
         - client.py
+        - dom/bindings
         - dom/canvas/test
         - dom/media/test
         - gfx
         - ipc/ipdl
         - layout/reftests
-        - layout/style/ServoCSSPropList.mako.py
+        - layout/style
         - layout/tools/reftest
         - media
         - security/manager/ssl
         - testing/awsy
         - testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
         - testing/gtest
+        - testing/mochitest
         - testing/mozharness
         - testing/tps
         - testing/web-platform
         - toolkit
         - tools/profiler
         - tools/rb
         - xpcom/idl-parser
     extensions: ['py']
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -110,17 +110,16 @@ netwerk/srtp/src/
 nsprpub/
 other-licenses/
 parser/expat/
 security/nss/
 security/sandbox/chromium/
 security/sandbox/chromium-shim/
 testing/gtest/gmock/
 testing/gtest/gtest/
-testing/mochitest/pywebsocket
 testing/talos/talos/tests/dromaeo/
 testing/talos/talos/tests/kraken/
 testing/talos/talos/tests/v8_7/
 testing/web-platform/tests/resources/webidl2/
 testing/web-platform/tests/tools/third_party/
 testing/xpcshell/node-ip/
 testing/xpcshell/dns-packet/
 third_party/