Opened 8 years ago
Closed 8 years ago
#53342 closed defect (fixed)
flake8 has an incompatible pyflakes
Reported by: | informatimago (Pascal J. Bourguignon) | Owned by: | petrrr |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.5 |
Keywords: | Cc: | stromnov (Andrey Stromnov), kpreid (Kevin Reid) | |
Port: | py-flake8 py-pyflakes |
Description
With both py27 and py35 versions of pyflakes and flake8, the version of pyflakes installed is 1.5.0 and it's incompatible with the requirements of flake8:
[pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$ sudo port select --set flake8 flake8-35 Selecting 'flake8-35' for 'flake8' succeeded. 'flake8-35' is now active. [pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$ which flake8 /opt/local/bin/flake8 [pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$ $(which flake8) --version Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 655, in _build_master ws.require(__requires__) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 963, in require needed = self.resolve(parse_requirements(requirements)) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 854, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (pyflakes 1.5.0 (/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages), Requirement.parse('pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.4.0,>=0.8.1'), {'flake8'}) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/local/bin/flake8", line 6, in <module> from pkg_resources import load_entry_point File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3019, in <module> @_call_aside File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside f(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3032, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 657, in _build_master return cls._build_from_requirements(__requires__) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 670, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 849, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.4.0,>=0.8.1' distribution was not found and is required by flake8 [pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$ sudo port select --set flake8 flake8-27 Selecting 'flake8-27' for 'flake8' succeeded. 'flake8-27' is now active. [pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$ $(which flake8) --version Traceback (most recent call last): File "/opt/local/bin/flake8", line 6, 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 3019, in <module> @_call_aside File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3003, 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 3032, 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 657, 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 670, 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 'pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.4.0,>=0.8.1' distribution was not found and is required by flake8 [pjb@macbook-trustonic :0.0 dev_kinibi_wb_sdk-LP34315237]$
Change History (3)
comment:1 Changed 8 years ago by mf2k (Frank Schima)
Cc: | stromnov added |
---|---|
Owner: | set to petrrr |
Port: | py-flake8 py-pyflakes added; flake8 pyflakes removed |
Status: | new → assigned |
comment:2 Changed 8 years ago by kpreid (Kevin Reid)
Cc: | kpreid added |
---|
comment:3 Changed 8 years ago by petrrr
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In the meantime this was fixed by the update of py-flake8 to version 3.3.0 commit: [466406233b4669560ca71f8a4067006de34b591c/macports-ports]
However, this kind of issues are somewhat difficult to avoid.
Macports supports only one single version of a Python package while py-flake8
is pretty picky wrt. to the versions of its dependencies. In particular, it introduces caps on the versions. So if these ports (py-pyflakes
and py-flake8
) are updated out of sync such an situation can occur. Occasionally it also took quite some while until a new version of py-flake8 became available.
In the future, please use the actual port names in the Port field and Cc the port maintainers (
port info --maintainers py-flake8 py-pyflakes
), if any.