-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-47151][PYTHON][PS][BUILD] Upgrade to pandas 2.2.1
#45236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue predates this PR, but I note that this version requirement is more strict than our dev requirement:
spark/dev/requirements.txt
Line 8 in e46d7d1
One consequence of this is that trying to build the Python API docs locally can fail as follows:
We should perhaps align the dev requirement with this Pandas version requirement here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. there was some discussion on this in
https://github.com/apache/spark/pull/44881/files/9ae857a1b9c47dc12153cbf868e79ca2d0299a1d#diff-95a965e9b4d0ca83ab61f7af36659422910868431d05d68dc21dc8284e1c4b13
but why do you get 2.1.4? are there something else that downgrade it from 2.2.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are multiple ways to get an older version. Since the requirement only asks for
pandas>=1.4.4, then setting up the virtual environment months ago will install a version that remains valid even if you rerunpip install -r ...today. Another way is, yes, if a different requirement specifically prevents 2.2.1 from being installed.The way we manage Python dependencies leaves a lot to be desired. I tried to fix it in the past (e.g. #27928) but failed to get enough committer support. I am inclined to try again, because I see a constant stream of commits just trying to keep the Python build working, and I think there should be a way to make this easier for everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but what about dev-container then?
Dev container have been open sourced some months ago Development Containers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with Development Containers, but yes, there are probably many ways we can improve the situation.
What I advocated in #27928, and what I still believe is the best option for us today (with some tweaks to my original proposal), is to adopt pip-tools. That's because it's a very conservative approach that builds on our existing use of pip, and lets us focus on the technology-agnostic problem of separating Spark's direct dependencies from our build environment dependencies.