| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| | |
* origin/main:
Remove noise from the Sphinx config.
Fix instantiating validators with cached refs-to-bool schemas.
Try fixing more Sphinx refs which fail only on Ubuntu...
|
| | |
|
|/ |
|
|
|
|
| |
Co-authored-by: Hynek Schlawack <hs@ox.cx>
|
|
|
|
| |
The same applies to pattern, patternProperties, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Format support / enablement will change with vocabulary support,
but in the interim, now that #905 is merged, these objects are
better accessed by retrieving them directly from the corresponding
validator.
In other words: don't do:
from jsonschema import draft202012_format_checker
just do
from jsonschema import Draft202012Validator
do_whatever_with(Draft202012Validator.FORMAT_CHECKER)
|
| |
|
|
|
|
|
| |
(And remove some ancient language from when it was a twinkle in
someone's eye).
|
| |
|
| |
|
|
|
|
| |
Ref: #590
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In newer JSON Schema specifications we've standardized more
on this language rather than calling things validators (and such
a thing already has plenty of overloaded meaning here).
This commit doesn't do any deprecation, so there's still some
awkwardness in that ValidationError.validator is the keyword which
failed validation, and Validator.VALIDATORS is a mapping of keywords to
callables.
We may choose to do so later, but for now will save some API churn in
case something else changes.
|
|
|
|
|
| |
Obviously what was here works fine, but better to show
the examples with a more recent spec.
|
|
|
|
|
| |
It is way too easy to silently pass these :( -- specifically,
the doctest directive only works for things with >>> prompts.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing so jettisons setuptools in favor of a more modern, well-designed,
legacy-free, and now well-supported packaging tool, Hatch.
No end-user facing behavior changes are expected for any users using a
recent packaging setup (within the past 2-3 years), so please report any
issues.
Hatch: https://hatch.pypa.io/latest/
PEP 621: https://peps.python.org/pep-0621/
|
| |
|
|
|
|
|
|
|
|
| |
Several remaining cases referred to `IValidator` which is now just
`Validtator`. Fix these.
Add a test which ensures that all valdiators pass
`isinstance(x, Validator)` using the runtime-checkable protocol.
|
|
|
|
|
|
| |
Primarily, rewrite `IValidator` to `Validator`
Co-authored-by: Julian Berman <Julian@GrayVines.com>
|
|
|
| |
Co-authored-by: Julian Berman <Julian@GrayVines.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a Protocol implementation for type checking under mypy and
other static analyzers. It uses the protocol class defined in py3.8+
and uses typing_extensions as a backport for py3.7
The documentation-only validator class has been replaced with the
protocol, and docs are now driven via autoclass on the protocol.
Importantly, several documented methods of the class have been
removed, as they were marked deprecated under jsonschema v3.0 and are
no longer provided by the builtin validators.
Minor adjustments to the docs are made to repoint references at the
new class definition.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A Validator should be thought of as encapsulating validation with a
single fixed schema.
Previously, iter_errors and is_valid allowed passing a second argument,
which was a different schema to use for one method call.
This was mostly for convenience, since the second argument is often
used during sub-validation whilst say, recursing.
The correct way to do so now is to say:
validator.evolve(schema=new_schema).iter_errors(...)
validator.evolve(schema=new_schema).is_valid(...)
instead, which is essentially equally convenient.
Closes: #522
|
|
|
|
|
|
|
| |
It passes all the new upstream (non-ASCII date/time) tests, whilst
strict-rfc3339 does not, plus it's maintained.
More props to @naimetti.
|
|
|
|
| |
recursiveRef is broken in the same way dynamicRef is.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The other drafts are *available* over HTTPS, but their
canonical URI has apparently not changed.
|
|
|
|
| |
Closes: #653
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add everything that's the same in Draft6, which appears to just leave
out if/then/else.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/master:
This doesn't exist anymore.
Skip the newly added case-insensitive date-time tests.
Less hard to read.
Squashed 'json/' changes from cb2b906..2ca50c0
Re-wording email disclaimer to fit the reasoning behind it
Clarifying limitation of email validator
Layout changed for Draft7 format tests.
Assume the next version will be 3.0.0
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Let's see what https://github.com/sphinx-doc/sphinx/issues/4345 turns up.
|