shivsharma07 / django-survey

Automatically exported from code.google.com/p/django-survey
0 stars 0 forks source link

Does not work with Python2.4 because uuid.py can not be imported? #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Solution:

Copy uuid.py to django.utils or your project directory

Change  the following to forms.py (in the survey directory)
import uuid 
to 
from itertools import chain
try:
    import uuid
except ImportError:
    from django.utils import uuid

Done with Django1.1alpha

Original issue reported on code.google.com by Mountain...@gmail.com on 27 Oct 2008 at 8:11

GoogleCodeExporter commented 8 years ago
Hello,
I would prefer to avoid checking in external code in that repository. If you 
want to
use python 2.4 I would advise you to have uuid in your PYTHONPATH. Like this 
you will
be able to use django-survey without patching it.

--yml

Original comment by yann.ma...@gmail.com on 30 Oct 2008 at 1:37

GoogleCodeExporter commented 8 years ago
I can definitely see why you would not make this change to the source (it is 
sort of
a kluge), after all the install or (Django) would have to copy the uuid.py file 
from
Python 2.5 into utils directory.  Plus how if it changes how does one ensure it 
gets
updated.

Would adding the path to /usr/lib/python2.5 and running python2.4 cause some
conflicts/problems with /usr/lib/python2.4 ? For example a user could use 
another 
Django (or other python app) that would try to use a 2.5 module that would not 
be
compatible with 2.4(and does not exist in 2.4). It seems an import error would 
be
easier to track down than some incompatibility. 

In my case I decide to rebuild wsgi to use python 2.5, so the problem is now 
moot for
me. 

FYI, I stole the original solution from another django app (sorry, I forgot 
which one).

I would suggest that somewhere in the docs or the wiki that perhaps 2.5 should 
be
mentioned as a requirement. I don't think it is necessary to support all the 
way down
to 2.3 (which Django does).  

Original comment by Mountain...@gmail.com on 30 Oct 2008 at 3:19

GoogleCodeExporter commented 8 years ago
I have added a note in 
http://code.google.com/p/django-survey/wiki/GettingStarted
You can also easy_install it in your Python 2.4 or use virtualenv.
--yml

Original comment by yann.ma...@gmail.com on 30 Oct 2008 at 11:40