← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 925748] Re: We should call unicode() instead of str()

 

until we have the dependency issue addressed for python3 this isn't
worth addressing IMHO

** Changed in: nova
       Status: Triaged => Opinion

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/925748

Title:
  We should call unicode() instead of str()

Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  Until we move to Python 3, we need to be careful of unicode vs ascii
  strings.  Calling str(s) on a string which contains extended
  characters gives an exception.  Please see related bug Bug #822666,
  which was a specific instance of this.

  This is potentially a huge change though, so I'm not sure how we
  should attack it; here are a few starting thoughts:

  Replace all calls to str() with unicode()  (or deprecate and replace over time)
  Anywhere we call _() we're OK, because gettext is configured in unicode mode
  If we have something like this: "%s %s" % (a, b)  could we be in trouble there also?

  Other ideas:
  We could change the default python character encoding ?
  We could target Python 3 in parallel to Python 2 ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/925748/+subscriptions