Skip to content

Comments

Remove upper restriction to pandas#388

Open
Natim wants to merge 1 commit intogoogleapis:mainfrom
Natim:patch-1
Open

Remove upper restriction to pandas#388
Natim wants to merge 1 commit intogoogleapis:mainfrom
Natim:patch-1

Conversation

@Natim
Copy link

@Natim Natim commented Feb 9, 2026

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #387 🦕

@Natim Natim requested a review from a team as a code owner February 9, 2026 15:00
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. labels Feb 9, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Natim, 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 dependency configuration to remove the upper version limit for the pandas library. This modification ensures that the project can integrate with pandas versions 3.0.0 and newer, addressing potential compatibility issues and allowing the use of the latest features and improvements from the pandas ecosystem.

Highlights

  • Dependency Management: The upper version restriction for the pandas library has been removed from the noxfile.py configuration, allowing for compatibility with pandas versions 3.0.0 and above during prerelease testing.
  • Project Dependencies: The setup.py file has been updated to remove the upper version constraint on pandas, changing it from < 3.0.0 to no upper limit, thus enabling the project to work with future pandas releases.
Changelog
  • noxfile.py
    • Removed the upper version constraint pandas<3.0.0rc0 from the prerelease session's installation command, now simply installing pandas.
  • setup.py
    • Updated the install_requires list to remove the upper version constraint ,< 3.0.0 for pandas, allowing pandas >= 1.5.3.
Activity
  • No human activity (comments, reviews, or progress updates) has been recorded on this pull request since its creation.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the upper version constraint on the pandas dependency to allow compatibility with pandas 3.0 and later. The change in noxfile.py correctly updates the pre-release testing session to use the latest pandas pre-release, which is a good step for ensuring forward compatibility.

My review includes one suggestion for setup.py. While removing the < 3.0.0 restriction is correct, I recommend adding a new upper bound of < 4.0.0. This is a common best practice that provides stability for users by ensuring compatibility with the pandas 3.x series while preventing unexpected breakages from a future, untested pandas 4.0 major release.

"numpy >= 1.24.0 ; python_version != '3.10'",
"packaging >= 24.2.0",
"pandas >= 1.5.3, < 3.0.0",
"pandas >= 1.5.3",

Choose a reason for hiding this comment

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

medium

While this change enables support for pandas 3.0, removing the upper version bound entirely can introduce risk for users. Since db-dtypes is tightly coupled with pandas internals, future major versions of pandas (e.g., 4.0) are likely to have breaking changes that would affect this library.

To provide more stability for users, it's a common best practice to cap the dependency at the next major version. This would allow all pandas 3.x versions but prevent an automatic upgrade to an untested pandas 4.0. It ensures users don't get a broken environment unexpectedly.

Suggested change
"pandas >= 1.5.3",
"pandas >= 1.5.3, < 4.0.0",

Copy link
Author

@Natim Natim Feb 9, 2026

Choose a reason for hiding this comment

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

We can wait for it to fail to limit it. Since it already covers pandas v1 and v2 there is no need to be so protective at this library level.

IMO, It is the project's responsibility to decide whether they want to upgrade or not. In this case going from v1.4.4 to v1.5.0, rollback to a previous version of pandas in our project while 3.0.0 is already supported.

@Natim
Copy link
Author

Natim commented Feb 9, 2026

In the meantime I was able to tell my project to override the restriction using:

[tool.uv]
override-dependencies = ["pandas>=3.0.0"]

But as you will guess, I would rather not...

@Natim
Copy link
Author

Natim commented Feb 9, 2026

Alternatively we can also describe it like that:

[tool.uv]
dependency-metadata = [
  { name = "db-dtypes", requires-dist = [
      'numpy>=1.24.0',
      "packaging>=24.2.0",
      "pandas>=1.5.3",
      "pyarrow>=13.0.0",
  ] }
]

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

Labels

api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we remove the restriction to pandas<3.0.0?

2 participants