diff -Nru python-oslo.context-2.2.0/debian/changelog python-oslo.context-2.2.0/debian/changelog --- python-oslo.context-2.2.0/debian/changelog 2016-04-04 08:55:18.000000000 +0000 +++ python-oslo.context-2.2.0/debian/changelog 2018-03-21 09:23:53.000000000 +0000 @@ -1,3 +1,10 @@ +python-oslo.context (2.2.0-2ubuntu1) xenial; urgency=medium + + * Adding support unicode for older type of user id (LP: #1507937) + - d/p/0001-Ensure-to_dict-supports-unicode.patch + + -- Seyeong Kim Wed, 21 Mar 2018 02:23:53 -0700 + python-oslo.context (2.2.0-2) unstable; urgency=medium * Uploading to unstable. diff -Nru python-oslo.context-2.2.0/debian/patches/ensure-to_dict-supports-unicode.patch python-oslo.context-2.2.0/debian/patches/ensure-to_dict-supports-unicode.patch --- python-oslo.context-2.2.0/debian/patches/ensure-to_dict-supports-unicode.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.context-2.2.0/debian/patches/ensure-to_dict-supports-unicode.patch 2018-03-21 09:23:53.000000000 +0000 @@ -0,0 +1,50 @@ +From c63a359094907bc50cc5e1be716508ddee825dfa Mon Sep 17 00:00:00 2001 +From: "ChangBo Guo(gcb)" +Date: Sat, 27 Feb 2016 22:23:50 +0800 +Subject: [PATCH] Ensure to_dict() supports unicode + +When we compose a string for user_identity, we should +ensure that we don't break for non-ascii strings in +user name or tenant name or domain names. + +Change-Id: Id457ebe415f78c435fc8ece810f0a1b20964dabf +Closes-Bug: #1507937 +--- + oslo_context/context.py | 2 +- + oslo_context/tests/test_context.py | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +Origin: upstream, https://github.com/openstack/oslo.context/commit/c63a359094907bc50cc5e1be716508ddee825dfa +Bug: https://bugs.launchpad.net/bugs/1507937 +Index: python-oslo.context-2.2.0/oslo_context/context.py +=================================================================== +--- python-oslo.context-2.2.0.orig/oslo_context/context.py 2018-03-21 02:23:36.960954406 -0700 ++++ python-oslo.context-2.2.0/oslo_context/context.py 2018-03-21 02:23:36.956954318 -0700 +@@ -48,7 +48,7 @@ + accesses the system, as well as additional request information. + """ + +- user_idt_format = '{user} {tenant} {domain} {user_domain} {p_domain}' ++ user_idt_format = u'{user} {tenant} {domain} {user_domain} {p_domain}' + + def __init__(self, auth_token=None, user=None, tenant=None, domain=None, + user_domain=None, project_domain=None, is_admin=False, +Index: python-oslo.context-2.2.0/oslo_context/tests/test_context.py +=================================================================== +--- python-oslo.context-2.2.0.orig/oslo_context/tests/test_context.py 2018-03-21 02:23:36.960954406 -0700 ++++ python-oslo.context-2.2.0/oslo_context/tests/test_context.py 2018-03-21 02:23:36.956954318 -0700 +@@ -1,3 +1,4 @@ ++# -*- encoding: utf-8 -*- + # Copyright 2011 OpenStack Foundation. + # All Rights Reserved. + # +@@ -177,7 +178,8 @@ + + def test_values(self): + auth_token = "token1" +- user = "user1" ++ # test unicode support ++ user = u"John Gāo" + tenant = "tenant1" + domain = "domain1" + user_domain = "user_domain1" diff -Nru python-oslo.context-2.2.0/debian/patches/series python-oslo.context-2.2.0/debian/patches/series --- python-oslo.context-2.2.0/debian/patches/series 2016-04-04 08:55:18.000000000 +0000 +++ python-oslo.context-2.2.0/debian/patches/series 2018-03-21 09:23:53.000000000 +0000 @@ -1 +1,2 @@ remove-privacy-breach-in-README.rst.patch +ensure-to_dict-supports-unicode.patch