Skip to content

Add tests for unpickling legacy datetime.datetime-indexed / DateRange objects #794

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

Closed
wesm opened this issue Feb 16, 2012 · 3 comments
Closed
Labels
Datetime Datetime data dtype Testing pandas testing functions or related to the test suite
Milestone

Comments

@wesm
Copy link
Member

wesm commented Feb 16, 2012

No description provided.

@adamklein
Copy link
Contributor

@wesm, i have a legacy daterange unpickling to a datetimeindex, looks something like this:

        # extract the raw datetime data, turn into datetime64
        index_state = state[0]
        raw_data = index_state[0][4]
        raw_data = np.array(raw_data, dtype='M8[us]')
        new_state = raw_data.__reduce__()
        np.ndarray.__setstate__(self, new_state[2])

No matter what I try to do, at the end of the test suite I get a

*** Reference count error detected:
an attempt was made to deallocate 17 (O) ***

Any ideas?

@adamklein
Copy link
Contributor

Nm, warning disappeared. No idea. Working!

@wesm
Copy link
Member Author

wesm commented Apr 5, 2012

Added a bunch of integration tests and kicked on this a bit. seems ok now

@wesm wesm closed this as completed Apr 5, 2012
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
Add a config option to skip bson encoding in pickle store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants