This is the most exciting and interesting thing in the release:
Persistent database connections
Django now supports reusing the same database connection for several requests. This avoids the overhead of re-establishing a connection at the beginning of each request. For backwards compatibility, this feature is disabled by default. See Persistent connections for details.
Connection pooling? I am surprised to find out that Django doesn't have this feature until now. Is there any specific reason why this wasn't implemented much earlier? Old tech like plain asp had this more than a decade ago.
I would take a look at the actual implementation [1].
It is clearly not a full-featured connection pool. Sure, it gives some quick performance wins within each thread, but this is no proper cross-process connection pool.
As soon as someone decides to develop it. Remember: Django is open source software, maintained by a community of competent, dedicated and exceedingly generous developers who give us the privilege of using their software for free.
I just read through the entire, long release document, which listed dozens of changes, large and small. Not a single mention of Python 3 that I could see (though, of course, I could have missed it.) This was supposed to have been the first version of Django in--how many years?--that the version of Python you could build production websites with was the current Python, not a legacy.
That this fact is not the headline, and apparently not even considered worthy of mention in a long list of "miscellaneous" items, suggests that those of us who aren't legacy Python 2 users (and don't ever intend to be) just aren't Django's target market. Django has been around for a relatively long time accumulating so many long-time users that I understand the desire to make supporting those who long ago entrusted their businesses to Django the #1 priority. The flip side of that, though, is that those of us without such a legacy would seem destined to be lower priority, maybe significantly lower, for at least a few more years.
If there is no Flask in the next year or so that is redesigned to focus primarily on Python 3 web dev, we'll still use Python 3 for various tasks, but for web dev it might make more sense for us to just move on to another language with a more-recently-designed framework.
Wow, you're really making a ton of assumptions based on no evidence. I'm sorry you have such trouble assuming good faith.
Fact is, we just forgot to mention it. Django's working so well on Py3 that it kinda seems like no big deal any more, so we forgot to mention it in the release notes. I'll fix that once I get a chance.
> Django has supported python 3 since version 1.5 - the last major release
Python 3 support in 1.5 was marked as "experimental"[1], with 1.6 being the release that was supposed to be marked as suitable for general use. I believe that's what GP is referring to.
Yes, but 1.5 claimed only "experimental support", adding that they thought it probably would work all right but didn't want to recommend Python 3 for production yet. The unqualified "yes, we now consider it ready and can recommend Python 3 for production," was promised for Django 1.6. They probably have achieved that goal, but the fact that there is no mention of it anywhere in a document that mentions so many other things suggests that "for the first time, we can now recommend the use of Python 3 for production" isn't something they think their target market cares about as much as the several dozen other "issues" they DID mention.
Well, this is just the alpha release of the Django 1.6 so production recommendations (other than "don't use this for production yet") are probably a bit premature.
If you are very concerned about this, you should bring it up on the django-dev list:
Yup, we made a mistake. You could help by submitting a patch to fix it, or you could just choose to be a jerk and give some random person shit for making a mistake.
>Fact is, we just forgot to mention it. Django's working so well on Py3 that it kinda seems like no big deal any more, so we forgot to mention it in the release notes. I'll fix that once I get a chance.
It works fine. I'm working on my 2nd Django project using Python 3.3. The only missing component is South, and that isn't part of Django (although it'd be nice if it were).
Have they moved to a faster release schedule? I feel like 1.5 just came out and we can already expect 1.6 in August (not that I'm complaining about it).
For this release specifically we wanted to have it out before the end of summer so that we can be ready to merge Andrew's migration work and any GSoC code and turn around another release quickly.
probably because 1.5 was the first release that didn't block master branch during the feature freeze period, so work targetting 1.6 was already progressing on master during the 1.5 bugfixing schedule.
Not exactly. It's not proper connection pooling -- for that, you still should be using an external pool like pgbouncer. Instead this is a single persistent connection per thread. The speed improvement should be about the same, but you something like pgbouncer gives you more control over the number of connections and offers a ton of extra features.
Mmmm.... I mean, it would, I guess, but I wouldn't recommend using both unless you can show a marked speed improvement over just using pgbouncer. A real connection is (probably) better than persistent connections, so you probably only need the one.
Now, I've not benchmarked this, so it's just a guess. Further, the specific performance characteristics will depend on your specific setup -- particularly upon where you have pgbouncer running -- so the only real answer is to benchmark and see.
New Relic does a good job showing time spent connecting to the db, fwiw, so you may want to give that a try.
Thanks again for your answer - I have noted this down now. I will benchmark both cases (CONN_MAX_AGE and PgBouncer) and see which one is faster. Would like to thank you (!!) for the awesome python framework - Django.
Are there usually this many backwards-incompatible changes? In the past I've usually been able to upgrade Django without having to do any significant changes in the code.
So, it's a big list. But a lot of them are either:
* Fallout from transaction changes. Whether this affects your code will vary, and when and how it can affect your code is documented, or
* Bugfixes: lots of the stuff in there consists of "we had a bug, we fixed the bug, but you should know this in case you relied on the buggy behavior".
Split those out and it's actually quite a bit shorter.
Persistent database connections
Django now supports reusing the same database connection for several requests. This avoids the overhead of re-establishing a connection at the beginning of each request. For backwards compatibility, this feature is disabled by default. See Persistent connections for details.