Bug 1690026 - Remove pip legacy_resolver support. r=mhentges
authorAlex Lopez <alex.lopez.zorzano@gmail.com>
Mon, 22 Feb 2021 16:29:13 +0000
changeset 568252 33bf4204b2c9c0286082ea5df8e1f6e245c3e676
parent 568251 46d6675d2db8833c73287e20be1d070f33faffc7
child 568253 1c523745d274e77fe1faa2c1d5bfde61e3278818
push id38229
push usersmolnar@mozilla.com
push dateMon, 22 Feb 2021 21:40:56 +0000
treeherdermozilla-central@7ea6d7472432 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhentges
bugs1690026
milestone88.0a1
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
Bug 1690026 - Remove pip legacy_resolver support. r=mhentges Now that no mozharness packages need the old pip resolver behaviour, we can opt to always use the new resolver. Differential Revision: https://phabricator.services.mozilla.com/D105869
testing/mozharness/mozharness/base/python.py
testing/mozharness/scripts/awsy_script.py
testing/mozharness/scripts/desktop_unittest.py
testing/mozharness/scripts/marionette.py
testing/mozharness/scripts/web_platform_tests.py
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -121,37 +121,27 @@ class VirtualenvMixin(object):
         self,
         name=None,
         url=None,
         method=None,
         requirements=None,
         optional=False,
         two_pass=False,
         editable=False,
-        legacy_resolver=False,
     ):
         """Register a module to be installed with the virtualenv.
 
         This method can be called up until create_virtualenv() to register
         modules that should be installed in the virtualenv.
 
         See the documentation for install_module for how the arguments are
         applied.
         """
         self._virtualenv_modules.append(
-            (
-                name,
-                url,
-                method,
-                requirements,
-                optional,
-                two_pass,
-                editable,
-                legacy_resolver,
-            )
+            (name, url, method, requirements, optional, two_pass, editable)
         )
 
     def query_virtualenv_path(self):
         """Determine the absolute path to the virtualenv."""
         dirs = self.query_abs_dirs()
 
         if "abs_virtualenv_dir" in dirs:
             return dirs["abs_virtualenv_dir"]
@@ -255,17 +245,16 @@ class VirtualenvMixin(object):
         module=None,
         module_url=None,
         install_method=None,
         requirements=(),
         optional=False,
         global_options=[],
         no_deps=False,
         editable=False,
-        legacy_resolver=False,
     ):
         """
         Install module via pip.
 
         module_url can be a url to a python package tarball, a path to
         a directory containing a setup.py (absolute or relative to work_dir)
         or None, in which case it will default to the module name.
 
@@ -286,18 +275,16 @@ class VirtualenvMixin(object):
                 self.fatal("Must specify module and/or requirements")
             pip = self.query_python_path("pip")
             if c.get("verbose_pip"):
                 command = [pip, "-v", "install"]
             else:
                 command = [pip, "install"]
             if no_deps:
                 command += ["--no-deps"]
-            if legacy_resolver:
-                command += ["--use-deprecated=legacy-resolver"]
             # To avoid timeouts with our pypi server, increase default timeout:
             # https://bugzilla.mozilla.org/show_bug.cgi?id=1007230#c802
             command += ["--timeout", str(c.get("pip_timeout", 120))]
             for requirement in requirements:
                 command += ["-r", requirement]
             if c.get("find_links") and not c["pip_index"]:
                 command += ["--no-index"]
             for opt in global_options:
@@ -513,37 +500,34 @@ class VirtualenvMixin(object):
         for (
             module,
             url,
             method,
             requirements,
             optional,
             two_pass,
             editable,
-            legacy_resolver,
         ) in self._virtualenv_modules:
             if two_pass:
                 self.install_module(
                     module=module,
                     module_url=url,
                     install_method=method,
                     requirements=requirements or (),
                     optional=optional,
                     no_deps=True,
                     editable=editable,
-                    legacy_resolver=legacy_resolver,
                 )
             self.install_module(
                 module=module,
                 module_url=url,
                 install_method=method,
                 requirements=requirements or (),
                 optional=optional,
                 editable=editable,
-                legacy_resolver=legacy_resolver,
             )
 
         self.info("Done creating virtualenv %s." % venv_path)
 
         self.package_versions(log_output=True)
 
     def activate_virtualenv(self):
         """Import the virtualenv's packages into this Python interpreter."""
--- a/testing/mozharness/scripts/awsy_script.py
+++ b/testing/mozharness/scripts/awsy_script.py
@@ -158,24 +158,24 @@ class AWSY(TestingMixin, MercurialScript
     def download_and_extract(self, extract_dirs=None, suite_categories=None):
         ret = super(AWSY, self).download_and_extract(
             suite_categories=["common", "awsy"]
         )
         return ret
 
     @PreScriptAction("create-virtualenv")
     def _pre_create_virtualenv(self, action):
-        requirements_file = os.path.join(
-            self.testdir, "config", "marionette_requirements.txt"
-        )
+        requirements_files = [
+            os.path.join(self.testdir, "config", "marionette_requirements.txt")
+        ]
 
-        # marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
-        self.register_virtualenv_module(
-            requirements=[requirements_file], two_pass=True, legacy_resolver=True
-        )
+        for requirements_file in requirements_files:
+            self.register_virtualenv_module(
+                requirements=[requirements_file], two_pass=True
+            )
 
         self.register_virtualenv_module("awsy", self.awsy_path)
 
     def populate_webroot(self):
         """Populate the production test machines' webroots"""
         self.info("Downloading pageset with tooltool...")
         manifest_file = os.path.join(self.awsy_path, "tp5n-pageset.manifest")
         page_load_test_dir = os.path.join(self.webroot_dir, "page_load_test")
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -445,27 +445,22 @@ class DesktopUnittest(TestingMixin, Merc
 
     @PreScriptAction("create-virtualenv")
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
         self.register_virtualenv_module(name="mock")
         self.register_virtualenv_module(name="simplejson")
 
-        marionette_requirements_file = os.path.join(
-            dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
-        )
-        # marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
-        self.register_virtualenv_module(
-            requirements=[marionette_requirements_file],
-            two_pass=True,
-            legacy_resolver=True,
-        )
+        requirements_files = [
+            os.path.join(
+                dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
+            )
+        ]
 
-        requirements_files = []
         if self._query_specified_suites("mochitest") is not None:
             # mochitest is the only thing that needs this
             if PY2:
                 wspb_requirements = "websocketprocessbridge_requirements.txt"
             else:
                 wspb_requirements = "websocketprocessbridge_requirements_3.txt"
             requirements_files.append(
                 os.path.join(
--- a/testing/mozharness/scripts/marionette.py
+++ b/testing/mozharness/scripts/marionette.py
@@ -255,20 +255,17 @@ class MarionetteTest(TestingMixin, Mercu
         requirements = os.path.join(
             dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
         )
         if not os.path.isfile(requirements):
             self.fatal(
                 "Could not find marionette requirements file: {}".format(requirements)
             )
 
-        # marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
-        self.register_virtualenv_module(
-            requirements=[requirements], two_pass=True, legacy_resolver=True
-        )
+        self.register_virtualenv_module(requirements=[requirements], two_pass=True)
 
     def _get_test_suite(self, is_emulator):
         """
         Determine which in tree options group to use and return the
         appropriate key.
         """
         platform = "emulator" if is_emulator else "desktop"
         # Currently running marionette on an emulator means webapi
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -254,20 +254,17 @@ class WebPlatformTest(TestingMixin, Merc
     @PreScriptAction("create-virtualenv")
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
         requirements = os.path.join(
             dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
         )
 
-        # marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
-        self.register_virtualenv_module(
-            requirements=[requirements], two_pass=True, legacy_resolver=True
-        )
+        self.register_virtualenv_module(requirements=[requirements], two_pass=True)
 
     def _query_geckodriver(self):
         path = None
         c = self.config
         dirs = self.query_abs_dirs()
         repl_dict = {}
         repl_dict.update(dirs)
         path = c.get("geckodriver", "geckodriver")