On 05/07/12 16:25, Anssi Kääriäinen wrote: > Currently Django's session middleware saves sessions unconditionally > in process_response. I have created a patch which skips session save > on 500 responses. Reasons for this: > 1. When saving the session after PostgreSQL query error into database > backed session store, the save is guaranteed to fail due to aborted > transaction error. The save error will mask the original error. > 2. The session.save() will be cancelled by transaction middleware if > that is installed. > 3. Saving the session in 500 situations can be argued to be non- > wanted behaviour. The request processing likely ended due to > unexpected error. If so, it is also possible that the changes to > session aren't valid, or are incomplete. > > Now, this is clearly a change to existing behaviour. Should this be > considered backwards incompatible or is this change not wanted at all? > If that is the case I will create a patch targeting #1 above > specifically.
I agree it should be changed, and I would regard it as a bug fix, but make a note of it in the 1.5 release notes nonetheless. Regards, Luke -- "Pessimism: Every dark cloud has a silver lining, but lightning kills hundreds of people each year trying to find it." (despair.com) Luke Plant || http://lukeplant.me.uk/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
