diff --git a/crates/polars-plan/src/dsl/python_udf.rs b/crates/polars-plan/src/dsl/python_udf.rs index e99ec56f14d5..cd133ceb646e 100644 --- a/crates/polars-plan/src/dsl/python_udf.rs +++ b/crates/polars-plan/src/dsl/python_udf.rs @@ -67,7 +67,7 @@ impl PythonUdfExpression { (3, ser_py_version[0], ser_py_version[1] ) ); } - let buf = &buf[2..]; + let buf = &buf[3..]; // Load UDF metadata let mut reader = Cursor::new(buf); diff --git a/py-polars/tests/unit/io/cloud/test_cloud.py b/py-polars/tests/unit/io/cloud/test_cloud.py index a7dcc5c8a8cc..58e341f5b39f 100644 --- a/py-polars/tests/unit/io/cloud/test_cloud.py +++ b/py-polars/tests/unit/io/cloud/test_cloud.py @@ -57,9 +57,7 @@ def raises_2() -> pl.CredentialProviderFunctionReturn: pl.scan_parquet("s3://bucket/path", credential_provider=raises_2).collect() -def test_scan_credential_provider_serialization( - monkeypatch: pytest.MonkeyPatch, -) -> None: +def test_scan_credential_provider_serialization() -> None: err_magic = "err_magic_3" class ErrCredentialProvider(pl.CredentialProvider): @@ -74,7 +72,7 @@ def __call__(self) -> pl.CredentialProviderFunctionReturn: lf = pl.LazyFrame.deserialize(io.BytesIO(serialized)) - with pytest.raises(AssertionError, match=err_magic): + with pytest.raises(ComputeError, match=err_magic): lf.collect()