GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(bigquery): allow python-dateutil 3.x and 4.x by Shriraj1901 · Pull Request #19020 · googleapis/google-cloud-python Conversationgoogle-cloud-bigquery only uses dateutil.relativedelta (for INTERVAL values), and the unit tests pass unchanged on python-dateutil 3.0.0 and 4.0.0, so the "< 3.0.0" cap just makes pip refuse to install it next to a newer dateutil. Raise the cap to "< 5.0.0". 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:
Fixes #<issue_number_goes_here> 🦕
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
google-cloud-bigquery only uses dateutil.relativedelta (for INTERVAL values), and the unit tests pass unchanged on python-dateutil 3.0.0 and 4.0.0, so the "< 3.0.0" cap just makes pip refuse to install it next to a newer dateutil. Raise the cap to "< 5.0.0". Fixes googleapis#18806 Fixes googleapis#18948
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code ReviewThis pull request updates the dependency requirements in pyproject.toml for google-cloud-bigquery by increasing the upper bound of python-dateutil from < 3.0.0 to < 5.0.0. There are no review comments to address, and I have no additional feedback to provide.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Su-001
reviewed
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change fixes the install error, but it causes a new problem on Python 3.10. On Python 3.10, installing import pandas as pd pd.Timestamp("2024-07-01 12:00", tz="dateutil/America/New_York") # AttributeError: 'NoneType' object has no attribute 'total_seconds' The same code works with python-dateutil 2.9.0.post0, which is what users get today. The reason seems to be that dateutil 3.0 changed how its timezone class works, and pandas only handles this from version 3.1.1. With dateutil 4.0.0, I tried pandas 1.5.3, 2.0.3, 2.2.3, 2.3.3, 3.0.0, 3.0.1, 3.0.2 and 3.1.0, and all of them crash. pandas 3.1.1 works, but it isn't available on Python 3.10. BigQuery's own code only uses Suggested fix: keep the old limit on Python 3.10 only.
Suggested change
I tested this. Python 3.10 installs dateutil 2.9.0.post0 and the crash is gone. dateutil 3.0.0 and 4.0.0 still install on Python 3.11 and later, so both linked issues are still fixed. If BigQuery is about to drop Python 3.10 (as #19015 did elsewhere in this repo), the 3.10 line won't be needed for long.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers2 more reviewersAt least 1 approving review is required to merge this pull request. Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. google-cloud-bigquery: support python-dateutil 4.x google-cloud-bigquery: python-dateutil <3.0.0 constraint blocks upgrade to 3.0.0Uh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |