Cerberus

Latest version: v1.3.5

Safety actively analyzes 629004 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

1.2

-----------

Released on April 12, 2018.

- New: docs: Add note that normalization cannot be applied within an ``*of-rule``.
(Frank Sachsenheim)
- New: Add the ability to query for a type of error in an error tree.
(Frank Sachsenheim)
- New: Add errors.MAPPING_SCHEMA on errors within subdocuments.
(Frank Sachsenheim)
- New: Support for Types Definitions, which allow quick types check on the fly.
(Frank Sachsenheim)

- Fix: Simplify the tests with Docker by using a volume for tox environments.
(Frank Sachsenheim)
- Fix: Schema registries do not work on dict fields.
Closes :issue:`318`. (Frank Sachsenheim)
- Fix: Need to drop some rules when ``empty`` is allowed.
Closes :issue:`326`. (Frank Sachsenheim)
- Fix: typo in README (Christian Hogan)
- Fix: Make ``purge_unknown`` and ``allow_unknown`` play nice together.
Closes :issue:`324`. (Audric Schiltknecht)
- Fix: API reference lacks generated content.
Closes :issue:`281`. (Frank Sachsenheim)
- Fix: ``readonly`` works properly just in the first validation.
Closes :issue:`311`. (Frank Sachsenheim)
- Fix: ``coerce`` ignores ``nullable: True``.
Closes :issue:`269`. (Frank Sachsenheim)
- Fix: A dependency is not considered satisfied if it has a null value.
Closes :issue:`305`. (Frank Sachsenheim)
- Override ``UnvalidatedSchema.copy``. (Peter Demin)
- Fix: README link. (Gabriel Wainer)
- Fix: Regression: allow_unknown causes dictionary validation to fail with
a KeyError. Closes :issue:`302`. (Frank Sachsenheim)
- Fix: Error when setting fields as tuples instead of lists.
Closes :issue:`271`. (Sebastian Rajo)
- Fix: Correctly handle nested logic and group errors.
Closes :issue:`278` and :issue:`299`. (Kornelijus Survila)
- CI: Reactivate testing on PyPy3. (Frank Sachsenheim)

1.1

-----------

Released on January 25, 2017.

- New: Python 3.6 support. (Frank Sachsenheim)
- New: Users can implement their own semantics in Validator._lookup_field.
(Frank Sachsenheim)
- New: Allow applying of ``empty`` rule to sequences and mappings.
Closes :issue:`270`. (Frank Sachsenheim)

- Fix: Better handling of unicode in ``allowed`` rule.
Closes :issue:`280`. (Michael Klich).
- Fix: Rules sets with normalization rules fail.
Closes :issue:`283`. (Frank Sachsenheim)
- Fix: Spelling error in RULE_SCHEMA_SEPARATOR constant (Antoine Lubineau)
- Fix: Expand schemas and rules sets when added to a registry. Closes :issue:`284`
(Frank Sachsenheim)
- Fix: ``readonly`` conflicts with ``default`` rule. Closes :issue:`268` (Dominik
Kellner).
- Fix: Creating custom Validator instance with ``_validator_*`` method raises
``SchemaError``. Closes :issue:`265` (Frank Sachsenheim).
- Fix: Consistently use new style classes (Dominik Kellner).
- Fix: ``NotImplemented`` does not derive from ``BaseException``. (Bryan W.
Weber).

- Completely switch to py.test. Closes :issue:`213` (Frank Sachsenheim).
- Convert ``self.assert`` method calls to plain ``assert`` calls supported by
pytest. Addresses :issue:`213` (Bruno Oliveira).

- Docs: Clarifications concerning dependencies and unique rules. (Frank
Sachsenheim)
- Docs: Fix custom coerces documentation. Closes :issue:`285`. (gilbsgilbs)
- Docs: Add note concerning regex flags. Closes :issue:`173`. (Frank Sachsenheim)
- Docs: Explain that normalization and coercion are performed on a copy of the
original document (Sergey Leshchenko)

1.0.1

-------------

Released on September 1, 2016.

- Fix: bump trove classifier to Production/Stable (5).

1.0

-----------

Released on September 1, 2016.

.. warning::

This is a major release which breaks backward compatibility in several
ways. Don't worry, these changes are for the better. However, if you are
upgrading, then you should really take the time to read the list of
`Breaking Changes`_ and consider their impact on your codebase. For your
convenience, some :doc:`upgrade notes <upgrading>` have been included.

- New: Add capability to use references in schemas. (Frank Sachsenheim)
- New: Support for binary type. (Matthew Ellison)
- New: Allow callables for 'default' schema rule. (Dominik Kellner)
- New: Support arbitrary types with 'max' and 'min' (Frank Sachsenheim).
- New: Support any iterable with 'minlength' and 'maxlength'.
Closes :issue:`158`. (Frank Sachsenheim)
- New: 'default' normalization rule. Closes :issue:`131`. (Damián Nohales)
- New: 'excludes' rule (calve). Addresses :issue:`132`.
- New: 'forbidden' rule. (Frank Sachsenheim)
- New: 'rename'-rule renames a field to a given value during normalization
(Frank Sachsenheim).
- New: 'rename_handler'-rule that takes an callable that renames unknown
fields. (Frank Sachsenheim)
- New: 'Validator.purge_unknown'-property and conditional purging of unknown
fields. (Frank Sachsenheim)
- New: 'coerce', 'rename_handler' and 'validator' can use class-methods (Frank
Sachsenheim).
- New: '\*of'-rules can be extended by concatenating another rule. (Frank
Sachsenheim)
- New: Allows various error output with error handlers (Frank Sachsenheim).
- New: Available rules etc. of a Validator-instance are accessible as
'validation_rules', 'normalization_rules', 'types', 'validators' and
'coercer' -property. (Frank Sachsenheim)
- New: Custom rule's method docstrings can contain an expression to validate
constraints for that rule when a schema is validated. (Frank Sachsenheim).
- New: 'Validator.root_schema' complements 'Validator.root_document'. (Frank
Sachsenheim)
- New: 'Validator.document_path' and 'Validator.schema_path' properties can
be used to determine the relation of the currently validating document to the
'root_document' / 'root_schema'. (Frank Sachsenheim)
- New: Known, validated definition schemas are cached, thus validation run-time
of schemas is reduced. (Frank Sachsenheim)
- New: Add testing with Docker. (Frank Sachsenheim)
- New: Support CPython 3.5. (Frank Sachsenheim)

- Fix: 'allow_unknown' inside \*of rule is ignored. Closes 251. (Davis
Kirkendall)
- Fix: unexpected TypeError when using allow_unknown in a schema defining
a list of dicts. Closes :issue:`250`. (Davis Kirkendall)
- Fix: validate with 'update=True' does not work when required fields are in
a list of subdicts. (Jonathan Huot)
- Fix: 'number' type fails if value is boolean.
Closes :issue:`144`. (Frank Sachsenheim)
- Fix: allow None in 'default' normalization rule. (Damián Nohales)
- Fix: in 0.9.2, coerce does not maintain proper nesting on dict fields. Closes
:issue:`185`.
- Fix: normalization not working for valueschema and propertyschema. Closes
:issue:`155`. (Frank Sachsenheim)
- Fix: 'coerce' on List elements produces unexpected results.
Closes :issue:`161`. (Frank Sachsenheim)
- Fix: 'coerce'-constraints are validated. (Frank Sachsenheim)
- Fix: Unknown fields are normalized. (Frank Sachsenheim)
- Fix: Dependency on boolean field now works as expected.
Addresses :issue:`138`. (Roman Redkovich)
- Fix: Add missing deprecation-warnings. (Frank Sachsenheim)

- Docs: clarify read-only rule. Closes :issue:`127`.
- Docs: split Usage page into Usage; Validation Rules: Normalization Rules.
(Frank Sachsenheim)

Breaking Changes
~~~~~~~~~~~~~~~~
Several relevant breaking changes have been introduced with this release. For
the inside scoop, please see the :doc:`upgrade notes <upgrading>`.

- Change: 'errors' values are lists containing error messages. Previously, they
were simple strings if single errors, lists otherwise.
Closes :issue:`210`. (Frank Sachsenheim)
- Change: Custom validator methods: remove the second argument.
(Frank Sachsenheim)
- Change: Custom validator methods: invert the logic of the conditional clauses
where is tested what a value is not / has not. (Frank Sachsenheim)
- Change: Custom validator methods: replace calls to 'self._error' with
'return True', or False, or None. (Frank Sachsenheim)
- Change: Remove 'transparent_schema_rule' in favor of docstring schema
validation. (Frank Sachsenheim)
- Change: Rename 'property_schema' rule to 'keyschema'. (Frank Sachsenheim)
- Change: Replace 'validate_update' method with 'update' keywork argument.
(Frank Sachsenheim)
- Change: The processed root-document of is now available as 'root_document'-
property of the (child-)Validator. (Frank Sachsenheim)
- Change: Removed 'context'-argument from 'validate'-method as this is set
upon the creation of a child-validator. (Frank Sachsenheim)
- Change: 'ValidationError'-exception renamed to 'DocumentError'.
(Frank Sachsenheim)
- Change: Consolidated all schema-related error-messages' names.
(Frank Sachsenheim)
- Change: Use warnings.warn for deprecation-warnings if available.
(Frank Sachsenheim)

0.9.2

-------------

Released on September 23, 2015

- Fix: don't rely on deepcopy since it can't properly handle complex objects in
Python 2.6.

0.9.1

-------------

Released on July 7 2015

- Fix: 'required' is always evaluated, independent of eventual missing
dependencies. This changes the previous behaviour whereas a required field
with dependencies would only be reported as missing if all dependencies were
met. A missing required field will always be reported. Also see the
discussion in https://github.com/pyeve/eve/pull/665.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.