File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,10 @@ static void InitializeConsumers(py::class_<DuckDBPyRelation> &m) {
85
85
.def (" record_batch" ,
86
86
[](pybind11::object &self, idx_t rows_per_batch)
87
87
{
88
- auto warnings = pybind11::module::import (" warnings" );
89
- auto builtins = pybind11::module::import (" builtins" );
90
- warnings.attr (" warn" )(
91
- " record_batch() is deprecated, use fetch_record_batch() instead." ,
92
- builtins.attr (" DeprecationWarning" ));
93
-
94
- return self.attr (" fetch_record_batch" )(rows_per_batch);
88
+ PyErr_WarnEx (PyExc_DeprecationWarning,
89
+ " record_batch() is deprecated, use fetch_record_batch() instead." ,
90
+ 0 );
91
+ return self.attr (" fetch_record_batch" )(rows_per_batch);
95
92
}, py::arg (" rows_per_batch" ) = 1000000 );
96
93
}
97
94
Original file line number Diff line number Diff line change 3
3
filterwarnings =
4
4
error
5
5
ignore::UserWarning
6
+ ignore::DeprecationWarning
6
7
# Jupyter is throwing DeprecationWarnings
7
8
ignore:function ham\(\) is deprecated:DeprecationWarning
8
9
# Pyspark is throwing these warnings
You can’t perform that action at this time.
0 commit comments