You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a DefectsField field type for collecting errors raised during parsing and decoding
By default, errors are stored as a dict that maps header field names to lists of exceptions
What should happen for scanner and body errors?
Idea: Don't catch scanner errors … for now
Idea: Store them in the dict with the key set to a SCANNING or BODY enum or token
Idea: Wrap all decoder errors in custom DecoderError instances
Subclasses:
FieldDecoderError(post-alias-name, value, error)
ExtraFieldsDecoderError(value, error)
BodyDecoderError(value, error)
Non-extra fields can now take a required: bool parameter so that lack of a required field can be caught & registered as a defect
Errors are stored after calling .with_traceback(None) on them and their chain of causes (__cause__) & contexts (__context__) in order to reduce memory use
Should defects mode be toggleable by an option when parse*() is called?
Activity