Skip to content

BUG: Fix Segfault with pd.tslib.get_period_field (GH4519, GH4520) #4562

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 15, 2013

Conversation

prossahl
Copy link
Contributor

Fixes the following problem (issues #4519, #4520):

>>> import pandas as pd
>>> pd.tslib.get_period_field(11, 1, 1)
Exception ValueError: ValueError('Unrecognized code: 11',) in 'pandas.tslib._get_accessor_func' ignored
Segmentation fault

@@ -116,6 +116,8 @@ pandas 0.13

- ``HDFStore``

- ``tslib.get_period_field()`` and ``tslib.get_period_field_arr()`` now raise
if code argument out of range (:issue:`4519`, :issue:`4520`)
Copy link
Contributor

Choose a reason for hiding this comment

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

pls move this to the end of the Bugs section (as the last entry)

@prossahl
Copy link
Contributor Author

Indeed, that would work but it seems to be simpler and cheaper to check f against NULL rather than using Cython's exception specification machinery.

@jreback
Copy link
Contributor

jreback commented Aug 15, 2013

its fine...just pointing out another way...pls rebase and squash commits into 1 and i'll merge you in

@prossahl
Copy link
Contributor Author

Done! Thanks.

jreback added a commit that referenced this pull request Aug 15, 2013
BUG: Fix Segfault with pd.tslib.get_period_field (GH4519, GH4520)
@jreback jreback merged commit e52ff84 into pandas-dev:master Aug 15, 2013
@jreback
Copy link
Contributor

jreback commented Aug 15, 2013

@prossahl thank you!

@prossahl prossahl deleted the AHLRAP-3065-01 branch August 15, 2013 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants