Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bundle] napari-chatgpt plugin broken due to pyside2 #170

Open
psobolewskiPhD opened this issue Jul 17, 2024 · 3 comments
Open

[bundle] napari-chatgpt plugin broken due to pyside2 #170

psobolewskiPhD opened this issue Jul 17, 2024 · 3 comments

Comments

@psobolewskiPhD
Copy link
Member

Originally posted:
https://forum.image.sc/t/failed-to-import-command-at-napari-chatgpt/99260
Looks like an incompatibility between the specific black import and pyside2
With black, from black import FileMode fails in the bundle or napari env with pyside2
but works with pyqt5

That import looks outdated in the plugin, see:
psf/black@06f2790

But making an issue here so we consider how long we can stick with pyside2 which is has really poor support:
image

@Czaki
Copy link

Czaki commented Jul 17, 2024

Next example of pyside people knowing better:

Here simplified stacktrace:

from black import FileMode
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 from black import FileMode

File ~/.pyenv/versions/3.10.13/envs/napari-3.10-pyside/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py:142, in _import(name, *args, **kwargs)
    140     flag = -1
    141 pyside_feature_dict[importing_module] = flag
--> 142 return original_import(name, *args, **kwargs)

File src/black/__init__.py:67

File src/black/linegen.py:73

File src/black/trans.py:251

TypeError: mypyc classes can't have a metaclass

Also PySide2 is incompatybile with numpy 2.0

import works with PySide6

@jaimergp
Copy link
Collaborator

Just to make sure what we are discussing:

  • PySide vs PyQt? The answer has to do with the licensing, since PySide is more permissive
  • PySide2 vs PySide6? I don't have the answer, but nothing against moving to PySide6 if you tell me it works :)

@Czaki
Copy link

Czaki commented Jul 17, 2024

PySide2 vs PySide6? I don't have the answer, but nothing against moving to PySide6 if you tell me it works :)

This is the biggest problem. We cannot depend in bundle on something that is not tested. But license...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants