From a97473c1b613233eb84b75ca757ad5d825f6d538 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Mon, 18 Aug 2014 20:53:47 -0400 Subject: Release notes for v2.4.0 --- CHANGELOG.rst | 10 +++++++++- 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) diff --git a/README.rst b/README.rst index 362e936..20c2fe6 100644 --- a/README.rst +++ b/README.rst @@ -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 `_ -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 -- cgit v1.2.1