Field zope.schema.Object does not check for invariants

Bug #567520 reported by andreypopp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.schema
Won't Fix
Medium
Christian Theune

Bug Description

Field zope.schema.Object does not check invariant during validation. I have attached simple test for that.

Revision history for this message
andreypopp (bsdemon) wrote :
Revision history for this message
andreypopp (bsdemon) wrote :

I have a patch with tests for that.

Tres Seaver (tseaver)
tags: added: bugday20100424
Revision history for this message
Tres Seaver (tseaver) wrote :

The issue is definitely present: Object fields do not enforce their schema invariants.

I have reviewed the patch, and like the idea. I am concerned that obscuring the Invalid eror raised by the invariant check is going to lead to hard-to-debug errors, so I haven't committed the patch. Instead, I am assigning the Christian for confirmation.

Changed in zope.schema:
assignee: nobody → Christian Theune (ct-gocept)
status: New → Confirmed
Revision history for this message
andreypopp (bsdemon) wrote :

Just for some clarification, I'm wrapping exceptions raised during Object field's invariant check to differentiate them later from exceptions raised by other fields.

Tres Seaver (tseaver)
Changed in zope.schema:
importance: Undecided → Medium
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.schema:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.