Skip to content

Commit

Permalink
fix deprecation warnings in py-polars
Browse files Browse the repository at this point in the history
  • Loading branch information
bschoenmaeckers committed Dec 2, 2024
1 parent dd96e31 commit 28d9b58
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions py-polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,98 +290,98 @@ fn polars(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
// Exceptions - Errors
m.add(
"PolarsError",
py.get_type_bound::<exceptions::PolarsError>(),
py.get_type::<exceptions::PolarsError>(),
)
.unwrap();
m.add(
"ColumnNotFoundError",
py.get_type_bound::<exceptions::ColumnNotFoundError>(),
py.get_type::<exceptions::ColumnNotFoundError>(),
)
.unwrap();
m.add(
"ComputeError",
py.get_type_bound::<exceptions::ComputeError>(),
py.get_type::<exceptions::ComputeError>(),
)
.unwrap();
m.add(
"DuplicateError",
py.get_type_bound::<exceptions::DuplicateError>(),
py.get_type::<exceptions::DuplicateError>(),
)
.unwrap();
m.add(
"InvalidOperationError",
py.get_type_bound::<exceptions::InvalidOperationError>(),
py.get_type::<exceptions::InvalidOperationError>(),
)
.unwrap();
m.add(
"NoDataError",
py.get_type_bound::<exceptions::NoDataError>(),
py.get_type::<exceptions::NoDataError>(),
)
.unwrap();
m.add(
"OutOfBoundsError",
py.get_type_bound::<exceptions::OutOfBoundsError>(),
py.get_type::<exceptions::OutOfBoundsError>(),
)
.unwrap();
m.add(
"SQLInterfaceError",
py.get_type_bound::<exceptions::SQLInterfaceError>(),
py.get_type::<exceptions::SQLInterfaceError>(),
)
.unwrap();
m.add(
"SQLSyntaxError",
py.get_type_bound::<exceptions::SQLSyntaxError>(),
py.get_type::<exceptions::SQLSyntaxError>(),
)
.unwrap();
m.add(
"SchemaError",
py.get_type_bound::<exceptions::SchemaError>(),
py.get_type::<exceptions::SchemaError>(),
)
.unwrap();
m.add(
"SchemaFieldNotFoundError",
py.get_type_bound::<exceptions::SchemaFieldNotFoundError>(),
py.get_type::<exceptions::SchemaFieldNotFoundError>(),
)
.unwrap();
m.add("ShapeError", py.get_type_bound::<exceptions::ShapeError>())
m.add("ShapeError", py.get_type::<exceptions::ShapeError>())
.unwrap();
m.add(
"StringCacheMismatchError",
py.get_type_bound::<exceptions::StringCacheMismatchError>(),
py.get_type::<exceptions::StringCacheMismatchError>(),
)
.unwrap();
m.add(
"StructFieldNotFoundError",
py.get_type_bound::<exceptions::StructFieldNotFoundError>(),
py.get_type::<exceptions::StructFieldNotFoundError>(),
)
.unwrap();

// Exceptions - Warnings
m.add(
"PolarsWarning",
py.get_type_bound::<exceptions::PolarsWarning>(),
py.get_type::<exceptions::PolarsWarning>(),
)
.unwrap();
m.add(
"PerformanceWarning",
py.get_type_bound::<exceptions::PerformanceWarning>(),
py.get_type::<exceptions::PerformanceWarning>(),
)
.unwrap();
m.add(
"CategoricalRemappingWarning",
py.get_type_bound::<exceptions::CategoricalRemappingWarning>(),
py.get_type::<exceptions::CategoricalRemappingWarning>(),
)
.unwrap();
m.add(
"MapWithoutReturnDtypeWarning",
py.get_type_bound::<exceptions::MapWithoutReturnDtypeWarning>(),
py.get_type::<exceptions::MapWithoutReturnDtypeWarning>(),
)
.unwrap();

// Exceptions - Panic
m.add(
"PanicException",
py.get_type_bound::<pyo3::panic::PanicException>(),
py.get_type::<pyo3::panic::PanicException>(),
)
.unwrap();

Expand Down

0 comments on commit 28d9b58

Please sign in to comment.