Skip to content

Commit e5bb8bf

Browse files
rad-patsadpandajoe
authored andcommitted
fix: Bump pandas to 2.1.4 for python 3.12 (#34999)
(cherry picked from commit db178cf)
1 parent 8306b66 commit e5bb8bf

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ dependencies = [
7373
"packaging",
7474
# --------------------------
7575
# pandas and related (wanting pandas[performance] without numba as it's 100+MB and not needed)
76-
"pandas[excel]>=2.0.3, <2.1",
76+
"pandas[excel]>=2.0.3, <2.2",
7777
"bottleneck", # recommended performance dependency for pandas, see https://pandas.pydata.org/docs/getting_started/install.html#performance-dependencies-recommended
7878
# --------------------------
7979
"parsedatetime",

requirements/base.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ greenlet==3.1.1
154154
# via
155155
# apache-superset (pyproject.toml)
156156
# shillelagh
157+
# sqlalchemy
157158
gunicorn==23.0.0
158159
# via apache-superset (pyproject.toml)
159160
h11==0.16.0
@@ -256,7 +257,7 @@ packaging==25.0
256257
# limits
257258
# marshmallow
258259
# shillelagh
259-
pandas==2.0.3
260+
pandas==2.1.4
260261
# via apache-superset (pyproject.toml)
261262
paramiko==3.5.1
262263
# via

requirements/development.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ greenlet==3.1.1
313313
# apache-superset
314314
# gevent
315315
# shillelagh
316+
# sqlalchemy
316317
grpcio==1.71.0
317318
# via
318319
# apache-superset
@@ -510,7 +511,7 @@ packaging==25.0
510511
# pytest
511512
# shillelagh
512513
# sqlalchemy-bigquery
513-
pandas==2.0.3
514+
pandas==2.1.4
514515
# via
515516
# -c requirements/base.txt
516517
# apache-superset

superset/commands/database/uploaders/excel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def file_to_dataframe(self, file: FileStorage) -> pd.DataFrame:
7272
"na_values": self._options.get("null_values")
7373
if self._options.get("null_values") # None if an empty list
7474
else None,
75-
"parse_dates": self._options.get("column_dates"),
75+
"parse_dates": self._options.get("column_dates") or False,
7676
"skiprows": self._options.get("skip_rows", 0),
7777
"sheet_name": self._options.get("sheet_name", 0),
7878
"nrows": self._options.get("rows_to_read"),

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def data_loader(
105105
pandas_loader_configuration: PandasLoaderConfigurations,
106106
table_to_df_convertor: TableToDfConvertor,
107107
) -> DataLoader:
108+
if example_db_engine.dialect.name == PRESTO:
109+
example_db_engine.dialect.get_view_names = Mock(return_value=[])
108110
return PandasDataLoader(
109111
example_db_engine, pandas_loader_configuration, table_to_df_convertor
110112
)

0 commit comments

Comments
 (0)