From 7c638ba8b313dfc10a5ccb3b11748d87379897f2 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 15 Apr 2019 16:57:21 -0400 Subject: [PATCH] Bug 1547730 - Use six.moves for urllib.urlparse r=#build Differential Revision: https://phabricator.services.mozilla.com/D28108 --HG-- extra : rebase_source : 33c707a33e478fb558e58c5b878f6da63b14927b extra : intermediate-source : aa83f8790d9b9b16c756bc8311e7d57028abf487 extra : source : 8421e3222f669eae250a3b3facf8afa989ccc2c4 --- python/mozbuild/mozpack/chrome/manifest.py | 6 +----- python/mozbuild/mozpack/packager/formats.py | 2 +- python/mozbuild/mozpack/packager/unpack.py | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py index 2e3a6bd046fd..a578ff5bd2a0 100644 --- a/python/mozbuild/mozpack/chrome/manifest.py +++ b/python/mozbuild/mozpack/chrome/manifest.py @@ -7,14 +7,10 @@ from __future__ import absolute_import, print_function, unicode_literals import re import os -try: - from urlparse import urlparse -except ImportError: - from urllib.parse import urlparse - import mozpack.path as mozpath from mozpack.chrome.flags import Flags from mozpack.errors import errors +from six.moves.urllib.parse import urlparse class ManifestEntry(object): diff --git a/python/mozbuild/mozpack/packager/formats.py b/python/mozbuild/mozpack/packager/formats.py index 8b998bb97e12..6ae684f99c30 100644 --- a/python/mozbuild/mozpack/packager/formats.py +++ b/python/mozbuild/mozpack/packager/formats.py @@ -13,7 +13,7 @@ from mozpack.chrome.manifest import ( ManifestMultiContent, ) from mozpack.errors import errors -from urlparse import urlparse +from six.moves.urllib.parse import urlparse import mozpack.path as mozpath from mozpack.files import ManifestFile from mozpack.copier import ( diff --git a/python/mozbuild/mozpack/packager/unpack.py b/python/mozbuild/mozpack/packager/unpack.py index 197f3a1e4bcd..d1b65372ee33 100644 --- a/python/mozbuild/mozpack/packager/unpack.py +++ b/python/mozbuild/mozpack/packager/unpack.py @@ -24,7 +24,7 @@ from mozpack.copier import ( ) from mozpack.packager import SimplePackager from mozpack.packager.formats import FlatFormatter -from urlparse import urlparse +from six.moves.urllib.parse import urlparse class UnpackFinder(BaseFinder):