Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#70689 - [python-spyder-kernels] spyder crashs at startup.

Attached to Project: Community Packages
Opened by Simon (Giggi) - Monday, 03 May 2021, 07:30 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 04 May 2021, 05:45 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Jelle van der Waa (jelly)
Muflone (muflone)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 12
Private No

Details

Description:

After the start spyder crash with the following error message:

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (decorator 5.0.7 (/usr/lib/python3.9/site-packages), Requirement.parse('decorator<5'), {'spyder-kernels'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/spyder", line 33, in <module>
sys.exit(load_entry_point('spyder==5.0.0', 'gui_scripts', 'spyder')())
File "/usr/bin/spyder", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/spyder/app/start.py", line 34, in <module>
from spyder.utils.external import lockfile
File "/usr/lib/python3.9/site-packages/spyder/utils/external/lockfile.py", line 31, in <module>
from spyder.utils.programs import is_spyder_process
File "/usr/lib/python3.9/site-packages/spyder/utils/programs.py", line 29, in <module>
import pkg_resources
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 570, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'decorator<5' distribution was not found and is required by spyder-kernels




Additional info:
version: spyder 5.0.0-2


Steps to reproduce:
Start spyder in a console
This task depends upon

Comment by Skupin Skupin (stefan.skupin) - Monday, 03 May 2021, 10:02 GMT
Same here. Downgrading python-decorator to version 4.4.2-4 fixes this issue.
Comment by Maxim (mxfm) - Monday, 03 May 2021, 12:36 GMT
I also can cofirm the bug. The spyder package in recent years often had problems caused by spyder upstream depending on old version of some python packages. Sometimes devs explicitly marked new versions of dependencies as not supported like 'xxx<5.0' for no reason (not because 5.0 of xxx is really incompatible with spyder, but because upstreams considers such policy as wise). I have seen discussions at spyder forum about their policy (why limit supported versions of dependecies for no reason) - they consider their current policy right.

P.S Last time such issue was fixed by patching some config file during compilation, this time it seems they pushed 'xxx<5.0' restriction somewhere in the code.
Comment by loqs (loqs) - Monday, 03 May 2021, 16:51 GMT
Upstream bug report [1]. The change that introduced the issue is [2].
Does removing the upper bound on decorator [3] resolve the issue without introducing any other issues?

[1] https://github.com/spyder-ide/spyder-kernels/issues/288
[2] https://github.com/spyder-ide/spyder-kernels/commit/a826376ee090ba22b9efe1d2734573f5429b4797
[3] PKGBUILD.diff
Comment by Simon (Giggi) - Thursday, 06 May 2021, 14:22 GMT
The fix from loqs for me is working.
Comment by Felix Salazar (phollox) - Thursday, 06 May 2021, 15:45 GMT
Upstream needs to be informed that those 2 characters (<5) need to be removed from the setup.py file

Thanks
Comment by Benoit Brummer (trougnouf) - Friday, 07 May 2021, 16:22 GMT
I got it to compile after replacing "_pkg" with "pkgname" in the above diff, but then I get "pkg_resources.DistributionNotFound: The 'pyqtwebengine<5.13' distribution was not found and is required by spyder". I guess it's still https://github.com/spyder-ide/spyder/issues/14697 .

I also removed the version from setup.py on parso, pyqt5, pyqtwebengine, and jedi then building with makepkg --noextract. Somehow I'm back to the decorator issue even though it's not in setup.py. It would be nice if they added a launch flag to ignore all of this planned obsolescence.
Comment by Ville Sinisalo (blaubos) - Friday, 11 June 2021, 18:49 GMT
Version 2.0.4 fixing this is now available upstream: https://github.com/spyder-ide/spyder-kernels/releases/tag/v2.0.4
Comment by edes (LudwigJ) - Tuesday, 06 July 2021, 02:04 GMT
By now, 2.0.5 is already out: https://github.com/spyder-ide/spyder-kernels/releases/tag/v2.0.5
It would be great to have updated packages for Arch, with this bug sorted out.
(An updated Spyder package would also be swell, Arch is already four releases behind)
Comment by st666 (st666) - Sunday, 25 July 2021, 15:37 GMT
With the recent update to python-tomli, spyder crashes again with the following error: "The 'flit-core<4,>=3.2.0' distribution was not found and is required by tomli". This time reverting the update does not help (unlike with python-decorator).
Comment by Felix Salazar (phollox) - Monday, 26 July 2021, 06:58 GMT
Actually st666. You need to install python-flit-core

It should be part of the dependencies of python-tomli
Comment by st666 (st666) - Monday, 26 July 2021, 11:24 GMT
Thanks for the tip Felix. It does work now (after downgrading python-decorator). However, python-flit-core wasn't pulled automatically as it is not required by python-tomli.
Comment by Felix Salazar (phollox) - Monday, 26 July 2021, 12:00 GMT
Yes, sorry, I was not clear enough.

python-flit-core it is not part of the dependencies of python-tomli. Therefore, manual installation is required. However, it should be within the dependency array of python-tomli.

I'm going to report it there, and probably get a faster solution than here in spyder with the decorator problem that started this thread
Comment by Simon (Giggi) - Monday, 09 August 2021, 19:11 GMT
Can somebody fix this package?
Comment by st666 (st666) - Thursday, 12 August 2021, 17:14 GMT
I hope it gets fixed soon :). Spyder has been borked in Arch since late April. Almost been 4 months and also multiple releases from upstream
Comment by Simon (Giggi) - Monday, 16 August 2021, 09:15 GMT
I also hope.

At the moment I've recompiled spyder for myself and everything is working.

To make it working you must install from AUR the following packages ...
python-lsp-black 1.0.0-1
python-lsp-jsonrpc 1.0.0-1
python-lsp-server 1.2.1-1
Comment by Felix Salazar (phollox) - Tuesday, 24 August 2021, 20:25 GMT
In its current state, Spyder is almost unusable, at least for me.
There are a few visual glitches with shadows and mouseover. All transitions are defective. The help is broken. The plots are stretched. I'm sure all this is related to one or two dependencies that are not updated. Probably the decorator that originated this thread.

I didn't wanted to install from AUR. I might switch to another IDE, maybe temporarily but who knows

Loading...