Skip to content

Commit 75840ac

Browse files
committed
use default registry
Signed-off-by: Onur Satici <[email protected]>
1 parent e89ff20 commit 75840ac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vortex-python/src/serde/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ use bytes::Bytes;
88
use pyo3::exceptions::PyValueError;
99
use pyo3::prelude::*;
1010
use pyo3::{Bound, Python};
11-
use vortex::ArrayRegistry;
11+
use vortex::ArraySessionExt;
1212
use vortex_ipc::messages::{DecoderMessage, MessageDecoder, PollRead};
1313

1414
use crate::arrays::PyArrayRef;
1515
use crate::install_module;
16+
use crate::SESSION;
1617
use crate::serde::context::PyArrayContext;
1718
use crate::serde::parts::PyArrayParts;
1819

@@ -48,7 +49,7 @@ pub(crate) fn init(py: Python, parent: &Bound<PyModule>) -> PyResult<()> {
4849
/// The decoded Vortex array
4950
#[pyfunction]
5051
fn decode_ipc_array(array_bytes: Vec<u8>, dtype_bytes: Vec<u8>) -> PyResult<PyArrayRef> {
51-
let registry = ArrayRegistry::canonical_only();
52+
let registry = SESSION.arrays().registry().clone();
5253
let mut decoder = MessageDecoder::new(registry);
5354

5455
let mut dtype_buf = Bytes::from(dtype_bytes);
@@ -102,7 +103,7 @@ fn decode_ipc_array_buffers<'py>(
102103
) -> PyResult<PyArrayRef> {
103104
use pyo3::buffer::PyBuffer;
104105

105-
let registry = ArrayRegistry::canonical_only();
106+
let registry = SESSION.arrays().registry().clone();
106107
let mut decoder = MessageDecoder::new(registry);
107108

108109
// Concatenate dtype buffers

0 commit comments

Comments
 (0)