6 ms·
So here's the deal: Django 1.5 has "full" Python 3 support, at least from a technical level. It's done, works, is well-tested. I'm planning on putting a Django
by jacobian 14y ago
So here's the deal:
Django 1.5 has "full" Python 3 support, at least from a technical level. It's done, works, is well-tested. I'm planning on putting a Django 1.5 / Python 3.3 site into production later this year. So in that sense it's "done" now.
However, we sorta have to hedge our bets in terms of what we recommend others do.
We have a pretty serious backwards-compatibility promise, and we're not 100% certainly we've nailed down all the Python 3 APIs perfectly. There's a small (but non-zero) chance something might need to change between 1.5 and 1.6; we want the ability to make that change backwards-incompatible (for Python 3 users) if possible.
Similarly, there's a small (but again non-zero) chance that there's a serious bug or three in the Python 3 support. We don't want people getting bitten.
Finally, much of the "good stuff" in Django-land is actually in third-party apps, many of which don't yet support Python 3. This puts a pretty big obstacle in the way of a Django/Py3 site -- most real-world sites use a ton of third-party stuff. So to use Django on Py3 right now you'll need to make a bunch of "should I DIY this component or port it to py3 and submit a patch?" decisions.
In the case of the site I mentioned up top these are tradeoffs I'm willing to make. I know Django well enough to not be worried about potential bugs or backwards-incompatibilities, and I have the luxury on this project of getting to work on py3 patches as part of the deal.
Most people won't be so lucky, though, so we expect the majority of Django users to wait until 1.6 to start seriously using Py3.
We don't have a firm timeline yet. I'm guessing something like 6-9 months for 1.6, but that depends on a lot of different things. It could be longer, as much as a year, or possibly even as short as 3-4 months. We'll see :)
- mahmoudimus 14y agoThis is such a great answer. Definitely understand the reasoning here -- part of Django's strength is its ecosystem and its available third-party apps. Taking that away would certainly hinder adoption/productivity. At the same time, it's important to realize that there will probably need to be some point in the future where Django has to take a stand and firmly put down a timeline on when apps need to be migrated to stay "relevant." Maybe something like Python's Wall of Superpowers / Shame (http://python3wos.appspot.com/ http://python3wos.appspot.com/) though I know Jesse Noller has had some pushback on this website.
- jnoller 14y agoI didn't have pushback. I didn't like the "Wall of Shame" name.
- mahmoudimus 14y agoAh fair enough!
- ambiate 14y agoIs there a non-zero chance that all Python 2.* support will be removed in the future (2-3 years)? I'm with a company that's currently toying with the idea of using Django in our production environment. Py3 is a no-show in our plan or goals.
- gtaylor 14y agoThey've been gradually removing support for older Python 2.x with each release, so it's likely the same will happen with all of Python 2 in the coming years. But that's probably a good thing. Python needs to keep improving, and Python 3 is just flat out a better language.
- mixmastamyk 14y agoIsn't it still significantly slower? Even though it probably doesn't matter most of the time, it would helpful for all 3's items to be in the "better column."
- tshepang 14y agoThe only significant slowness I've heard of was due to the I/O library, but it was only in 3.0, so has since been fixed. Or were you referring to something else?
- jacobian 14y agoAt some point, yes, we'll drop Python 2 support. When really depends on how rapidly we see adoption (from users and re-distributors of Django) and how heavy the dual-version support burden turns out to be. My guess is what we're looking at a longer support window than the 2-3 years you posit, but that's really just a half-assed guess. Anything between "next year" and "never" would be a reasonable guess too... ... and y'know, Python 3 should be on your radar, if not necessarily what you use right now. It's better than Python 2 in every way (except for adoption, and that's changing). 3.3 in particular has a ton of really great new stuff (futures! working namespace packages! yield from!) that you'll wonder how you lived without.
- SilasX 14y agoThat care and precision, in a nutshell, is a large part of why I prefer Django to Rails so much.
- rednukleus 14y agoThanks for the detailed answer! That all makes sense, and sounds like a very sensible way for the project to progress.
- eclipticplane 14y agoAs an author of many Django sites and third party components/libraries -- Django was one of our major blockers to even attempt Py3 ports. Now that it's under way, we'll get started, too. The fact that Django is using a single code base (with six) is a huge bonus, so we'll be trying to do that, too.