-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REGR: unpickling in 1.3.0 DataFrame created in 1.2.x #42345 #42394
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
Conversation
jbrockmendel
commented
Jul 6, 2021
- closes BUG: regression for 1.3.0: saving a dataframe with the "pickle" package using pandas 1.2.5 would not open with "pickle" again with pandas 1.3.0 #42345
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
with open(path, "rb") as fd: | ||
df = pickle.load(fd) | ||
|
||
expected = pd.DataFrame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can i add another case with columns and index (respectively) as well (but no rows)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is highly focused, let's hold off on adding to this test and do a dedicated pass using the generate_legacy_storage_files pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh ok, yeah i think that would be a great idea.
doc/source/whatsnew/v1.3.1.rst
Outdated
@@ -15,6 +15,7 @@ including other versions of pandas. | |||
Fixed regressions | |||
~~~~~~~~~~~~~~~~~ | |||
- Pandas could not be built on PyPy (:issue:`42355`) | |||
- :class:`DataFrame` constructed in with an older version of pandas could not be unpickled (:issue:`42345`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- :class:`DataFrame` constructed in with an older version of pandas could not be unpickled (:issue:`42345`) | |
- :class:`DataFrame` constructed with an older version of pandas could not be unpickled (:issue:`42345`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, will update
def test_pickle_frame_v124_unpickle_130(): | ||
# GH#42345 DataFrame created in 1.2.x, unpickle in 1.3.x | ||
path = os.path.join(legacy_dirname, "1.2.4", "empty_frame_v1_2_4-GH#42345.pkl") | ||
with open(path, "rb") as fd: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also do thsi with pd.read_pickle
(I think it works w/o your change prob)
@jbrockmendel ok i think then let's merge this and then backport the full testing of the 1.2.x pickles in 1.3? |
|
@meeseeksdev backport 1.3.x |
Something went wrong ... Please have a look at my logs. |