[Checkins] [zopefoundation/zope.schema] 28d574: Add fields and interfaces matching the numeric tow...

GitHub noreply at github.com
Fri Aug 31 19:50:46 CEST 2018


  Branch: refs/heads/issue49
  Home:   https://github.com/zopefoundation/zope.schema
  Commit: 28d574d0e7bae7dc9c9aedd77e6e5ef7077ad5e9
      https://github.com/zopefoundation/zope.schema/commit/28d574d0e7bae7dc9c9aedd77e6e5ef7077ad5e9
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2018-08-31 (Fri, 31 Aug 2018)

  Changed paths:
    M CHANGES.rst
    M docs/api.rst
    M src/zope/schema/__init__.py
    M src/zope/schema/_bootstrapfields.py
    M src/zope/schema/_field.py
    M src/zope/schema/interfaces.py
    M src/zope/schema/tests/test__bootstrapfields.py
    M src/zope/schema/tests/test__field.py

  Log Message:
  -----------
  Add fields and interfaces matching the numeric tower.

In descending order of generality these are ``Number``, ``Complex``,
``Real``, ``Rational`` and ``Integral``. The ``Int`` class extends
``Integral``, the ``Float`` class extends ``Real``, and the
``Decimal`` class extends ``Number``.

Generalize the parsing of numbers in the Number class.

Add tests and document them.

Run the field and bootstrap field doctests as part of unittesting, not
just under tox with sphinx, and make them run on both Python 2 and 3.

Fixes #49


  Commit: 73627cf222688ae30a7bdfda5abc6fd19fde1c87
      https://github.com/zopefoundation/zope.schema/commit/73627cf222688ae30a7bdfda5abc6fd19fde1c87
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2018-08-31 (Fri, 31 Aug 2018)

  Changed paths:
    M src/zope/schema/_field.py

  Log Message:
  -----------
  Fix tests on PyPy3.

Previously they would fail like this:

  File /home/travis/build/zopefoundation/zope.schema/src/zope/schema/_bootstrapfields.py, line 522, in fromUnicode
    raise self._validation_error(*last_exc.args).with_field_and_value(self, value)
TypeError: __init__() missing 1 required positional argument: 'literal'


  Commit: 99f265f1ed958f0d37e24b69d8b1a74f52e2cd8a
      https://github.com/zopefoundation/zope.schema/commit/99f265f1ed958f0d37e24b69d8b1a74f52e2cd8a
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2018-08-31 (Fri, 31 Aug 2018)

  Changed paths:
    M CHANGES.rst
    M src/zope/schema/_field.py
    M src/zope/schema/tests/test__bootstrapfields.py
    M src/zope/schema/tests/test__field.py

  Log Message:
  -----------
  Expand the equality tests and conformance tests to all fields.

Fix Iterable and Container to conform to their interfaces.


Compare: https://github.com/zopefoundation/zope.schema/compare/37b2ee37347c...99f265f1ed95
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the checkins mailing list