Live data from Hacker News

Removing Python 2.x support from Django for version 2.0

github.com

51–60 of 413 posts

Re: Removing Python 2.x support from Django for version 2.0

#51
post #9

Earlier quoted context omitted.

I think whatever goodies Django 2.x will have, they'll be backported to 1.x by somebody. At my last job they were still using Django 1.6 when I quit last year. Updating to a new version takes a lot of manhours. Rewriting the codebase in a new language (which basically what Python 2 -> Python 3 transition is) would be completely out of the question.

> Rewriting the codebase in a new language (which basically what Python 2 -> Python 3 transition is) would be completely out of the question. Not even close to rewriting in a new language. In my experience upgrading from django 1.6 to 1.7 is a bigger change than python 2 to 3

Yep. I've done 1.6->1.7->1.8->1.9 at my current workplace and 1.6->1.7 with Django migrations was the biggest one by a long way. The documentation for upgrades is great too.

Re: Removing Python 2.x support from Django for version 2.0

#54

So, after a poor evolution strategy that lead the Python world to be split in two and forces maintainers to offer two versions for the same library, and upstream maintainers to offer support for two different python versions, the same is happening for Django! I speculate that the latest Django 1.x will remain used - and possibly the most used - for a lot, lot of time.

I disagree, I think Django dropping support for 2 will actually push more open source projects to do the same. This will create the momentum and incentive necessary to nudge people over the edge and upgrade. There is an awful lot of hyperbole around the difficulty of upgrading from python 2 to 3, however with the latest changes in 2.7 and 3.6 the gap isn't as big as you expect. I converted our (admittedly not massive…

>There is an awful lot of hyperbole around the difficulty of upgrading from python 2 to 3

+1. IMO this is the 2nd most overblown python issue next to the GIL.

It's also not actually that difficult to maintain code that works on both.

Upgrading Django OTOH has caused me quite a bit more pain over the years.

Re: Removing Python 2.x support from Django for version 2.0

#55
post #34

Earlier quoted context omitted.

the benefit is that all the wasted energy that went into all the useless 3.x stuff, could have been spent on advancing Python's speed, multicore, or GPU programming capabilities. Instead, for the single use case where Python is clearly the dominant language (for pure network-effect reasons), namely scientific programming, we have been at a standstill for years. In other words, under current stewardship, Python is goi…

> I am also almost 100% certain that if scientific programmers leave Python, the language will stall, and the current 3.x pushers are dangerously looking a gift horse in the mouth. This sounds like such similar sour grapes to the systemd escapades. Huge initial outroar as certain things happened, followed by a gradual diminishing, then [mostly] acceptance. This is what is happening with Python 3 and a smaller, doom-a…

>This sounds like such similar sour grapes to the systemd escapades. Huge initial outroar as certain things happened, followed by a gradual diminishing, then [mostly] acceptance.

Only here we don't have mere service scripts, but millions of lines of code people have written in perfectly fine 2.x Python.

And also here we don't have any significant uptake -- Python 2.x is still over 60% of what's used (according to PyPi stats and everything we've seen), and that's after 6+ years that Python 3 had its chances.

Re: Removing Python 2.x support from Django for version 2.0

#56
post #47
post #6

This call has been made a while back, and it makes perfect sense. Python 2 is slowly being EOL'd and if you're starting a brand new Django project there's no reason on earth you should choose Python 2 anymore. Sure legacy projects still need support and for that they get the 1.11 LTS, but otherwise it's really time to move on.

> and if you're starting a brand new Django project there's no reason on earth you should choose Python 2 anymore. How about millions of lines of code in your company in Python 2, and several Python 2 based services and websites? Why on earth will you go to Python 3 at huge rewriting costs? To get some fancy syntactic sugar and improved unicode?

Why can't your Python 2 services talk to your Python 3 web app?

Re: Removing Python 2.x support from Django for version 2.0

#57

Earlier quoted context omitted.

Please, don't tell me how "Python3 is good" - I know everything. I just still don't approve the way the transition was made - if we got to Python 3 through progressive deprecation and evolution via python 2.8 and 2.9, we wouldn't be where we are now.

> if we got to Python 3 through progressive deprecation and evolution via python 2.8 and 2.9, we wouldn't be where we are now. You mean exactly like Django's progressive deprecation and evolution that you're complaining about in your parent post?

No, he means language level progressive deprecation and evolution, as opposed to an abrupt jump to a changed 3 from 2.

Re: Removing Python 2.x support from Django for version 2.0

#58
post #11

Earlier quoted context omitted.

Or if they had called Python 3 a different name, and let both branches evolve freely and compete.

This sounds like a fork. Nothing need stop someone from forking and maintaining CPython 2.x. Open source is a do-ocracy. But I doubt it'd be worth it. Python 3 is getting great traction and is a fundamentally better language.

>This sounds like a fork.

Python 3 is already a fork.

Re: Removing Python 2.x support from Django for version 2.0

#59
post #47

Earlier quoted context omitted.

> and if you're starting a brand new Django project there's no reason on earth you should choose Python 2 anymore. How about millions of lines of code in your company in Python 2, and several Python 2 based services and websites? Why on earth will you go to Python 3 at huge rewriting costs? To get some fancy syntactic sugar and improved unicode?

Why can't your Python 2 services talk to your Python 3 web app?

Why should I maintain code, servers and libs in 2 versions of a backend programming language?

Re: Removing Python 2.x support from Django for version 2.0

#60
post #43
post #37

Earlier quoted context omitted.

Could you give a description of some subsystem that has been architectured in this way, and then provide a concrete example of some methods that implement this pattern and why it is bad? We are users of Django, and it helps us to deliver projects, quickly. Interested to know how you think things could be improved.

Not sure what it's like now, but the insides of the admin used to be fairly terrible (generating HTML with strings for instance). There was a patch to change this to use templates, but it was rejected at the time as it slowed things down too much. FormWizard (which I hear doesn't exist now), was a nightmare to use for any sort of complex form - I tried to do just this and had to call many private methods. I understan…

The core Django developers will (and have) freely admit that the admin interface implementation is a bit of a mess. There is an enormous amount of technical debt in it. It is however not a "core" part of Django and there are many alternatives. I think most people would agree that the correct long term solution to the admin interface is a complete rewrite, however the cost of doing so is too high.

The html forms (used in the admin and everywhere else) have until now been generated from strings, however the next realise 1.11 (went to alpha yesterday) this has been changed to using the template tools.

Post reply on HN