Re: Possible idea for removing global state in Django.

2013-10-21 Thread Jonathan Slenders
Le vendredi 18 octobre 2013 13:27:21 UTC+2, Anssi Kääriäinen a écrit : > > On Friday, October 18, 2013 1:31:07 AM UTC+3, Shai Berger wrote: >> >> On Thursday 17 October 2013 08:34:48 Aymeric Augustin wrote: >> > >> > For instance, thread locals are strictly equivalent to regular >> variables i

Re: Possible idea for removing global state in Django.

2013-10-18 Thread Anssi Kääriäinen
On Friday, October 18, 2013 1:31:07 AM UTC+3, Shai Berger wrote: > > On Thursday 17 October 2013 08:34:48 Aymeric Augustin wrote: > > > > For instance, thread locals are strictly equivalent to regular variables > in > > tests because they are single threaded (with a handful of exceptions). > B

Re: Possible idea for removing global state in Django.

2013-10-17 Thread Shai Berger
On Thursday 17 October 2013 08:34:48 Aymeric Augustin wrote: > > For instance, thread locals are strictly equivalent to regular variables in > tests because they are single threaded (with a handful of exceptions). But > allowing testing in isolation is a major goal of "removing global state". If

Re: Possible idea for removing global state in Django.

2013-10-16 Thread Aymeric Augustin
On Oct 17, 2013 7:13 AM, "Jonathan Slenders" wrote: > There is one exception, called Gevent. what Gevent does, is patching IO routines and swapping the current call stack for another using a C-extension. That's a dangerous practice, which is unsafe by design (Also why Guido van Rossem only wants t

Re: Possible idea for removing global state in Django.

2013-10-16 Thread Jonathan Slenders
Le jeudi 17 octobre 2013 01:26:20 UTC+2, Russell Keith-Magee a écrit > What's wrong with thread local storage? Well, try this though experiment. > > Everywhere that you see the word "thread local", replace it with "global > variable". Now re-read your argument. > > It doesn't matter how you

Re: Possible idea for removing global state in Django.

2013-10-16 Thread Russell Keith-Magee
On Thu, Oct 17, 2013 at 4:24 AM, Jonathan Slenders < jonathan.slend...@gmail.com> wrote: > The global state problem is something that's been bothering me for a long > while, but after seeing a presentation of Alex Gaynor [1] from last year, I > started thinking about this again. > > The main probl

Possible idea for removing global state in Django.

2013-10-16 Thread Jonathan Slenders
The global state problem is something that's been bothering me for a long while, but after seeing a presentation of Alex Gaynor [1] from last year, I started thinking about this again. The main problem is that you'd need to have a DjangoProject object which contains the root configuration and y