From d6e8ca4204d11dd5e38c6d159281b9cc5652a789 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Sat, 19 Oct 2024 12:24:57 -0400 Subject: [PATCH] Bump numpy -> 0.23, pyo3 -> 0.22.5, and arrow -> 53.1 (#7834) - Resolves: https://github.com/rerun-io/rerun/issues/7676 Required also updating pyo3 / arrow and fixing up some deprecated APIs. --- Cargo.lock | 211 ++++++++++++++++------------------ Cargo.toml | 22 ++-- deny.toml | 1 - rerun_py/src/dataframe.rs | 4 +- rerun_py/src/python_bridge.rs | 30 ++++- rerun_py/src/video.rs | 1 + 6 files changed, 141 insertions(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa8afef806b9..b035239b42ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -296,7 +296,7 @@ dependencies = [ "argh_shared", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -328,9 +328,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "arrow" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05048a8932648b63f21c37d88b552ccc8a65afb6dfe9fc9f30ce79174c2e7a85" +checksum = "a9ba0d7248932f4e2a12fb37f0a2e3ec82b3bdedbac2a1dce186e036843b8f8c" dependencies = [ "arrow-arith", "arrow-array", @@ -347,9 +347,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a57966e43bfe9a3277984a14c24ec617ad874e4c0e1d2a1b083a39cfbf22c" +checksum = "d60afcdc004841a5c8d8da4f4fa22d64eb19c0c01ef4bcedd77f175a7cf6e38f" dependencies = [ "arrow-array", "arrow-buffer", @@ -362,9 +362,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f4a9468c882dc66862cef4e1fd8423d47e67972377d85d80e022786427768c" +checksum = "7f16835e8599dbbb1659fd869d865254c4cf32c6c2bb60b6942ac9fc36bfa5da" dependencies = [ "ahash", "arrow-buffer", @@ -378,9 +378,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c975484888fc95ec4a632cdc98be39c085b1bb518531b0c80c5d462063e5daa1" +checksum = "1a1f34f0faae77da6b142db61deba2cb6d60167592b178be317b341440acba80" dependencies = [ "bytes", "half 2.3.1", @@ -389,9 +389,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26719e76b81d8bc3faad1d4dbdc1bcc10d14704e63dc17fc9f3e7e1e567c8e" +checksum = "450e4abb5775bca0740bec0bcf1b1a5ae07eff43bd625661c4436d8e8e4540c4" dependencies = [ "arrow-array", "arrow-buffer", @@ -409,9 +409,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9d6f18c65ef7a2573ab498c374d8ae364b4a4edf67105357491c031f716ca5" +checksum = "2b1e618bbf714c7a9e8d97203c806734f012ff71ae3adc8ad1b075689f540634" dependencies = [ "arrow-buffer", "arrow-schema", @@ -431,9 +431,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42745f86b1ab99ef96d1c0bcf49180848a64fe2c7a7a0d945bc64fa2b21ba9bc" +checksum = "2427f37b4459a4b9e533045abe87a5183a5e0995a3fc2c2fd45027ae2cc4ef3f" dependencies = [ "arrow-array", "arrow-buffer", @@ -446,9 +446,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd09a518c602a55bd406bcc291a967b284cfa7a63edfbf8b897ea4748aad23c" +checksum = "15959657d92e2261a7a323517640af87f5afd9fd8a6492e424ebee2203c567f6" dependencies = [ "ahash", "arrow-array", @@ -460,18 +460,18 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e972cd1ff4a4ccd22f86d3e53e835c2ed92e0eea6a3e8eadb72b4f1ac802cf8" +checksum = "fbf0388a18fd7f7f3fe3de01852d30f54ed5182f9004db700fbe3ba843ed2794" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "arrow-select" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600bae05d43483d216fb3494f8c32fdbefd8aa4e1de237e790dbb3d9f44690a3" +checksum = "b83e5723d307a38bf00ecd2972cd078d1339c7fd3eb044f609958a9a24463f3a" dependencies = [ "ahash", "arrow-array", @@ -483,9 +483,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc1985b67cb45f6606a248ac2b4a288849f196bab8c657ea5589f47cdd55e6" +checksum = "7ab3db7c09dd826e74079661d84ed01ed06547cf75d52c2818ef776d0d852305" dependencies = [ "arrow-array", "arrow-buffer", @@ -710,7 +710,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -745,7 +745,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -1014,7 +1014,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -1262,7 +1262,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -1691,7 +1691,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -1702,7 +1702,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2092,7 +2092,7 @@ checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2113,7 +2113,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2124,7 +2124,7 @@ checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2145,7 +2145,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2412,7 +2412,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2502,7 +2502,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2659,7 +2659,7 @@ dependencies = [ "inflections", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -2806,6 +2806,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.2.6" @@ -3206,9 +3212,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -3219,9 +3225,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -3230,9 +3236,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" dependencies = [ "lexical-util", "static_assertions", @@ -3240,18 +3246,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" dependencies = [ "lexical-util", "lexical-write-integer", @@ -3260,9 +3266,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" dependencies = [ "lexical-util", "static_assertions", @@ -3598,19 +3604,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", -] - [[package]] name = "ndarray" version = "0.16.1" @@ -3632,7 +3625,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f093b3db6fd194718dcdeea6bd8c829417deae904e3fcc7732dabcd4416d25d8" dependencies = [ - "ndarray 0.16.1", + "ndarray", "rand", "rand_distr", ] @@ -3777,7 +3770,7 @@ checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -3851,7 +3844,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -3871,12 +3864,12 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "numpy" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec170733ca37175f5d75a5bea5911d6ff45d2cd52849ce98b685394e4f2f37f4" +checksum = "cf314fca279e6e6ac2126a4ff98f26d88aa4ad06bc68fb6ae5cf4bd706758311" dependencies = [ "libc", - "ndarray 0.15.6", + "ndarray", "num-complex", "num-integer", "num-traits", @@ -4304,7 +4297,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -4487,7 +4480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -4502,9 +4495,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -4526,7 +4519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce97fecd27bc49296e5e20518b5a1bb54a14f7d5fe6228bc9686ee2a74915cc8" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -4556,7 +4549,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.48", + "syn 2.0.79", "tempfile", ] @@ -4570,7 +4563,7 @@ dependencies = [ "itertools 0.10.5", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -4646,15 +4639,15 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.21.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" dependencies = [ "cfg-if", "indoc", "libc", "memoffset 0.9.0", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -4664,9 +4657,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" dependencies = [ "once_cell", "target-lexicon", @@ -4674,9 +4667,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" dependencies = [ "libc", "pyo3-build-config", @@ -4684,27 +4677,27 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] name = "pyo3-macros-backend" -version = "0.21.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -5497,7 +5490,7 @@ dependencies = [ "document-features", "itertools 0.13.0", "libc", - "ndarray 0.16.1", + "ndarray", "ndarray-rand", "once_cell", "parking_lot", @@ -5687,7 +5680,7 @@ dependencies = [ "bytemuck", "egui", "half 2.3.1", - "ndarray 0.16.1", + "ndarray", "re_chunk_store", "re_data_ui", "re_log_types", @@ -5838,7 +5831,7 @@ dependencies = [ "linked-hash-map", "mime_guess2", "mint", - "ndarray 0.16.1", + "ndarray", "nohash-hasher", "once_cell", "ply-rs", @@ -5891,7 +5884,7 @@ dependencies = [ "re_log", "re_tracing", "rust-format", - "syn 2.0.48", + "syn 2.0.79", "tempfile", "unindent", "xshell", @@ -6055,7 +6048,7 @@ dependencies = [ "indexmap 2.1.0", "itertools 0.13.0", "linked-hash-map", - "ndarray 0.16.1", + "ndarray", "nohash-hasher", "once_cell", "parking_lot", @@ -6503,7 +6496,7 @@ dependencies = [ "clap", "half 2.3.1", "image", - "ndarray 0.16.1", + "ndarray", "re_log", "rerun", ] @@ -6575,7 +6568,7 @@ version = "0.20.0-alpha.1+dev" dependencies = [ "anyhow", "clap", - "ndarray 0.16.1", + "ndarray", "re_log", "rerun", ] @@ -6839,7 +6832,7 @@ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -6861,7 +6854,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -7058,7 +7051,7 @@ name = "snippets" version = "0.20.0-alpha.1+dev" dependencies = [ "itertools 0.13.0", - "ndarray 0.16.1", + "ndarray", "rand", "rand_distr", "re_build_tools", @@ -7142,7 +7135,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -7164,9 +7157,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -7230,7 +7223,7 @@ dependencies = [ "clap", "glam", "itertools 0.13.0", - "ndarray 0.16.1", + "ndarray", "ndarray-rand", "rand", "re_log", @@ -7302,7 +7295,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -7497,7 +7490,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -7783,7 +7776,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -7850,7 +7843,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8301,7 +8294,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -8312,7 +8305,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] @@ -8770,7 +8763,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8a0a7dcb562d..0b2748769c20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -146,7 +146,7 @@ anyhow = { version = "1.0", default-features = false } arboard = { version = "3.2", default-features = false } argh = "0.1.12" array-init = "2.1" -arrow = { version = "52.2", default-features = false } +arrow = { version = "53.1", default-features = false } arrow2 = { package = "re_arrow2", version = "0.17" } async-executor = "1.0" backtrace = "0.3" @@ -170,11 +170,11 @@ criterion = "0.5" crossbeam = "0.8" directories = "5" document-features = "0.2.8" -econtext = "0.2" # Prints error contexts on crashes +econtext = "0.2" # Prints error contexts on crashes ehttp = "0.5.0" enumset = "1.0.12" env_logger = { version = "0.10", default-features = false } -fixed = { version = "<1.28", default-features = false } # 1.28+ is MSRV 1.79+ +fixed = { version = "<1.28", default-features = false } # 1.28+ is MSRV 1.79+ flatbuffers = "23.0" futures-channel = "0.3" futures-util = { version = "0.3", default-features = false } @@ -186,9 +186,9 @@ half = "2.3.1" hexasphere = "14.1.0" image = { version = "0.25", default-features = false } indent = "0.1" -indexmap = "2.1" # Version chosen to align with other dependencies -indicatif = "0.17.7" # Progress bar -infer = "0.15" # infer MIME type by checking the magic number signaturefer MIME type by checking the magic number signature +indexmap = "2.1" # Version chosen to align with other dependencies +indicatif = "0.17.7" # Progress bar +infer = "0.15" # infer MIME type by checking the magic number signaturefer MIME type by checking the magic number signature insta = "1.23" itertools = "0.13" js-sys = "0.3" @@ -199,7 +199,7 @@ log-once = "0.4" lz4_flex = "0.11" memory-stats = "1.1" mimalloc = "0.1.43" -mime_guess2 = "2.0" # infer MIME type by file extension, and map mime to file extension +mime_guess2 = "2.0" # infer MIME type by file extension, and map mime to file extension mint = "0.5.9" re_mp4 = "0.1.0" natord = "1.0.9" @@ -210,9 +210,7 @@ nohash-hasher = "0.2" notify = { version = "6.1.1", features = ["macos_kqueue"] } num-derive = "0.4" num-traits = "0.2" -# TODO(#7676) This pulls in an older ndarray. Remove it from the skip list in `deny.toml` and -# close the issue when updating to 0.22. -numpy = "0.21" +numpy = "0.22" once_cell = "1.17" # No lazy_static - use `std::sync::OnceLock` or `once_cell` instead ordered-float = "4.2" parking_lot = "0.12" @@ -228,8 +226,8 @@ proc-macro2 = { version = "1.0", default-features = false } profiling = { version = "1.0.12", default-features = false } puffin = "0.19.1" puffin_http = "0.16" -pyo3 = "0.21.2" -pyo3-build-config = "0.21.2" +pyo3 = "0.22.5" +pyo3-build-config = "0.22.5" quote = "1.0" rand = { version = "0.8", default-features = false } rand_distr = { version = "0.4", default-features = false } diff --git a/deny.toml b/deny.toml index 2e1166e5f5e7..d99c623c3e5d 100644 --- a/deny.toml +++ b/deny.toml @@ -55,7 +55,6 @@ skip = [ { name = "hashbrown" }, # Old version used by polar-rs { name = "libloading" }, # Old version used by ash (vulkan binding), newer version used by khronos-egl { name = "memoffset" }, # Small crate - { name = "ndarray" }, # Needed by `numpy<0.22` in `rerun_py` { name = "prettyplease" }, # Old version being used by prost { name = "pulldown-cmark" }, # Build-dependency via `ply-rs` (!). TODO(emilk): use a better crate for .ply parsing { name = "raw-window-handle" }, # Pretty small crate; some crates still on old version diff --git a/rerun_py/src/dataframe.rs b/rerun_py/src/dataframe.rs index e1323e006ee0..a2d7484c2640 100644 --- a/rerun_py/src/dataframe.rs +++ b/rerun_py/src/dataframe.rs @@ -588,7 +588,7 @@ pub struct PyRecording { #[pyclass(name = "RecordingView")] #[derive(Clone)] pub struct PyRecordingView { - recording: Py, + recording: std::sync::Arc>, query_expression: QueryExpression, } @@ -1351,7 +1351,7 @@ impl PyRecording { let recording = slf.unbind(); Ok(PyRecordingView { - recording, + recording: std::sync::Arc::new(recording), query_expression: query, }) } diff --git a/rerun_py/src/python_bridge.rs b/rerun_py/src/python_bridge.rs index ce99b744c159..cc42dba4fea6 100644 --- a/rerun_py/src/python_bridge.rs +++ b/rerun_py/src/python_bridge.rs @@ -2,9 +2,9 @@ #![allow(clippy::borrow_deref_ref)] // False positive due to #[pyfunction] macro #![allow(unsafe_op_in_unsafe_fn)] // False positive due to #[pyfunction] macro -use std::collections::HashMap; use std::io::IsTerminal as _; use std::path::PathBuf; +use std::{borrow::Borrow, collections::HashMap}; use itertools::Itertools; use pyo3::{ @@ -348,6 +348,7 @@ impl std::ops::Deref for PyRecordingStream { } #[pyfunction] +#[pyo3(signature = (recording=None))] fn get_application_id(recording: Option<&PyRecordingStream>) -> Option { get_data_recording(recording)? .store_info() @@ -355,6 +356,7 @@ fn get_application_id(recording: Option<&PyRecordingStream>) -> Option { } #[pyfunction] +#[pyo3(signature = (recording=None))] fn get_recording_id(recording: Option<&PyRecordingStream>) -> Option { get_data_recording(recording)? .store_info() @@ -364,6 +366,7 @@ fn get_recording_id(recording: Option<&PyRecordingStream>) -> Option { /// Returns the currently active data recording in the global scope, if any; fallbacks to the /// specified recording otherwise, if any. #[pyfunction] +#[pyo3(signature = (recording=None))] fn get_data_recording(recording: Option<&PyRecordingStream>) -> Option { RecordingStream::get_quiet( re_sdk::StoreKind::Recording, @@ -388,6 +391,7 @@ fn cleanup_if_forked_child() { /// /// Returns the previous one, if any. #[pyfunction] +#[pyo3(signature = (recording=None))] fn set_global_data_recording( py: Python<'_>, recording: Option<&PyRecordingStream>, @@ -420,6 +424,7 @@ fn get_thread_local_data_recording() -> Option { /// /// Returns the previous one, if any. #[pyfunction] +#[pyo3(signature = (recording=None))] fn set_thread_local_data_recording( py: Python<'_>, recording: Option<&PyRecordingStream>, @@ -445,6 +450,7 @@ fn set_thread_local_data_recording( /// Returns the currently active blueprint recording in the global scope, if any; fallbacks to the /// specified recording otherwise, if any. #[pyfunction] +#[pyo3(signature = (overrides=None))] fn get_blueprint_recording(overrides: Option<&PyRecordingStream>) -> Option { RecordingStream::get_quiet( re_sdk::StoreKind::Blueprint, @@ -463,6 +469,7 @@ fn get_global_blueprint_recording() -> Option { /// /// Returns the previous one, if any. #[pyfunction] +#[pyo3(signature = (recording=None))] fn set_global_blueprint_recording( py: Python<'_>, recording: Option<&PyRecordingStream>, @@ -495,6 +502,7 @@ fn get_thread_local_blueprint_recording() -> Option { /// /// Returns the previous one, if any. #[pyfunction] +#[pyo3(signature = (recording=None))] fn set_thread_local_blueprint_recording( py: Python<'_>, recording: Option<&PyRecordingStream>, @@ -520,6 +528,7 @@ fn set_thread_local_blueprint_recording( // --- Sinks --- #[pyfunction] +#[pyo3(signature = (recording=None))] fn is_enabled(recording: Option<&PyRecordingStream>) -> bool { get_data_recording(recording).map_or(false, |rec| rec.is_enabled()) } @@ -836,6 +845,7 @@ impl PyMemorySinkStorage { /// Concatenate the contents of the [`MemorySinkStorage`] as bytes. /// /// Note: This will do a blocking flush before returning! + #[pyo3(signature = (concat=None))] fn concat_as_bytes<'p>( &self, concat: Option<&Self>, @@ -994,6 +1004,7 @@ fn serve( /// Subsequent log messages will be buffered and either sent on the next call to `connect`, /// or shown with `show`. #[pyfunction] +#[pyo3(signature = (recording=None))] fn disconnect(py: Python<'_>, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1007,6 +1018,7 @@ fn disconnect(py: Python<'_>, recording: Option<&PyRecordingStream>) { /// Block until outstanding data has been flushed to the sink #[pyfunction] +#[pyo3(signature = (blocking, recording=None))] fn flush(py: Python<'_>, blocking: bool, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1025,6 +1037,7 @@ fn flush(py: Python<'_>, blocking: bool, recording: Option<&PyRecordingStream>) // --- Time --- #[pyfunction] +#[pyo3(signature = (timeline, sequence, recording=None))] fn set_time_sequence(timeline: &str, sequence: i64, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1033,6 +1046,7 @@ fn set_time_sequence(timeline: &str, sequence: i64, recording: Option<&PyRecordi } #[pyfunction] +#[pyo3(signature = (timeline, seconds, recording=None))] fn set_time_seconds(timeline: &str, seconds: f64, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1041,6 +1055,7 @@ fn set_time_seconds(timeline: &str, seconds: f64, recording: Option<&PyRecording } #[pyfunction] +#[pyo3(signature = (timeline, nanos, recording=None))] fn set_time_nanos(timeline: &str, nanos: i64, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1049,6 +1064,7 @@ fn set_time_nanos(timeline: &str, nanos: i64, recording: Option<&PyRecordingStre } #[pyfunction] +#[pyo3(signature = (timeline, recording=None))] fn disable_timeline(timeline: &str, recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1057,6 +1073,7 @@ fn disable_timeline(timeline: &str, recording: Option<&PyRecordingStream>) { } #[pyfunction] +#[pyo3(signature = (recording=None))] fn reset_time(recording: Option<&PyRecordingStream>) { let Some(recording) = get_data_recording(recording) else { return; @@ -1314,9 +1331,14 @@ fn escape_entity_path_part(part: &str) -> String { } #[pyfunction] -fn new_entity_path(parts: Vec<&pyo3::types::PyString>) -> PyResult { - let parts: PyResult> = parts.iter().map(|part| part.to_str()).collect(); - let path = EntityPath::from(parts?.into_iter().map(EntityPathPart::from).collect_vec()); +fn new_entity_path(parts: Vec>) -> PyResult { + let parts: PyResult> = parts.iter().map(|part| part.to_cow()).collect(); + let path = EntityPath::from( + parts? + .into_iter() + .map(|part| EntityPathPart::from(part.borrow())) + .collect_vec(), + ); Ok(path.to_string()) } diff --git a/rerun_py/src/video.rs b/rerun_py/src/video.rs index d16b10de6d8d..a81f6144469d 100644 --- a/rerun_py/src/video.rs +++ b/rerun_py/src/video.rs @@ -12,6 +12,7 @@ use crate::arrow::array_to_rust; /// Python `bytes` can be done with `to_pybytes` but this requires copying the data. /// So instead, we pass the arrow array directly. #[pyfunction] +#[pyo3(signature = (video_bytes_arrow_array, media_type=None))] pub fn asset_video_read_frame_timestamps_ns( video_bytes_arrow_array: &Bound<'_, PyAny>, media_type: Option<&str>,