From aff45da04a3c803e36e23406f96e88d29a87767f Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 23 Aug 2019 16:43:58 +0000 Subject: [PATCH] Bug 1576097 - Remove mozbuild.util.encode again. r=nalexander This time, existing config.status trying to import it will throw an exception that will trigger a re-configure. Differential Revision: https://phabricator.services.mozilla.com/D43215 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/util.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py index 349c25c2b9ac..d11f95838b79 100644 --- a/python/mozbuild/mozbuild/util.py +++ b/python/mozbuild/mozbuild/util.py @@ -23,7 +23,6 @@ import sys import time from collections import ( - Iterable, OrderedDict, ) from io import ( @@ -1297,24 +1296,6 @@ def indented_repr(o, indent=4): return ''.join(recurse_indented_repr(o, 0)) -# Please do not use this function. It's only kept for backwards compatibility -# with older config.status files that may lay around before a CLOBBER. -def encode(obj, encoding='utf-8'): - '''Recursively encode unicode strings with the given encoding.''' - if isinstance(obj, dict): - return { - encode(k, encoding): encode(v, encoding) - for k, v in six.iteritems(obj) - } - if isinstance(obj, bytes): - return obj - if isinstance(obj, six.text_type): - return obj.encode(encoding) - if isinstance(obj, Iterable): - return [encode(i, encoding) for i in obj] - return obj - - def patch_main(): '''This is a hack to work around the fact that Windows multiprocessing needs to import the original main module, and assumes that it corresponds to a file