Skip to content

DOC: Document that read_hdf can use pickle #35554

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 3 commits into from
Aug 6, 2020

Conversation

TomAugspurger
Copy link
Contributor

This documents that read_hdf, which uses PyTables, might invoke pickle to deserialize arrays that were serialize with pickle.

PyTables clearly documents this at http://www.pytables.org/usersguide/libref/declarative_classes.html#tables.ObjectAtom, but pandas users may not realize that if they aren't aware that pandas uses pytables under the hood.

I've tried to include the warning in all the methods that eventually read data, but it's a bit hard to say if I've gotten them all.

Ideally we would also like to provide an allow_pickle=False keyword, but that would be best implemented in PyTables, and used by us. I opened PyTables/PyTables#813 for discussion.

There is a indexing bug in ``PyTables`` < 3.2 which may appear when querying stores using an index.
If you see a subset of results being returned, upgrade to ``PyTables`` >= 3.2.
Stores created previously will need to be rewritten using the updated version.
Pandas uses PyTables for reading and writing HDF5 files, which allows
Copy link
Contributor

Choose a reason for hiding this comment

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

note that this only applies to fixed stores; tables do not use pickle

@WillAyd
Copy link
Member

WillAyd commented Aug 4, 2020

lgtm ex Jeff's comments

@TomAugspurger TomAugspurger added this to the 1.1.1 milestone Aug 6, 2020
@TomAugspurger
Copy link
Contributor Author

FYI, I tagged this for 1.1.1. Wouldn't normally backport doc-only changes but this is tangentially security related so I think it's better to backport.

@jreback jreback merged commit c4691d6 into pandas-dev:master Aug 6, 2020
@jreback
Copy link
Contributor

jreback commented Aug 6, 2020

thanks @TomAugspurger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants