Bug in 1.2.0 - No matching overload found - probably regression
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
MWN:
```
import pandas as pd
df = pd.DataFrame()
rows: list[pd.DataFrame] = [pd.DataFrame()]
# Fails
pd.concat([df, *rows], axis="index", ignore_index=True)
# Passes
tmp: list[pd.DataFrame] = [df, *rows]
pd.concat(tmp, axis="index", ignore_index=True)
```
The version that now fails used to work in `1.1.1` but now fails with something like
```
ERROR No matching overload found for function `pandas.core.reshape.concat.concat` called with arguments: (list[DataFrame], axis=Literal['index'], ignore_index=Literal[True]) [no-matching-overload]
Possible overloads:
(objs: Iterable[None] | Mapping[HashableT1, None], *, axis: Axis = 0, ..., ignore_index: bool = False, ...) -> Never [closest match]
(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Axis = 0, ..., ignore_index: Literal[True], ...) -> Never
(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: AxisIndex = 0, ..., ignore_index: bool = False, ...) -> Series[S2]
(objs: Iterable[Series | None] | Mapping[HashableT1, Series | None], *, axis: AxisIndex = 0, ..., ignore_index: bool = False, ...) -> Series
(objs: Iterable[Series | None] | Mapping[HashableT1, Series | None], *, axis: AxisColumn, ..., ignore_index: bool = False, ...) -> DataFrame
(objs: Iterable[DataFrameT0 | None] | Mapping[HashableT1, DataFrameT0 | None], *, axis: Axis = 0, ..., ignore_index: bool = False, ...) -> DataFrameT0
(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Axis = 0, ..., ignore_index: Literal[False] = False, ...) -> DataFrame
Argument `list[DataFrame]` is not assignable to parameter `objs` with type `Iterable[None] | Mapping[@_, None]` in function `pandas.core.reshape.concat.concat`
```
Sandbox fails with
```
ERROR sandbox.py:1:8-20: Stubs for `pandas` are bundled with Pyrefly but the source files for the package are not found. [[missing-source-for-stubs](https://pyrefly.org/en/docs/error-kinds/#missing-source-for-stubs)]
```
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Research direction
Start with the minimal reproducer and the pandas.concat overload-resolution entry point; compare the starred-list call with the temporary-list case and the reported 1.1.1 behavior. Done means the starred-list call type-checks consistently, while the sandbox.py result is understood separately from the overload error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100