Skip to content

Commit 2f3c3b7

Browse files
authored
[seaborn] Unpin pandas-stubs (#15135)
1 parent fd7dfa0 commit 2f3c3b7

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

stubs/seaborn/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
version = "0.13.2"
22
# Requires a version of numpy and matplotlib with a `py.typed` file
3-
requires = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs<2.3.3.251201"]
3+
requires = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs"]
44
upstream_repository = "https://github.com/mwaskom/seaborn"

stubs/seaborn/seaborn/_core/data.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ from collections.abc import Mapping
33
from typing import TypeVar, overload
44

55
from pandas import DataFrame
6-
from pandas.core.interchange.dataframe_protocol import DataFrame as DataFrameProtocol
7-
from seaborn._core.typing import DataSource, VariableSpec
6+
from seaborn._core.typing import DataSource, SupportsDataFrame, VariableSpec
87

98
_T = TypeVar("_T", Mapping[Incomplete, Incomplete], None)
109

@@ -22,5 +21,5 @@ class PlotData:
2221
@overload
2322
def handle_data_source(data: _T) -> _T: ...
2423
@overload
25-
def handle_data_source(data: DataFrameProtocol) -> DataFrame: ...
24+
def handle_data_source(data: SupportsDataFrame) -> DataFrame: ...
2625
def convert_dataframe_to_pandas(data: object) -> DataFrame: ...

stubs/seaborn/seaborn/_core/typing.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ from pandas import DataFrame, Index, Series, Timedelta, Timestamp
1010

1111
@type_check_only
1212
class SupportsDataFrame(Protocol):
13-
# `__dataframe__` should return pandas.core.interchange.dataframe_protocol.DataFrame
14-
# but this class needs to be defined as a Protocol, not as an ABC.
1513
def __dataframe__(self, nan_as_null: bool = ..., allow_copy: bool = ...): ...
1614

1715
ColumnName: TypeAlias = str | bytes | date | datetime | timedelta | bool | complex | Timestamp | Timedelta

0 commit comments

Comments
 (0)