diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e575e51d..f9f75be9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ * Remove overambitious assertions in the HTTP state machine, fix some error handling. ([#5383](https://github.com/mitmproxy/mitmproxy/issues/5383), @mhils) +* Use default_factory for parser_options. + ([#5474](https://github.com/mitmproxy/mitmproxy/issues/5474), @rathann) ## 15 May 2022: mitmproxy 8.1.0 diff --git a/mitmproxy/contentviews/grpc.py b/mitmproxy/contentviews/grpc.py index a5ef99708..5c73220c8 100644 --- a/mitmproxy/contentviews/grpc.py +++ b/mitmproxy/contentviews/grpc.py @@ -951,7 +951,7 @@ def format_grpc( @dataclass class ViewConfig: - parser_options: ProtoParser.ParserOptions = ProtoParser.ParserOptions() + parser_options: ProtoParser.ParserOptions = field(default_factory=ProtoParser.ParserOptions) parser_rules: list[ProtoParser.ParserRule] = field(default_factory=list)