Opened 9 years ago

Closed 9 years ago

#50991 closed defect (fixed)

mitmproxy-2.7 is not working, due to netlib version mismatch

Reported by: th-macports@… Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: py-mitmproxy

Description (last modified by petrrr)

After doing a port upgrade, mitmproxy-2.7 now complains:

$ mitmproxy-2.7
Traceback (most recent call last):
  File "/opt/local/bin/mitmproxy-2.7", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3138, in <module>
    @_call_aside
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3124, in _call_aside
    f(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 663, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 676, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'netlib<0.14,>=0.13' distribution was not found and is required by mitmproxy

$ sudo port installed|grep mitm
  py-mitmproxy @0.13_0 (active)
  py27-mitmproxy @0.13_0 (active)
$ sudo port installed|grep netlib
  py-netlib @0.13.1_0
  py-netlib @0.16_0 (active)
  py27-netlib @0.13.1_0
  py27-netlib @0.16_0 (active)

Change History (8)

comment:1 Changed 9 years ago by th-macports@…

Of course, activating the old netlib port will solve this for now.

$ sudo port activate py27-netlib@0.13.1_0 ---> Computing dependencies for py27-netlib ---> Deactivating py27-netlib @0.16_0 ---> Cleaning py27-netlib ---> Activating py27-netlib @0.13.1_0 ---> Cleaning py27-netlib

$ mitmproxy-2.7 -v |head -1 usage: mitmproxy-2.7 [options]

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Cc: petr@… added
Keywords: mitmproxy-2.7 py-netlib removed
Owner: changed from macports-tickets@… to macports@…
Port: py-mitmproxy added; mitmproxy-2.7 removed

In the future, please use WikiFormatting, fill in the Port field with the actual name of the port and Cc the port maintainers (port info --maintainers py27-mitmproxy), if any.

Last edited 9 years ago by mf2k (Frank Schima) (previous) (diff)

comment:3 Changed 9 years ago by petrrr

Description: modified (diff)

comment:4 Changed 9 years ago by petrrr

py-netlib was updated in r146178, and probably updating py-mitmproxy as well should solve this issue. #50611 is requesting the update.

comment:5 Changed 9 years ago by petrrr

py-mitmproxy pins the version to exactly the same minor version as py-netlib (see https://github.com/mitmproxy/mitmproxy/blob/v0.15/setup.py#L17), so we would need to update to 0.16. Ticket #50611, provides only an update to 0.15, which will not solve this problem. At the same time the tar.gz tarball for version 0.16 is not published on PyPI, which is currently used by this port.

So either, we

  1. use the tarball from GitHub,
  2. try to use the wheel file on PyPI,
  3. wait until netlib and mitmproxy merge (expected to happen for version > 0.16)

I filed this issue understand better, why the tar.gz file is no longer available on PyPI and what to expect in future.

comment:6 Changed 9 years ago by petrrr

Owner: changed from macports@… to petr@…

r147514 updates mitmproxy to 0.16 and should fix this issue.

comment:7 Changed 9 years ago by petrrr

Cc: petr@… removed

Cc Me!

comment:8 Changed 9 years ago by petrrr

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.