Re: get_cache and multiple caches

2013-09-21 Thread Florian Apolloner
On Saturday, September 21, 2013 2:12:31 AM UTC+2, Curtis Maloney wrote: > Is there anything else? > Ain't that enough? :p -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it,

Re: Default session data serializer doesn't support extended data types

2013-09-21 Thread Davide Rizzo
On Friday, September 20, 2013 3:59:47 PM UTC+2, Donald Stufft wrote: > > A basic tenant in securing systems is that you make each piece of the > system responsible for it's own security and you don't have it depend on > the security of another system. Moving away from pickle as the default > se

Re: Performance Docs

2013-09-21 Thread Marc Tamlyn
Not sure where the compatibility comment came from as I think that's clearly not right. As for the performance gain, it's true pypy won't give you much of a help until you've fixed your code. Once you have a passably performant site you wish to make very fast, it's a major player in that equation.

Re: Performance Docs

2013-09-21 Thread Aymeric Augustin
On 21 sept. 2013, at 10:04, Marc Tamlyn wrote: > Not sure where the compatibility comment came from as I think that's clearly > not right. > The paragraph talks about both Pypy and C libraries. Historically, the Python and C versions of simplejson have seriously diverged in unicode handling; th

Re: Performance Docs

2013-09-21 Thread Marc Tamlyn
That looks better to me. Still conveys the same message with all the caveats. On 21 sept. 2013, at 10:04, Marc Tamlyn wrote: Not sure where the compatibility comment came from as I think that's clearly not right. The paragraph talks about both Pypy and C libraries. Historically, the Python and C

Re: Default session data serializer doesn't support extended data types

2013-09-21 Thread Davide Rizzo
On Friday, September 20, 2013 4:40:39 PM UTC+2, Curtis Maloney wrote: > I talked with the OP [or someone who talks a _lot_ like the OP:)] > Oh, I should meet this animal–pardon, this guy. :) And the answer is: there's no way for a matching Decoder to know when to > decode any of these types, si

Re: Performance Docs

2013-09-21 Thread Tim Graham
Aymeric's edits look good to me. Thanks for raising the issue, Alex. On Saturday, September 21, 2013 4:31:33 AM UTC-4, Marc Tamlyn wrote: > > That looks better to me. Still conveys the same message with all the > caveats. > On 21 sept. 2013, at 10:04, Marc Tamlyn > > wrote: > > Not sure where th

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-21 Thread Richard Ward
Oh dear, I just posted using the wrong Google account! Short version: ticket here: https://code.djangoproject.com/ticket/21134 Possible patch for raising exceptions when using broken transactions here: https://github.com/RichardOfWard/django/commit/cb46c75db275db59b54511c090286255bd9cc46d There

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-21 Thread Richard Ward
> > I'll open a ticket about the docs later today. https://code.djangoproject.com/ticket/21134 > Let me know if you think it can be improved. > That looks nice and explicit to me. I'm OK with trying to to raise exceptions when making a query and > get_rollback returns True. I'm not sure

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-21 Thread Aymeric Augustin
> Le 21 sept. 2013 à 15:53, Richard Ward a écrit : > > You say in your docs patch that savepoints are cheap Truth be said, I haven't run benchmarks. > so what is transaction.atomic(savepoint=False) for? is it just for > performance, or is more like an assertion that we are definitely in a > t

Re: Performance Docs

2013-09-21 Thread Daniele Procida
On Fri, Sep 20, 2013, Alex Gaynor wrote: >I didn't follow this PR as it was in progress, but I just sat down and read >them. I have to say I'm extremely saddened by >https://docs.djangoproject.com/en/dev/topics/performance/#alternative- >software-implementations. See if

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-21 Thread Kääriäinen Anssi
For the performance part: a simple model.save() is about 50% more expensive with savepoints. This time is used in the database. In addition there are 3 network trips instead of one. This could add latency in some usecases. Original message Subject: Re: Is "transaction.atomic"

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-21 Thread Aymeric Augustin
On 21 sept. 2013, at 15:53, Richard Ward wrote: > I'm OK with trying to to raise exceptions when making a query and > get_rollback returns True. I'm not sure it's doable; patch welcome ;-) > > How about this: > https://github.com/RichardOfWard/django/commit/cb46c75db275db59b54511c090286255bd9

Revert 165f44aa?

2013-09-21 Thread Aymeric Augustin
Hello, I think we went overboard in this commit: https://github.com/django/django/commit/165f44aa Specifically, I consider it's a regression in three areas. 1) Readability After the patch, indentation no longer matches the logical structure of the program. For example: -with self.se

Re: Revert 165f44aa?

2013-09-21 Thread Marc Tamlyn
Burn the backslashes! On a more serious note, I think these need to be taken on a case by case basis. Certainly unhelpful it test code though. On 21 Sep 2013 18:50, "Aymeric Augustin" wrote: > Hello, > > I think we went overboard in this commit: > https://github.com/django/django/commit/165f44aa

Re: Revert 165f44aa?

2013-09-21 Thread Florian Apolloner
On Saturday, September 21, 2013 7:50:34 PM UTC+2, Aymeric Augustin wrote: > > But whenever the with statement spills over two lines, which happens in a > majority of cases, I find it worse than two with statements. It's > especially bad in the transactions tests — I worked in this area today.

Re: Revert 165f44aa?

2013-09-21 Thread Kevin Christopher Henry
To summarize the possible approaches here: 1) Combine multiple with statements into one wherever possible. This seems to be the approach of the commit in question. 2) Group with statements based on whether they logically belong together, regardless of line length. This will involve backslashes,

Re: AbstractUser to get more abstract

2013-09-21 Thread Luke Sneeringer
I'm taking several different e-mail replies and attempting to conglomerate them. Please forgive me if this is not considered socially acceptable here. On Sep 20, 2013, at 8:42 PM, Russell Keith-Magee wrote: > We have two key questions here: > > 1) Where does the new model live? Is it going t

Re: Revert 165f44aa?

2013-09-21 Thread Russell Keith-Magee
On Sun, Sep 22, 2013 at 5:16 AM, Florian Apolloner wrote: > > > On Saturday, September 21, 2013 7:50:34 PM UTC+2, Aymeric Augustin wrote: >> >> But whenever the with statement spills over two lines, which happens in a >> majority of cases, I find it worse than two with statements. It's >> especial

Re: AbstractUser to get more abstract

2013-09-21 Thread Timothy Anderegg
> > > >- I believe that we should add an AbstractEmailUser as a subclass of >AbstractBaseUser, and make AbstractUser subclass it. > - So, right now we have AbstractBaseUser -> AbstractUser -> User. > - My desired hierarchy would be: > - AbstractBaseUser > -

Re: AbstractUser to get more abstract

2013-09-21 Thread Luke Sneeringer
On Sat, Sep 21, 2013 at 5:49 PM, Timothy Anderegg < timothy.ander...@gmail.com> wrote: > >> >>- I believe that we should add an AbstractEmailUser as a subclass of >>AbstractBaseUser, and make AbstractUser subclass it. >> - So, right now we have AbstractBaseUser -> AbstractUser -> Use