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) {
8585 .def (" record_batch" ,
8686 [](pybind11::object &self, idx_t rows_per_batch)
8787 {
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);
9592 }, py::arg (" rows_per_batch" ) = 1000000 );
9693}
9794
Original file line number Diff line number Diff line change 33filterwarnings =
44 error
55 ignore::UserWarning
6+ ignore::DeprecationWarning
67 # Jupyter is throwing DeprecationWarnings
78 ignore:function ham\(\) is deprecated:DeprecationWarning
89 # Pyspark is throwing these warnings
You can’t perform that action at this time.
0 commit comments