Proposal: drop Python 2.5 support in Django 1.5

964 views
Skip to first unread message

Luke Plant

unread,
Dec 10, 2011, 9:36:28 AM12/10/11
to django-d...@googlegroups.com
Hi all,

In other threads we've discussed the problem of Python 2/3 compatibility
where we need to catch exceptions and need the exception object itself.
This leads to ugliness and possible poor performance on PyPy.

However, we could get around it completely if we drop Python 2.5
support, since the 'except Exception as e' syntax is valid from Python
2.6. [1]

Other things I've read recently suggest life will be made much easier
for out Python 3 work if we drop Python 2.5 support [2].

So, I propose that we attempt to merge the py3k work after the release
of 1.4, rather than let it go stale and lose the good work done so far,
and also drop support for Python 2.5 for Django 1.5.

For reference, here are release dates so far, and Python versions, with
my proposal sketched in:


Django releases
---------------
Django 1.0 - September 3, 2008
Django 1.1 - July 29, 2009
Django 1.2 - May 17, 2010
Django 1.3 - March 23, 2011
Django 1.4 - early 2012 ?
Django 1.5 - late 2012 ??


Python releases Django dropped support
--------------- ----------------------
Python 2.3 - July 29, 2003 in 1.2 released May 2010
Python 2.4 - November 30, 2004 in 1.4 released early 2012 (?)
Python 2.5 - September 19, 2006 in 1.5 released late 2012 (?)


So, we dropped Python 2.3 support 6 years 10 months after it was
released. We will be dropping 2.4 support after approx 7 years 3 months,
and we would be dropping Python 2.5 support after approx 6 years 3
months. So, this would be a slight squeeze compared to Python 2.3, and a
bigger squeeze compared to 2.4.

But given that I think a push to Python 3 is the right thing to do, this
doesn't seem like an extreme programme at all. We *should* be squeezing
the programme in terms of migrating from 2.x, not expanding it. It would
be nice to be able to announce this when we release 1.4, if we agree on it.

In the past we have talked about dropping a Python version with each
Django release. The other thing to consider is support by the major
vendors. I know very little about this side, but from what I've gleaned,
RHEL5 goes into long term support mode in 2012 Q1 (it had Python 2.4,
which we already dropped), and RHEL6 is already out, and has Python 2.6.

Regards,

Luke


[1] http://docs.python.org/whatsnew/2.6.html
[2] http://goo.gl/qNfKN

--

Luke Plant || http://lukeplant.me.uk/

Jannis Leidel

unread,
Dec 10, 2011, 11:22:13 AM12/10/11
to django-d...@googlegroups.com
> I propose that we attempt to merge the py3k work after the release
> of 1.4, rather than let it go stale and lose the good work done so far,
> and also drop support for Python 2.5 for Django 1.5.

+1

I think dropping Python 2.5 in the process of porting Django to Python 3.X are reasonable goals. That said, even without the Py3k work going so well I would support dropping Python 2.5 in the next major version.

Jannis

Adrian Holovaty

unread,
Dec 10, 2011, 11:56:42 AM12/10/11
to django-d...@googlegroups.com
On Sat, Dec 10, 2011 at 8:36 AM, Luke Plant <L.Pla...@cantab.net> wrote:
> So, I propose that we attempt to merge the py3k work after the release
> of 1.4, rather than let it go stale and lose the good work done so far,
> and also drop support for Python 2.5 for Django 1.5.

I think both of these proposals are great -- start merging the Python
3 work right after we release 1.4, and drop support for Python 2.5 in
trunk after 1.4 is released.

Thanks for the suggestion, Luke.

Adrian

Jacob Kaplan-Moss

unread,
Dec 10, 2011, 12:32:08 PM12/10/11
to django-d...@googlegroups.com
On Sat, Dec 10, 2011 at 10:56 AM, Adrian Holovaty <adr...@holovaty.com> wrote:
> I think both of these proposals are great -- start merging the Python
> 3 work right after we release 1.4, and drop support for Python 2.5 in
> trunk after 1.4 is released.

I totally agree.

Jacob

Russell Keith-Magee

unread,
Dec 10, 2011, 6:08:54 PM12/10/11
to django-d...@googlegroups.com

Same here. +1.

Russ %-)

Paul Egges

unread,
Dec 10, 2011, 7:35:38 PM12/10/11
to django-d...@googlegroups.com
+1 

I thought there was an implicit understanding that only 3 versions of Python would be supported at any given time.  If so it makes sense to drop support for 2.4 when we add 3.x. 




--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.


Alex Gaynor

unread,
Dec 10, 2011, 7:37:08 PM12/10/11
to django-d...@googlegroups.com
2.5 is EOL and no longer receiving security patches even, it is *irresponsible* of us to support it (I claim).  ANyways +1

Alex

--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero

Markus Gattol

unread,
Dec 10, 2011, 8:21:05 PM12/10/11
to django-d...@googlegroups.com
Wasn't the reason why Django 1.4 should still support Python 2.5 because of RHEL 5? If so, RHEL 5 never had official Python 2.5 support but only supported Python 2.4. RHEL 6 does not support 2.5 either, its Python version is 2.6. What is the reason that Django 1.4 needs to support Python 2.5?

Adrian Holovaty

unread,
Dec 10, 2011, 9:06:08 PM12/10/11
to django-d...@googlegroups.com
On Sat, Dec 10, 2011 at 6:37 PM, Alex Gaynor <alex....@gmail.com> wrote:
> 2.5 is EOL and no longer receiving security patches even, it is
> *irresponsible* of us to support it (I claim).  ANyways +1

This is a very good reason I hadn't though of.

Anyway, looks like this is a plan! Excellent.

Adrian

Kok Hoor (gmail)

unread,
Dec 10, 2011, 9:39:45 PM12/10/11
to django-d...@googlegroups.com, django-d...@googlegroups.com
+1

Regards,
Kok HOOR

Sent from my iPad

Paul McMillan

unread,
Dec 12, 2011, 12:30:30 AM12/12/11
to django-d...@googlegroups.com
> 2.5 is EOL and no longer receiving security patches even, it is
> *irresponsible* of us to support it (I claim).  ANyways +1

This. +1 from me. We do everything else in our power to encourage
secure behavior from our users, this is yet another appropriate step.

-Paul

Joseph Tennies

unread,
Dec 12, 2011, 1:46:57 AM12/12/11
to django-d...@googlegroups.com
While I agree it should be dropped, I was discussing this with the Twisted guys. They pointed out that it will actually receive security updates through 2013. This is thanks to Ubuntu 8.10 LTS. I'm sure Canonical could tap into someone like Barry to fix it if serious enough.



-- Sent from my HP TouchPad

Vinay Sajip

unread,
Dec 23, 2011, 5:49:32 AM12/23/11
to Django developers

On Dec 10, 4:56 pm, Adrian Holovaty <adr...@holovaty.com> wrote:

> I think both of these proposals are great -- start merging the Python
> 3 work right after we release 1.4, anddropsupport for Python2.5in
> trunk after 1.4 is released.

Before we do this, another decision is required - which release of 2.6
is the minimum Django should support? There was a change which
occurred with 2.6.5 (IIRC) to allow Unicode in kwargs keys (earlier
versions would raise an exception).

If we use "from __future__ import unicode_literals" to avoid using u()
and b(), then a lot of Django code will be affected. Supporting 2.6-
>2.6.4 will require cleaning kwargs, and to avoid this one would need
to state that Django will only support 2.6.5 onwards. Of course, that
might affect quite a lot of users with 2.6 system Pythons which are <
2.6.5 (e.g. on Ubuntu Jaunty the system Python is 2.6.2).

Regards,

Vinay Sajip

David Malcolm

unread,
Dec 23, 2011, 9:26:06 AM12/23/11
to django-d...@googlegroups.com
On Mon, 2011-12-12 at 00:46 -0600, Joseph Tennies wrote:
> While I agree it should be dropped, I was discussing this with the
> Twisted guys. They pointed out that it will actually receive security
> updates through 2013. This is thanks to Ubuntu 8.10 LTS. I'm sure
> Canonical could tap into someone like Barry to fix it if serious
> enough.

In a similar vein, I'm actually still doing security fixes for Python
2.2 for some RHEL customers, and for 2.3 and 2.4 for RHEL 4 and 5 (we
never shipped 2.5 in RHEL; we're at 2.6.6 in RHEL 6)

(But I don't want to stand in the way of Python 3 support, and 2.6 is
probably the minimum sane version of 2.* to handle a dual 2/3 codebase)

Dave

Jannis Leidel

unread,
Dec 23, 2011, 10:23:23 AM12/23/11
to django-d...@googlegroups.com

I would argue that Jaunty being a non-LTS release shouldn't be considered as a target platform we want to support. OTOH the LTS release Ubuntu Lucid (10.04) ships Python 2.6.5, so we're good.

Jannis

Vinay Sajip

unread,
Dec 23, 2011, 11:36:41 AM12/23/11
to Django developers

On Dec 23, 3:23 pm, Jannis Leidel <lei...@gmail.com> wrote:
>
> I would argue that Jaunty being a non-LTS release shouldn't be considered as a target platform we want to support. OTOH the LTS release Ubuntu Lucid (10.04) ships Python 2.6.5, so we're good.

Sure, Jaunty was just an example. I'm not sure what versions of 2.6
are on different releases of RHEL, CentOS etc.

Regards,

Vinay Sajip

Nan

unread,
Dec 23, 2011, 12:28:43 PM12/23/11
to Django developers

FWIW, the previous version of Mac OS X (10.6) shipped with 2.6.1.

David Malcolm

unread,
Dec 23, 2011, 12:30:13 PM12/23/11
to django-d...@googlegroups.com

FWIW, RHEL 6.0 shipped with 2.6.5, and we rebased to 2.6.6 in RHEL 6.1:
https://bugzilla.redhat.com/show_bug.cgi?id=627301
http://rhn.redhat.com/errata/RHSA-2011-0554.html

Hope this is helpful
Dave

Mateusz Harasymczuk

unread,
Dec 28, 2011, 6:15:20 AM12/28/11
to django-d...@googlegroups.com
Me too.
+ 1

--
Matt Harasymczuk
http://www.matt.harasymczuk.pl
Reply all
Reply to author
Forward
0 new messages