Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#51659 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), rectalogic (Andrew Wason), patrik.hartlen@…
Port: py-flake8 py-pyflakes py-pep8

Description

The current py27-flake8 version is 2.5.4_0. The current py27-pyflakes version is 1.2.3_0. But flake8 requires a version < 1.2.

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 2927, in <module>
    @_call_aside
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2913, 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 2940, 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.8.1' distribution was not found and is required by flake8

Change History (10)

comment:1 Changed 8 years ago by rectalogic (Andrew Wason)

Cc: rectalogic@… added

Cc Me!

comment:2 Changed 8 years ago by rectalogic (Andrew Wason)

This is similar to the issue with py27-flake8 and py27-pep8 that was fixed here https://trac.macports.org/ticket/47429

comment:3 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:4 Changed 8 years ago by rectalogic (Andrew Wason)

It looks like upgrading py27-flake8 to 2.6.0 will fix this, it supports pyflakes < 1.3 https://gitlab.com/pycqa/flake8/blob/2.6.0/setup.py#L52

comment:5 Changed 8 years ago by petrrr

Cc: patrik.hartlen@… added
Port: py-pep8 added

Adding py-pep8 maintainer to the discussion as this issue continues to emerge periodically.

Yes, unfortunately this happens when the various related packages are update out of sync, because flake8 imposes quite stringent constraints on the version of its dependencies. I was in discussion with the author if these constraints are really necessary, but he argues that this would be the only way to ensure consistency and quality of the software.

I occasionally removed or bumped the constrain, if there was some evidence that nothing breaks (merge request or pre-release merge upstream), but the author explicitly does not support this. Therefore I would suggest, that before upgrading any of these packages (in particular the dependencies), it is checked that nothing breaks or wait for upstream support otherwise.

This time it should be sufficient to version bump flake8, but experience shows that such upstream updates can be significantly delayed, and I really would like to avoid the need to handle these situations the way it became necessary in the cited ticket #47429. If it helps, I can drop maintainership so that all three packages are maintained by one single person.

comment:6 Changed 8 years ago by petrrr

Anyway will prepare an upgrade ASAP, so that this gets fixed.

comment:7 Changed 8 years ago by petrrr

Apparently packages pep8 was renamed to pycodestyle. New port committed in r149437. Seems not to conflict with pep8. Maintainers of py-pep8 and py-pyflakes, feel free to add yourself as maintainer.

comment:8 Changed 8 years ago by petrrr

Resolution: fixed
Status: newclosed

r149438 updates py-flake8 to @2.6.0 and and py-flake8-mccabe to @0.5.0.

comment:9 Changed 8 years ago by hmeine (Hans Meine)

Don't know if it's worth reopening, but it seems to me that this problem exists again with:

  py27-pyflakes @1.5.0_0 (active)
  py27-flake8 @3.2.1_0 (active)

I am getting

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

which seems to be expected with the most current versions on pypi: https://pypi.python.org/pypi/flake8

comment:10 in reply to:  9 Changed 8 years ago by icemac (Michael Howitz)

Replying to hmeine:

Don't know if it's worth reopening, but it seems to me that this problem exists again with:

The problem is that there is currently no released version of flake8 which supports pyflakes 1.5. So the first step would be to nag the flake8 maintainer to release 3.3.0 which will support pyflakes 1.5 (Source: http://flake8.pycqa.org/en/latest/release-notes/3.3.0.html)

Maybe a flake8-dev port could help to avoid this situation in the future as the flake8 developers are very explicit in the list of supported versions.

Note: See TracTickets for help on using tickets.