[mq]: debug draft
authorGeoff Brown <gbrown@mozilla.com>
Tue, 23 Jun 2020 17:10:09 -0600
changeset 2999925 85312e0595fbd3b673973f4296c28471f327290a
parent 2999844 777aaec108b022435d02fff69ccd44495b0d0713
child 2999926 a10d2c25ee666ea7b8ac28cb1284442f8015360e
push id558580
push usergbrown@mozilla.com
push dateTue, 23 Jun 2020 23:10:58 +0000
treeherdertry@a10d2c25ee66 [default view] [failures only]
milestone79.0a1
[mq]: debug
python/mozbuild/mozbuild/virtualenv.py
toolkit/components/featuregates/gen_feature_definitions.py
--- a/python/mozbuild/mozbuild/virtualenv.py
+++ b/python/mozbuild/mozbuild/virtualenv.py
@@ -626,16 +626,22 @@ class VirtualenvManager(object):
             'PIPENV_IGNORE_VIRTUALENVS': '1',
             'WORKON_HOME': str(os.path.normpath(os.path.join(self.topobjdir, '_virtualenvs')))
         }))
         # On mac, running pipenv with LC_CTYPE set to "UTF-8" (which happens
         # when wrapping with run-task on automation) fails.
         # Unsetting it doesn't really matter for what pipenv does.
         env.pop('LC_CTYPE', None)
 
+        # Avoid click RuntimeError under python 3: http://click.pocoo.org/python3/
+        env.update(ensure_subprocess_env({
+            'LC_ALL': 'C.UTF-8',
+            'LANG': 'C.UTF-8'
+        }))
+
         if python is not None:
             env.update(ensure_subprocess_env({
                 'PIPENV_DEFAULT_PYTHON_VERSION': str(python),
                 'PIPENV_PYTHON': str(python)
             }))
 
         def ensure_venv():
             """Create virtual environment if needed and return path"""
--- a/toolkit/components/featuregates/gen_feature_definitions.py
+++ b/toolkit/components/featuregates/gen_feature_definitions.py
@@ -75,17 +75,17 @@ class FeatureGateException(Exception):
         else:
             rv.append('file "{}":'.format(self.filename))
         rv.append(message)
         return ' '.join(rv)
 
     def __repr__(self):
         # Turn "FeatureGateExcept(<message>,)" into "FeatureGateException(<message>, filename=<filename>)"
         original = super(FeatureGateException, self).__repr__()
-        return original[:-1] + ', filename={!r})'.format(self.filename)
+        return original[:-1] + ' filename={!r})'.format(self.filename)
 
 
 def process_files(filenames):
     features = {}
     errors = []
 
     for filename in filenames:
         try: