[Bug 1763179] Re: Returned strings should not be forced into unicode
Corey Bryant
corey.bryant at canonical.com
Tue Apr 17 12:31:41 UTC 2018
** Also affects: python-oslo.versionedobjects (Ubuntu)
Importance: Undecided
Status: New
** Also affects: python-oslo.versionedobjects (Ubuntu Bionic)
Importance: Undecided
Status: New
** Changed in: python-oslo.versionedobjects (Ubuntu Bionic)
Status: New => Triaged
** Changed in: python-oslo.versionedobjects (Ubuntu Bionic)
Importance: Undecided => High
** Also affects: cloud-archive
Importance: Undecided
Status: New
** Also affects: cloud-archive/queens
Importance: Undecided
Status: New
** Changed in: cloud-archive/queens
Status: New => Triaged
** Changed in: cloud-archive/queens
Importance: Undecided => High
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-oslo.versionedobjects in
Ubuntu.
https://bugs.launchpad.net/bugs/1763179
Title:
Returned strings should not be forced into unicode
Status in Ubuntu Cloud Archive:
Triaged
Status in Ubuntu Cloud Archive queens series:
Triaged
Status in oslo.versionedobjects:
Fix Released
Status in python-oslo.versionedobjects package in Ubuntu:
Triaged
Status in python-oslo.versionedobjects source package in Bionic:
Triaged
Bug description:
Change https://review.openstack.org/#/c/557778/ changed the return
value for coerce() to explicitly force the value to be unicode. This
causes problems with Python 2 runtimes, where the expected value of a
string is no longer a string but now unicode (see:
https://github.com/openstack/cinder/blob/b89e73a2ac315927d2eee42129597b14e87ba685/cinder/tests/unit/volume/drivers/dell_emc/vmax/test_vmax.py#L3412)
The correct fix should be to use either six.text_type to convert it,
or format it into a string as is being done, but without forcing it to
be a unicode string. "%s" will end up being the correct type depending
on whether it is running under py2 or py3.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1763179/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list