File tree Expand file tree Collapse file tree 2 files changed +17
-28
lines changed Expand file tree Collapse file tree 2 files changed +17
-28
lines changed Original file line number Diff line number Diff line change
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
+
1
9
v2.3.0
2
10
------
3
11
4
- * Added by_relevance and best_match (#91)
12
+ * Added `` by_relevance `` and `` best_match `` (#91)
5
13
* Fixed ``format `` to allow adding formats for non-strings (#125)
6
14
* Fixed the ``uri `` format to reject URI references (#131)
7
15
Original file line number Diff line number Diff line change @@ -49,33 +49,14 @@ Features
49
49
Release Notes
50
50
-------------
51
51
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.
79
60
80
61
81
62
Running the Test Suite
You can’t perform that action at this time.
0 commit comments