Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: mitmpr...@packages.debian.org
Control: affects -1 + mitmproxy

Dear Release Team,

Could you unblock package mitmproxy/8.1.1-2, in this version it applies an
upstream patch to fix Python 3.11 compatibility, otherwise the package would
fail to start, although the original bug report (#1031787) wasn't marked RC.

Regards,
Aron
diff -Nru mitmproxy-8.1.1/debian/changelog mitmproxy-8.1.1/debian/changelog
--- mitmproxy-8.1.1/debian/changelog    2023-02-06 00:00:42.000000000 +0800
+++ mitmproxy-8.1.1/debian/changelog    2023-03-03 01:21:00.000000000 +0800
@@ -1,3 +1,10 @@
+mitmproxy (8.1.1-2) unstable; urgency=medium
+
+  * Team upload.
+  * Add upstream patch to fix Python 3.11 compatibility (Closes: #1031787)
+
+ -- Aron Xu <a...@debian.org>  Fri, 03 Mar 2023 01:21:00 +0800
+
 mitmproxy (8.1.1-1) unstable; urgency=high
 
   * Team upload
diff -Nru 
mitmproxy-8.1.1/debian/patches/0007-use-default_factory-for-parser_options-field-5476.patch
 
mitmproxy-8.1.1/debian/patches/0007-use-default_factory-for-parser_options-field-5476.patch
--- 
mitmproxy-8.1.1/debian/patches/0007-use-default_factory-for-parser_options-field-5476.patch
 1970-01-01 08:00:00.000000000 +0800
+++ 
mitmproxy-8.1.1/debian/patches/0007-use-default_factory-for-parser_options-field-5476.patch
 2023-03-03 01:20:48.000000000 +0800
@@ -0,0 +1,34 @@
+From 55a64b7ad993fd52fbff19f33e3c6e153b3e8d9b Mon Sep 17 00:00:00 2001
+From: rathann <domi...@greysector.net>
+Date: Sat, 23 Jul 2022 10:15:03 +0200
+Subject: [PATCH] use default_factory for parser_options field (#5476)
+
+* use default_factory for field parser_options
+
+When running mitmproxy under python 3.11, the following exception
+is thrown otherwise:
+```
+ValueError: mutable default <class 
'mitmproxy.contentviews.grpc.ProtoParser.ParserOptions'> for field 
parser_options is not allowed: use default_factory
+```
+
+Fixes #5474.
+---
+ mitmproxy/contentviews/grpc.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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)
+ 
+ 
+-- 
+2.30.2
+
diff -Nru mitmproxy-8.1.1/debian/patches/series 
mitmproxy-8.1.1/debian/patches/series
--- mitmproxy-8.1.1/debian/patches/series       2023-02-06 00:00:42.000000000 
+0800
+++ mitmproxy-8.1.1/debian/patches/series       2023-03-03 01:19:49.000000000 
+0800
@@ -3,3 +3,4 @@
 0004-Remove-test_cibuild.py.patch
 0005-Remove-test_readfile.py.patch
 0006-Delete-asciinema-for-which-we-only-have-minified-ver.patch
+0007-use-default_factory-for-parser_options-field-5476.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to