Commit Graph

29 Commits

Author SHA1 Message Date
Dmitry Dygalo e564888da5 feat(python): Custom format checkers
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-05-02 00:02:22 +02:00
Dmitry Dygalo b31e4ffb18 chore: fix import order
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-03-22 19:00:09 +01:00
Florian Braun 829ca19963 feat(python): support validation of dict subclasses
Currently, attemping to validate an instance of a dict subclass will raise a `ValueError`. This should not be happening, since the instance is still dict.
Achieve compatibility by checking the subclasses' inheritance tree, and treat the instance like a dict if that check passes.
2024-03-22 18:44:42 +01:00
Dmitry Dygalo 4f99c8f8be feat: Support Python 3.12
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-03-03 19:48:40 +01:00
Dmitry Dygalo 558d13db35 test: fix python tests
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-03-03 00:11:33 +01:00
Dmitry Dygalo a15343802b test(python): Adjust integer sizes in tests to avoid unrelated failures on Python 3.11 2023-01-14 22:04:59 +01:00
ermakov-oleg 002edce5b0
chore(python): Add .pyi "stub" file for type checkers support #391 2022-10-28 20:35:30 +02:00
o.ermakov e40a35a983 fix(python): Review fixes 2022-10-18 22:13:10 +02:00
o.ermakov bbd0153de8 fix(python): Fix SystemError when non-str dict key provided #386 2022-10-18 22:13:10 +02:00
Dmitry Dygalo 37955910cf refactor(test): Refactor Python tests 2022-04-25 19:28:56 +02:00
Dmitry Dygalo 7924d55af7 chore: Update pre-commit 2022-04-01 09:49:01 +02:00
Blayne Chard 0515c955a4
feat: convert python enum into raw values before validating (#317)
* feat: convert python enum into raw values before validating

* refactor: apply pull request comments
2021-11-09 20:49:04 +01:00
Blayne Chard b88262bb14 test: validate that named tuples error 2021-11-04 12:29:45 +01:00
Blayne Chard a4dc339635 refactor: expand tests around arrays and tuples 2021-11-04 12:29:45 +01:00
Blayne Chard 734445856b fix: convert tuples into lists 2021-11-04 12:29:45 +01:00
Dmitry Dygalo 80c5af90c4
docs: Update support notes
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-29 17:53:44 +02:00
Dmitry Dygalo a95a754496 feat(python): A way to compile schemas from a string
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-29 17:50:43 +02:00
Dmitry Dygalo c5dd4f3a47 chore(python): Set proper __module__ attribute to JSONSchema
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-27 21:09:49 +02:00
Blayne Chard 0430432957
feat(python): support iterating all errors with `iter_errors` (#296)
* feat(python): support iterating all errors with iter_errors

* docs: move changelog into the python changelog

* test: parameterise tests to validate both iter_errors functions

* refactor: fixup pr comments

* docs: remove excess line
2021-10-22 08:50:20 +02:00
Dmitry Dygalo d7b69197a7 fix(python): Inaccurate schema path in validation error messages
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-26 10:13:52 +02:00
Dmitry Dygalo a773044d28 feat(python): Additional attributes for ValidationError
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-06 14:40:09 +02:00
Dmitry Dygalo 442c05bd75
test(python): Properly wait for the test server
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-06-30 13:49:24 +02:00
DzikiChrzan 561f9cd2bd
feat: Report schema paths in validation errors
Ref: #199

Co-authored-by: ueco <ueco@libertymail.net>
Co-authored-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-06-19 17:00:26 +02:00
Eden Yefet 5e65010387
feat: Use meta-schemas to validate input schemas 2021-06-17 15:04:29 +02:00
Dmitry Dygalo 17acb7000f feat(python): Add instance path to error messages
Ref: #144
2021-05-05 13:37:54 +02:00
Dmitry Dygalo c99064ceaf fix: Floating point overflow in the `multipleOf` validator 2021-04-30 21:32:04 +02:00
Dmitry Dygalo 4da2f0d2bb test(python): Bring the suite tests back 2021-02-03 13:46:24 +01:00
Dmitry Dygalo dee71c7c56 feat(python): Add `validate` shortcut 2021-02-03 12:30:50 +01:00
Dmitry Dygalo f5be9508d0
fix: Sdist Python packaging
* chore: Move Python bindings to `bindings`

* chore: Move `jsonschema` into a separate directory

* chore: Move submodule

* ci: Fix the `coverage` job

* chore: Move submodule

* test: Disable some failing optional tests

* ci: Add tests for installing Python sdist

* fix: Sdist Python packaging

* chore: Remove coverage job

It doesn't support such project structure
Ref: https://github.com/actions-rs/grcov/issues/50
2021-01-29 09:52:12 +01:00