Skip to content

BUG: PeriodDtype constructor allowing invalid construction, incorrect exception class #51790

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 2 commits into from
Mar 6, 2023

Conversation

jbrockmendel
Copy link
Member

"""
if isinstance(freq, PeriodDtype):
return freq

elif freq is None:
# empty constructor for pickle compat
Copy link
Member

Choose a reason for hiding this comment

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

Do you know if this comment is still relevant?

Copy link
Member Author

Choose a reason for hiding this comment

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

my assumption is that since it isn't in the test suite it should be OK

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this may break pre-0.19 pickle compat but that's fine IMO 6fa2b03

@mroeschke mroeschke added the Period Period data type label Mar 6, 2023
@mroeschke mroeschke added this to the 2.1 milestone Mar 6, 2023
@mroeschke mroeschke merged commit 842664f into pandas-dev:main Mar 6, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bug-27388 branch March 6, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PeriodDType should require freq argument
3 participants