Skip to content

BUG/WARN: Passing EA object to dtype instead of an instance #54721

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

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Aug 23, 2023

Instantiating an empty instance is an imperfect solution since the EADtype could require positional arguments, so raises a UserWarning to encourage users to pass instances instead

@mroeschke mroeschke added ExtensionArray Extending pandas with custom dtypes or arrays. Warnings Warnings that appear or should be added to pandas labels Aug 23, 2023
@mroeschke mroeschke added this to the 2.1 milestone Aug 23, 2023
Copy link
Member

@lithomas1 lithomas1 left a comment

Choose a reason for hiding this comment

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

LGTM. Is the end-goal to deprecate this in the future?

@mroeschke
Copy link
Member Author

LGTM. Is the end-goal to deprecate this in the future?

I don't think there has been formal discussion to deprecate, but I would +1 for deprecating in the future.

@mroeschke mroeschke merged commit a180f0f into pandas-dev:main Aug 24, 2023
@mroeschke mroeschke deleted the bug/noninstance_dtype branch August 24, 2023 16:13
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 24, 2023
mroeschke added a commit that referenced this pull request Aug 24, 2023
…ype instead of an instance) (#54726)

Backport PR #54721: BUG/WARN: Passing EA object to dtype instead of an instance

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Warnings Warnings that appear or should be added to pandas
Projects
None yet
2 participants