Skip to content

[SPARK-55108][PYTHON] Use the latest pandas-stubs for type check#53877

Closed
gaogaotiantian wants to merge 3 commits intoapache:masterfrom
gaogaotiantian:upgrade-pandas-stubs
Closed

[SPARK-55108][PYTHON] Use the latest pandas-stubs for type check#53877
gaogaotiantian wants to merge 3 commits intoapache:masterfrom
gaogaotiantian:upgrade-pandas-stubs

Conversation

@gaogaotiantian
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Upgrade pandas-stubs version (basically do not pin it anymore) and fix all the mypy errors.

Why are the changes needed?

pandas-stubs sync with pandas - in theory we should use the same version for both. The stubs for numpy is smarter that it actually depends on a specific version. pandas-stubs does not do that. However, we should definitely not pin it on a 1.x version.

Some of the ignore comments might because we have a low mypy version (we have to do one at a time). I did not really "fix" all typing issues - I explicitly ignored a lot of them. Some of the errors are because our type hint is wrong or inaccurate.

One step at a time. I think we are moving to the right direction.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Let's check CI.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions
Copy link
Copy Markdown

JIRA Issue Information

=== Improvement SPARK-55108 ===
Summary: Upgrade to the latest pandas-stubs
Assignee: None
Status: Open
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

@zhengruifeng
Copy link
Copy Markdown
Contributor

thanks, merged to master

@gaogaotiantian gaogaotiantian deleted the upgrade-pandas-stubs branch January 21, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants