Re: Problem with randrange in django/middleware/csrf.py

2010-07-09 Thread DanEE
After all it was a misconfiguration of my system and not a problem of Python or Django. Somehow the special files /dev/random and /dev/urandom got screwed up. I suppose it was the outcome of a bad update of the udev package on my Archlinux system. When I recreated the node of /dev/urandom manually

Re: Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread Ramiro Morales
On Thu, Jul 8, 2010 at 4:09 PM, DanEE wrote: > The problems with randrange also occur when I run it directly from a > normal python prompt. > >[...] > So it doesn't seem to be a django problem, but it still is very > annoying. > >> If the host has not enough entropy, Django shouldn't fix it, an >>

Re: Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread DanEE
The problems with randrange also occur when I run it directly from a normal python prompt. >>> random.randrange(0, 2<<63) instantly returns me the random numbers. whereas >>> random.SystemRandom().randrange(0, 2<<63) Takes forever to run. I cancelled the execution after about 10 minutes. As an i

Re: Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread stefanw
> >> By playing around in a python session it seems that the call to the > >> system randrange with random.SystemRandom().randrange(0, > >> _MAX_CSRF_KEY) never stops (or doesn't seem to stop in less than 30 > >> minutes) whereas a call to the "normal" randrange with randrange(0, > >> _MAX_CSRF_KE

Re: Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread Alex Gaynor
On Thu, Jul 8, 2010 at 8:39 AM, Russell Keith-Magee wrote: > On Thu, Jul 8, 2010 at 3:17 PM, DanEE wrote: >> Hello >> >> I posted this already in django-user. But because it is rather an >> internal django/python problem I will repost it here >> >> I experienced a strange behaviour with my django

Re: Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread Russell Keith-Magee
On Thu, Jul 8, 2010 at 3:17 PM, DanEE wrote: > Hello > > I posted this already in django-user. But because it is rather an > internal django/python problem I will repost it here > > I experienced a strange behaviour with my django application when I > wanted to deploy and test on my apache instanc

Problem with randrange in django/middleware/csrf.py

2010-07-08 Thread DanEE
Hello I posted this already in django-user. But because it is rather an internal django/python problem I will repost it here I experienced a strange behaviour with my django application when I wanted to deploy and test on my apache instance on my virtual server. I could successfully deploy my app