← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1345642] Re: use force_text instead of force_unicode

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

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

Title:
  use force_text instead of force_unicode

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  Horizon's code base uses force_unicode()[0] function to ensure the an
  object is correctly transformed to unicode text, this function is part
  of Django. This function is deprecated.

  Since Django 1.5 there are new functions to string handling[1] and
  force_unicode() since then is an alias of force_text(), but only
  available when Django is running in a Python 2.x interpreter, Django
  doesn't provide the alias when is running on Python 3.x[2]

  Horizon should start using force_text() to be able to run on Python 3

  [0] https://docs.djangoproject.com/en/1.4/ref/unicode/#conversion-functions
  [1] https://docs.djangoproject.com/en/1.5/topics/python3/#string-handling
  [2] https://github.com/django/django/blob/1.5/django/utils/encoding.py#L171

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


References