context = context.new(context)

2016-02-18 Thread John Bazik
I'm looking at code that does this: context = context.new(context) Prior to 1.7, I assume that worked since a context was a dict. Now that it's a stack, it breaks. I could suggest they use flatten: context = context.new(context.flatten()) but that's not exactly a copy, which is what I

Re: deadlock risk from using cache a load time

2016-01-25 Thread John Bazik
I got a patch from the django-cms folks that moves template loading into their AppConfig.ready() routine, but the problem persists. The last few lines of apps.populate are: self.models_ready = True for app_config in self.get_app_configs():

Re: deadlock risk from using cache a load time

2016-01-13 Thread John Bazik
> I wouldn't call multisite/hacks.py reasonable :D That said, unpickling > models requires apps to be populated (relations etc…), therefor do not > attempt to do such an action during population. > Thanks. Shai offered the same opinion and I'm following up with the django-cms developers.

deadlock risk from using cache a load time

2016-01-13 Thread John Bazik
I'm encountering a nested call to apps.populate in 1.8.7 which causes deadlock at load time. It's called first from django.setup(), then from LocMemCache and the process hangs on a lock. I'm posting here because I think the problem is principally within django - the apps I'm using are doing