diff -Nru heat-8.0.6/debian/changelog heat-8.0.6/debian/changelog --- heat-8.0.6/debian/changelog 2018-02-02 12:35:42.000000000 -0800 +++ heat-8.0.6/debian/changelog 2018-04-24 00:11:43.000000000 -0700 @@ -1,3 +1,10 @@ +heat (1:8.0.6-0ubuntu1~cloud1) xenial-ocata; 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 Tue, 24 Apr 2018 00:10:44 -0700 + heat (1:8.0.6-0ubuntu1~cloud0) xenial-ocata; urgency=medium * New stable point release for OpenStack Ocata (LP: #1747066). diff -Nru heat-8.0.6/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch heat-8.0.6/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch --- heat-8.0.6/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch 1969-12-31 16:00:00.000000000 -0800 +++ heat-8.0.6/debian/patches/0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch 2018-05-31 05:17:59.000000000 -0700 @@ -0,0 +1,92 @@ +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 +@@ -165,8 +165,8 @@ + cfg.CONF.stale_token_duration)) + + 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,50 @@ + 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'), ++ project_name=ctx_origin.get('tenant'), ++ tenant=ctx_origin.get('tenant_id'), ++ user=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'), ++ 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-8.0.6/debian/patches/series heat-8.0.6/debian/patches/series --- heat-8.0.6/debian/patches/series 2018-02-02 12:35:22.000000000 -0800 +++ heat-8.0.6/debian/patches/series 2018-04-24 00:10:39.000000000 -0700 @@ -1,3 +1,4 @@ sudoers_patch.patch fixup-assert-regex.patch #fix-ceilometerclient-2.8.patch +0001-Fixing-unicode-issue-when-to_dict-is-called-on-py2.7.patch