Skip to content

Commit

Permalink
Merge pull request #43 from zopefoundation/issue42
Browse files Browse the repository at this point in the history
Add Python 3.7, metadata fixes, 100% test coverage on 3
  • Loading branch information
jamadden committed Aug 14, 2018
2 parents 2ab8d04 + 5f6aab2 commit 1696ffe
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 96 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Expand Up @@ -5,7 +5,13 @@ python:
- 3.4
- 3.5
- 3.6
- pypy-5.6.0
- pypy
- pypy3
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true

script:
- coverage run -m zope.testrunner --test-path=src
Expand Down
92 changes: 51 additions & 41 deletions CHANGES.rst
@@ -1,15 +1,26 @@
Changes
=======
=========
Changes
=========

4.5.1 (unreleased)
------------------
4.6.0 (unreleased)
==================

- Add support for Python 3.7.

- ``Object`` instances call their schema's ``validateInvariants``
method by default to collect errors from functions decorated with
``@invariant`` when validating. This can be disabled by passing
``validate_invariants=False`` to the ``Object`` constructor. See
`issue 10 <https://github.com/zopefoundation/zope.schema/issues/10>`_.

- ``ValidationError`` can be sorted on Python 3.

- ``DottedName`` and ``Id`` consistently handle non-ASCII unicode
values on Python 2 and 3 by raising ``InvalidDottedName`` and
``InvalidId`` in ``fromUnicode`` respectively. Previously, a
``UnicodeEncodeError`` would be raised on Python 2 while Python 3
would raise the descriptive exception.

- ``Field`` instances are hashable on Python 3, and use a defined
hashing algorithm that matches what equality does on all versions of
Python. Previously, on Python 2, fields were hashed based on their
Expand All @@ -19,7 +30,6 @@ Changes
compatibility problem. See `issue 36
<https://github.com/zopefoundation/zope.schema/issues/36>`_.


- Orderable fields, including ``Int``, ``Float``, ``Decimal``,
``Timedelta``, ``Date`` and ``Time``, can now have a
``missing_value`` without needing to specify concrete ``min`` and
Expand All @@ -34,7 +44,7 @@ Changes


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

- Drop support for Python 2.6, 3.2, and 3.3.

Expand All @@ -44,19 +54,19 @@ Changes


4.4.2 (2014-09-04)
------------------
==================

- Fix description of min max field: max value is included, not excluded.


4.4.1 (2014-03-19)
------------------
==================

- Add support for Python 3.4.


4.4.0 (2014-01-22)
------------------
==================

- Add an event on field properties to notify that a field has been updated.
This event enables definition of subscribers based on an event, a context
Expand All @@ -65,7 +75,7 @@ Changes


4.3.3 (2014-01-06)
------------------
==================

- PEP 8 cleanup.

Expand All @@ -82,22 +92,22 @@ Changes


4.3.2 (2013-02-24)
------------------
==================

- Fix Python 2.6 support. (Forgot to run tox with all environments before last
release.)


4.3.1 (2013-02-24)
------------------
==================

- Make sure that we do not fail during bytes decoding of term token when
generated from a bytes value by ignoring all errors. (Another option would
have been to hexlify the value, but that would break way too many tests.)


4.3.0 (2013-02-24)
------------------
==================

- Fix a bug where bytes values were turned into tokens inproperly in
Python 3.
Expand All @@ -106,18 +116,18 @@ Changes
maps schema fields into ``FieldProperty`` instances.

4.2.2 (2012-11-21)
------------------
==================

- Add support for Python 3.3.

4.2.1 (2012-11-09)
------------------
==================

- Fix the default property of fields that have no defaultFactory attribute.


4.2.0 (2012-05-12)
------------------
==================

- Automate build of Sphinx HTML docs and running doctest snippets via tox.

Expand Down Expand Up @@ -149,13 +159,13 @@ Changes


4.1.1 (2012-03-23)
------------------
==================

- Remove trailing slash in MANIFEST.in, it causes Winbot to crash.


4.1.0 (2012-03-23)
------------------
==================

- Add TreeVocabulary for nested tree-like vocabularies.

Expand All @@ -167,28 +177,28 @@ Changes
IContextSourceBinder is still missing.

4.0.1 (2011-11-14)
------------------
==================

- Fix bug in ``fromUnicode`` method of ``DottedName`` which would fail
validation on being given unicode. Introduced in 4.0.0.

4.0.0 (2011-11-09)
------------------
==================

- Fix deprecated unittest methods.

- Port to Python 3. This adds a dependency on six and removes support for
Python 2.5.

3.8.1 (2011-09-23)
------------------
==================

- Fix broken Object field validation. Previous version was using a volatile
property on object field values which ends in a ForbiddenAttribute error
on security proxied objects.

3.8.0 (2011-03-18)
------------------
==================

- Implement a ``defaultFactory`` attribute for all fields. It is a callable
that can be used to compute default values. The simplest case is::
Expand All @@ -205,7 +215,7 @@ Changes
Date(defaultFactory=today)

3.7.1 (2010-12-25)
------------------
==================

- Rename the validation token, used in the validation of schema with Object
Field to avoid infinite recursion:
Expand All @@ -217,31 +227,31 @@ Changes
https://bugs.launchpad.net/zope.schema/+bug/191236

3.7.0 (2010-09-12)
------------------
==================

- Improve error messages when term tokens or values are duplicates.

- Fix the buildout so the tests run.

3.6.4 (2010-06-08)
------------------
==================

- fix validation of schema with Object Field that specify Interface schema.

3.6.3 (2010-04-30)
------------------
==================

- Prefer the standard libraries doctest module to the one from zope.testing.

3.6.2 (2010-04-30)
------------------
==================

- Avoid maximum recursion when validating Object field that points to cycles

- Make the dependency on ``zope.i18nmessageid`` optional.

3.6.1 (2010-01-05)
------------------
==================

- Allow "setup.py test" to run at least a subset of the tests runnable
via ``bin/test`` (227 for ``setup.py test`` vs. 258. for
Expand All @@ -253,7 +263,7 @@ Changes
- Make "setup.py test" tests pass on Jython.

3.6.0 (2009-12-22)
------------------
==================

- Prefer zope.testing.doctest over doctestunit.

Expand All @@ -263,7 +273,7 @@ Changes
instead of storing directly on the instance __dict__.

3.5.4 (2009-03-25)
------------------
==================

- Don't fail trying to validate default value for Choice fields with
IContextSourceBinder object given as a source. See
Expand All @@ -281,7 +291,7 @@ Changes


3.5.3 (2009-03-10)
------------------
==================

- Make Choice and Bool fields implement IFromUnicode interface, because
they do provide the ``fromUnicode`` method.
Expand All @@ -296,15 +306,15 @@ Changes
- Remove zpkg-related file.

3.5.2 (2009-02-04)
------------------
==================

- Made validation tests compatible with Python 2.5 again (hopefully not
breaking Python 2.4)

- Add an __all__ package attribute to expose documentation.

3.5.1 (2009-01-31)
------------------
==================

- Stop using the old old set type.

Expand All @@ -318,7 +328,7 @@ Changes
much more sense for debugging for developers.

3.5.0a2 (2008-12-11)
--------------------
====================

- Move zope.testing to "test" extras_require, as it is not needed
for zope.schema itself.
Expand All @@ -329,7 +339,7 @@ Changes
example is z3c.form's converter.

3.5.0a1 (2008-10-10)
--------------------
====================

- Add the doctests to the long description.

Expand All @@ -345,19 +355,19 @@ Changes
- zope.schema now works on Python2.5

3.4.0 (2007-09-28)
------------------
==================

Add BeforeObjectAssignedEvent that is triggered before the object
field sets a value.

3.3.0 (2007-03-15)
------------------
==================

Corresponds to the version of the zope.schema package shipped as part of
the Zope 3.3.0 release.

3.2.1 (2006-03-26)
------------------
==================

Corresponds to the version of the zope.schema package shipped as part of
the Zope 3.2.1 release.
Expand All @@ -366,7 +376,7 @@ Fix missing import of 'VocabularyRegistryError'. See
http://www.zope.org/Collectors/Zope3-dev/544 .

3.2.0 (2006-01-05)
------------------
==================

Corresponds to the version of the zope.schema package shipped as part of
the Zope 3.2.0 release.
Expand All @@ -375,7 +385,7 @@ Add "iterable" sources to replace vocabularies, which are now deprecated
and scheduled for removal in Zope 3.3.

3.1.0 (2005-10-03)
------------------
==================

Corresponds to the version of the zope.schema package shipped as part of
the Zope 3.1.0 release.
Expand All @@ -386,7 +396,7 @@ argument (sources are a simpler implementation).
Add 'TimeDelta' and 'ASCIILine' field types.

3.0.0 (2004-11-07)
------------------
==================

Corresponds to the version of the zope.schema package shipped as part of
the Zope X3.0.0 release.
24 changes: 17 additions & 7 deletions README.rst
@@ -1,16 +1,26 @@
``zope.schema``
===============
=============
zope.schema
=============

.. image:: https://img.shields.io/pypi/v/zope.schema.svg
:target: https://pypi.python.org/pypi/zope.schema/
:alt: Latest Version
:target: https://pypi.org/project/zope.schema/
:alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/zope.schema.svg
:target: https://pypi.org/project/zope.schema/
:alt: Supported Python versions

.. image:: https://travis-ci.org/zopefoundation/zope.schema.svg?branch=master
:target: https://travis-ci.org/zopefoundation/zope.schema
:target: https://travis-ci.org/zopefoundation/zope.schema
:alt: Build Status

.. image:: https://readthedocs.org/projects/zopeschema/badge/?version=latest
:target: http://zopeschema.readthedocs.org/en/latest/
:alt: Documentation Status
:target: https://zopeschema.readthedocs.org/en/latest/
:alt: Documentation Status

.. image:: https://coveralls.io/repos/github/zopefoundation/zope.schema/badge.svg
:target: https://coveralls.io/github/zopefoundation/zope.schema
:alt: Code Coverage

Schemas extend the notion of interfaces to detailed descriptions of
Attributes (but not methods). Every schema is an interface and
Expand Down

0 comments on commit 1696ffe

Please sign in to comment.