Skip to content

Commit a97473c

Browse files
committed
Release notes for v2.4.0
1 parent 470a8c6 commit a97473c

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
v2.4.0
2+
------
3+
4+
* Added a CLI (#134)
5+
* Added absolute path and absolute schema path to errors (#120)
6+
* Added ``relevance``
7+
* Meta-schemas are now loaded via ``pkgutil``
8+
19
v2.3.0
210
------
311

4-
* Added by_relevance and best_match (#91)
12+
* Added ``by_relevance`` and ``best_match`` (#91)
513
* Fixed ``format`` to allow adding formats for non-strings (#125)
614
* Fixed the ``uri`` format to reject URI references (#131)
715

README.rst

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,14 @@ Features
4949
Release Notes
5050
-------------
5151

52-
``v2.3.0`` removes the (improper) limitation of ``format`` to strings. It also
53-
adds the `jsonschema.exceptions.best_match <https://python-jsonschema.readthedocs.org/en/latest/errors/#best-match-and-by-relevance>`_
54-
function which can be used to guess at the best matching single validation
55-
error for a given instance.
56-
57-
58-
.. code-block:: python
59-
60-
>>> from jsonschema.validators import Draft4Validator
61-
>>> from jsonschema.exceptions import best_match
62-
63-
>>> schema = {
64-
... "properties" : {
65-
... "foo" : {"type" : "string"},
66-
... "bar" : {"properties" : {"baz": {"type": "string"}}},
67-
... },
68-
... }
69-
>>> instance = {"foo" : 12, "bar": {"baz" : 19}}
70-
>>> print(best_match(Draft4Validator(schema).iter_errors(instance)).path)
71-
deque(['foo'])
72-
73-
74-
where the error closer to the top of the instance in ``foo`` was selected
75-
as being more relevant.
76-
77-
Also, URI references are now properly rejected by the URI format validator
78-
(i.e., it now only accepts full URIs, as defined in the specification).
52+
* A simple CLI was added for validation
53+
* Validation errors now keep full absolute paths and absolute schema paths in
54+
their ``absolute_path`` and ``absolute_schema_path`` attributes. The ``path``
55+
and ``schema_path`` attributes are deprecated in favor of ``relative_path``
56+
and ``relative_schema_path``\ .
57+
58+
*Note:* Support for Python 3.2 was dropped in this release, and installation
59+
now uses setuptools.
7960

8061

8162
Running the Test Suite

0 commit comments

Comments
 (0)