From e7915d8af319297285b60b89db621b2c0d5f2e77 Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Sun, 7 Jul 2024 16:27:05 +0900 Subject: [PATCH] fix(python): Handle DB cursor descriptions that contain more fields than the DBAPI2 standard (#17468) --- py-polars/polars/io/database/_inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py-polars/polars/io/database/_inference.py b/py-polars/polars/io/database/_inference.py index f9045e00bdb6..7b48a3fc2377 100644 --- a/py-polars/polars/io/database/_inference.py +++ b/py-polars/polars/io/database/_inference.py @@ -203,7 +203,7 @@ def _infer_dtype_from_cursor_description( description: tuple[Any, ...], ) -> PolarsDataType | None: """Attempt to infer Polars dtype from database cursor description `type_code`.""" - type_code, _disp_size, internal_size, precision, scale, _null_ok = description + type_code, _disp_size, internal_size, precision, scale, *_ = description dtype: PolarsDataType | None = None if isclass(type_code):