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
7946e978b5
chore(python): Update PyO3 to 0.21.0
...
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-05-01 18:08:54 +02: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
Stephan Lanfermann
6ae63dc564
feat: Expose drafts 2019-09 and 2020-12 to Python ( #457 )
...
Co-authored-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-03-03 01:24:07 +01:00
Dmitry Dygalo
e15d4dd342
chore: Update dependencies
...
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2024-03-03 01:18:27 +01:00
Dmitry Dygalo
0391921362
build(python): Switch to maturin ( #411 )
...
* build(python): Switch to maturin
* chore: Use `maturin>=0.14.11,<0.15`
Co-authored-by: messense <messense@icloud.com>
* build: Build only `sdist` in the `test-python-sdist` job
Co-authored-by: messense <messense@icloud.com>
* build: Set the proper output directory for `maturin`
* chore: Add more metadata
---------
Co-authored-by: messense <messense@icloud.com>
2023-01-31 22:10:06 +01:00
ermakov-oleg
002edce5b0
chore(python): Add .pyi "stub" file for type checkers support #391
2022-10-28 20:35:30 +02:00
Dmitry Dygalo
f57357d021
perf(python): Avoid extra allocation when validating a dictionary with non-string keys
2022-10-18 22:52:16 +02:00
o.ermakov
cc07bb2526
fix(python): Deleted unnecessary Debug derive attr
2022-10-18 22:13:10 +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
9ab21a243f
chore: Avoid some `Result` wrapping
2022-05-12 16:51:51 +02:00
Dmitry Dygalo
5feb0d2308
chore: Avoid usage of deprecated PyO3 traits
2022-05-12 16:51:51 +02:00
Dmitry Dygalo
7544f7a2af
fix(python): Compatibility with `pyo3-built`
2022-05-03 17:57:14 +02:00
Dmitry Dygalo
872bd7617e
chore(python): Fix clippy warnings
2022-01-28 12:23:10 +01:00
Dmitry Dygalo
347e01541b
perf(python): Do not box iterator inside `ValidationErrorIter`
2021-12-12 21:40:02 +01: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
9867b383a6
refactor: split list and tuple serialization
2021-11-04 12:29:45 +01:00
Blayne Chard
3ae1db54de
refactor: convert tuple size to 0
2021-11-04 12:29:45 +01:00
Blayne Chard
045d4aaab5
refactor: avoid serialization logic duplication
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
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
b69482b312
chore: Pre-compute `JSONSchema` representation
...
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-24 16:13:19 +02:00
Alex Good
11086926d0
refactor: update python bindings to remove JSONSchema lifetime
2021-07-24 15:32:06 +02:00
Dmitry Dygalo
28b71f64e3
perf: Minor optimizations
...
* perf: Use Box<str> in PathChunk
* perf: Create InstancePath once
* perf: Do not call to_string() when it is not needed
2021-07-15 08:35:09 +02:00
Dmitry Dygalo
3c342448e6
chore(python): Remove unused import
...
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-06 18:41:40 +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
c3754cedf9
chore: Update PyO3 to 0.14.1
...
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-05 14:34:53 +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
Dmitry Dygalo
a0a5be814b
chore: Fix various clippy lints
2021-06-17 19:27:14 +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
e3f1e62df1
chore: Resolve clippy lints
2021-05-03 11:02:12 +02:00
Dmitry Dygalo
dee71c7c56
feat(python): Add `validate` shortcut
2021-02-03 12:30:50 +01:00
Dmitry Dygalo
f2c247401e
docs(python): Fix `JSONSchema.validate` docstring
2021-02-03 12:30:50 +01:00
Dmitry Dygalo
5bbb1a111b
chore: Add `with_meta_schemas` argument for `is_valid` and update docstrings
2021-01-30 13:08:08 +01:00
Dmitry Dygalo
5286ea22c0
chore: Add `with_meta_schemas` for Python bindings
2021-01-29 18:42:27 +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