Skip to content

pandas-stubs 2.3.2.250827 crashing MyPy 1.17.1 on Windows 11 #1351

@Owen-OptiGrid

Description

@Owen-OptiGrid

Describe the bug

pandas-stubs 2.3.2.250827 crashing MyPy 1.17.1 on Windows 11. No issue with pandas-stubs 2.3.0.250703

To Reproduce
Sorry unsure of a minimal example, on a larger code base using:

  • pandas 2.3.2
  • pandas 0.25.0

and this mypy config:

[mypy]
plugins = pandera.mypy, pydantic.mypy
files = src, tests
ignore_missing_imports = False
follow_imports = silent
check_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_calls = True
disallow_untyped_defs = True
no_implicit_reexport = True
warn_redundant_casts = True
warn_return_any = True
warn_unused_configs = True
warn_unused_ignores = True

[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True

I would get MyPy crashes on pd.concat lines with generator expressions of dataframes, code like:

big_df = pd.concat(
   (df_fetcher(idx) for idx in range(10)), axis=1
)

which would give an error with the pd.concat line number of the form:

error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1

Please complete the following information:

  • OS: Windows
  • OS Version [e.g. 22]
  • python version 3.13.7
  • version of type checker mypy 1.17.1
  • version of installed pandas-stubs =2.3.2.250827

Additional context
As mentioned at the beginning this appears to be a recent regression, keeping all other dependencies and tooling the same when using pandas-stubs 2.3.0.250703 everything runs fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions