[openstack-dev] [Solum] Unicode strings in Python3
Adrian Otto
adrian.otto at rackspace.com
Wed Dec 4 23:24:31 UTC 2013
Gregory and Ben,
Awesome, thanks!!
Adrian
On Dec 4, 2013, at 2:01 PM, Georgy Okrokvertskhov <gokrokvertskhov at mirantis.com<mailto:gokrokvertskhov at mirantis.com>>
wrote:
I opened a bug https://bugs.launchpad.net/solum/+bug/1257929 for that issue.
Ben, thank you for a quick fix proposal.
Thanks
Georgy
On Wed, Dec 4, 2013 at 1:41 PM, Ben Nemec <openstack at nemebean.com<mailto:openstack at nemebean.com>> wrote:
I don't think so. It looks like ./solum/api/controllers/v1/assembly.py is calling unicode(). It will need to be changed to six.text_type() for Python 3 compat.
-Ben
On 2013-12-04 15:41, Adrian Otto wrote:
Am I interpreting this to mean that WSME is calling unicode()?
On Dec 4, 2013, at 1:32 PM, Georgy Okrokvertskhov <gokrokvertskhov at mirantis.com<mailto:gokrokvertskhov at mirantis.com>>
wrote:
Hi,
I am working on unit tests for Solum as a side effect of new unit tests I found that we use unicode strings in the way which is not compatible with python3.
Here is an exception form python3 gate:
Server-side error: "global name 'unicode' is not defined". Detail: 2013-12-04 Traceback (most recent call last): File "/home/jenkins/workspace/gate-solum-python33/.tox/py33/lib/python3.3/site-packages/wsmeext/pecan.py"
result = f(self, *args, **kwargs)
File "./solum/api/controllers/v1/assembly.py", line 59, in get
raise wsme.exc.ClientSideError(unicode(error))
NameError: global name 'unicode' is not defined
Here is a documentation for python3: http://docs.python.org/3.0/whatsnew/3.0.html
Quick summary: you can't use unicode() function and u' ' strings in Pyhton3.
Thanks
Georgy
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
--
Georgy Okrokvertskhov
Technical Program Manager,
Cloud and Infrastructure Services,
Mirantis
http://www.mirantis.com<http://www.mirantis.com/>
Tel. +1 650 963 9828
Mob. +1 650 996 3284
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131204/b090f2d9/attachment.html>
More information about the OpenStack-dev
mailing list