Skip to content

Commit

Permalink
Expand the equality tests and conformance tests to all fields.
Browse files Browse the repository at this point in the history
Fix Iterable and Container to conform to their interfaces.
  • Loading branch information
jamadden committed Aug 31, 2018
1 parent 73627cf commit 99f265f
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 256 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -94,6 +94,9 @@
``Decimal`` class extends ``Number``. See `issue 49
<https://github.com/zopefoundation/zope.schema/issues/49>`_.

- Make ``Iterable`` and ``Container`` properly implement ``IIterable``
and ``IContainer``, respectively.

4.5.0 (2017-07-10)
==================

Expand Down
9 changes: 5 additions & 4 deletions src/zope/schema/_field.py
Expand Up @@ -45,8 +45,9 @@
from zope.schema.interfaces import IBytes
from zope.schema.interfaces import IBytesLine
from zope.schema.interfaces import IChoice
from zope.schema.interfaces import IComplex
from zope.schema.interfaces import ICollection
from zope.schema.interfaces import IComplex
from zope.schema.interfaces import IContainer
from zope.schema.interfaces import IContextSourceBinder
from zope.schema.interfaces import IDate
from zope.schema.interfaces import IDatetime
Expand All @@ -58,6 +59,7 @@
from zope.schema.interfaces import IFromUnicode
from zope.schema.interfaces import IFrozenSet
from zope.schema.interfaces import IId
from zope.schema.interfaces import IIterable
from zope.schema.interfaces import IInt
from zope.schema.interfaces import IIntegral
from zope.schema.interfaces import IInterfaceField
Expand Down Expand Up @@ -123,9 +125,6 @@
from zope.schema._compat import PY3
from zope.schema._compat import make_binary

# pep 8 friendlyness
Container

# Fix up bootstrap field types
Field.title = FieldProperty(IField['title'])
Field.description = FieldProperty(IField['description'])
Expand All @@ -142,6 +141,8 @@
classImplements(Password, IPassword)
classImplements(Bool, IBool)
classImplements(Bool, IFromUnicode)
classImplements(Iterable, IIterable)
classImplements(Container, IContainer)

classImplements(Number, INumber)
classImplements(Complex, IComplex)
Expand Down

0 comments on commit 99f265f

Please sign in to comment.