[PKG-Openstack-devel] Bug#755654: Fails to build with Django 1.7

Raphael Hertzog hertzog at debian.org
Thu Aug 7 21:17:31 UTC 2014

Control: tag -1 + confirmed

The package fails to build with Django 1.7:

ERROR: test_create_post_name_exists (tuskar_ui.infrastructure.flavors.tests.FlavorsTest)
  File "/usr/lib/python2.7/dist-packages/horizon/workflows/views.py", line 165, in post
    context = self.get_context_data(**kwargs)
  File "/usr/lib/python2.7/dist-packages/horizon/workflows/views.py", line 89, in get_context_data
    workflow = self.get_workflow()
  File "/usr/lib/python2.7/dist-packages/horizon/workflows/views.py", line 79, in get_workflow
  File "/usr/lib/python2.7/dist-packages/horizon/workflows/base.py", line 650, in __init__
    valid = step.action.is_valid()
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 162, in is_valid
    return self.is_bound and not bool(self.errors)
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 154, in errors
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 354, in full_clean
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 380, in _clean_form
    self.add_error(None, e)
TypeError: add_error() takes exactly 2 arguments (3 given)

==> this is a bug in "horizon", to be fixed there

ERROR: Failure: ImportError (cannot import name simplejson)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/«PKGBUILDDIR»/tuskar_ui/infrastructure/templatetags/chart_helpers.py", line 15, in <module>
    from django.utils import simplejson
ImportError: cannot import name simplejson

==> this is a real problem

You should try to use "import simplejson" (works with Python 2.7) and only use
the copy from Django as fallback:

    import simplejson
except ImportError:
    from django.utils import simplejson

The copy in Django 2.7 has been dropped because it already requires Python 2.7 which
includes this module.


Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/

More information about the Openstack-devel mailing list