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

It is not possible to disable external plugins #17464

Closed
mrclary opened this issue Mar 10, 2022 · 20 comments · Fixed by #21101
Closed

It is not possible to disable external plugins #17464

mrclary opened this issue Mar 10, 2022 · 20 comments · Fixed by #21101

Comments

@mrclary
Copy link
Contributor

mrclary commented Mar 10, 2022

Description

What steps will reproduce the problem?

The spyder-terminal plugin is enabled despite disabling in Preferences->Plugins.

  1. Start Spyder from conda environment using bootstrap
  2. Disable Terminal in Preferences->Plugins
  3. Restart Spyder
  4. Observe error window. This is flashed rapidly and barely visible on the gif. A still shot is also attached.
  5. Upon restart, observe that Terminal is still enabled

plugin
plugin-2

spyder_terminal_err.log
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect. 
2022-03-10 08:27:05 TAE7235-MLAP.local __main__[54284] INFO Server is now at: 127.0.0.1:8072
2022-03-10 08:27:05 TAE7235-MLAP.local __main__[54284] INFO Shell: /usr/local/bin/bash
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET / (127.0.0.1) 3.16ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /?path=/Users/rclary (127.0.0.1) 0.79ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/css/ubuntu.css (127.0.0.1) 3.95ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/components/jquery/dist/jquery.min.js (127.0.0.1) 2.31ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/build/main.bundle.js (127.0.0.1) 5.36ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] WARNING 404 GET /main.bundle.js (127.0.0.1) 7.45ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/css/style.css (127.0.0.1) 1.30ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/components/xterm.js/src/xterm.css (127.0.0.1) 2.10ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] WARNING 404 GET /main.bundle.js (127.0.0.1) 0.56ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/css/fonts/ubuntumono-regular-webfont.woff2 (127.0.0.1) 1.63ms
2022-03-10 08:27:06 TAE7235-MLAP.local spyder_terminal.server.rest.term_rest[54284] INFO CWD: /Users/rclary
2022-03-10 08:27:06 TAE7235-MLAP.local spyder_terminal.server.rest.term_rest[54284] INFO Size: (54, 15)
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 POST /api/terminals?cols=54&rows=15 (127.0.0.1) 16.35ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] WARNING 404 GET /favicon.ico (127.0.0.1) 0.87ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 101 GET /terminals/23d95a (127.0.0.1) 0.64ms
2022-03-10 08:27:06 TAE7235-MLAP.local spyder_terminal.server.websockets.term_ws[54284] INFO WebSocket opened: 23d95a
2022-03-10 08:27:06 TAE7235-MLAP.local spyder_terminal.server.websockets.term_ws[54284] INFO TTY On!
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/images/up_arrow_disabled.png (127.0.0.1) 1.18ms
2022-03-10 08:27:06 TAE7235-MLAP.local tornado.access[54284] INFO 200 GET /static/images/down_arrow_disabled.png (127.0.0.1) 1.63ms

Versions

  • Spyder version: 5.3.0.dev0 8026178
  • Python version: 3.9.10
  • Qt version: 5.12.9
  • PyQt5 version: 5.12.3
  • Operating System: Darwin 20.6.0

Dependencies

Dependencies
# Mandatory:
applaunchservices >=0.1.7            :  0.2.1 (OK)
atomicwrites >=1.2.0                 :  1.4.0 (OK)
chardet >=2.0.0                      :  4.0.0 (OK)
cloudpickle >=0.5.0                  :  2.0.0 (OK)
cookiecutter >=1.6.0                 :  1.7.3 (OK)
diff_match_patch >=20181111          :  20200713 (OK)
intervaltree >=3.0.2                 :  3.0.2 (OK)
IPython >=7.31.1;<8.0.0              :  7.32.0 (OK)
jedi >=0.17.2;<0.19.0                :  0.18.1 (OK)
jellyfish >=0.7                      :  0.9.0 (OK)
jsonschema >=3.2.0                   :  4.4.0 (OK)
keyring >=17.0.0                     :  23.4.0 (OK)
nbconvert >=4.0                      :  6.4.2 (OK)
numpydoc >=0.6.0                     :  1.2 (OK)
parso >=0.7.0;<0.9.0                 :  0.8.3 (OK)
pexpect >=4.4.0                      :  4.8.0 (OK)
pickleshare >=0.4                    :  0.7.5 (OK)
psutil >=5.3                         :  5.9.0 (OK)
pygments >=2.0                       :  2.11.2 (OK)
pylint >=2.5.0                       :  2.12.2 (OK)
pyls_spyder >=0.4.0                  :  0.4.0 (OK)
pylsp >=1.3.2;<1.4.0                 :  1.3.2 (OK)
pylsp_black >=1.0.0                  :  1.1.0 (OK)
qdarkstyle =3.0.2                    :  3.0.2 (OK)
qstylizer >=0.1.10                   :  0.2.1 (OK)
qtawesome >=1.0.2                    :  1.1.1 (OK)
qtconsole >=5.2.1;<5.3.0             :  5.2.2 (OK)
qtpy >=1.5.0                         :  2.0.1 (OK)
rtree >=0.9.7                        :  0.9.7 (OK)
setuptools >=49.6.0                  :  60.9.3 (OK)
sphinx >=0.6.6                       :  3.5.4 (OK)
spyder_kernels >=2.2.1;<2.3.0        :  2.3.0.dev0 (OK)
textdistance >=4.2.0                 :  4.2.2 (OK)
three_merge >=0.1.1                  :  0.1.1 (OK)
watchdog >=0.10.3                    :  2.1.6 (OK)
zmq >=17                             :  22.3.0 (OK)

# Optional:
cython >=0.21                        :  0.29.28 (OK)
matplotlib >=2.0.0                   :  3.5.1 (OK)
numpy >=1.7                          :  1.22.2 (OK)
pandas >=1.1.1                       :  1.4.1 (OK)
scipy >=0.17.0                       :  1.8.0 (OK)
sympy >=0.7.3                        :  1.9 (OK)

# Spyder plugins:
spyder_terminal.terminalplugin 1.2.1 :  1.2.1 (OK)
Environment
(spy-dev) >> conda list
# packages in environment at /Users/rclary/opt/miniconda3/envs/spy-dev:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
applaunchservices         0.2.1                      py_0    conda-forge
appnope                   0.1.2            py39h6e9494a_2    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
arrow                     1.2.2              pyhd8ed1ab_0    conda-forge
astroid                   2.9.3            py39h6e9494a_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
autopep8                  1.6.0              pyhd8ed1ab_1    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bcrypt                    3.2.0            py39h89e85a6_2    conda-forge
binaryornot               0.4.4                      py_1    conda-forge
black                     22.1.0             pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h0d85af4_6    conda-forge
brotli-bin                1.0.9                h0d85af4_6    conda-forge
brotlipy                  0.7.0           py39h89e85a6_1003    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
certifi                   2021.10.8        py39h6e9494a_1    conda-forge
cffi                      1.15.0           py39he338e87_0    conda-forge
chardet                   4.0.0            py39h6e9494a_2    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
click                     8.0.4            py39h6e9494a_0    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
coloredlogs               15.0.1             pyhd8ed1ab_3    conda-forge
cookiecutter              1.7.3              pyh6c4a22f_1    conda-forge
coverage                  6.3.2            py39h63b48b0_1    conda-forge
cryptography              36.0.1           py39h209aa08_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.28          py39h9fcab8e_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
dbus                      1.13.6               h811a1a6_3    conda-forge
debugpy                   1.5.1            py39h9fcab8e_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
docutils                  0.16             py39h6e9494a_3    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
expat                     2.4.6                h96cf925_0    conda-forge
flake8                    4.0.1              pyhd8ed1ab_1    conda-forge
flaky                     3.7.0              pyh9f0ad1d_0    conda-forge
fonttools                 4.29.1           py39h89e85a6_0    conda-forge
freetype                  2.10.4               h4cff582_1    conda-forge
gettext                   0.19.8.1          hd1a6beb_1008    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
gmpy2                     2.1.2            py39hab8a6df_0    conda-forge
humanfriendly             10.0             py39h6e9494a_2    conda-forge
icu                       69.1                 he49afe7_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
imagesize                 1.3.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        3.10.1           py39h6e9494a_0    conda-forge
importlib_metadata        3.10.1               hd8ed1ab_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
inflection                0.5.1              pyh9f0ad1d_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 6.9.1            py39h71a6800_0    conda-forge
ipython                   7.32.0           py39h6e9494a_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     5.10.1             pyhd8ed1ab_0    conda-forge
jbig                      2.1               h0d85af4_2003    conda-forge
jedi                      0.18.1           py39h6e9494a_0    conda-forge
jellyfish                 0.9.0            py39h89e85a6_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jinja2-time               0.2.0                      py_2    conda-forge
jpeg                      9e                   h0d85af4_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2            py39h6e9494a_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
keyring                   23.4.0           py39h6e9494a_2    conda-forge
kiwisolver                1.3.2            py39hf018cea_1    conda-forge
krb5                      1.19.2               hb49756b_4    conda-forge
lazy-object-proxy         1.7.1            py39h89e85a6_0    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
lerc                      3.0                  he49afe7_0    conda-forge
libblas                   3.9.0           13_osx64_openblas    conda-forge
libbrotlicommon           1.0.9                h0d85af4_6    conda-forge
libbrotlidec              1.0.9                h0d85af4_6    conda-forge
libbrotlienc              1.0.9                h0d85af4_6    conda-forge
libcblas                  3.9.0           13_osx64_openblas    conda-forge
libclang                  13.0.1          default_he082bbe_0    conda-forge
libcxx                    12.0.1               habf9029_1    conda-forge
libdeflate                1.10                 h0d85af4_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
libglib                   2.70.2               hf1fb8c0_4    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0           13_osx64_openblas    conda-forge
libllvm13                 13.0.1               h64f94b2_2    conda-forge
libopenblas               0.3.18          openmp_h3351f45_0    conda-forge
libpng                    1.6.37               h7cec526_2    conda-forge
libpq                     14.2                 hea3049e_0    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libspatialindex           1.9.3                he49afe7_4    conda-forge
libtiff                   4.3.0                h17f2ce3_3    conda-forge
libwebp                   1.2.2                h28dabe5_0    conda-forge
libwebp-base              1.2.2                h0d85af4_1    conda-forge
libxcb                    1.13              h0d85af4_1004    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               13.0.1               hda6cdc1_0    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
markupsafe                2.1.0            py39h63b48b0_0    conda-forge
matplotlib                3.5.1            py39h6e9494a_0    conda-forge
matplotlib-base           3.5.1            py39hb07454d_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py39h89e85a6_1005    conda-forge
mpc                       1.2.1                hbb51d92_0    conda-forge
mpfr                      4.1.0                h0f52abe_1    conda-forge
mpmath                    1.2.1              pyhd8ed1ab_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           0.4.3            py39h6e9494a_4    conda-forge
mysql-common              8.0.28               h694c41f_0    conda-forge
mysql-libs                8.0.28               h115446f_0    conda-forge
nbclient                  0.5.11             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.2            py39h6e9494a_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  he49afe7_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
nspr                      4.32                 hcd9eead_1    conda-forge
nss                       3.74                 h31e2bf1_0    conda-forge
numpy                     1.22.2           py39h9d9ce41_0    conda-forge
numpydoc                  1.2                pyhd8ed1ab_0    conda-forge
openjpeg                  2.4.0                h6e7aa92_1    conda-forge
openssl                   1.1.1l               h0d85af4_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.1            py39h4d6be9b_0    conda-forge
pandoc                    2.17.1.1             h694c41f_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
paramiko                  2.9.2              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 he49afe7_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.0.1            py39hd2c7aa1_2    conda-forge
pip                       22.0.3             pyhd8ed1ab_0    conda-forge
platformdirs              2.5.1              pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0            py39h6e9494a_2    conda-forge
poyo                      0.5.0                      py_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
psutil                    5.9.0            py39h89e85a6_0    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pycodestyle               2.8.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydocstyle                6.1.1              pyhd8ed1ab_0    conda-forge
pyflakes                  2.4.0              pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pylint                    2.12.2             pyhd8ed1ab_0    conda-forge
pyls-spyder               0.4.0              pyhd8ed1ab_0    conda-forge
pynacl                    1.5.0            py39h89e85a6_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py39h6e9494a_8    conda-forge
pyqt-impl                 5.12.3           py39he44290a_8    conda-forge
pyqt5-sip                 4.19.18          py39h15fb055_8    conda-forge
pyqtchart                 5.12             py39he44290a_8    conda-forge
pyqtwebengine             5.12.1           py39he44290a_8    conda-forge
pyrsistent                0.18.1           py39h89e85a6_0    conda-forge
pysocks                   1.7.1            py39h6e9494a_4    conda-forge
pytest                    6.2.5            py39h6e9494a_2    conda-forge
pytest-cov                3.0.0              pyhd8ed1ab_0    conda-forge
pytest-lazy-fixture       0.6.3                      py_0    conda-forge
pytest-mock               3.7.0              pyhd8ed1ab_0    conda-forge
pytest-order              1.0.1              pyhd8ed1ab_0    conda-forge
pytest-qt                 4.0.2              pyhd8ed1ab_0    conda-forge
python                    3.9.10          h1dd9edd_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-lsp-black          1.1.0              pyhd8ed1ab_0    conda-forge
python-lsp-jsonrpc        1.0.0              pyhd8ed1ab_0    conda-forge
python-lsp-server         1.3.3              pyhd8ed1ab_0    conda-forge
python-slugify            6.1.1              pyhd8ed1ab_0    conda-forge
python.app                1.4              py39h89e85a6_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyxdg                     0.27               pyhd8ed1ab_0    conda-forge
pyyaml                    6.0              py39h89e85a6_3    conda-forge
pyzmq                     22.3.0           py39h7fec2f1_1    conda-forge
qdarkstyle                3.0.2                     dev_0    <develop>
qstylizer                 0.2.1              pyhd8ed1ab_0    conda-forge
qt                        5.12.9               h2a607e2_5    conda-forge
qtawesome                 1.1.1              pyhd8ed1ab_0    conda-forge
qtconsole                 5.2.2              pyhd8ed1ab_1    conda-forge
qtconsole-base            5.2.2              pyhd8ed1ab_1    conda-forge
qtpy                      2.0.1              pyhd8ed1ab_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
rope                      0.23.0             pyhd8ed1ab_0    conda-forge
rtree                     0.9.7            py39h7d0d40a_3    conda-forge
scipy                     1.8.0            py39h056f1c0_1    conda-forge
setuptools                60.9.3           py39h6e9494a_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sphinx                    3.5.4              pyh44b312d_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_1    conda-forge
spyder                    5.3.0.dev0               pypi_0    pypi
spyder-kernels            2.3.0.dev0                dev_0    <develop>
spyder-terminal           1.2.1            py39h6e9494a_1    conda-forge
sqlite                    3.37.0               h23a322b_0    conda-forge
sympy                     1.9              py39h6e9494a_1    conda-forge
terminado                 0.13.1           py39h6e9494a_0    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
text-unidecode            1.3                        py_0    conda-forge
textdistance              4.2.2              pyhd8ed1ab_0    conda-forge
three-merge               0.1.1              pyh9f0ad1d_0    conda-forge
tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39h89e85a6_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typed-ast                 1.5.2            py39h89e85a6_0    conda-forge
typing-extensions         4.1.1                hd8ed1ab_0    conda-forge
typing_extensions         4.1.1              pyha770c72_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ujson                     5.1.0            py39h9fcab8e_0    conda-forge
unicodedata2              14.0.0           py39h89e85a6_0    conda-forge
unidecode                 1.3.3              pyhd8ed1ab_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
watchdog                  2.1.6            py39h9c2f2d1_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
wrapt                     1.13.3           py39h89e85a6_1    conda-forge
wurlitzer                 3.0.2            py39h6e9494a_1    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
yaml                      0.2.5                h0d85af4_2    conda-forge
yapf                      0.32.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge
zstd                      1.5.2                h582d3a0_0    conda-forge
@mrclary
Copy link
Contributor Author

mrclary commented Mar 10, 2022

@ccordoba12 ccordoba12 added this to the v5.3.0 milestone Mar 10, 2022
@ccordoba12
Copy link
Member

Thanks @mrclary for opening this one! This requires a new release of Spyder-terminal.

@steff456
Copy link
Member

I already tried out the fix that @ccordoba12 suggested but it still has no effect. What is weird for me is that I added the option to not be able to disable this plugin. So I'm not sure if we need to check the teardown mechanism for third party plugins.

@ccordoba12
Copy link
Member

ccordoba12 commented Mar 10, 2022

That's one thing, but I was talking about adding enable to the default options of Spyder-terminal:

https://github.com/spyder-ide/spyder-terminal/blob/7bafa8cc1b7dc82c46e13fdfbfd707b59ec42953/spyder_terminal/config.py#L18-L37

Since that option is missing, then Spyder can't read/write it to disk when enabling/disabling the plugin.

I think that should solve the problem, according to what @dalthviz found.

@steff456
Copy link
Member

I already tried that option, and it is not working.

@ccordoba12
Copy link
Member

Mmmh, that's bad news.

@andfoy, any ideas about this?

@dalthviz
Copy link
Member

I think the problem is related to the way the config is being handle for external plugins (this is not only happening with spyder-teminal but also with the spyder-boilerplate plugin used in the slow test) so if you use CONF.get as is being done at

try:
if CONF.get(plugin_main_attribute_name, "enable"):
enabled_plugins[plugin_name] = plugin
PLUGIN_REGISTRY.set_plugin_enabled(plugin_name)
except (cp.NoOptionError, cp.NoSectionError):
enabled_plugins[plugin_name] = plugin
PLUGIN_REGISTRY.set_plugin_enabled(plugin_name)
to read a config from an external plugin seems like this isn't working (although not sure why). Maybe the addition of the plugin config file is not working since if I check the spyder-terminal config file I can see the enable: false config:

imagen

@andfoy
Copy link
Member

andfoy commented Mar 10, 2022

A while ago with @steff456 we did reached the same conclusion as Daniel, because of the current configuration implementation, an external plugin configuration is picked only after the plugin loads. In order to fix this, all configurations should be available at all times, regardless if a plugin has loaded. However, this requires a (potentially extensive and expensive) implementation of the configuration system that needs further discussion and implementation

@ccordoba12
Copy link
Member

Ok, so the solution for now is not allowing Spyder-terminal to be disabled in Preferences > Plugins, right?

@mrclary
Copy link
Contributor Author

mrclary commented Mar 11, 2022

Ok, so the solution for now is not allowing Spyder-terminal to be disabled in Preferences > Plugins, right?

Should we consider reverting the inclusion of spyder-terminal in the standalone applications until this is fixed? I don't know which is better: to have the plugin but unable to disable it, or not have the plugin yet...

@mrclary
Copy link
Contributor Author

mrclary commented Mar 11, 2022

@dalthviz @andfoy , wouldn't it be better for Spyder's config file to store the enabled state of all plugins (internal + external)? Rather than relying on the plugin's config file?

@dalthviz
Copy link
Member

Ok, so the solution for now is not allowing Spyder-terminal to be disabled in Preferences > Plugins, right?

That could be a possibility. For that there is some missing code in the Plugins config page to also check for CAN_BE_DISABLED on external plugins A similar logic as is used for internal plugins:

if not getattr(PluginClass, 'CAN_BE_DISABLED', True):
# Do not list core plugins that can not be disabled
continue

Should we consider reverting the inclusion of spyder-terminal in the standalone applications until this is fixed? I don't know which is better: to have the plugin but unable to disable it, or not have the plugin yet...

I'm not sure either but at least we shouldn't show the option to disable the plugin if that can't be done

wouldn't it be better for Spyder's config file to store the enabled state of all plugins (internal + external)? Rather than relying on the plugin's config file?

That could be an interesting approach. It could be like a list of disabled plugins maybe or a dict where each entry key is the name of the plugin and has if the plugin is enabled or not as value?

@steff456
Copy link
Member

When I saw this issue a while back I decided to just not allow Spyder-terminal to be disabled because at the end as it currently is a third party plugin people have to install it in order to use it. So it seems weird if someone install the plugin and disables it, because it will be the same as just uninstalling it. We could just prevent third party plugins to not be able to disable them for now while we think of a solution that is not that hard to implement.

@andfoy
Copy link
Member

andfoy commented Mar 11, 2022

Our proposal back a time ago was to create a higher-level configuration file that mapped each section to the place where it should looked for (external, internal, etc). By doing so, the main Spyder configuration file will be split into internal, external and even other categories such as project-wise configurations that might help users override global configurations per project. However, this needs more discussion. At least on my opinion, I'd prefer a well-implemented solution rather than a quick one

@steff456
Copy link
Member

That could be an interesting approach. It could be like a list of disabled plugins maybe or a dict where each entry key is the name of the plugin and has if the plugin is enabled or not as value?

The issue with this approach is that we will need to create an instance of the plugin to get all its configuration, letting the "disable/enable" option just aesthetic and not reducing the amount of things that Spyder has to load at startup

@ccordoba12
Copy link
Member

Should we consider reverting the inclusion of spyder-terminal in the standalone applications until this is fixed?

I think Spyder-terminal is mature enough to be part of the installers. Since solving this problem the right way will require a good amount of work, I propose to add the necessary code to Spyder-terminal so that it creates terminals only if it's visible at startup.

In other words, if the user hides it and then restart Spyder, the plugin wouldn't do anything. This is not the same as a full teardown, but it's pretty close.

@mrclary
Copy link
Contributor Author

mrclary commented Mar 11, 2022

@dalthviz

That could be an interesting approach. It could be like a list of disabled plugins maybe or a dict where each entry key is the name of the plugin and has if the plugin is enabled or not as value?

That's exactly what I was thinking. In principle, the Spyder application only needs to know two things with regard to plugins: 1) is it available (code is installed); and 2) is it enabled. The plugins themselves don't need to control these things, and the Spyder application wouldn't need to load a plugin in order to get that information.


@andfoy

Our proposal back a time ago was to create a higher-level configuration file that mapped each section to the place where it should looked for (external, internal, etc). By doing so, the main Spyder configuration file will be split into internal, external and even other categories such as project-wise configurations that might help users override global configurations per project. However, this needs more discussion. At least on my opinion, I'd prefer a well-implemented solution rather than a quick one

I agree that a well-implemented solution is better than a quick one. Why do we need to segregate the internal/external plugins? I also noticed that the internal plugin configurations are included in Spyder's configuration file, but external plugins have their own configuration file in their own directory. Is there a reason why we treat these plugins differently? I understand that "internal" plugins are included in Spyder's source code, but it seems to me that regardless of whether a plugin is "internal" or "external" they should be treated exactly the same. Perhaps each plugin should have its own configuration file in its own directory, does not have an enabled configuration, but Spyder's configuration has [plugins] with a list of available plugins and their enabled state.

I don't know what a "higher-level configuration file" would look like, but it seems to me that only a single configuration file for Spyder is best, even for project-wise configurations. For multi-project implementation, I think the same paradigm as for plugins would work: a [projects] section lists the currently open project(s), but individual projects maintain their own configuration files (as I think they currently do, but are unused?). However, in this case, there is just a hierarchical preference, where Spyder has global settings which are overridden by a project's configuration, depending on which project is open (in single project support) or which project has focus (in multi-project support)


@steff456

So it seems weird if someone install the plugin and disables it, because it will be the same as just uninstalling it.

I agree, except that for the macOS app, the user cannot choose to install/uninstall it. I think we've discussed before the desire to have a package manager in Spyder, in which case users would be able to install/uninstall Python packages. When we implement this, I think this idea could also be extended to Spyder's plugins.

That could be an interesting approach. It could be like a list of disabled plugins maybe or a dict where each entry key is the name of the plugin and has if the plugin is enabled or not as value?

The issue with this approach is that we will need to create an instance of the plugin to get all its configuration, letting the "disable/enable" option just aesthetic and not reducing the amount of things that Spyder has to load at startup

I don't completely understand all the plugin mechanisms, so perhaps I'm mistaken, but wouldn't having Spyder maintain a list of available plugins and whether they are enabled mean that Spyder does not have to load the plugin to get that information? Only if a plugin is enabled does Spyder need to load the plugin, and only in that instance does Spyder need the plugin to serve up its configuration?

@mrclary
Copy link
Contributor Author

mrclary commented Mar 11, 2022

Should we consider reverting the inclusion of spyder-terminal in the standalone applications until this is fixed?

I think Spyder-terminal is mature enough to be part of the installers. Since solving this problem the right way will require a good amount of work, I propose to add the necessary code to Spyder-terminal so that it creates terminals only if it's visible at startup.

In other words, if the user hides it and then restart Spyder, the plugin wouldn't do anything. This is not the same as a full teardown, but it's pretty close.

@ccordoba12 whether or not Spyder-terminal is enabled/disabled, closing the Terminal pane is honored, i.e. upon restart the Terminal widget is not visible and remains deselected in View->Panes->Terminal. I'm sure that the plugin is still loaded, but as far as the user is concerned, it may have the same effect. So maybe this is good enough for now? or just disable the enable checkbox in Preferences?

@steff456
Copy link
Member

@mrclary on our last meeting we decided that for Spyder 5.3.0 release we are just going to remove the external plugins from the plugins conf page. In this way users will not be able to enable/disable third party plugins. I will not close this issue once I open the PR for this so we can summarize this issue and then implement a solution that works as we want.

@ccordoba12 ccordoba12 changed the title Disabling Terminal External Plugin Has No Effect Disabling External Plugins Has No Effect Mar 15, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.3.0, v6.0alpha1 Mar 15, 2022
@ccordoba12 ccordoba12 changed the title Disabling External Plugins Has No Effect It is not possible to disable external plugins Apr 3, 2022
@Lewn
Copy link

Lewn commented May 25, 2022

To add a bit of extra context to this issue: On my company laptop, the process started by spyder-terminal gets stuck and starts using 100% CPU. While this is probably an issue with my laptop, rather then with spyder-terminal, it would be nice if I could disable the plugin (or at least not start the server process).
Even on my personal laptop, the server process also keeps using some small amount of CPU all the time, even though I am not using it, or even interacting with spyder. So also here I would like to be able to disable the plugin.

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

Successfully merging a pull request may close this issue.

6 participants