Update pandas version upper bound to support python 3.14#39056
Conversation
|
r: @tvalentyn |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the project's pandas dependency to support Python 3.14, addressing critical segmentation faults encountered during testing. It includes necessary adjustments to handle behavioral changes in pandas 2.3.0+ regarding how null values are represented in dummy columns, ensuring the codebase remains compatible with both older and newer versions of the library. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
There was a problem hiding this comment.
Code Review
This pull request updates the pandas dependency constraint to support versions up to <2.4, adjusts test skip conditions to use a full version check, and dynamically detects the NaN column name used by pandas in get_dummies(). The feedback suggests replacing the dynamic pandas operation with a static version check to avoid runtime overhead and potential IndexError.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Bump pandas version to 2.3.x to fix segfault on dataframe tests that run on python 3.14.
Stacktrace of segfault from failed tests: https://github.com/apache/beam/actions/runs/27927544557/job/82678205191
This failure occurs when running the tests with pandas 2.2.3, whereas pandas 2.3.3 is the first version to introduce support for Python 3.14 (https://github.com/pandas-dev/pandas/releases/tag/v2.3.3).
Also see #38691 (comment)
Notice that a few tests failed (https://github.com/apache/beam/actions/runs/27951859585/job/82710533408?pr=39056) due to a change in pandas 2.3.0+, where null/missing values returned
by
Series.str.get_dummies()are changed from'nan'to'NaN'.In this PR, we also applied a fix in the code so the tests pass on pandas before and after 2.3.0.
Also related to #31238.