diff -Nru heat-6.1.2/debian/changelog heat-6.1.2/debian/changelog --- heat-6.1.2/debian/changelog 2017-06-07 01:35:21.000000000 -0700 +++ heat-6.1.2/debian/changelog 2018-05-31 02:51:18.000000000 -0700 @@ -1,3 +1,10 @@ +heat (1:6.1.2-0ubuntu1.1) xenial; urgency=medium + + * Fixing heat error with unicode (LP: #1761629) + - d/p/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch + + -- Seyeong Kim Mon, 23 Apr 2018 21:42:13 -0700 + heat (1:6.1.2-0ubuntu1) xenial; urgency=medium * New upstream point release for OpenStack Mitaka (LP: #1696177). diff -Nru heat-6.1.2/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch heat-6.1.2/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch --- heat-6.1.2/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch 1969-12-31 16:00:00.000000000 -0800 +++ heat-6.1.2/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch 2018-05-31 02:51:20.000000000 -0700 @@ -0,0 +1,93 @@ +From 4d71926b3afc50c3f16378de260b86a85e8d721d Mon Sep 17 00:00:00 2001 +From: Seyeong Kim +Date: Thu, 5 Apr 2018 15:10:01 -0700 +Subject: [PATCH] Fixing unicode issue when to_dict is called on py2.7 env +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When using non-unicode old style user id such as Gāo +Unicode error popup on py2.7 environment +Fixing it on common/context.py + +Change-Id: I95e49f359410049ff5b254cd1b8ee16402c8719d +Closes-Bug: #1761629 +--- + heat/common/context.py | 4 ++-- + heat/tests/test_common_context.py | 46 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 48 insertions(+), 2 deletions(-) + +Bug: upstream, https://github.com/openstack/heat/commit/44fb52f0652a634540b8fcac07bd4ee7df03d3b2 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1761629 +--- a/heat/common/context.py ++++ b/heat/common/context.py +@@ -123,8 +123,8 @@ + return self._clients + + def to_dict(self): +- user_idt = '{user} {tenant}'.format(user=self.user_id or '-', +- tenant=self.tenant_id or '-') ++ user_idt = u'{user} {tenant}'.format(user=self.user_id or '-', ++ tenant=self.tenant_id or '-') + + return {'auth_token': self.auth_token, + 'username': self.username, +--- a/heat/tests/test_common_context.py ++++ b/heat/tests/test_common_context.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # + # Licensed under the Apache License, Version 2.0 (the "License"); you may + # not use this file except in compliance with the License. You may obtain +@@ -77,6 +78,51 @@ + del(ctx_dict['request_id']) + self.assertEqual(self.ctx, ctx_dict) + ++ def test_request_context_to_dict_unicode(self): ++ ++ ctx_origin = {'username': 'mick', ++ 'trustor_user_id': None, ++ 'auth_token': '123', ++ 'auth_token_info': {'123info': 'woop'}, ++ 'is_admin': False, ++ 'user': 'mick', ++ 'password': 'foo', ++ 'trust_id': None, ++ 'show_deleted': False, ++ 'roles': ['arole', 'notadmin'], ++ 'tenant_id': '456tenant', ++ 'user_id': u'Gāo', ++ 'tenant': u'\u5218\u80dc', ++ 'auth_url': 'http://xyz', ++ 'aws_creds': 'blah', ++ 'region_name': 'RegionOne', ++ 'user_identity': u'Gāo 456tenant', ++ 'user_domain_id': None, ++ 'project_domain_id': None} ++ ++ ctx = context.RequestContext( ++ auth_token=ctx_origin.get('auth_token'), ++ username=ctx_origin.get('username'), ++ password=ctx_origin.get('password'), ++ aws_creds=ctx_origin.get('aws_creds'), ++ tenant=ctx_origin.get('tenant'), ++ tenant_id=ctx_origin.get('tenant_id'), ++ user_id=ctx_origin.get('user_id'), ++ auth_url=ctx_origin.get('auth_url'), ++ roles=ctx_origin.get('roles'), ++ show_deleted=ctx_origin.get('show_deleted'), ++ is_admin=ctx_origin.get('is_admin'), ++ auth_token_info=ctx_origin.get('auth_token_info'), ++ trustor_user_id=ctx_origin.get('trustor_user_id'), ++ trust_id=ctx_origin.get('trust_id'), ++ user=ctx_origin.get('user'), ++ region_name=ctx_origin.get('region_name'), ++ user_domain_id=ctx_origin.get('user_domain'), ++ project_domain_id=ctx_origin.get('project_domain')) ++ ctx_dict = ctx.to_dict() ++ del(ctx_dict['request_id']) ++ self.assertEqual(ctx_origin, ctx_dict) ++ + def test_request_context_from_dict(self): + ctx = context.RequestContext.from_dict(self.ctx) + ctx_dict = ctx.to_dict() diff -Nru heat-6.1.2/debian/patches/series heat-6.1.2/debian/patches/series --- heat-6.1.2/debian/patches/series 2017-06-07 01:35:21.000000000 -0700 +++ heat-6.1.2/debian/patches/series 2018-04-23 21:41:26.000000000 -0700 @@ -2,3 +2,4 @@ sudoers_patch.patch #default-log-dir.patch fixup-assert-regex.patch +0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch