]>
git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/python/pyarrow/tests/test_serialization_deprecated.py
cd4b3ed78c876a3ac1b39ceaad723bc659af2370
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
25 def test_serialization_deprecated():
26 with pytest
.warns(FutureWarning
):
29 with pytest
.warns(FutureWarning
):
30 pa
.deserialize(ser
.to_buffer())
32 f
= pa
.BufferOutputStream()
33 with pytest
.warns(FutureWarning
):
34 pa
.serialize_to(12, f
)
37 f
= pa
.BufferReader(buf
)
38 with pytest
.warns(FutureWarning
):
39 pa
.read_serialized(f
).deserialize()
41 with pytest
.warns(FutureWarning
):
42 pa
.default_serialization_context()
44 context
= pa
.lib
.SerializationContext()
45 with pytest
.warns(FutureWarning
):
46 pa
.register_default_serialization_handlers(context
)
49 @pytest.mark
.skipif(sys
.version_info
< (3, 7),
50 reason
="getattr needs Python 3.7")
51 def test_serialization_deprecated_toplevel():
52 with pytest
.warns(FutureWarning
):
53 pa
.SerializedPyObject()
55 with pytest
.warns(FutureWarning
):
56 pa
.SerializationContext()