diff -Nru python-oslo.versionedobjects-1.31.2/debian/changelog python-oslo.versionedobjects-1.31.2/debian/changelog --- python-oslo.versionedobjects-1.31.2/debian/changelog 2018-02-12 19:37:08.000000000 -0800 +++ python-oslo.versionedobjects-1.31.2/debian/changelog 2018-04-08 23:45:04.000000000 -0700 @@ -1,3 +1,10 @@ +python-oslo.versionedobjects (1.31.2-0ubuntu1~cloud1) xenial-queens; urgency=medium + + * Fixing UUID coerce function for unicode non uuid form id (LP: #1760918) + - d/p/Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch + + -- Seyeong Kim Sun, 08 Apr 2018 23:44:26 -0700 + python-oslo.versionedobjects (1.31.2-0ubuntu1~cloud0) xenial-queens; urgency=medium * New upstream release for the Ubuntu Cloud Archive. diff -Nru python-oslo.versionedobjects-1.31.2/debian/patches/Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch python-oslo.versionedobjects-1.31.2/debian/patches/Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch --- python-oslo.versionedobjects-1.31.2/debian/patches/Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch 1969-12-31 16:00:00.000000000 -0800 +++ python-oslo.versionedobjects-1.31.2/debian/patches/Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch 2018-04-08 23:44:24.000000000 -0700 @@ -0,0 +1,65 @@ +From b1d0b5d886afef8c08330bf3c2291e180aa1f534 Mon Sep 17 00:00:00 2001 +From: Seyeong Kim +Date: Thu, 29 Mar 2018 10:03:51 -0700 +Subject: Fixing UUID coerce function for unicode non uuid form + +If we use non uuid unicode user id in py27 env, +unicode error pop up when function is called. + +Closes-bug: #1760918 + +Change-Id: Ic6b6308fb1960ec40407e6efde30137b64543e72 +--- + oslo_versionedobjects/fields.py | 8 +++++--- + oslo_versionedobjects/tests/test_fields.py | 4 ++++ + 2 files changed, 9 insertions(+), 3 deletions(-) + +Bug: upstream, https://git.openstack.org/cgit/openstack/oslo.versionedobjects/commit/?id=b1d0b5d886afef8c08330bf3c2291e180aa1f534 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1760918 + +Index: python-oslo.versionedobjects-1.31.2/oslo_versionedobjects/fields.py +=================================================================== +--- python-oslo.versionedobjects-1.31.2.orig/oslo_versionedobjects/fields.py 2018-04-08 23:44:12.263425553 -0700 ++++ python-oslo.versionedobjects-1.31.2/oslo_versionedobjects/fields.py 2018-04-08 23:44:12.259425530 -0700 +@@ -349,7 +349,7 @@ + with warnings.catch_warnings(): + warnings.simplefilter("once") + try: +- uuid.UUID(str(value)) ++ uuid.UUID(u"%s" % value) + except Exception: + # This is to ensure no breaking behaviour for current + # users +@@ -360,9 +360,11 @@ + "code to input valid UUIDs or accept " + "ValueErrors for invalid UUIDs. See " + "https://docs.openstack.org/oslo.versionedobjects/latest/reference/fields.html#oslo_versionedobjects.fields.UUIDField " # noqa +- "for further details" % value, FutureWarning) ++ "for further details" % ++ repr(value).encode('utf8'), ++ FutureWarning) + +- return str(value) ++ return u"%s" % value + + + class MACAddress(StringPattern): +Index: python-oslo.versionedobjects-1.31.2/oslo_versionedobjects/tests/test_fields.py +=================================================================== +--- python-oslo.versionedobjects-1.31.2.orig/oslo_versionedobjects/tests/test_fields.py 2018-04-08 23:44:12.263425553 -0700 ++++ python-oslo.versionedobjects-1.31.2/oslo_versionedobjects/tests/test_fields.py 2018-04-08 23:44:12.259425530 -0700 +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright 2013 Red Hat, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); you may +@@ -284,6 +285,9 @@ + ('da66a411-af0e-4829-9b67-475017ddz152', + 'da66a411-af0e-4829-9b67-475017ddz152'), + ('fake_uuid', 'fake_uuid'), ++ (u'fake_uāid', u'fake_uāid'), ++ (b'fake_u\xe1id'.decode('latin_1'), ++ b'fake_u\xe1id'.decode('latin_1')), + ('1', '1'), + (1, '1') + ] diff -Nru python-oslo.versionedobjects-1.31.2/debian/patches/series python-oslo.versionedobjects-1.31.2/debian/patches/series --- python-oslo.versionedobjects-1.31.2/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ python-oslo.versionedobjects-1.31.2/debian/patches/series 2018-04-08 23:44:10.000000000 -0700 @@ -0,0 +1 @@ +Fixing-uuid-coerce-function-for-unicode-non-uuid-form.patch