python-attrs / cattrs

Composable custom class converters for attrs, dataclasses and friends.
https://catt.rs
MIT License
799 stars 111 forks source link

transform_error's format_exception parameter is not passed down recursively #389

Closed oc-ben-ellis closed 1 year ago

oc-ben-ellis commented 1 year ago

Description

I'd expect when I call,

transform_error(ex, format_exception=my_format_exception_handler)

I would expect my_format_exception_handler callable to be called and the return value applied to to all exceptions.

However, as it recursively calls itself without passing on the format_exception parameter, it uses the default format_exception callable instead of the one I passed in.

Tinche commented 1 year ago

Eep, you're right.

BEllis commented 1 year ago

Eep, you're right.

@Tinche happy for this to be closed unless you normally wait for the release?

Tinche commented 1 year ago

Yeah we can close, I'll release in the next couple of weeks. Thanks!