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

Make CollectionError pickleable #401

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

amyreese
Copy link
Member

@amyreese amyreese commented Oct 24, 2023

Stack from ghstack (oldest at bottom):

CollectionError could not be unpickled because the default
Exception.__reduce__ implementation does not include any
attributes/values that weren't passed to the superclass constructor,
resulting in a failure when unpickling the exception in the parent
class because the rule argument wasn't given.

This updates the class to add a custom __reduce__ that fixes the
ability to pickle/unpickle the class correctly, fixing the primary
issue with exceptions during linting resulting in broken process
pools.

Fix #381

CollectionError could not be unpickled because the default
`Exception.__reduce__` implementation does not include any
attributes/values that weren't passed to the superclass constructor,
resulting in a failure when unpickling the exception in the parent
class because the `rule` argument wasn't given.

This updates the class to add a custom `__reduce__` that fixes the
ability to pickle/unpickle the class correctly, fixing the primary
issue with exceptions during linting resulting in broken process
pools.

Fix #381

[ghstack-poisoned]
@amyreese amyreese requested a review from zsol as a code owner October 24, 2023 19:57
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2023
amyreese added a commit that referenced this pull request Oct 24, 2023
CollectionError could not be unpickled because the default
`Exception.__reduce__` implementation does not include any
attributes/values that weren't passed to the superclass constructor,
resulting in a failure when unpickling the exception in the parent
class because the `rule` argument wasn't given.

This updates the class to add a custom `__reduce__` that fixes the
ability to pickle/unpickle the class correctly, fixing the primary
issue with exceptions during linting resulting in broken process
pools.

Fix #381

ghstack-source-id: d8bd29c52d8320ee33a7f43937df6dc4e883d90d
Pull Request resolved: #401
@amyreese amyreese merged commit 8e9873b into gh/amyreese/2/base Oct 24, 2023
13 checks passed
amyreese added a commit that referenced this pull request Oct 24, 2023
CollectionError could not be unpickled because the default
`Exception.__reduce__` implementation does not include any
attributes/values that weren't passed to the superclass constructor,
resulting in a failure when unpickling the exception in the parent
class because the `rule` argument wasn't given.

This updates the class to add a custom `__reduce__` that fixes the
ability to pickle/unpickle the class correctly, fixing the primary
issue with exceptions during linting resulting in broken process
pools.

Fix #381

ghstack-source-id: d8bd29c52d8320ee33a7f43937df6dc4e883d90d
Pull Request resolved: #401
@amyreese amyreese deleted the gh/amyreese/2/head branch October 24, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants