[Bug 1530888] Re: Bytes versus text issues on Python 3
Launchpad Bug Tracker
1530888 at bugs.launchpad.net
Wed Sep 12 20:50:25 UTC 2018
This bug was fixed in the package python-tooz - 1.62.0-0ubuntu2
---------------
python-tooz (1.62.0-0ubuntu2) cosmic; urgency=medium
* d/p/ensure-consistent-encoding-of-strings-for-ID.patch: Cherry
pick inflight fix to resolve encoding issues under Python 3
(LP: #1530888).
-- James Page <james.page at ubuntu.com> Tue, 11 Sep 2018 11:14:22 -0600
** Changed in: python-tooz (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-tooz in Ubuntu.
https://bugs.launchpad.net/bugs/1530888
Title:
Bytes versus text issues on Python 3
Status in tooz:
Triaged
Status in python-tooz package in Ubuntu:
Fix Released
Bug description:
It's unclear to me if group and member identifiers are supposed to be
bytes or text strings in tooz. Try to run unit tests with "python3
-bb" to see BytesWarning errors.
It looks like bytes is preferred, but it's cause some conversion
issues on Python 3.
Tooz errors have group_id and member_id attributes which are used to
format error messages. Example:
---
class MemberAlreadyExist(ToozError):
"""Exception raised when the caller try to join a group but a member
with the same identifier belongs to that group.
"""
def __init__(self, group_id, member_id):
self.group_id = group_id
self.member_id = member_id
super(MemberAlreadyExist, self).__init__(
"Member %s has already joined %s" %
(member_id, group_id))
---
If group_id and member_id must be bytes, we must decode them to format
the error message. "%s" % b'bytes' raises a BytesWarning when python3
is used with -bb.
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-tooz/+bug/1530888/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list