Skip to content
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

REGR: unpickling in 1.3.0 DataFrame created in 1.2.x #42345 #42394

Merged
merged 4 commits into from Jul 6, 2021

Conversation

jbrockmendel
Copy link
Member

with open(path, "rb") as fd:
df = pickle.load(fd)

expected = pd.DataFrame()
Copy link
Contributor

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)

Copy link
Member Author

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

Copy link
Contributor

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.

@@ -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`)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- :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`)

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, will update

@jreback jreback added this to the 1.3.1 milestone Jul 6, 2021
@jreback jreback added IO Data IO issues that don't fit into a more specific label Regression Functionality that used to work in a prior pandas version labels Jul 6, 2021
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:
Copy link
Contributor

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)

@jreback
Copy link
Contributor

jreback commented Jul 6, 2021

@jbrockmendel ok i think then let's merge this and then backport the full testing of the 1.2.x pickles in 1.3?

@jbrockmendel
Copy link
Member Author

yah

@jreback
Copy link
Contributor

jreback commented Jul 6, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jul 6, 2021

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Jul 6, 2021
…2.x #42345 (#42416)

Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
@jbrockmendel jbrockmendel deleted the regr-pickle branch November 20, 2021 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label Regression Functionality that used to work in a prior pandas version
Projects
None yet
3 participants