Opened 3 years ago

Last modified 3 years ago

#64034 new defect

mitmproxy fails to start due to incompatible pyOpenSSL

Reported by: szhorvat (Szabolcs Horvát) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: petrrr, cjones051073 (Chris Jones)
Port: py-mitmproxy

Description

Starting mitmproxy results in the following error message:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 573, in _build_master
    ws.require(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyOpenSSL 19.1.0 (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages), Requirement.parse('pyOpenSSL>=20.0'), {'mitmproxy'})

Looks like py-openssl needs to be updated?

Change History (6)

comment:1 Changed 3 years ago by cjones051073 (Chris Jones)

Please include above the exact command used to 'start mitmproxy' ?

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:3 Changed 3 years ago by szhorvat (Szabolcs Horvát)

Simply run mitmproxy-3.9. The command name depends on which Python you chose. It seems 3.9 is the default.

comment:5 Changed 3 years ago by szhorvat (Szabolcs Horvát)

Now it wants hyperframe 6.0 or later, but MacPorts has 5.2.0.

Here's the list of requirements for mitmproxy 6.0.2, which is what's now in MacPorts:

https://github.com/mitmproxy/mitmproxy/blob/v6.0.2/setup.py#L69

It seems to want pyopenssl < 20.1, but you upgraded to 21.0.

It looks like keeping this port functional will be an uphill battle ... Originally, I tried to install it with MacPorts because they recommend using Homebrew, which I do not have: https://mitmproxy.org/ However, it looks like they do have standalone binaries for macOS here: https://mitmproxy.org/downloads/ I just used these for now. Thus, please do not spend time fixing this for my sake.

comment:6 Changed 3 years ago by reneeotten (Renee Otten)

it seems there are several dependencies that need to be taken care of; there was a PR a while back but the submitter didn't express interest in taking care of the review comments and finishing it up. Perhaps you can take that as a starting point though to start fixing this yourself, as the port has no maintainer.

Last edited 3 years ago by reneeotten (Renee Otten) (previous) (diff)
Note: See TracTickets for help on using tickets.