From 28597c4a5fd17c32e10935063223cba6baabfd54 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Tue, 25 Jun 2024 10:40:45 -0700 Subject: [PATCH] fixes Signed-off-by: Jess Frazelle --- Cargo.lock | 62 ++++++++++++++++++++++++++++++------------------------ Cargo.toml | 6 +++--- src/lib.rs | 9 +++++--- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a15baa..99b45a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -384,7 +384,7 @@ version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.66", @@ -528,6 +528,20 @@ dependencies = [ "parking_lot_core 0.9.10", ] +[[package]] +name = "dashmap" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -886,12 +900,6 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1136,9 +1144,9 @@ dependencies = [ [[package]] name = "kcl-lib" -version = "0.1.65" +version = "0.1.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace7f81b9ef4abcfe8b1ee7059be772fb70092631d074d31dec6f3f66520e16d" +checksum = "c3d70e0e7614df8f743ee8c7a3404ed7e6f4d414e30fe289ad252e6c6289fc3e" dependencies = [ "anyhow", "approx", @@ -1148,7 +1156,7 @@ dependencies = [ "bson", "chrono", "clap", - "dashmap", + "dashmap 6.0.1", "databake", "derive-docs", "form_urlencoded", @@ -1224,9 +1232,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" @@ -1702,15 +1710,15 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +checksum = "1962a33ed2a201c637fc14a4e0fd4e06e6edfdeee6a5fede0dab55507ad74cf7" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot 0.12.3", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -1721,9 +1729,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +checksum = "ab7164b2202753bd33afc7f90a10355a719aa973d1f94502c50d06f3488bc420" dependencies = [ "once_cell", "target-lexicon", @@ -1731,9 +1739,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +checksum = "c6424906ca49013c0829c5c1ed405e20e2da2dc78b82d198564880a704e6a7b7" dependencies = [ "libc", "pyo3-build-config", @@ -1741,9 +1749,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +checksum = "82b2f19e153122d64afd8ce7aaa72f06a00f52e34e1d1e74b6d71baea396460a" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1753,11 +1761,11 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +checksum = "dd698c04cac17cf0fe63d47790ab311b8b25542f5cb976b65c374035c50f1eef" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "pyo3-build-config", "quote", @@ -2455,7 +2463,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -2799,7 +2807,7 @@ dependencies = [ "async-trait", "auto_impl", "bytes", - "dashmap", + "dashmap 5.5.3", "futures", "httparse", "lsp-types", @@ -3486,7 +3494,7 @@ dependencies = [ [[package]] name = "zoo-kcl" -version = "0.1.15" +version = "0.1.16" dependencies = [ "anyhow", "kcl-lib", diff --git a/Cargo.toml b/Cargo.toml index 66045b3..1a3deb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zoo-kcl" -version = "0.1.15" +version = "0.1.16" edition = "2021" repository = "https://github.com/kittycad/kcl.py" @@ -11,9 +11,9 @@ crate-type = ["cdylib"] [dependencies] anyhow = "1.0.86" -kcl-lib = {version = "0.1.60", features = ["pyo3"]} +kcl-lib = {version = "0.1.67", features = ["pyo3"]} kittycad = "0.3.6" -pyo3 = { version = "0.21.1", features = ["serde", "experimental-async"] } +pyo3 = { version = "0.22.0", features = ["serde", "experimental-async"] } reqwest = "0.11.0" serde = "1.0.203" serde_json = "1.0.118" diff --git a/src/lib.rs b/src/lib.rs index 65aef09..adf83ca 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,10 @@ use kcl_lib::{ lint::{checks, Discovered}, settings::types::UnitLength, }; -use pyo3::{pyclass, pyfunction, pymethods, pymodule, types::PyModule, wrap_pyfunction, Bound, PyErr, PyResult}; +use pyo3::{ + prelude::PyModuleMethods, pyclass, pyfunction, pymethods, pymodule, types::PyModule, wrap_pyfunction, Bound, PyErr, + PyResult, +}; use serde::{Deserialize, Serialize}; fn tokio() -> &'static tokio::runtime::Runtime { @@ -15,7 +18,7 @@ fn tokio() -> &'static tokio::runtime::Runtime { /// The variety of image formats snapshots may be exported to. #[derive(Serialize, Deserialize, PartialEq, Hash, Debug, Clone, Copy)] -#[pyclass] +#[pyclass(eq, eq_int)] #[serde(rename_all = "lowercase")] pub enum ImageFormat { /// .png format @@ -76,7 +79,7 @@ impl ExportFile { /// The valid types of output file formats. #[derive(Serialize, Deserialize, PartialEq, Hash, Debug, Clone)] -#[pyclass] +#[pyclass(eq, eq_int)] #[serde(rename_all = "lowercase")] pub enum FileExportFormat { /// Autodesk Filmbox (FBX) format.