Skip to content

Conversation

@harshil21
Copy link
Member

Closes #4111.

Implementing tests for this was hard! Since our library's code will keep changing, we could not rely on the previous method of pickling a file from an older version and unpickling in our current version. We need to specfically test when we are in a deprecation phase like now. So I came up with using exec() statements to fool Python into thinking the class is changing.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks & kudos for the PR! The number of changed lines is not that big but I can imagine that it took quite some headache to get it done 😬
Just smaller comments

@Bibo-Joshi Bibo-Joshi requested a review from Poolitzer February 26, 2024 16:48
@Bibo-Joshi Bibo-Joshi merged commit bd9b0bd into master Mar 3, 2024
@Bibo-Joshi Bibo-Joshi deleted the pickle-backward-compat branch March 3, 2024 18:22
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2024
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 enhancement pr description: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Improve Backward Compatibility for pickling

3 participants