diff --git a/pyproject.toml b/pyproject.toml index 26ab69dd3..d92c64de1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dependencies = [ "prompt-toolkit;platform_system!='Emscripten'", "python-multipart>=0.0.7;platform_system!='Emscripten'", "setuptools;python_version>='3.12'", - "narwhals>=1.9.0,<1.10.0", + "narwhals>=1.9.1", "orjson>=3.10.7", ] diff --git a/shiny/render/_data_frame_utils/_types.py b/shiny/render/_data_frame_utils/_types.py index 2fa1bea95..486988194 100644 --- a/shiny/render/_data_frame_utils/_types.py +++ b/shiny/render/_data_frame_utils/_types.py @@ -14,11 +14,11 @@ import narwhals.stable.v1 as nw from htmltools import TagNode -from narwhals.dtypes import DType as DType -from narwhals.typing import DataFrameT as DataFrameT -from narwhals.typing import IntoDataFrame as IntoDataFrame -from narwhals.typing import IntoDataFrameT as IntoDataFrameT -from narwhals.typing import IntoExpr as IntoExpr +from narwhals.stable.v1.dtypes import DType as DType +from narwhals.stable.v1.typing import DataFrameT as DataFrameT +from narwhals.stable.v1.typing import IntoDataFrame as IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrameT as IntoDataFrameT +from narwhals.stable.v1.typing import IntoExpr as IntoExpr from ..._typing_extensions import Annotated, NotRequired, Required, TypedDict from ...types import Jsonifiable, JsonifiableDict, ListOrTuple diff --git a/tests/playwright/shiny/components/data_frame/data_view_info/app.py b/tests/playwright/shiny/components/data_frame/data_view_info/app.py index 9edce24dc..0d1a08d3c 100644 --- a/tests/playwright/shiny/components/data_frame/data_view_info/app.py +++ b/tests/playwright/shiny/components/data_frame/data_view_info/app.py @@ -5,7 +5,7 @@ # pyright: reportArgumentType = false # pyright: reportUnknownMemberType = false import polars as pl -from narwhals.typing import IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrame from palmerpenguins import load_penguins_raw from shiny import App, Inputs, Outputs, Session, module, render, ui diff --git a/tests/playwright/shiny/components/data_frame/df_methods/app.py b/tests/playwright/shiny/components/data_frame/df_methods/app.py index 3819d0664..fb55d944f 100644 --- a/tests/playwright/shiny/components/data_frame/df_methods/app.py +++ b/tests/playwright/shiny/components/data_frame/df_methods/app.py @@ -1,7 +1,7 @@ import pandas as pd import polars as pl import seaborn as sns -from narwhals.typing import IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrame from shiny import App, Inputs, Outputs, Session, module, reactive, render, ui diff --git a/tests/playwright/shiny/components/data_frame/row_selection/app.py b/tests/playwright/shiny/components/data_frame/row_selection/app.py index 1d809fd58..b4c9fe7d5 100644 --- a/tests/playwright/shiny/components/data_frame/row_selection/app.py +++ b/tests/playwright/shiny/components/data_frame/row_selection/app.py @@ -2,7 +2,7 @@ import palmerpenguins # pyright: ignore[reportMissingTypeStubs] import polars as pl -from narwhals.typing import IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrame from shiny import App, Inputs, Outputs, Session, module, reactive, render, ui diff --git a/tests/playwright/shiny/components/data_frame/styles/app.py b/tests/playwright/shiny/components/data_frame/styles/app.py index cb2de7e29..ebfa90329 100644 --- a/tests/playwright/shiny/components/data_frame/styles/app.py +++ b/tests/playwright/shiny/components/data_frame/styles/app.py @@ -5,7 +5,7 @@ # pyright: reportMissingTypeStubs = false import palmerpenguins import polars as pl -from narwhals.typing import IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrame from shiny import App, Inputs, Outputs, Session, module, render, ui diff --git a/tests/playwright/shiny/components/data_frame/validate_column_labels/app.py b/tests/playwright/shiny/components/data_frame/validate_column_labels/app.py index 2ee08a111..99c321ee1 100644 --- a/tests/playwright/shiny/components/data_frame/validate_column_labels/app.py +++ b/tests/playwright/shiny/components/data_frame/validate_column_labels/app.py @@ -4,7 +4,7 @@ import palmerpenguins # pyright: ignore[reportMissingTypeStubs] import polars as pl -from narwhals.typing import IntoDataFrame +from narwhals.stable.v1.typing import IntoDataFrame from shiny import Inputs, Outputs, Session from shiny.express import module, render, ui diff --git a/tests/pytest/test_render_data_frame_tbl_data.py b/tests/pytest/test_render_data_frame_tbl_data.py index 0bb3676eb..6b5b777fc 100644 --- a/tests/pytest/test_render_data_frame_tbl_data.py +++ b/tests/pytest/test_render_data_frame_tbl_data.py @@ -341,7 +341,7 @@ def test_subset_frame_cols_single(small_df_f: IntoDataFrame): def test_dtype_coverage(): from pathlib import Path - from narwhals import dtypes as nw_dtypes + from narwhals.stable.v1 import dtypes as nw_dtypes # Copy from https://github.com/narwhals-dev/narwhals/blob/2c9e2e7a308ebb30c6f672e27c1da2086ebbecbc/utils/check_api_reference.py#L144-L146 dtype_names = [