Re: Plone 4.3.4 RuntimeError: maximum recursion depth exceeded

Asko Soukka <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
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?

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.