Skip to content
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

Add BaseOffset as a final proxy type to pass instancechecks for offsets against BaseOffset #14678

Merged
merged 8 commits into from
Jan 19, 2024

Conversation

shwina
Copy link
Contributor

@shwina shwina commented Dec 28, 2023

Addresses part of #14674.

This PR makes cudf.pandas aware of the BaseOffset type. Because of the way isinstance() checks work on proxy types*, we will now pass instance checks like:

freq = "D"
assert isinstance(pd.tseries.frequencies.to_offset(freq), pd.tseries.offsets.BaseOffset)

*proxy types appear to be related to each other in the same way as their corresponding slow types. So if A inherits from B, then ProxyA appears to inherit from ProxyB even though they are not actually related by inheritance.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Dec 28, 2023
@shwina shwina added bug Something isn't working non-breaking Non-breaking change labels Dec 28, 2023
@shwina shwina marked this pull request as ready for review December 29, 2023 12:37
@shwina shwina requested a review from a team as a code owner December 29, 2023 12:37
@vyasr
Copy link
Contributor

vyasr commented Jan 12, 2024

/merge

@vyasr
Copy link
Contributor

vyasr commented Jan 19, 2024

/merge

@rapids-bot rapids-bot bot merged commit bfbaf3f into rapidsai:branch-24.02 Jan 19, 2024
66 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants