It's *really* difficult for the internet to help debug your problems
without a full traceback. You're basically asking if anyone has seen this
exact problem before because they have no other context to help them out.

Anyway, Pyramid does not copy anything that is in the settings or the
registry. Are you sure your client is threadsafe? If you're touching a
non-threadsafe object from multiple request threads then anything could
happen.


On Mon, May 27, 2013 at 8:47 AM, ian marcinkowski <ianmarcinkow...@gmail.com
> wrote:

> Attaching my Suds Client to the registry did not help, but I will keep
> that pattern in mind.
>
> Thanks!
>
>
>
> On Thu, May 23, 2013 at 3:35 PM, Michael Merickel <mmeri...@gmail.com>wrote:
>
>> The settings dictionary is copied once when you pass it into the
>> configurator, and it is supposed to be a shallow copy.
>>
>> new_settings = {}
>> new_settings.update(settings)
>>
>> That doesn't explain your issue though.
>>
>> A likely fix is just to follow the pattern I use, which is to leave the
>> settings dictionary for primitive types. Services and utilities are things
>> I attach to the registry itself (it's a dict too).
>>
>>
>>
>>
>>
>> On Thu, May 23, 2013 at 2:19 PM, ian marcinkowski <
>> ianmarcinkow...@gmail.com> wrote:
>>
>>> Are objects modified when they are saved in the Configurator
>>> registry.settings dictionary?
>>>
>>> I am trying to store a Suds SOAP Client in the registry which can be
>>> cloned in my view-callables so I can avoid re-parsing that WSDL document.
>>>  When I am trying to clone the Suds Client that has been stored in the
>>> registry, my app is crashing horribly due to a maximum recursion limit
>>> reached exception.
>>>
>>> Some code:
>>>
>>> In my app __init__.py:
>>> def main(global_config, **app_settings):
>>>   settings = {}
>>>   ...
>>>   settings['soap_client'] = suds.client.Client('file:///service.wsdl',
>>> username='foo', password='bar')
>>>
>>>   config = Configurator(settings=settings,  ...)
>>>   return config.make_wsgi_app()
>>>
>>> view-callable.py
>>> def view(request):
>>>   cloned_soap_client = request.registry.settings['soap_client'].clone()
>>> <-- Induces Max. Recursion exception
>>>   return cloned_soap_client.service.SomeMethod()
>>>
>>> If I drop in to a PDB terminal inside of my application's main()
>>> function and try cloneing settings['soap_client'] I do not encounter this
>>> recursion limit.
>>>
>>> Sure, this is probably an bug with the Suds client, but I'm not sure how
>>> toreproduce it outside of my application.
>>>
>>> Thoughts?
>>>
>>> --
>>> Ian Marcinkowski
>>> ianmarcinkow...@gmail.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "pylons-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pylons-discuss+unsubscr...@googlegroups.com.
>>> To post to this group, send email to pylons-discuss@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pylons-discuss+unsubscr...@googlegroups.com.
>> To post to this group, send email to pylons-discuss@googlegroups.com.
>> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Ian Marcinkowski
> ianmarcinkow...@gmail.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to