Falcon doesn't work with Django 1.0

Bug #282472 reported by Raphaël Doursenaud on 2008-10-13
40
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Falcon
Undecided
Unassigned
falcon (Ubuntu)
High
Toby Collett

Bug Description

Binary package hint: falcon

Runnig falcon in intrepid gives the following error :
Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 14, in ?
    import falcon
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 45, in ?
    import falcon.config
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 62, in ?
    class ConfigurationKey(models.Model):
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 64, in ConfigurationKey
    key = models.CharField(maxlength=50, unique=True)
TypeError: __init__() got an unexpected keyword argument 'maxlength'

It's easily fixed replacing "maxlength" by "max_length" as this changed in the new django but with this fix, the application still doesn't start and give the following error I'm unable to fix:
Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 14, in ?
    import falcon
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 57, in ?
    from django.db import models as _models, get_creation_module, connection
ImportError: cannot import name get_creation_module

After some research, this is due to some incompatible changes in django 1.0 :

maxlength => max_length

get_creation_module() => connection.creation

DATA_TYPES => data_types

I'll put a patch as soon as I've tackled all the differences.

I'm now on :
Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 87, in ?
    falcon.conf.set_options(options, action!='iso', action)
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 180, in set_options
    falcon.init_rootdir()
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 146, in init_rootdir
    management.disable_termcolors()
AttributeError: 'module' object has no attribute 'disable_termcolors'

Also reported by a debian user : https://bugs.launchpad.net/ubuntu/+source/falcon/+bug/257304

Sorry wrong link in previous comment, I ment : https://bugs.launchpad.net/falcon/+bug/206762

OK, i figured out this one and hit a wall :

management.disable_termcolors() => from django.core.management.color import no_style

Now is :
Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 87, in ?
    falcon.conf.set_options(options, action!='iso', action)
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 180, in set_options
    falcon.init_rootdir()
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 151, in init_rootdir
    sql, ref = management._get_sql_model_create(model, all_models)
AttributeError: 'module' object has no attribute '_get_sql_model_create'

This is due to this change : http://code.djangoproject.com/changeset/5898 "This is backwards-incompatible for people who used django.core.management functions directly"

I think it needs bigger changes than I expected. I have no clue where to look at. I'll give up on that one. I'm not skilled enough (yet).

Gianvito Cavasoli (janvitus) wrote :

Same problem here:

Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 14, in ?
    import falcon
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 45, in ?
    import falcon.config
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 62, in ?
    class ConfigurationKey(models.Model):
  File "/usr/lib/python2.4/site-packages/falcon/config.py", line 64, in ConfigurationKey
    key = models.CharField(maxlength=50, unique=True)
TypeError: __init__() got an unexpected keyword argument 'maxlength'

Fix 'maxlength' to 'max_length':

Traceback (most recent call last):
  File "/usr/bin/falcon-start", line 14, in ?
    import falcon
  File "/usr/lib/python2.4/site-packages/falcon/__init__.py", line 57, in ?
    from django.db import models as _models, get_creation_module, connection
ImportError: cannot import name get_creation_module

Ubuntu Intrepid Ibex AMD64
Falcon 2.0.5 0ubuntu2
python-django 1.0 1ubuntu1

Eric Nichols (eric.nichols) wrote :

For those of you who absolutely need falcon working, I have verified that reverting to hardy's python-django package works.

Timo Aaltonen (tjaalton) wrote :

bumping the importance, falcon is useless on jaunty.

Changed in falcon:
importance: Undecided → High
status: New → Confirmed
Toby Collett (thjc) wrote :

I have a branch of falcon that at least loads with django-1
https://code.launchpad.net/~launchpad-plan9/falcon/community

If anyone wants to give it a go and let me know how it works. The backwards compatibility code is currently disabled as I havent updated that.

It should work with existing databases etc, but as with any test code I would advise you to back up first...

Scott Kitterman (kitterman) wrote :

Falcon has been removed from Jaunty and later releases due to this issue. If upstream ever fixes this, then it might return.

Changed in falcon (Ubuntu):
status: Confirmed → Won't Fix
Alan Barrow (alanbarrow) wrote :

Has attempts to fix or find a workaround for falcon been abandoned? Shame, as it appeared to be the most complete & easiest to use repository manager.

Thanks,

Alan

Robert Coup (rcoup) wrote :

@Alan: have a look at Toby's updated branch, seems to work well for me.

Yes. The upstream developer said they didn't have time for it anymore.

Toby Collett (thjc) wrote :

I have prepared a ppa release of this that works with django-1.0
https://launchpad.net/~thjc/+archive/ppa

This needs some testing (volunteers?).

Also the code for this version of the package is in my bzr branch
https://code.launchpad.net/~thjc/falcon/community

I am happy to take over as maintainer of this project for the moment, but have been unable to contact the author, I am not sure what the next step there is.

Changed in falcon (Ubuntu):
assignee: nobody → Toby Collett (thjc)
status: Won't Fix → In Progress
Scott Kitterman (kitterman) wrote :

His irc nick is seveas and he is often reachable on freenode.

Timo Aaltonen (tjaalton) wrote :

Thanks Toby, now it at least starts, but it scans every file every time.. so something is still wrong. Where do you want the bugreports?

Toby Collett (thjc) wrote :

File bugs under the falcon launchpad project for the moment, just make sure
you note that it was with this version.

2009/6/9 Timo Aaltonen <email address hidden>

> Thanks Toby, now it at least starts, but it scans every file every
> time.. so something is still wrong. Where do you want the bugreports?
>
> --
> Falcon doesn't work with Django 1.0
> https://bugs.launchpad.net/bugs/282472
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
This email is intended for the addressee only and may contain privileged
and/or confidential information

Dylan A. (dylan.a) wrote :

This bug target a different falcon than the one in the current ubuntu repository.

Changed in falcon (Ubuntu):
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers