Skip to content

[MINOR][PYTHON] Add scipy-stubs to dev/requirements.txt - #51366

Closed
jorenham wants to merge 1 commit into
apache:masterfrom
jorenham:scipy-stubs
Closed

[MINOR][PYTHON] Add scipy-stubs to dev/requirements.txt#51366
jorenham wants to merge 1 commit into
apache:masterfrom
jorenham:scipy-stubs

Conversation

@jorenham

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This adds scipy-stubs to the list of optional Python requirements.

Why are the changes needed?

For the same reason as pandas-stubs is already an optional requirement: To improve static typing support and IDE features (autocompletion, inline documentation, etc).

Does this PR introduce any user-facing change?

No.

How was this patch tested?

No need; there's no runtime impact :)

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

No.

Comment threaddev/requirements.txt
flake8==3.9.0
# See SPARK-38680.
pandas-stubs<1.2.0.54
scipy-stubs; python_version>='3.10'

@dongjoon-hyundongjoon-hyunJul 3, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making a PR, @jorenham .

May I ask why this is limited to Python 3.10+?

BTW, FYI, since Apache Spark 4.1.0 is going to drop Python 3.9, I believe we can remove this condition python_version>='3.10' later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask why this is limited to Python 3.10+?

at the earliest, scipy-stubs supports scipy 1.14, which requires python >=3.10, as per SPEC 0

@dongjoon-hyundongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

cc @peter-toth

@HyukjinKwonHyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's fine to add if it's required during the dev setup

@HyukjinKwon

Copy link
Copy Markdown
Member

Merged to master.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jorenham@HyukjinKwon@dongjoon-hyun