Zope schema related support
nti.schema includes utilities for working with schema-driven development using zope.schema.
For complete details and the changelog, see the documentation.
Some of the most useful features include:
- nti.schema.interfaces.find_most_derived_interface for finding a bounded interface.
- nti.schema.eqhash.EqHash is a class-decorator for creating efficient, correct implementations of equality and hashing.
- nti.schema.field contains various schema fields, including a Variant type and more flexible collection types, all of which produce better validation errors.
- nti.schema.fieldproperty contains field properties that can adapt to interfaces or decode incoming text. The function createDirectFieldProperties can assign just the necessary properties automatically.
- Depend on zope.deferredimport >= 4.2.1 to be able to generate Sphinx documentation.
- Clean up code to match PEP8.
- Fix an UnboundLocalError on Python 3 in the Variant field. See issue 14.
- Drop the Python 2 dependency on plone.i18n in favor of the new library nti.i18n, which supports Python 3. If plone.i18n is installed, it should not be configured (ZCML), but its utility objects can be looked up by either interface.
- Remove use of unicode_literals.
- Add support for Python 3.6.
- The SchemaConfigured constructor doesn’t hide errors when checking for properties on Python 2. See issue 11.
- Add info to minLength validation message.
- Add Acquisition and zope.event as install dependencies. Previously they were only pulled in via the test extra.
- Substantial speedups to the hash functions generated by EqHash.
- Substantial speedups to the equality functions generated by EqHash.
- Add support for Python 3. Note the countries vocabulary will not be complete on Python 3.
- Drop the dolmen.builtins dependency.
- Drop the dm.zope.schema dependency.
- The plone.i18n dependency is Python 2 only (and can even be removed).
- The matchers in nti.schema.testing have been moved to nti.testing.matchers.
- Using AdaptingFieldProperty will now raise the more specific SchemaNotProvided error instead of a TypeError if adapting the value fails.
- EqHash has moved from nti.schema.schema to nti.schema.eqhash. A compatibility shim remains.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|nti.schema-1.3.2-py2.py3-none-any.whl (42.0 kB) Copy SHA256 hash SHA256||Wheel||py2.py3||Oct 24, 2017|
|nti.schema-1.3.2.tar.gz (40.1 kB) Copy SHA256 hash SHA256||Source||None||Oct 24, 2017|