There's a closed pull request on the void-packages repository mitmproxy: fix for python 3.11 https://github.com/void-linux/void-packages/pull/41348 Description: #### Testing the changes - I tested the changes in this PR: **briefly** Without this patch, mitmproxy doesn't even start. I also disabled two tests that are broken with python 3.11. Upgrading to 9.0.1 needs https://github.com/decathorpe/mitmproxy_wireguard which is a python module written in rust.