Re: Struggling newbie

2016-08-24 Thread Berker Peksağ
On Wed, Aug 24, 2016 at 11:12 PM, wrote: > I am running python3.4 with Django in virtualenv. When I execute python > manage.py runserver I continue to get "sqlite3.NotSupportedError: URIs not > supported", I have looked all around for posts that will point me to the > solution but have not loca

Re: Struggling newbie

2016-08-24 Thread GMail
Could you provide you settings file? I think it may be an error in settings. > On 24 Aug 2016, at 23:12, jsjazzj...@gmail.com wrote: > > I am running python3.4 with Django in virtualenv. When I execute python > manage.py runserver I continue to get "sqlite3.NotSupportedError: URIs not > suppor

Struggling newbie

2016-08-24 Thread jsjazzjeff
I am running python3.4 with Django in virtualenv. When I execute python manage.py runserver I continue to get "sqlite3.NotSupportedError: URIs not supported", I have looked all around for posts that will point me to the solution but have not located any to date. Can anyone provide me with clue

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
I've actually tried adding ThreadingMixIn to WSGIServer and it worked like a charm in my case. Here's the code I added: from django.test.testcases import LiveServerThread, QuietWSGIRequestHandler from django.core.servers.basehttp import WSGIServer from socketserver import ThreadingMixIn class T

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread roboslone
In answer ti "Any idea how complex the patch would be?" in https://code.djangoproject.com/ticket/25970#comment:2 I think using socketserver.ThreadingMixin with django.core.servers.WSGIServer would do the job. Not completely sure about consequences though... вторник, 23 августа 2016 г., 19:59:40

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
Wow, that was a quick response! Tim, is there a way for me to join the discussion? Is there another mail thread? > On 24 Aug 2016, at 21:36, Tim Graham wrote: > > multithreading support has been proposed a couple times but it hasn't passed > the discussion stage yet. > > https://code.djangopro

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
I found this ticket about same issue: https://code.djangoproject.com/ticket/20238 It was closed 2 years ago and one of the reasons is that use case was considered "somewhat fictional". I personally think my case is very real :) I'm thinking about us

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Tim Graham
multithreading support has been proposed a couple times but it hasn't passed the discussion stage yet. https://code.djangoproject.com/ticket/20238 https://code.djangoproject.com/ticket/25970 On Wednesday, August 24, 2016 at 2:21:07 PM UTC-4, roboslone wrote: > > So I've tried LiveServerTestCase

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
So I've tried LiveServerTestCase and it seems that live server is single-threaded. If client timeout is 5 seconds, then LiveServerTestCase works fine for slow requests, that take from 1 to 9 seconds to process. Second try will send request to the same thread and client will get TimeoutError ins

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
I didn't try LiveServerTestCase yet (and to be honest never heard of it before), I'll give it a try. Thanks! > On 24 Aug 2016, at 17:19, Shai Berger wrote: > > Yes, the prototype I mentioned is a PR against Django, except that if it is > intended to clarify the request rather than supply it,

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Shai Berger
Yes, the prototype I mentioned is a PR against Django, except that if it is intended to clarify the request rather than supply it, it doesn't have to be full -- e.g. it doesn't need tests or documentation untill we decide we want the feature in. But before you go there -- isn't LiveServerTestCa

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread GMail
"Players" are backends (Django) and load balancer that proxies all user requests on one of the backends. In my case load balancer has small backend timeout (default is 3 sec, preferable is 1 sec) and it will send the same request (with the same X-Request-Id header) to another backend after this

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Shai Berger
On Wednesday 24 August 2016 14:33:34 Александр Христюхин wrote: > Actually network is not an issue here. I'm using locks in distributed cache > to manage requests between backends and that's what I want to test. In this > case calling Django directly is okay. > I am sorry, then; it seems I have m

Re: Simulating timeouts on client with django.test.client.Client

2016-08-24 Thread Александр Христюхин
Actually network is not an issue here. I'm using locks in distributed cache to manage requests between backends and that's what I want to test. In this case calling Django directly is okay. вторник, 23 августа 2016 г., 23:16:10 UTC+3 пользователь Shai Berger написал: > > Hi, > > Just to make i