Opened 8 years ago

Closed 7 years ago

#52599 closed defect (fixed)

Current versions of py27-flake8 and py27-pyflakes are not compatible

Reported by: icemac (Michael Howitz) Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: stromnov (Andrey Stromnov)
Port: py-flake8 py-pyflakes

Description

The current py27-flake8 version is 2.6.0_0. The current py27-pyflakes version is 1.3.0_0. But flake8 requires a version < 1.3.

Updating pyflakes to 3.0.4 (current release as of when I am writing this ticket) does not help as it still requires < 1.3. I requested a new release of flake8 because it is already fixed in the repository.

An alternative solution could be to pin pyflakes to 1.2.3 if this is still possible after 1.3 slipped into the port file.

This issue is similar to #51659.

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 2928, in <module>
    @_call_aside
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2914, 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 2941, 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 637, 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 650, 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 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.3,>=0.8.1' distribution was not found and is required by flake8

Change History (4)

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: stromnov@… added
Owner: changed from macports-tickets@… to petr@…
Port: py-flake8 py-pyflakes added

In the future, please fill in the Port field and Cc the port maintainers (port info --maintainers py27-flake8 py27-pyflakes), if any.

comment:2 Changed 7 years ago by icemac (Michael Howitz)

Version 3.1.0 of flake8 allows to use pyflakes 1.3. See changelog: http://flake8.pycqa.org/en/latest/release-notes/3.1.0.html Please update to at least this version to be able to use this port again.

comment:3 Changed 7 years ago by cdeil (Christoph Deil)

I ran into this issue with Python 3.5 just now. Please update the Python 3.5 version as well.

$ flake8
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 659, 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 967, 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 858, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyflakes 1.3.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.3,>=0.8.1'), {'flake8'})

During handling of the above exception, another exception occurred:

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/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3017, 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 3030, 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 661, 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 674, 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 853, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.3,>=0.8.1' distribution was not found and is required by flake8

$ port installed *flake*
The following ports are currently installed:
  flake8_select @0.1_0 (active)
  py35-flake8 @2.6.0_0 (active)
  py35-flake8-mccabe @0.5.0_0 (active)
  py35-pyflakes @1.3.0_0 (active)
  pyflakes_select @0.1_0 (active)

comment:4 Changed 7 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Alright, I just pushed an update for this. Should roll out shortly:

https://github.com/macports/macports-ports/commit/c8734e998fa4c24f6085dfd5cefb7171c4033527

Note: See TracTickets for help on using tickets.