diff options
author | Julian Berman <Julian@GrayVines.com> | 2014-08-18 20:53:47 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2014-08-18 20:53:47 -0400 |
commit | a97473c1b613233eb84b75ca757ad5d825f6d538 (patch) | |
tree | aa546871d411fa33377e012d4865d292f7dd9a8a | |
parent | 470a8c6a90cb28c11ffbe56d801fa50e5abdca94 (diff) | |
download | jsonschema-a97473c1b613233eb84b75ca757ad5d825f6d538.tar.gz |
Release notes for v2.4.0
-rw-r--r-- | CHANGELOG.rst | 10 | ||||
-rw-r--r-- | README.rst | 35 |
2 files changed, 17 insertions, 28 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5d626e8..b341f76 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,15 @@ +v2.4.0 +------ + +* Added a CLI (#134) +* Added absolute path and absolute schema path to errors (#120) +* Added ``relevance`` +* Meta-schemas are now loaded via ``pkgutil`` + v2.3.0 ------ -* Added by_relevance and best_match (#91) +* Added ``by_relevance`` and ``best_match`` (#91) * Fixed ``format`` to allow adding formats for non-strings (#125) * Fixed the ``uri`` format to reject URI references (#131) @@ -49,33 +49,14 @@ Features Release Notes ------------- -``v2.3.0`` removes the (improper) limitation of ``format`` to strings. It also -adds the `jsonschema.exceptions.best_match <https://python-jsonschema.readthedocs.org/en/latest/errors/#best-match-and-by-relevance>`_ -function which can be used to guess at the best matching single validation -error for a given instance. - - -.. code-block:: python - - >>> from jsonschema.validators import Draft4Validator - >>> from jsonschema.exceptions import best_match - - >>> schema = { - ... "properties" : { - ... "foo" : {"type" : "string"}, - ... "bar" : {"properties" : {"baz": {"type": "string"}}}, - ... }, - ... } - >>> instance = {"foo" : 12, "bar": {"baz" : 19}} - >>> print(best_match(Draft4Validator(schema).iter_errors(instance)).path) - deque(['foo']) - - -where the error closer to the top of the instance in ``foo`` was selected -as being more relevant. - -Also, URI references are now properly rejected by the URI format validator -(i.e., it now only accepts full URIs, as defined in the specification). +* A simple CLI was added for validation +* Validation errors now keep full absolute paths and absolute schema paths in + their ``absolute_path`` and ``absolute_schema_path`` attributes. The ``path`` + and ``schema_path`` attributes are deprecated in favor of ``relative_path`` + and ``relative_schema_path``\ . + +*Note:* Support for Python 3.2 was dropped in this release, and installation +now uses setuptools. Running the Test Suite |