Commit 9313230
committed
More closely match modern JSON Schema vocabulary in internal module names.
These are private, so it's easy to rename them to use preferred modern
terminology, namely that individual keywords are called 'keywords' rather
than 'validators'.
This leaves the latter ('validator') to have one fewer overloaded meaning
in this library, leaving it primarily referring to class objects such as
DraftNValidator objects, however there are still at least 2 public places
where we conflate terminology:
* In the VALIDATORS attribute on validator classes, where this
attribute is a mapping from str to callable but really the
callables are callables for each *keyword*
* ValidationError.validator, which is really the *keyword* which
failed validation
These are of course public API and need deprecating, which hasn't been
done thus far mostly to not create API churn simply to rename.
In the future however, it's likely that broader deprecations will help
us deprecate these.
Specifically when we implement fuller support for vocabularies and/or
deprecate jsonschema.validators.create in favor of newer objects, we may
get a chance to replace VALIDATORS, and when we implement more robust
exception types (e.g. to address #119) we likely will deprecate
.validator.1 parent 1b83f79 commit 9313230
File tree
7 files changed
+197
-207
lines changed- docs
- jsonschema
- tests
7 files changed
+197
-207
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 241 | + | |
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
| |||
276 | 274 | | |
277 | 275 | | |
278 | 276 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 277 | + | |
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 55 | + | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
| |||
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
0 commit comments