@@ -55,7 +55,7 @@ def test_parquet_piece_read(tempdir):
5555 path = tempdir / 'parquet_piece_read.parquet'
5656 _write_table (table , path , version = '2.6' )
5757
58- with pytest .warns (DeprecationWarning ):
58+ with pytest .warns (FutureWarning ):
5959 piece1 = pq .ParquetDatasetPiece (path )
6060
6161 result = piece1 .read ()
@@ -70,7 +70,7 @@ def test_parquet_piece_open_and_get_metadata(tempdir):
7070 path = tempdir / 'parquet_piece_read.parquet'
7171 _write_table (table , path , version = '2.6' )
7272
73- with pytest .warns (DeprecationWarning ):
73+ with pytest .warns (FutureWarning ):
7474 piece = pq .ParquetDatasetPiece (path )
7575 table1 = piece .read ()
7676 assert isinstance (table1 , pa .Table )
@@ -80,7 +80,7 @@ def test_parquet_piece_open_and_get_metadata(tempdir):
8080 assert table .equals (table1 )
8181
8282
83- @pytest .mark .filterwarnings ("ignore:ParquetDatasetPiece:DeprecationWarning " )
83+ @pytest .mark .filterwarnings ("ignore:ParquetDatasetPiece:FutureWarning " )
8484def test_parquet_piece_basics ():
8585 path = '/baz.parq'
8686
@@ -140,7 +140,7 @@ def test_read_partitioned_directory(tempdir, use_legacy_dataset):
140140 _partition_test_for_filesystem (fs , tempdir , use_legacy_dataset )
141141
142142
143- @pytest .mark .filterwarnings ("ignore:'ParquetDataset:DeprecationWarning " )
143+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset:FutureWarning " )
144144@pytest .mark .pandas
145145def test_create_parquet_dataset_multi_threaded (tempdir ):
146146 fs = LocalFileSystem ._get_instance ()
@@ -151,7 +151,7 @@ def test_create_parquet_dataset_multi_threaded(tempdir):
151151 manifest = pq .ParquetManifest (base_path , filesystem = fs ,
152152 metadata_nthreads = 1 )
153153 with pytest .warns (
154- DeprecationWarning , match = "Specifying the 'metadata_nthreads'"
154+ FutureWarning , match = "Specifying the 'metadata_nthreads'"
155155 ):
156156 dataset = pq .ParquetDataset (
157157 base_path , filesystem = fs , metadata_nthreads = 16 )
@@ -801,14 +801,14 @@ def _test_read_common_metadata_files(fs, base_path):
801801
802802
803803@pytest .mark .pandas
804- @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:DeprecationWarning " )
804+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:FutureWarning " )
805805def test_read_common_metadata_files (tempdir ):
806806 fs = LocalFileSystem ._get_instance ()
807807 _test_read_common_metadata_files (fs , tempdir )
808808
809809
810810@pytest .mark .pandas
811- @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:DeprecationWarning " )
811+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:FutureWarning " )
812812def test_read_metadata_files (tempdir ):
813813 fs = LocalFileSystem ._get_instance ()
814814
@@ -922,7 +922,7 @@ def read_multiple_files(paths, columns=None, use_threads=True, **kwargs):
922922 result2 = read_multiple_files (paths , metadata = metadata )
923923 assert result2 .equals (expected )
924924
925- with pytest .warns (DeprecationWarning , match = "Specifying the 'schema'" ):
925+ with pytest .warns (FutureWarning , match = "Specifying the 'schema'" ):
926926 result3 = pq .ParquetDataset (dirpath , schema = metadata .schema ).read ()
927927 assert result3 .equals (expected )
928928 else :
@@ -968,7 +968,7 @@ def read_multiple_files(paths, columns=None, use_threads=True, **kwargs):
968968 mixed_paths = [bad_apple_path , paths [0 ]]
969969
970970 with pytest .raises (ValueError ):
971- with pytest .warns (DeprecationWarning , match = "Specifying the 'schema'" ):
971+ with pytest .warns (FutureWarning , match = "Specifying the 'schema'" ):
972972 read_multiple_files (mixed_paths , schema = bad_meta .schema )
973973
974974 with pytest .raises (ValueError ):
@@ -1014,7 +1014,7 @@ def test_dataset_read_pandas(tempdir, use_legacy_dataset):
10141014 tm .assert_frame_equal (result .reindex (columns = expected .columns ), expected )
10151015
10161016
1017- @pytest .mark .filterwarnings ("ignore:'ParquetDataset:DeprecationWarning " )
1017+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset:FutureWarning " )
10181018@pytest .mark .pandas
10191019@parametrize_legacy_dataset
10201020def test_dataset_memory_map (tempdir , use_legacy_dataset ):
@@ -1217,7 +1217,7 @@ def test_empty_directory(tempdir, use_legacy_dataset):
12171217 assert result .num_columns == 0
12181218
12191219
1220- @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:DeprecationWarning " )
1220+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset.schema:FutureWarning " )
12211221def _test_write_to_dataset_with_partitions (base_path ,
12221222 use_legacy_dataset = True ,
12231223 filesystem = None ,
@@ -1259,7 +1259,7 @@ def _test_write_to_dataset_with_partitions(base_path,
12591259 use_legacy_dataset = use_legacy_dataset )
12601260 # ARROW-2209: Ensure the dataset schema also includes the partition columns
12611261 if use_legacy_dataset :
1262- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.schema'" ):
1262+ with pytest .warns (FutureWarning , match = "'ParquetDataset.schema'" ):
12631263 dataset_cols = set (dataset .schema .to_arrow_schema ().names )
12641264 else :
12651265 # NB schema property is an arrow and not parquet schema
@@ -1409,7 +1409,7 @@ def test_write_to_dataset_no_partitions_s3fs(
14091409 path , use_legacy_dataset , filesystem = fs )
14101410
14111411
1412- @pytest .mark .filterwarnings ("ignore:'ParquetDataset:DeprecationWarning " )
1412+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset:FutureWarning " )
14131413@pytest .mark .pandas
14141414@parametrize_legacy_dataset_not_supported
14151415def test_write_to_dataset_with_partitions_and_custom_filenames (
@@ -1569,6 +1569,7 @@ def test_dataset_read_dictionary(tempdir, use_legacy_dataset):
15691569
15701570@pytest .mark .dataset
15711571@pytest .mark .pandas
1572+ @pytest .mark .filterwarnings ("ignore:Passing 'use_legacy:FutureWarning" )
15721573def test_read_table_schema (tempdir ):
15731574 # test that schema keyword is passed through in read_table
15741575 table = pa .table ({'a' : pa .array ([1 , 2 , 3 ], pa .int32 ())})
@@ -1622,6 +1623,7 @@ def test_dataset_unsupported_keywords():
16221623
16231624
16241625@pytest .mark .dataset
1626+ @pytest .mark .filterwarnings ("ignore:Passing 'use_legacy:FutureWarning" )
16251627def test_dataset_partitioning (tempdir ):
16261628 import pyarrow .dataset as ds
16271629
@@ -1669,7 +1671,7 @@ def test_parquet_dataset_new_filesystem(tempdir):
16691671 assert result .equals (table )
16701672
16711673
1672- @pytest .mark .filterwarnings ("ignore:'ParquetDataset:DeprecationWarning " )
1674+ @pytest .mark .filterwarnings ("ignore:'ParquetDataset:FutureWarning " )
16731675def test_parquet_dataset_partitions_piece_path_with_fsspec (tempdir ):
16741676 # ARROW-10462 ensure that on Windows we properly use posix-style paths
16751677 # as used by fsspec
@@ -1693,30 +1695,33 @@ def test_parquet_dataset_deprecated_properties(tempdir):
16931695 pq .write_table (table , path )
16941696 dataset = pq .ParquetDataset (path )
16951697
1696- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.pieces" ):
1698+ with pytest .warns (FutureWarning , match = "'ParquetDataset.pieces" ):
16971699 dataset .pieces
16981700
1699- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.partitions" ):
1701+ with pytest .warns (FutureWarning , match = "'ParquetDataset.partitions" ):
17001702 dataset .partitions
17011703
1702- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.memory_map" ):
1704+ with pytest .warns (FutureWarning , match = "'ParquetDataset.memory_map" ):
17031705 dataset .memory_map
17041706
1705- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.read_dictio" ):
1707+ with pytest .warns (FutureWarning , match = "'ParquetDataset.read_dictio" ):
17061708 dataset .read_dictionary
17071709
1708- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.buffer_size" ):
1710+ with pytest .warns (FutureWarning , match = "'ParquetDataset.buffer_size" ):
17091711 dataset .buffer_size
17101712
1711- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.fs" ):
1713+ with pytest .warns (FutureWarning , match = "'ParquetDataset.fs" ):
17121714 dataset .fs
17131715
1714- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.schema'" ):
1716+ with pytest .warns (FutureWarning , match = "'ParquetDataset.schema'" ):
17151717 dataset .schema
17161718
1719+ with pytest .warns (FutureWarning , match = "'ParquetDataset.common_metadata'" ):
1720+ dataset .common_metadata
1721+
17171722 dataset2 = pq .ParquetDataset (path , use_legacy_dataset = False )
17181723
1719- with pytest .warns (DeprecationWarning , match = "'ParquetDataset.pieces" ):
1724+ with pytest .warns (FutureWarning , match = "'ParquetDataset.pieces" ):
17201725 dataset2 .pieces
17211726
17221727
0 commit comments