6 ms·
>Django 1.5 is the first Django release with support for Python 3 (specifically, Python 3.2 and newer). That sentence is of course followed by caveats about Py
by awolf 14y ago
>Django 1.5 is the first Django release with support for Python 3 (specifically, Python 3.2 and newer).
That sentence is of course followed by caveats about Python 3 support being experimental at this stage, but all-in-all I think this is a sign that we are finally at the tipping point for Python 3 to start gaining mainstream usage.
Thank you Django community for moving the ball forward for everyone.
- jacobian 14y agoFYI, the "experimental" thing is a community thing, not really a technical judgement. Since this is our first Python 3 release, we want to have some space to make changes between 1.5 and 1.6 that we otherwise would avoid because of our strong backwards compatibility promise. The "experimental" label is about giving ourselves that room and not surprising users if there do have to be changes in the way Py3 support works between 1.5 and 1.6. Technically, however, it's pretty rock-solid. I'll be launching a site built on Py3/1.5 is about two weeks, and aside from constantly forgetting to `print(...)` instead of `print ...` it's been surprisingly smooth sailing.
- sigzero 14y agoThat is great to hear. I am learning with Py3 and would love to use Django with it.
- deleted 14y ago[deleted]
- SoftwareMaven 14y agoHave you found any of the third-party Django extensions to be catching up? I'm starting a new project and would love to just start with Python3, but there are a few packages I depend on: South, lxml, pytz, simplejson, requests, django-compressor, gunicorn, jinja2, twisted, txAMQP, and django-rest-framework (amongst some other utilities actually used for development). It would sure be great to have a list of django sub-projects and their Python3 status. Regardless, even if we start with Python2.7 and bump up to 3.3 in a few months, this is a great step!
- takluyver 14y agoOff the top of my head: lxml, pytz, simplejson (as json in the stdlib), requests and jinja2 work already. Twisted has someone working on Python 3 support. The others I don't know about.
- jacobian 14y agoOf your list: * South doesn't have Py3 support in core, but there's a fork that does and seems to work perfectly: https://bitbucket.org/aaugustin/south-python3 https://bitbucket.org/aaugustin/south-python3 * lxml as of v3 seems to have py3 support (I haven't tried it, but looks like it does). * simplejson is now in the standard library as "json", so yes there. * requests works, since v0.10 (about a year ago). * django-compressor is not ported; however, django-pipeline does run on Python 3 and is basically -compressor's successor. It works great. * gunicorn works on py3 (as does uwsgi and mod_wsgi, btw.) * jinja2 hasn't been ported yet. * twisted is actively being ported right now, and has gotten to the point of "kinda working". You can follow along at http://twistedmatrix.com/trac/milestone/Python-3.x http://twistedmatrix.com/trac/milestone/Python-3.x and http://twistedmatrix.com/trac/wiki/Plan/Python3 http://twistedmatrix.com/trac/wiki/Plan/Python3. * txAMQP probably can't get ported until twisted does. * django-rest-framework has Python 3 support, I think it's fairly recent, but it works well. This list is about typical of what I've found doing Django/Py3 work: many things are ported, a bunch more have good alternatives, and a few things are still missing.
- pistacchioso 14y agohonest question: my job is programming in python. I never had python 3 installed on a machine, being it personal, a server or a computer at work. I never felt the need to. any time I wonder why I'm not using it, I go back to the "what's new" page and I remember why. I mean, the biggest change is print not being a statement anymore? Improved UTF8 is neat, and being Italian I work with not ASCII chars all the day, but even in large projects this comes down to a couple of encodings. I mean, multi-line lambdas, optional static decorators, those would justify a jump in version and backwork incompatibility, but map returning an iterator and not a list? Meh, this is good for python 2.actual_version + 1.
- lutusp 14y ago> I mean, the biggest change is print not being a statement anymore? The reasons to upgrade to Python 3 are both numerous and serious. If the only hit on your code base is to change "print this" to "print(this)", by all means upgrade. And most conversions are automated -- just run a script named "2to3": http://docs.python.org/2/library/2to3.html http://docs.python.org/2/library/2to3.html Asking why one would want to move from Python 2 to Python 3 is like asking how much a boat costs -- if you have to ask, you can't afford the consequences. Here are some of the reasons: http://wiki.python.org/moin/Python2orPython3 http://wiki.python.org/moin/Python2orPython3 A quote: "At the time of writing (July 4, 2010), the final 2.7 release is out, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen stable releases, such as the recent 3.2. This means that all recent standard library improvements, for example, are only available in Python 3.x." A more complete list of the changes: http://docs.python.org/3/whatsnew/3.0.html http://docs.python.org/3/whatsnew/3.0.html Bottom line -- if you don't migrate to Python 3, over time the corner you're painting yourself into will become smaller and smaller.
- pistacchioso 14y agoOf course the push to a new version is strong and a newer version of a product represents its future. I'm not debating this or stating that it is stupid to use the newer version, but when I see someone writing "about time!", I read it like "wow, so I can finally use Python 3 and all its game changing brand new features!", but I don't see anything new than, when programming in Python 2x, makes me think "oh, if only I had used Python 3 here!". For example, when I upgraded to .net 3.5 and I got Linq, I really felt the pain of not having it available when maintaing older code and I finally decided to migrate it all to 3.5 due to the real new features.