Saturday, September 27, 2014

Re: Django 1.7 and Python 2.6


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 %-)

On Sun, Sep 28, 2014 at 2:54 AM, François Schiettecatte <fschiettecatte@gmail.com> wrote:
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


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/CAJxq84-MEYEN_fX6f2Sj%3DguLB-jp%3D9GKvw36o9CRbG4GDSX_aQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment