Bug 1582075 - flake8 incompatible with pyflakes 2.0.0
Summary: flake8 incompatible with pyflakes 2.0.0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-flake8
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1586290 1591961 (view as bug list)
Depends On:
Blocks: PYTHON37
TreeView+ depends on / blocked
 
Reported: 2018-05-24 07:00 UTC by Dan Callaghan
Modified: 2018-06-18 06:34 UTC (History)
8 users (show)

Fixed In Version: python-flake8-3.5.0-4.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-11 22:17:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github PyCQA flake8 pull 21 0 None closed Fixes for pyflakes-2.0.0 2020-03-04 08:54:49 UTC

Description Dan Callaghan 2018-05-24 07:00:35 UTC
Description of problem:
pyflakes was recently rebased to 2.0.0 in rawhide, which appears to break flake8.

Version-Release number of selected component (if applicable):
python3-pyflakes-2.0.0-1.fc29.noarch
python3-flake8-3.5.0-2.fc29.noarch

How reproducible:
easily

Steps to Reproduce:
1. Run flake8

Actual results:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyflakes 2.0.0 (/usr/lib/python3.6/site-packages), Requirement.parse('pyflakes<1.7.0,>=1.5.0'), {'flake8'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/flake8", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 576, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes<1.7.0,>=1.5.0' distribution was not found and is required by flake8


Expected results:
Not that traceback

Additional info:

Comment 1 Matthias Runge 2018-05-24 07:10:17 UTC
Since flake8 requires pyflakes >= 1.5.0, < 1.7.0, see
https://github.com/PyCQA/flake8/blob/master/setup.cfg

this should me moved to pyflakes and the request would be to downgrade pyflakes.

Comment 2 Matthias Runge 2018-05-24 07:11:36 UTC
Unfortunately, the recent pyflakes upgrade broke flake8.

Comment 3 Matthias Runge 2018-05-24 07:13:03 UTC
Hmm, I also found this: https://gitlab.com/pycqa/flake8/issues/422
According to that, it's working fine with pyflakes 2.0.0

Comment 4 Matthias Runge 2018-05-24 07:13:32 UTC
(In reply to Matthias Runge from comment #3)
> Hmm, I also found this: https://gitlab.com/pycqa/flake8/issues/422
> According to that, it's working fine with pyflakes 2.0.0

Scratch that comment. The open issue still stands.

Comment 5 Sandro Bonazzola 2018-05-24 07:17:37 UTC
Let's see if upstream will issue a new release fixing the issue.
Otherwise proposed patch should fix within Fedora.

Comment 6 Sandro Bonazzola 2018-05-24 07:18:33 UTC
Moving to flake8 for consuming the proposed patch or rebase on the new release once available.

Comment 7 Sandro Bonazzola 2018-05-24 07:22:56 UTC
Pushed to gitlab too: https://gitlab.com/pycqa/flake8/merge_requests/237

Comment 8 Miro Hrončok 2018-06-02 15:17:45 UTC
flake8 FTBFS now. I also upgraded pycodestyle to 2.4.0 (sorry about that, I was unaware of how fragile flake8 is), so hopefully new version will be out soon.

This block flake8-import-order and rpmlint. But we can hopefully change rpmlint spec not to BR flake8 stuff.

Comment 9 Miro Hrončok 2018-06-03 20:21:45 UTC
New pyflakes compatibility: https://gitlab.com/pycqa/flake8/merge_requests/239/diffs

Comment 10 Miro Hrončok 2018-06-03 20:27:01 UTC
And new pycodestyle compatibility is in https://gitlab.com/pycqa/flake8/merge_requests/230/diffs

Comment 11 Miro Hrončok 2018-06-03 20:29:51 UTC
Oh, sorry https://gitlab.com/pycqa/flake8/merge_requests/237 interferes with https://gitlab.com/pycqa/flake8/merge_requests/239 - I commented that in the PR.

Comment 12 Matthias Runge 2018-06-06 08:36:32 UTC
*** Bug 1586290 has been marked as a duplicate of this bug. ***

Comment 13 Miro Hrončok 2018-06-08 10:45:46 UTC
FYI: 3.7.0rc1 is expected in 3 days (2018-06-11, [1]). I'd like to start building stuff in a side tag soon after that.

This is blocking us. Maybe we should apply [2] and [3] to make this build? The code numbers could possibly change but I think it's better than nothing.


[1] https://www.python.org/dev/peps/pep-0537/
[2] https://gitlab.com/pycqa/flake8/merge_requests/230
[3] https://gitlab.com/pycqa/flake8/merge_requests/239

Comment 14 Miro Hrončok 2018-06-11 09:19:33 UTC
$ dnf repoquery  --disablerepo='*' --enablerepo='rawhide-source' --whatrequires python3-flake8
ansible-review-0:0.13.4-4.fc29.src
collectd-ceilometer-plugin-0:1.0.1-5.fc28.src
commissaire-client-0:0.0.6-4.fc28.src
esptool-0:2.3.1-1.fc29.src
pki-console-0:10.6.1-2.fc29.src
pki-core-0:10.6.1-2.fc29.src
pyee-0:5.0.0-3.fc29.src
python-autobahn-0:18.5.1-1.fc29.src
python-catkin_pkg-0:0.4.3-2.fc29.src
python-catkin_tools-0:0.4.4-1.fc27.src
python-django-formtools-0:2.1-5.fc28.src
python-docker-py-1:1.10.6-8.fc29.src
python-docx-0:0.8.5-12.fc28.src
python-f5-icontrol-rest-0:1.3.6-3.fc29.src
python-flake8-import-order-0:0.17.1-1.fc29.src
python-fmn-sse-0:0.2.1-5.fc28.src
python-fpylll-0:0.4.1dev-1.fc29.src
python-hacking-0:1.1.0-1.fc29.src
python-lesscpy-0:0.10.1-13.fc28.src
python-nodeenv-0:0.13.6-11.fc28.src
python-osrf-pycommon-0:0.1.4-1.fc29.src
python-parsedatetime-0:2.4-6.fc28.src
python-pep8-naming-0:0.4.1-5.fc28.src
python-responses-0:0.9.0-1.fc29.src
python-tackerclient-0:0.7.0-5.fc28.src
python-terminaltables-0:3.1.0-7.fc29.src
python-testify-0:0.11.0-10.fc29.src
python-twitter-0:3.3-3.fc29.src
python-utils-0:2.3.0-1.fc29.src
python-webcolors-0:1.7-5.fc28.src
transtats-cli-0:0.1.2-1.fc29.src

Comment 15 Miro Hrončok 2018-06-11 18:52:32 UTC
Prepping patch.

Comment 17 Miro Hrončok 2018-06-11 19:01:32 UTC
Witch that patch applied, python-flake8 builds fine now in rawhide as well as with Python 3.7.

Comment 18 Matthias Runge 2018-06-18 06:34:12 UTC
*** Bug 1591961 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.