diff --git a/Cargo.lock b/Cargo.lock index ab33007..9c07d2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -63,9 +63,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrow" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caf25cdc4a985f91df42ed9e9308e1adbcd341a31a72605c697033fcef163e3" +checksum = "d2ccdcc8fb14508ca20aaec7076032e5c0b0751b906036d4496786e2f227a37a" dependencies = [ "arrow-arith", "arrow-array", @@ -82,24 +82,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f2dfd1a7ec0aca967dfaa616096aec49779adc8eccec005e2f5e4111b1192a" +checksum = "a1aad8e27f32e411a0fc0bf5a625a35f0bf9b9f871cf4542abe31f7cef4beea2" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "half", "num", ] [[package]] name = "arrow-array" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39387ca628be747394890a6e47f138ceac1aa912eab64f02519fed24b637af8" +checksum = "bd6ed90c28c6f73a706c55799b8cc3a094e89257238e5b1d65ca7c70bd3ae23f" dependencies = [ "ahash", "arrow-buffer", @@ -107,15 +106,15 @@ dependencies = [ "arrow-schema", "chrono", "half", - "hashbrown 0.14.5", + "hashbrown", "num", ] [[package]] name = "arrow-buffer" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e51e05228852ffe3eb391ce7178a0f97d2cf80cc6ef91d3c4a6b3cb688049ec" +checksum = "fe4a40bdc1552ea10fbdeae4e5a945d8572c32f66bce457b96c13d9c46b80447" dependencies = [ "bytes", "half", @@ -124,9 +123,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09aea56ec9fa267f3f3f6cdab67d8a9974cbba90b3aa38c8fe9d0bb071bd8c1" +checksum = "430c0a21aa7f81bcf0f97c57216d7127795ea755f494d27bae2bd233be43c2cc" dependencies = [ "arrow-array", "arrow-buffer", @@ -144,9 +143,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98ae0af50890b494cebd7d6b04b35e896205c1d1df7b29a6272c5d0d0249ef5" +checksum = "09af476cfbe9879937e50b1334c73189de6039186e025b1b1ac84b283b87b20e" dependencies = [ "arrow-buffer", "arrow-schema", @@ -156,26 +155,23 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2883d7035e0b600fb4c30ce1e50e66e53d8656aa729f2bfa4b51d359cf3ded52" +checksum = "eddf14c5f03b679ec8ceac4dfac43f63cdc4ed54dab3cc120a4ef46af38481eb" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "arrow-select", - "half", - "num", ] [[package]] name = "arrow-row" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552907e8e587a6fde4f8843fd7a27a576a260f65dab6c065741ea79f633fc5be" +checksum = "e9acdc58da19f383f4ba381fa0e3583534ae2ceb31269aaf4a03f08ff13e8443" dependencies = [ - "ahash", "arrow-array", "arrow-buffer", "arrow-data", @@ -185,18 +181,18 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539ada65246b949bd99ffa0881a9a15a4a529448af1a07a9838dd78617dafab1" +checksum = "3a1822a1a952955637e85e8f9d6b0e04dd75d65492b87ec548dd593d3a1f772b" dependencies = [ "bitflags", ] [[package]] name = "arrow-select" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6259e566b752da6dceab91766ed8b2e67bf6270eb9ad8a6e07a33c1bede2b125" +checksum = "5c4172e9a12dfe15303d3926269f9ead471ea93bdd067d113abc65cb6c48e246" dependencies = [ "ahash", "arrow-array", @@ -208,9 +204,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "53.2.0" +version = "54.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3179ccbd18ebf04277a095ba7321b93fd1f774f18816bd5f6b3ce2f594edb6c" +checksum = "73683040445f4932342781926189901c9521bb1a787c35dbe628a3ce51372d3c" dependencies = [ "arrow-array", "arrow-buffer", @@ -246,9 +242,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bumpalo" @@ -264,9 +260,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "calamine" @@ -286,9 +282,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "shlex", ] @@ -358,9 +354,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -370,9 +366,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -398,9 +394,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -427,9 +423,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -448,9 +444,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "half" @@ -465,15 +461,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -506,12 +496,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown", ] [[package]] @@ -522,18 +512,19 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lexical-core" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" +checksum = "b765c31809609075565a70b4b71402281283aeda7ecaf4818ac14a7b2ade8958" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -544,9 +535,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" +checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -555,9 +546,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" +checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" dependencies = [ "lexical-util", "static_assertions", @@ -565,18 +556,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" +checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" +checksum = "c5afc668a27f460fb45a81a757b6bf2f43c2d7e30cb5a2dcd3abf294c78d62bd" dependencies = [ "lexical-util", "lexical-write-integer", @@ -585,9 +576,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" +checksum = "629ddff1a914a836fb245616a7888b62903aae58fa771e1d83943035efa0f978" dependencies = [ "lexical-util", "static_assertions", @@ -595,15 +586,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "lockfree-object-pool" @@ -634,9 +625,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] @@ -723,9 +714,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "pretty_assertions" @@ -739,18 +730,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.22.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884" +checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "cfg-if", "indoc", @@ -766,9 +757,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38" +checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" dependencies = [ "once_cell", "target-lexicon", @@ -776,9 +767,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636" +checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" dependencies = [ "libc", "pyo3-build-config", @@ -786,9 +777,9 @@ dependencies = [ [[package]] name = "pyo3-log" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ac84e6eec1159bc2a575c9ae6723baa6ee9d45873e9bebad1e3ad7e8d28a443" +checksum = "be5bb22b77965a7b5394e9aae9897a0607b51df5167561ffc3b02643b4200bc7" dependencies = [ "arc-swap", "log", @@ -797,9 +788,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453" +checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -809,9 +800,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe" +checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" dependencies = [ "heck", "proc-macro2", @@ -832,18 +823,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -853,9 +844,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -910,6 +901,12 @@ dependencies = [ "semver", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" @@ -918,24 +915,24 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -962,9 +959,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -979,18 +976,18 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "thiserror" -version = "1.0.64" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", @@ -1008,9 +1005,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unindent" @@ -1032,24 +1029,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -1058,9 +1055,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1068,9 +1065,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -1081,9 +1078,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "windows-core" @@ -1186,9 +1186,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "arbitrary", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index 84e6869..c2d6d2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,16 +25,18 @@ crate-type = ["cdylib"] [dependencies] # There's a lot of stuff we don't want here, such as serde support -arrow = { version = "53.2.0", default-features = false, features = ["pyarrow"] } -calamine = { version = "0.26.1", features = ["dates"] } -chrono = { version = "0.4.39", default-features = false } +arrow = { version = "^54.0.0", default-features = false, features = [ + "pyarrow", +] } +calamine = { version = "^0.26.1", features = ["dates"] } +chrono = { version = "^0.4.39", default-features = false } log = "0.4.25" -pyo3 = { version = "0.22.6", features = ["abi3-py39"] } -pyo3-log = "0.11.0" +pyo3 = { version = "^0.23.4", features = ["abi3-py39"] } +pyo3-log = "^0.12.1" [dev-dependencies] -pretty_assertions = "1.4.1" -rstest = { version = "0.24.0", default-features = false } +pretty_assertions = "^1.4.1" +rstest = { version = "^0.24.0", default-features = false } # NOTE: This is a hack to bypass pyo3 limitations when testing: # https://pyo3.rs/v0.22.3/faq.html#i-cant-run-cargo-test-or-i-cant-build-in-a-cargo-workspace-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror diff --git a/src/lib.rs b/src/lib.rs index 74857f6..6b82e68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,38 +55,32 @@ fn _fastexcel(m: &Bound<'_, PyModule>) -> PyResult<()> { // errors [ - ( - "FastExcelError", - py.get_type_bound::(), - ), + ("FastExcelError", py.get_type::()), ( "UnsupportedColumnTypeCombinationError", - py.get_type_bound::(), + py.get_type::(), ), ( "CannotRetrieveCellDataError", - py.get_type_bound::(), + py.get_type::(), ), ( "CalamineCellError", - py.get_type_bound::(), - ), - ( - "CalamineError", - py.get_type_bound::(), + py.get_type::(), ), + ("CalamineError", py.get_type::()), ( "SheetNotFoundError", - py.get_type_bound::(), + py.get_type::(), ), ( "ColumnNotFoundError", - py.get_type_bound::(), + py.get_type::(), ), - ("ArrowError", py.get_type_bound::()), + ("ArrowError", py.get_type::()), ( "InvalidParametersError", - py.get_type_bound::(), + py.get_type::(), ), ] .into_iter() diff --git a/src/types/dtype.rs b/src/types/dtype.rs index dbe64c1..98c8a74 100644 --- a/src/types/dtype.rs +++ b/src/types/dtype.rs @@ -9,7 +9,8 @@ use arrow::datatypes::{DataType as ArrowDataType, TimeUnit}; use calamine::{CellErrorType, CellType, DataType, Range}; use log::warn; use pyo3::{ - prelude::PyAnyMethods, Bound, FromPyObject, PyAny, PyObject, PyResult, Python, ToPyObject, + prelude::PyAnyMethods, types::PyString, Bound, FromPyObject, IntoPyObject, IntoPyObjectRef, + PyAny, PyResult, Python, }; use crate::error::{py_errors::IntoPyResult, FastExcelError, FastExcelErrorKind, FastExcelResult}; @@ -64,9 +65,26 @@ impl Display for DType { } } -impl ToPyObject for DType { - fn to_object(&self, py: Python<'_>) -> PyObject { - self.to_string().to_object(py) +impl<'py> IntoPyObject<'py> for DType { + type Target = PyString; + + type Output = Bound<'py, Self::Target>; + + type Error = std::convert::Infallible; + + fn into_pyobject(self, py: Python<'py>) -> Result { + self.to_string().into_pyobject(py) + } +} +impl<'py> IntoPyObject<'py> for &DType { + type Target = PyString; + + type Output = Bound<'py, Self::Target>; + + type Error = std::convert::Infallible; + + fn into_pyobject(self, py: Python<'py>) -> Result { + self.to_string().into_pyobject(py) } } @@ -86,6 +104,7 @@ impl FromPyObject<'_> for DType { pub(crate) type DTypeMap = HashMap; +#[derive(IntoPyObject, IntoPyObjectRef)] pub(crate) enum DTypes { All(DType), Map(DTypeMap), @@ -110,15 +129,6 @@ impl FromPyObject<'_> for DTypes { } } -impl ToPyObject for DTypes { - fn to_object(&self, py: Python<'_>) -> PyObject { - match self { - DTypes::All(dtype) => dtype.to_object(py), - DTypes::Map(dtype_map) => dtype_map.to_object(py), - } - } -} - impl From<&DType> for ArrowDataType { fn from(dtype: &DType) -> Self { match dtype { @@ -229,7 +239,11 @@ fn get_cell_dtype( match cell.get_error() { // considering cells with #N/A! or #REF! as null Some( - CellErrorType::NA | CellErrorType::Value | CellErrorType::Null | CellErrorType::Ref | CellErrorType::Num, + CellErrorType::NA + | CellErrorType::Value + | CellErrorType::Null + | CellErrorType::Ref + | CellErrorType::Num, ) => Ok(DType::Null), Some(err) => Err(FastExcelErrorKind::CalamineCellError(err.to_owned()).into()), None => Err(FastExcelErrorKind::Internal(format!( diff --git a/src/types/idx_or_name.rs b/src/types/idx_or_name.rs index e66cb1d..187a5ae 100644 --- a/src/types/idx_or_name.rs +++ b/src/types/idx_or_name.rs @@ -1,5 +1,6 @@ use pyo3::{ - prelude::PyAnyMethods, Bound, FromPyObject, PyAny, PyObject, PyResult, Python, ToPyObject, + prelude::PyAnyMethods, Bound, FromPyObject, IntoPyObject, IntoPyObjectExt, PyAny, PyResult, + Python, }; use crate::error::{py_errors::IntoPyResult, FastExcelError, FastExcelErrorKind, FastExcelResult}; @@ -42,11 +43,32 @@ impl FromPyObject<'_> for IdxOrName { } } -impl ToPyObject for IdxOrName { - fn to_object(&self, py: Python<'_>) -> PyObject { +impl<'py> IntoPyObject<'py> for IdxOrName { + type Target = PyAny; + + type Output = Bound<'py, Self::Target>; + + type Error = pyo3::PyErr; + + fn into_pyobject(self, py: Python<'py>) -> Result { + match self { + IdxOrName::Idx(idx) => idx.into_bound_py_any(py), + IdxOrName::Name(name) => name.into_bound_py_any(py), + } + } +} + +impl<'py> IntoPyObject<'py> for &IdxOrName { + type Target = PyAny; + + type Output = Bound<'py, Self::Target>; + + type Error = pyo3::PyErr; + + fn into_pyobject(self, py: Python<'py>) -> Result { match self { - IdxOrName::Idx(idx) => idx.to_object(py), - IdxOrName::Name(name) => name.to_object(py), + IdxOrName::Idx(idx) => idx.into_bound_py_any(py), + IdxOrName::Name(name) => name.into_bound_py_any(py), } } } diff --git a/src/types/python/excelreader.rs b/src/types/python/excelreader.rs index f6c8549..8e7edb1 100644 --- a/src/types/python/excelreader.rs +++ b/src/types/python/excelreader.rs @@ -4,7 +4,7 @@ use std::{ }; use arrow::{pyarrow::ToPyArrow, record_batch::RecordBatch}; -use pyo3::{prelude::PyObject, pyclass, pymethods, Bound, IntoPy, PyAny, PyResult, Python}; +use pyo3::{pyclass, pymethods, Bound, IntoPyObjectExt, PyAny, PyResult, Python}; use calamine::{ open_workbook_auto, open_workbook_auto_from_rs, Data, DataRef, HeaderRow, Range, Reader, @@ -172,7 +172,7 @@ impl ExcelReader { } #[allow(clippy::too_many_arguments)] - fn build_sheet( + fn build_sheet<'py>( &mut self, sheet_meta: CalamineSheet, header_row: Option, @@ -181,11 +181,11 @@ impl ExcelReader { n_rows: Option, schema_sample_rows: Option, dtype_coercion: DTypeCoercion, - use_columns: Option<&Bound<'_, PyAny>>, + use_columns: Option<&Bound<'py, PyAny>>, dtypes: Option, eager: bool, - py: Python<'_>, - ) -> PyResult { + py: Python<'py>, + ) -> PyResult> { // calamine `header_row` is the first row of the range to be read. // For us `header_row` can be `None` (meaning there is no header and we should start reading // the data at the beginning) @@ -219,6 +219,7 @@ impl ExcelReader { ) .into_pyresult() .and_then(|rb| rb.to_pyarrow(py)) + .map(|py_object| py_object.into_bound(py)) } else { let range = self .sheets @@ -242,13 +243,13 @@ impl ExcelReader { if eager { sheet.to_arrow(py) } else { - Ok(sheet.into_py(py)) + sheet.into_bound_py_any(py) } } } #[allow(clippy::too_many_arguments)] - fn build_table( + fn build_table<'py>( &mut self, name: String, header_row: Option, @@ -260,8 +261,8 @@ impl ExcelReader { use_columns: Option<&Bound<'_, PyAny>>, dtypes: Option, eager: bool, - py: Python<'_>, - ) -> PyResult { + py: Python<'py>, + ) -> PyResult> { let selected_columns = Self::build_selected_columns(use_columns).into_pyresult()?; let table = self.sheets.get_table(&name).into_pyresult()?; @@ -287,9 +288,9 @@ impl ExcelReader { .into_pyresult()?; if eager { - excel_table.to_arrow(py) + excel_table.to_arrow(py).map(|py_obj| py_obj.into_bound(py)) } else { - Ok(excel_table.into_py(py)) + excel_table.into_bound_py_any(py) } } } @@ -336,20 +337,20 @@ impl ExcelReader { eager = false, ))] #[allow(clippy::too_many_arguments)] - pub fn load_sheet( + pub fn load_sheet<'py>( &mut self, - idx_or_name: &Bound<'_, PyAny>, + idx_or_name: &Bound<'py, PyAny>, header_row: Option, column_names: Option>, skip_rows: Option, n_rows: Option, schema_sample_rows: Option, dtype_coercion: DTypeCoercion, - use_columns: Option<&Bound<'_, PyAny>>, + use_columns: Option<&Bound<'py, PyAny>>, dtypes: Option, eager: bool, - py: Python<'_>, - ) -> PyResult { + py: Python<'py>, + ) -> PyResult> { // Cannot use NonZeroUsize in the parameters, as it is not supported by pyo3 if let Some(0) = schema_sample_rows { return Err(FastExcelErrorKind::InvalidParameters( @@ -414,20 +415,20 @@ impl ExcelReader { eager = false, ))] #[allow(clippy::too_many_arguments)] - pub fn load_table( + pub fn load_table<'py>( &mut self, - name: &Bound<'_, PyString>, + name: &Bound<'py, PyString>, header_row: Option, column_names: Option>, skip_rows: usize, n_rows: Option, schema_sample_rows: Option, dtype_coercion: DTypeCoercion, - use_columns: Option<&Bound<'_, PyAny>>, + use_columns: Option<&Bound<'py, PyAny>>, dtypes: Option, eager: bool, - py: Python<'_>, - ) -> PyResult { + py: Python<'py>, + ) -> PyResult> { // Cannot use NonZeroUsize in the parameters, as it is not supported by pyo3 if let Some(0) = schema_sample_rows { return Err(FastExcelErrorKind::InvalidParameters( diff --git a/src/types/python/excelsheet/mod.rs b/src/types/python/excelsheet/mod.rs index 52d7b55..3d160b9 100644 --- a/src/types/python/excelsheet/mod.rs +++ b/src/types/python/excelsheet/mod.rs @@ -8,8 +8,8 @@ use arrow::{pyarrow::ToPyArrow, record_batch::RecordBatch}; use pyo3::{ prelude::{pyclass, pymethods, PyAnyMethods, Python}, - types::PyList, - Bound, PyAny, PyObject, PyResult, ToPyObject, + types::{PyList, PyString}, + Bound, IntoPyObject, IntoPyObjectExt, PyAny, PyObject, PyResult, }; use crate::{ @@ -318,13 +318,20 @@ impl TryFrom>> for SelectedColumns { #[derive(Clone, Debug)] struct SheetVisible(CalamineSheetVisible); -impl ToPyObject for &SheetVisible { - fn to_object(&self, py: Python<'_>) -> PyObject { +impl<'py> IntoPyObject<'py> for &SheetVisible { + type Target = PyString; + + type Output = Bound<'py, Self::Target>; + + type Error = std::convert::Infallible; + + fn into_pyobject(self, py: Python<'py>) -> Result { match self.0 { - CalamineSheetVisible::Visible => "visible".to_object(py), - CalamineSheetVisible::Hidden => "hidden".to_object(py), - CalamineSheetVisible::VeryHidden => "veryhidden".to_object(py), + CalamineSheetVisible::Visible => "visible", + CalamineSheetVisible::Hidden => "hidden", + CalamineSheetVisible::VeryHidden => "veryhidden", } + .into_pyobject(py) } } @@ -478,8 +485,8 @@ impl ExcelSheet { } #[getter] - pub fn specified_dtypes<'p>(&'p self, py: Python<'p>) -> Option { - self.dtypes.as_ref().map(|dtypes| dtypes.to_object(py)) + pub fn specified_dtypes(&self, _py: Python<'_>) -> Option<&DTypes> { + self.dtypes.as_ref() } #[getter] @@ -488,12 +495,12 @@ impl ExcelSheet { } #[getter] - pub fn visible<'p>(&'p self, py: Python<'p>) -> PyObject { + pub fn visible<'py>(&'py self, py: Python<'py>) -> PyResult> { let visible: SheetVisible = self.sheet_meta.visible.into(); - (&visible).to_object(py) + (&visible).into_pyobject(py).map_err(Into::into) } - pub fn to_arrow(&self, py: Python<'_>) -> PyResult { + pub fn to_arrow<'py>(&self, py: Python<'py>) -> PyResult> { RecordBatch::try_from(self) .with_context(|| { format!( @@ -512,6 +519,7 @@ impl ExcelSheet { ) }) .into_pyresult() + .and_then(|obj| obj.into_bound_py_any(py)) } pub fn __repr__(&self) -> String { @@ -537,7 +545,7 @@ mod tests { #[test] fn selected_columns_from_list_of_valid_ints() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, vec![0, 1, 2]); + let py_list = PyList::new(py, vec![0, 1, 2]).expect("could not create PyList"); assert_eq!( TryInto::::try_into(Some(py_list.as_ref())).unwrap(), SelectedColumns::Selection([0, 1, 2].into_iter().map(IdxOrName::Idx).collect()) @@ -548,7 +556,7 @@ mod tests { #[test] fn selected_columns_from_list_of_valid_strings() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, vec!["foo", "bar"]); + let py_list = PyList::new(py, vec!["foo", "bar"]).expect("could not create PyList"); assert_eq!( TryInto::::try_into(Some(py_list.as_ref())).unwrap(), SelectedColumns::Selection( @@ -565,7 +573,7 @@ mod tests { #[test] fn selected_columns_from_list_of_valid_strings_and_ints() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, vec!["foo", "bar"]); + let py_list = PyList::new(py, vec!["foo", "bar"]).expect("could not create PyList"); py_list.append(42).unwrap(); py_list.append(5).unwrap(); assert_eq!( @@ -583,7 +591,7 @@ mod tests { #[test] fn selected_columns_from_invalid_ints() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, vec![0, 2, -1]); + let py_list = PyList::new(py, vec![0, 2, -1]).expect("could not create PyList"); let err = TryInto::::try_into(Some(py_list.as_ref())).unwrap_err(); assert!(matches!(err.kind, FastExcelErrorKind::InvalidParameters(_))); @@ -593,7 +601,7 @@ mod tests { #[test] fn selected_columns_from_empty_int_list() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, Vec::::new()); + let py_list = PyList::new(py, Vec::::new()).expect("could not create PyList"); let err = TryInto::::try_into(Some(py_list.as_ref())).unwrap_err(); assert!(matches!(err.kind, FastExcelErrorKind::InvalidParameters(_))); @@ -603,7 +611,7 @@ mod tests { #[test] fn selected_columns_from_empty_string_list() { Python::with_gil(|py| { - let py_list = PyList::new_bound(py, Vec::::new()); + let py_list = PyList::new(py, Vec::::new()).expect("could not create PyList"); let err = TryInto::::try_into(Some(py_list.as_ref())).unwrap_err(); assert!(matches!(err.kind, FastExcelErrorKind::InvalidParameters(_))); @@ -625,7 +633,7 @@ mod tests { let expected_range = SelectedColumns::Selection( expected_indices.into_iter().map(IdxOrName::Idx).collect(), ); - let input = PyString::new_bound(py, raw); + let input = PyString::new(py, raw); let range = TryInto::::try_into(Some(input.as_ref())) .expect("expected a valid column selection"); @@ -649,7 +657,7 @@ mod tests { #[case("a:b:e", "exactly 2 elements, got 3")] fn selected_columns_from_invalid_ranges(#[case] raw: &str, #[case] message: &str) { Python::with_gil(|py| { - let input = PyString::new_bound(py, raw); + let input = PyString::new(py, raw); let err = TryInto::::try_into(Some(input.as_ref())) .expect_err("expected an error"); diff --git a/src/types/python/table.rs b/src/types/python/table.rs index 4aa2339..4edf99b 100644 --- a/src/types/python/table.rs +++ b/src/types/python/table.rs @@ -5,7 +5,7 @@ use arrow::{ pyarrow::ToPyArrow, }; use calamine::{Data, Range, Table}; -use pyo3::{pyclass, pymethods, PyObject, PyResult, Python, ToPyObject}; +use pyo3::{pyclass, pymethods, PyObject, PyResult, Python}; use crate::{ data::{ @@ -206,8 +206,8 @@ impl ExcelTable { } #[getter] - pub fn specified_dtypes<'p>(&'p self, py: Python<'p>) -> Option { - self.dtypes.as_ref().map(|dtypes| dtypes.to_object(py)) + pub fn specified_dtypes(&self, _py: Python<'_>) -> Option<&DTypes> { + self.dtypes.as_ref() } #[getter]