Django 1.7 and Python 2.6

44 views
Skip to first unread message

François Schiettecatte

unread,
Sep 27, 2014, 2:54:47 PM9/27/14
to django...@googlegroups.com
Hi

I know that Django 1.7 does not officially run on Python 2.6:

https://docs.djangoproject.com/en/1.7/releases/1.7/#python-compatibility

Unfortunately I am stuck with Python 2.6 on a number of servers but would like to migrate to Django 1.7. Does anyone run that configuration? Is there anything in Django 1.7 which explicitly prevents it from running on Python 2.6? Or is this a "great if it runs, but don't care if it doesn't" situation.

Cheers

François


Babatunde Akinyanmi

unread,
Sep 27, 2014, 3:44:29 PM9/27/14
to Django users

Hi,
If you can download in your server then you can install python 2.7+ into your virtenv.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04A8E7D2-35CD-429A-873F-FF20C4D3D492%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

phi...@bailey.st

unread,
Sep 27, 2014, 4:51:43 PM9/27/14
to django...@googlegroups.com

Hello there,

docker might do the job.

Cheers,

Phillip


On 27/09/14 20:42, Babatunde Akinyanmi wrote:
> Hi,
> If you can download in your server then you can install python 2.7+ into
> your virtenv.
>
> On 27 Sep 2014 19:54, "François Schiettecatte" <fschiet...@gmail.com
> <mailto:fschiet...@gmail.com>> wrote:
>
> Hi

Russell Keith-Magee

unread,
Sep 27, 2014, 7:14:57 PM9/27/14
to Django Users

Out of the box, it won't work - but if maintaining an internal fork that adds Python 2.6 compatibility back in shouldn't be *too* difficult. 

When we drop support for a Python version, we don't go out of our way to break compatibility with that version. It's more like a gradual process where language features incompatible with older versions of Python slowly drift into the codebase.

The two sources of problems you'll hit are:

 1) Using language features available in 2.7 that weren't in 2.6. Set literals, dictionary/set comprehensions, and multiple context managers are the new features that are most likely to cause problems.

 2) Relying on compatibility shims that are no longer required in 2.7, and so were removed. The native OrderedDictionary type will be the complication here. We previously shipped a shim for older Python versions; that shim was removed in Django 1.7.

If you're absolutely stuck on 2.6, and you can't use a virutalenv or docker container to isolate your Python requirements (as suggested by others in this thread), then a back port might be an option.

The ultimate test - Can you run Django's own test suite? Once the test suite runs, you shouldn't have any problems.

Yours
Russ Magee %-)


François


François Schiettecatte

unread,
Sep 28, 2014, 11:39:35 AM9/28/14
to django...@googlegroups.com
Russell

Thanks, this the answer I was looking for, I think virtualenv is the way to go.

Cheers

François
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq84-MEYEN_fX6f2Sj%3DguLB-jp%3D9GKvw36o9CRbG4GDSX_aQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages