Re: Plone 4.3.4 RuntimeError: maximum recursion depth exceeded
"Jens W. Klein" <jens-/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Organization | Klein & Partner KG |
| Message-ID | <[email protected]> |
On 2014-11-25 15:45, Asko Soukka wrote:
> Hi Héctor,
>
> tests are working and failing as they should.
>
> Dexterity broken behavior was fixed, but unfortunately there seem to be
> code relying on the broken behavior:
>
> E.g. all "ContextAwareDefaultFactories" here are trying to read the
> default value from the context itself (which does not make sense,
> because factory is called exactly because the value is missing), causing
> recursion:
>
> https://github.com/plonegovbr/brasil.gov.agenda/blob/master/src/brasil/gov/agenda/content/agendadiaria.py#L51
>
> Probably, p.dexterity could be fixed to detect that recursion and return
> None. But is there a simple way in Python to detect possible recursion?
> Catching recursion exceptions within p.dexterity getattr?
I think we could detect it and raise a more verbose AttributeError. But
I fear too many checks on this level are probably a performance killer.
I usally prefer to add some extra verbose information to the traceback
using __traceback_supplement__ and let it upon the programmer to read it
right.
Jens
> Regards,
> Asko
>
>
> Héctor Velarde wrote:
>> thanks, Asko, but... how do we solve this issue then? there's nothing
>> weird with those tests, just plain vanilla content creation using
>> invokeFactory:
>>
>> self.agenda.invokeFactory('AgendaDiaria', '2013-02-05')
>>
>> I just changed them to use plone.api.content.create and the problem
>> persist:
>>
>> api.content.create(self.agenda, 'AgendaDiaria', '2013-02-05')
>>
>> Héctor Velarde
>>
>>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>
--
Klein & Partner KG, member of BlueDynamics Alliance
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Plone-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-developers