Backed out changeset 4b4f0fb8292c (bug 1595220) for several reftest failures.
authorCosmin Sabou <csabou@mozilla.com>
Wed, 13 Nov 2019 06:59:07 +0200
changeset 501701 f644542d11c15980eed8368d5b52539d571c35ce
parent 501700 c351bea716961017d6e4f59cb48a9bcaf6111e9b
child 501702 7d9725c3f834323fa9b39cf1b1d2604ce9d5c35d
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1595220
milestone72.0a1
backs out4b4f0fb8292c18cd114e92ed3f1c57f187a7d5eb
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 changeset 4b4f0fb8292c (bug 1595220) for several reftest failures.
testing/mozbase/mozinfo/mozinfo/mozinfo.py
testing/mozbase/mozinfo/setup.py
--- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py
+++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py
@@ -94,29 +94,30 @@ if system in ["Microsoft", "Windows"]:
         version = "%d.%d.%d" % (major, minor, build_number)
 
     os_version = "%d.%d" % (major, minor)
 elif system.startswith(('MINGW', 'MSYS_NT')):
     # windows/mingw python build (msys)
     info['os'] = 'win'
     os_version = version = unknown
 elif system == "Linux":
-    # Attempt to use distro package to determine Linux distribution first.
-    # Failing that, fall back to use the platform method.
-    # Note that platform.linux_distribution() will be deprecated as of 3.8
-    # and this block will be removed once support for 2.7/3.5 is dropped.
+    # Only attempt to import distro for Linux.
+    # https://github.com/nir0s/distro/issues/177
     try:
-        from distro import linux_distribution
+        import distro
     except ImportError:
-        from platform import linux_distribution
-
-    output = linux_distribution()
-    (distribution, os_version, codename) = tuple(
-        str(item.lower()) for item in output)
-
+        pass
+    # First use distro package, then fall back to platform.
+    # This will only until Mozilla upgrades python to 3.8.
+    if hasattr(distro, "linux_distribution"):
+        (distribution, os_version, codename) = distro.linux_distribution()
+    elif hasattr(platform, "linux_distribution"):
+        (distribution, os_version, codename) = platform.linux_distribution()
+    else:
+        (distribution, os_version, codename) = platform.dist()
     if not processor:
         processor = machine
     version = "%s %s" % (distribution, os_version)
 
     # Bug in Python 2's `platform` library:
     # It will return a triple of empty strings if the distribution is not supported.
     # It works on Python 3. If we don't have an OS version,
     # the unit tests fail to run.
--- a/testing/mozbase/mozinfo/setup.py
+++ b/testing/mozbase/mozinfo/setup.py
@@ -1,17 +1,17 @@
 # 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 absolute_import
 
 from setuptools import setup
 
-PACKAGE_VERSION = "1.2.1"
+PACKAGE_VERSION = "1.2.0"
 
 # dependencies
 deps = [
     "distro == 1.4.0",
     "mozfile >= 0.12",
 ]
 
 setup(