pkg_resources.DistributionNotFound: The 'ldap3<2.6,>=2.5' distribution was not found and is required by mitmproxy And if I manual change the dep to allow ldap3 2.6 I get: pkg_resources.DistributionNotFound: The 'dataclasses' distribution was not found and is required by wsproto
Notes: - Ruslan (rm@) updated ldap3 to 2.6 in ports r516400 - This port doesn't (but should) document its pinned version dependencies accurately (>=2.5,<2.6), or patch them after confirming they work with alter versions Does upstream have support for ldap3 >= 2.6? Are there any upstream bug reports, PR's, commits regarding this issue?
dependencies were bumped in https://github.com/mitmproxy/mitmproxy/commit/b4ffc929a2d0216c3a0910e633f31212c12136cd These changes haven't yet seen release. @Maintainer, please provide a patch to update this ports *_DEPENDS lines to include *all* maximum versions specified in setup.py, which ensures at least that committers/contributors can see if there are any ports which depend on specific maximum versions of a dependency. Separately, this issue requires the following to progress: - A minimum (not changing this ports PORTVERSION) backport of an upstream commit, or another change - That allows ldap3 versions >=2.6 to be used - QA verified that mitmproxy indeed completely functions with ldap3 >= 2.6 mitmproxy test suite support in the port (make test) would be perfect for QA.
(In reply to Alex Dupre from comment #0) Hi Alex, thanks for reporting. It's ok for you if I take this PR?
I'll file a patch for dependencies first.
Sorry for the mess. Any action from me is required?
(In reply to Ruslan Makhmatkhanov from comment #5) Nope, just CC'd you given the ldap3 upgrade was the source of the regression, and that having ports document their max version in dependency lines would have helped you with QA showing you this port wouldn't have worked with the update.
(In reply to Kai Knoblich from comment #3) No prob, take it.
As Alex already pointed out in comment #0 a trivial fix by relaxing the version requirements for net/py-ldap3 won't help, as the devel/py-dataclasses package is also missing. The update of net/py-ldap3 was not the only cause as an earlier commit (net/py-wsproto in ports r511877) already broke www/mitmproxy because it misses a Python 3.6 specific dependency (= devel/py-dataclasses). This means that www/mitmproxy is also broken in the 2019Q4 branch at the moment. I'll commit soon a fix for net/py-wsproto and merge that into to the 2019Q4 branch to bring www/mitmproxy there back into a working state.
A commit references this bug: Author: kai Date: Thu Nov 28 17:51:34 UTC 2019 New revision: 518596 URL: https://svnweb.freebsd.org/changeset/ports/518596 Log: net/py-wsproto: Fix runtime dependencies and Python version restriction * Update the RUN_DEPENDS and limit the port to Python 3.6 or newer as the support for Python 2.7 and 3.5 was dropped with the 0.15.0 release. Python 3.6 needs also the devel/py-dataclasses package as an additional dependency to work properly. * Add a "do-test" target while I'm here to make future QA easier. * Bump PORTREVISION for package change. PR: 242025 (related) Approved by: portmgr blanket (runtime fix) MFH: 2019Q4 (runtime fix) Changes: head/net/py-wsproto/Makefile
A commit references this bug: Author: kai Date: Thu Nov 28 18:01:19 UTC 2019 New revision: 518597 URL: https://svnweb.freebsd.org/changeset/ports/518597 Log: MFH: r518596 net/py-wsproto: Fix runtime dependencies and Python version restriction * Update the RUN_DEPENDS and limit the port to Python 3.6 or newer as the support for Python 2.7 and 3.5 was dropped with the 0.15.0 release. Python 3.6 needs also the devel/py-dataclasses package as an additional dependency to work properly. * Add a "do-test" target while I'm here to make future QA easier. * Bump PORTREVISION for package change. PR: 242025 (related) Approved by: portmgr blanket (runtime fix) Approved by: ports-secteam bugfix blanket Changes: _U branches/2019Q4/ branches/2019Q4/net/py-wsproto/Makefile
Created attachment 209602 [details] mitmproxy-fix-and-document-dependencies.patch Attached is a patch that fixes the dependency for net/py-ldap3 and "documents" the RUN_DEPENDS in the port's Makefile to reduce the probability of runtime failures in the future. The patch doesn't contain support for the test suite because I would wait with it IMHO because there's work in progress for the 5.0 release at the moment and the dependencies have been changed significantly since the 4.0.4 release. (In reply to Hung-Yi Chen from comment #4) Sorry for the case if you've already worked yourself on a patch for it. If you have a better/extended patch for it, just attach it in this PR and I'll obsolete my patch then. Does the attached patch bring www/mitmproxy back into a working state?
Created attachment 209808 [details] mitmproxy-fix-and-document-dependencies-v2.patch Since ports r519201 (= update of devel/py-urwid) the patch needs to be a bit adjusted. Attached is a revised version of the patch that also relaxes the requirements for devel/py-urwid.
A commit references this bug: Author: kai Date: Mon Dec 16 19:37:00 UTC 2019 New revision: 520286 URL: https://svnweb.freebsd.org/changeset/ports/520286 Log: www/mitmproxy: Unbreak at runtime * After r511877 (initial cause, already fixed in r518596) and r516400 [1] the port was broken at runtime. Unbreak it by relaxing the version range for net/py-ldap3. Also relax the version range for devel/py-urwid which was recently updated in r519201. * Adjust the RUN_DEPENDS by making them more specific (as given in setup.py) to reduce the likelihood of runtime errors in the future. * Bump PORTREVISION due changed code. A MFH is not required as www/mitmproxy in the 2019Q4 branch isn't affected and was already fixed with r518597. PR: 242025 Reported by: ale [1] Approved by: maintainer timeout (2 weeks) Changes: head/www/mitmproxy/Makefile head/www/mitmproxy/files/patch-setup.py
Committed, both versions of www/mitmproxy (head + 2019Q4) should work properly again.