[MacPorts] #47429: py27-flake8 not compatible with current py27-pep8
#47429: py27-flake8 not compatible with current py27-pep8 --------------------------+-------------------------------- Reporter: rectalogic@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: py27-flake8 --------------------------+-------------------------------- py27-flake8 @2.4.0_0 installs py27-pep8 @1.6.2_0 but is not compatible with it and fails to start: {{{ $ flake8 Traceback (most recent call last): File "/opt/local/bin/flake8", 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 3057, in <module> 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 641, 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 654, 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 827, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pep8<1.6,>=1.5.7' distribution was not found and is required by flake8 }}} To make flake8 work you have to force downgrade py27-pep8 to @1.5.7_0 flake8 2.4.0 introduced version caps on pep8, it requires an older version of pep8 https://gitlab.com/pycqa/flake8/issues/35 -- Ticket URL: <https://trac.macports.org/ticket/47429> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py27-flake8 not compatible with current py27-pep8 ---------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-flake8 | ---------------------------+-------------------- Changes (by mf2k@…): * owner: macports-tickets@… => petr@… * port: py27-flake8 => py-flake8 Comment: In the future, please Cc the port maintainers ({{{port info --maintainers py27-flake8}}}), if any. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Changes (by petr@…): * cc: patrik.hartlen@… (added) * version: 2.3.3 => * port: py-flake8 => py-flake8 py-pep8 Comment: This is a reciprocal incompatibility introduced upstream, therefore I add the maintainer of `py-pep8`. There is no single correct solution, to this issue. Either you would downgrade `py-pep8` (if you need the most recent `py-flake8` version) or you would downgrade `py-flake8` (if you need the latest `py-pep8` features). So I'd propose to leave the ports in the current state, in the hope the conflict is resolves soon upstream. Users can go install older versions of the port. The following combinations should work: py-pep8 @1.6.2 with py-flake8 @ 2.3.0 or py-pep8 @1.5.7 with py-flake8 @2.4.0. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by sean@…): I also ran into this issue. It is extremely annoying when this situation happens. I offer no real help here, just complaining :-) -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by petr@…): py-flake8 added an other constrain on its dependencies: pyflakes<0.9,>=0.8.1. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by petr@…): The pyflakes dependency conflict should be resolved by r138126. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by petr@…): To solve this issue completely, this commit would be required: https://github.com/jcrocholl/pep8/commit/435d1cbf995a659a82d1d4b42d25e345955... I'd propose to wait some days to see if there will be an upstream release any soon. Otherwise we could patch py-pep8 accordingly and remove the version constraint. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by jacoblee@…): Adding this to this ticket, since it is not resolved, and the issue is similar. On a relatively clean install: sudo port install py27-flake8 Installed: {{{ flake8_select @0.1_0 py27-flake8 @2.4.1_0 py27-flake8-mccabe @0.3.1_0 py27-pyflakes @0.9.2_0 pyflakes_select @0.1_0 pep8_select @0.1_0 py27-pep8 @1.6.2_0 py27-flake8-mccabe @0.3.1_0 }}} Found, that I had to call `port select --set` on the flake8 dependencies, pyflakes and pep8. I was surprised, but maybe that is not so unusual. When trying to call flake8 I get the following traceback: {{{ Traceback (most recent call last): File "/opt/local/bin/flake8", 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 3084, in <module> @_call_aside File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/pkg_resources/__init__.py", line 3070, 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 3097, 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 653, 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 666, 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 839, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7' distribution was not found and is required by flake8 }}} Oddly, my version of pep8 is 1.6.2 which is one of those listed in the error message. Here is the list of site-packages in my macports python site-packages directory. {{{ $ ls -1 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/README _markerlib easy_install.py easy_install.pyc flake8 flake8-2.4.1-py2.7.egg-info mccabe-0.3.1-py2.7.egg-info mccabe.py mccabe.pyc pep8-1.6.2-py2.7.egg-info pep8.py pep8.pyc pip pip-7.1.0-py2.7.egg-info pkg_resources pyflakes pyflakes-0.9.2-py2.7.egg-info setuptools setuptools-18.0.1-py2.7.egg-info }}} -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by petr@…): Replying to [comment:7 jacoblee@…]:
Adding this to this ticket, since it is not resolved, and the issue is similar. Yes, the ticket is about this issue.
[...]
On a relatively clean install:
sudo port install py27-flake8 [...]
Your installation work *as expected*.
Found, that I had to call `port select --set` on the flake8 dependencies, pyflakes and pep8. I was surprised, but maybe that is not so unusual.
I an not sure if I understand this correctly. Macports installs the callable scripts with a `-2.7` and `-3.4` suffix, respectively to allow the installation against various versions of Python. Appending this suffix allows you to select the desired version. With `port select` you can choose your default version. However, it should not be really necessary to perform a `port select --set` to have this package working correctly. If you found this necessary to make the packages working correctly, this is probably a bug and needs fixing.
When trying to call flake8 I get the following traceback:
{{{ Traceback (most recent call last): File "/opt/local/bin/flake8", 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 3084, in <module> @_call_aside File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/pkg_resources/__init__.py", line 3070, 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 3097, 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 653, 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 666, 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 839, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7' distribution was not found and is required by flake8 }}}
Oddly, my version of pep8 is 1.6.2 which is one of those listed in the error message.
Yes, this is exactly the issue here. The most recent released versions of `pep8` and `flake8` are not compatible, so this combination fails. This would ideally be solve upstream, but to my surprise this takes quite some time and the developers have not released yet. To have an immediate work-around you could install version 1.5.8. See wiki:howto/InstallingOlderPort. If we consider not to wait for upstream, we would need to: * down-grade pep8 to 1.5.8 again; * upgrade an unreleased *post-1.6.2-version* from the repository [https://github.com/jcrocholl/pep8/commit/435d1cbf995a659a82d1d4b42d25e345955... `435d1cb`]; -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Comment (by petr@…): r141247 introduces an new port py-pep8-157, r141248 updates py-flake8 to use this new port as dependency. This should fix the problem, but will require do deactivate py-pep8. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#47429: py-flake8, py-pep8: current versions not compatible --------------------------------+-------------------- Reporter: rectalogic@… | Owner: petr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-flake8 py-pep8 | --------------------------------+-------------------- Changes (by petr@…): * status: new => closed * resolution: => fixed Comment: r141250 and r141319 add (correct) deactivate hack. So this should be fixed, and has a smooth path to be effective. Uses still can use pep @1.6.2 if they do not need flake8 and prefer a newer version. -- Ticket URL: <https://trac.macports.org/ticket/47429#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts