Pylons/deform — Issue #76: weird deform parsing
Author: muellert
Created: 2012-02-25 01:43:36+00:00
State: open

As discussed on #pyramid, deform appears to have a problem with nested schemata. The test case, which I'll try to attach to this ticket (or else, push into my own account), produces this in the pdb session:

```
serving on http://0.0.0.0:6545
> /mounts/5/zope/pyramid/deform-problem/problem/problem/views.py(29)my_view()
-> appstruct = myform.validate(controls)
(Pdb) controls
[(u'_charset_', u'UTF-8'), (u'__formid__', u'myformid.'), (u'csrf', u'1276c06e8d66a41455bf0d936dbc07c811077004'), (u'__start__', u':mapping'), (u'sub1_1', u'asdasd'), (u'__end__', u':mapping'), (u'__start__', u':mapping'), (u'sub2_1', u''), (u'sub2_2', u''), (u'__end__', u':mapping'), (u'submit', u'submit')]
(Pdb) s
--Call--
> /mounts/5/zope/.virtualenvs/deform-problem/lib/python2.6/site-packages/deform-0.9.4-py2.6.egg/deform/field.py(439)validate()
-> def validate(self, controls):
(Pdb) n
> /mounts/5/zope/.virtualenvs/deform-problem/lib/python2.6/site-packages/deform-0.9.4-py2.6.egg/deform/field.py(506)validate()
-> pstruct = peppercorn.parse(controls)
(Pdb)
> /mounts/5/zope/.virtualenvs/deform-problem/lib/python2.6/site-packages/deform-0.9.4-py2.6.egg/deform/field.py(507)validate()
-> exc = None
(Pdb) pstruct
{u'': {u'sub2_2': u'', u'sub2_1': u''}, u'__formid__': u'myformid.', u'submit': u'submit', u'_charset_': u'UTF-8', u'csrf': u'1276c06e8d66a41455bf0d936dbc07c811077004'}
```