Suor/handy

Django 1.9 support

gregmuellegger opened this issue · 4 comments

It seems that handy doesn't support Django 1.9. If I try to use the package I get the following error:

Traceback (most recent call last):
  File "runtests.py", line 37, in <module>
    runtests(*sys.argv[1:])
  File "runtests.py", line 24, in runtests
    django.setup()
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/django/apps/config.py", line 116, in create
    mod = import_module(mod_path)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/gregor/projects/oTree/otree-core/otree/apps.py", line 11, in <module>
    from otree.models_concrete import StubModel
  File "/home/gregor/projects/oTree/otree-core/otree/models_concrete.py", line 1, in <module>
    from otree.db import models
  File "/home/gregor/projects/oTree/otree-core/otree/db/models.py", line 13, in <module>
    from handy.models import JSONField, PickleField
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/handy/models/__init__.py", line 1, in <module>
    from .fields import *
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/handy/models/fields.py", line 17, in <module>
    from handy.utils import get_module_attr
  File "/home/gregor/projects/oTree/otree-core/.tox/py2.7-django1.9-unittest/lib/python2.7/site-packages/handy/utils.py", line 10, in <module>
    from django.db.models.sql.where import Constraint
ImportError: cannot import name Constraint

Is there any chance that Django 1.9 will be supported in the future?

Suor commented

Fixed this in 54ed9e2. Please try it with your code.

Great! Thank you! Is it possible to get out a new release for this package, so that we can pin our dependencies against it?

@Suor Do you plan to release a new version of this anytime soon so that everyone could use the Django 1.9 support?

Suor commented

Released.