FS#73953 - [flake8] spyder crashes at startup

Attached to Project: Community Packages
Opened by Felix Salazar (phollox) - Friday, 25 February 2022, 11:16 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Sunday, 20 March 2022, 17:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Christian Rebischke (Shibumi)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Spyder refuses to start, due to error in flake8. The dependency of python-mccabe < 0.7 is not met in latest versions on the official repos. Downgrading python-mccabe to 0.6.1 and freezing it works, for now.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Sunday, 20 March 2022, 17:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  flake8 1:4.0.1-4.
Comment by Simon (Giggi) - Wednesday, 02 March 2022, 19:55 GMT
Same problem here.


Comment by Felix Salazar (phollox) - Friday, 11 March 2022, 15:03 GMT
I disagree with the severity rating.

This issue is severe, because it doesn't allow to run Spyder. If in an up-to-date Arch system, you install spyder for the first time, it won't work, because of this issue. Then you say "Spyder sucks", and try to use VScode or PyCharm, or Eclipse
Comment by Maurizio D'Addona (mauritiusdadd) - Tuesday, 15 March 2022, 09:38 GMT
Instead of downgrading, another possible workaround is to change the content of the file /usr/lib/python3.10/site-packages/flake8-4.0.1-py3.10.egg-info/requires.txt

In particular, replace the first line

mccabe<0.7.0,>=0.6.0

with

mccabe<=0.7.0,>=0.6.0
Comment by Prajna Sariputra (m7) - Tuesday, 15 March 2022, 09:48 GMT
Another alternative that doesn't require messing around with system files and/or holding back system packages is by `pip install --user mccabe==0.6.1`, although of course one will probably want to remove that once this issue is properly fixed.
Comment by Simon (Giggi) - Tuesday, 15 March 2022, 12:45 GMT
This is a recurring bug, about every 2 months it reappears.

It usually happens when spyder dependencies are updated without verifying that spyder works.

A little bit of testing would be enough to fix it, or use "=" in those spyder specific dependencies.
Comment by Bruno Pagani (ArchangeGabriel) - Sunday, 20 March 2022, 17:34 GMT
The problem is not really spyder here, but flake8 that has an upper bound dependency on mccabe. I’m already removing all upper bounds from spyder and the deps I manage, but apparently this is not enough because other packages have upper bounds… In fact flake8 used to ditch them (https://github.com/archlinux/svntogit-community/blob/packages/flake8/trunk/PKGBUILD#L21), but the code wasn’t adapted to upstream changes. I’ve just done that.

Loading...