FS#62791 - [mitmproxy] Incompatible with python-tornado 6.x

Attached to Project: Community Packages
Opened by Chih-Hsuan Yen (yan12125) - Saturday, 01 June 2019, 08:02 GMT
Last edited by Filipe Laíns (FFY00) - Thursday, 17 October 2019, 09:28 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Filipe Laíns (FFY00)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 12
Private No

Details

Description:

mitmproxy does not run on up-to-date systems.

$ mitmproxy
Traceback (most recent call last):
File "/usr/bin/mitmproxy", line 11, in <module>
load_entry_point('mitmproxy==4.0.4', 'console_scripts', 'mitmproxy')()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
return self.resolve()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.7/site-packages/mitmproxy/tools/main.py", line 22, in <module>
from ._main import * # noqa
File "/usr/lib/python3.7/site-packages/mitmproxy/tools/_main.py", line 13, in <module>
from mitmproxy.tools import cmdline # noqa
File "/usr/lib/python3.7/site-packages/mitmproxy/tools/cmdline.py", line 3, in <module>
from mitmproxy.addons import core
File "/usr/lib/python3.7/site-packages/mitmproxy/addons/__init__.py", line 11, in <module>
from mitmproxy.addons import onboarding
File "/usr/lib/python3.7/site-packages/mitmproxy/addons/onboarding.py", line 2, in <module>
from mitmproxy.addons.onboardingapp import app
File "/usr/lib/python3.7/site-packages/mitmproxy/addons/onboardingapp/app.py", line 13, in <module>
class Adapter(tornado.wsgi.WSGIAdapter):
AttributeError: module 'tornado.wsgi' has no attribute 'WSGIAdapter'

Additional info:
community/mitmproxy 4.0.4-3
community/python-tornado 6.0.2-1

FWIW, at MacPorts, the onboardingapp addon is disabled by default to allow running mitmproxy with tornado 6.x: https://github.com/macports/macports-ports/blob/master/python/py-mitmproxy/files/no-onboarding.patch

Steps to reproduce:
1. Run mitmproxy
This task depends upon

Closed by  Filipe Laíns (FFY00)
Thursday, 17 October 2019, 09:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  mitmproxy 4.0.4-4
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 01 June 2019, 08:38 GMT
Sorry forgot to say, upstream developer prefers not to disable the onboardingapp addon https://github.com/mitmproxy/mitmproxy/issues/3513
Comment by Filipe Laíns (FFY00) - Friday, 14 June 2019, 21:38 GMT
This is fixed in 106948d996d74bf5ff7e3511f35eefea0a90561f. It doesn't cleanly backport so we will need to wait for a new release.
Comment by Chih-Hsuan Yen (yan12125) - Monday, 17 June 2019, 12:06 GMT
Filipe Laíns: I think you were referring https://github.com/mitmproxy/mitmproxy/commit/106948d996d74bf5ff7e3511f35eefea0a90561f? That commit fixes compatibility with wsproto 0.13, not tornaod 6.x.
Comment by Tim Jones (tsj) - Monday, 30 September 2019, 20:59 GMT
This is no longer just for systems with testing repositories. community/python-tornado 6.0.3-1 is in the regular repository now. A relevant issue on mitmproxy's github: https://github.com/mitmproxy/mitmproxy/issues/3618
Comment by NA (kneedler) - Wednesday, 09 October 2019, 15:45 GMT Comment by Dobroslaw Kijowski (dobo) - Tuesday, 15 October 2019, 18:00 GMT
I've managed to backport commit mentioned by @kneedler to 4.0.4. It's available on https://github.com/dobo90/archlinux_mitmproxy_pkgbuild/commits/packages/mitmproxy. Feel free to use it. Btw, meanwhile more tests have begun to fail.
Comment by Filipe Laíns (FFY00) - Thursday, 17 October 2019, 09:28 GMT
Thanks for the backport! It seems to work fine now :D

Loading...