chore: Update dependencies
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
This commit is contained in:
parent
584a07a410
commit
e15d4dd342
|
@ -201,6 +201,9 @@ jobs:
|
|||
- run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
working-directory: ./jsonschema
|
||||
|
||||
- run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
working-directory: ./bindings/python
|
||||
|
||||
features:
|
||||
name: Check features
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Update `pyo3` to `0.20`.
|
||||
|
||||
## [0.17.1] - 2023-07-05
|
||||
|
||||
### Changed
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,7 @@ name = "jsonschema_rs"
|
|||
crate-type = ["cdylib"]
|
||||
|
||||
[build-dependencies]
|
||||
built = { version = "0.6.1", features = ["chrono"] }
|
||||
built = { version = "0.7.1", features = ["cargo-lock", "chrono"] }
|
||||
|
||||
[dependencies.jsonschema]
|
||||
path = "../../jsonschema"
|
||||
|
@ -27,7 +27,7 @@ features = ["resolve-http", "resolve-file"]
|
|||
[dependencies]
|
||||
serde_json = "1.0.91"
|
||||
serde = "1.0.152"
|
||||
pyo3 = { version = "0.19.1", features = ["extension-module"] }
|
||||
pyo3 = { version = "0.20.3", features = ["extension-module"] }
|
||||
pyo3-built = "0.4.7"
|
||||
|
||||
[profile.release]
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
fn main() {
|
||||
let src = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let dst = std::path::Path::new(&std::env::var("OUT_DIR").unwrap()).join("built.rs");
|
||||
let mut opts = built::Options::default();
|
||||
opts.set_dependencies(true).set_compiler(true).set_env(true);
|
||||
built::write_built_file_with_opts(&opts, std::path::Path::new(&src), &dst)
|
||||
.expect("Failed to acquire build-time information");
|
||||
built::write_built_file().expect("Failed to acquire build-time information");
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
clippy::match_same_arms,
|
||||
clippy::needless_borrow,
|
||||
clippy::print_stdout,
|
||||
clippy::integer_arithmetic,
|
||||
clippy::arithmetic_side_effects,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::map_unwrap_or,
|
||||
clippy::unseparated_literal_suffix,
|
||||
|
@ -21,7 +21,7 @@ use pyo3::{
|
|||
exceptions::{self, PyValueError},
|
||||
prelude::*,
|
||||
types::{PyAny, PyList, PyType},
|
||||
wrap_pyfunction, AsPyPointer,
|
||||
wrap_pyfunction,
|
||||
};
|
||||
#[macro_use]
|
||||
extern crate pyo3_built;
|
||||
|
@ -317,7 +317,6 @@ fn iter_errors(
|
|||
///
|
||||
/// By default Draft 7 will be used for compilation.
|
||||
#[pyclass(module = "jsonschema_rs")]
|
||||
#[pyo3(text_signature = "(schema, draft=None, with_meta_schemas=False)")]
|
||||
struct JSONSchema {
|
||||
schema: jsonschema::JSONSchema,
|
||||
repr: String,
|
||||
|
@ -338,6 +337,7 @@ fn get_schema_repr(schema: &serde_json::Value) -> String {
|
|||
#[pymethods]
|
||||
impl JSONSchema {
|
||||
#[new]
|
||||
#[pyo3(text_signature = "(schema, draft=None, with_meta_schemas=False)")]
|
||||
fn new(
|
||||
py: Python<'_>,
|
||||
pyschema: &PyAny,
|
||||
|
|
|
@ -6,7 +6,6 @@ use pyo3::{
|
|||
},
|
||||
prelude::*,
|
||||
types::PyAny,
|
||||
AsPyPointer,
|
||||
};
|
||||
use serde::{
|
||||
ser::{self, Serialize, SerializeMap, SerializeSeq},
|
||||
|
@ -164,7 +163,7 @@ impl Serialize for SerializePyObject {
|
|||
str_size as usize,
|
||||
))
|
||||
};
|
||||
#[allow(clippy::integer_arithmetic)]
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
map.serialize_entry(
|
||||
slice,
|
||||
&SerializePyObject::new(value, self.recursion_depth + 1),
|
||||
|
@ -191,7 +190,7 @@ impl Serialize for SerializePyObject {
|
|||
type_ptr = current_ob_type;
|
||||
ob_type = get_object_type(current_ob_type);
|
||||
}
|
||||
#[allow(clippy::integer_arithmetic)]
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
sequence.serialize_element(&SerializePyObject::with_obtype(
|
||||
elem,
|
||||
ob_type.clone(),
|
||||
|
@ -219,7 +218,7 @@ impl Serialize for SerializePyObject {
|
|||
type_ptr = current_ob_type;
|
||||
ob_type = get_object_type(current_ob_type);
|
||||
}
|
||||
#[allow(clippy::integer_arithmetic)]
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
sequence.serialize_element(&SerializePyObject::with_obtype(
|
||||
elem,
|
||||
ob_type.clone(),
|
||||
|
@ -231,7 +230,7 @@ impl Serialize for SerializePyObject {
|
|||
}
|
||||
ObjectType::Enum => {
|
||||
let value = unsafe { PyObject_GetAttr(self.object, types::VALUE_STR) };
|
||||
#[allow(clippy::integer_arithmetic)]
|
||||
#[allow(clippy::arithmetic_side_effects)]
|
||||
SerializePyObject::new(value, self.recursion_depth + 1).serialize(serializer)
|
||||
}
|
||||
ObjectType::Unknown(ref type_name) => Err(ser::Error::custom(format!(
|
||||
|
|
Loading…
Reference in New Issue