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.
Stack from ghstack (oldest at bottom):
400
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 therule
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