Repository: spyder-ide/spyder

Issue:
Add QDarkstyle to the Dependencies list
### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [x] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [x] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [ ] Tried basic troubleshooting (if a bug/error)
    * [ ] Restarted Spyder
    * [ ] Reset preferences with ``spyder --reset``
    * [ ] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [ ] Tried the other applicable steps from the Troubleshooting Guide
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below

## Problem Description
**QDarkStyle is not listed in the Help/Dependencies as mandatory, but is in the requirements.** I don't know how is generated the list of dependencies in the interface (Help/Dependencies), but I would guess that it should reflect the setup or requirement lists,  including the versions.

### What steps reproduce the problem?

Run spyder and compare the setup.py requirements, requirements/requirements.txt and the Help/Dependencies lists.

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 4-master, rev e3d19f7
* Python version: 3.6.7
* Qt version: 5.6.2
* PyQt version: 5.6
* Operating System name/version: Linux 4.4.0-139-generic (Ubuntu 16.04)
#165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

```
alabaster                 0.7.12                     py_0    conda-forge
asn1crypto                0.24.0                py36_1003    conda-forge
astroid                   2.0.3                 py36_1000    conda-forge
attrs                     18.2.0                     py_0    conda-forge
autopep8                  1.4.3                      py_0    conda-forge
babel                     2.6.0                      py_1    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    3.0.2                      py_0    conda-forge
ca-certificates           2018.10.15           ha4d7672_0    conda-forge
certifi                   2018.10.15            py36_1000    conda-forge
cffi                      1.11.5           py36h5e8e0c9_1    conda-forge
chardet                   3.0.4                 py36_1003    conda-forge
cloudpickle               0.6.1                      py_0    conda-forge
cryptography              2.3.1            py36hdffb7b8_0    conda-forge
cryptography-vectors      2.3.1                 py36_1000    conda-forge
dbus                      1.13.0               h3a4f0e9_0    conda-forge
decorator                 4.3.0                      py_0    conda-forge
docutils                  0.14                  py36_1001    conda-forge
entrypoints               0.2.3                 py36_1002    conda-forge
expat                     2.2.5                hfc679d8_2    conda-forge
fontconfig                2.13.1               h65d0f4c_0    conda-forge
freetype                  2.9.1                h6debe1e_4    conda-forge
future                    0.17.0                py36_1000    conda-forge
gettext                   0.19.8.1             h5e8e0c9_1    conda-forge
glib                      2.56.2               h464dc38_1    conda-forge
gmp                       6.1.2                hfc679d8_0    conda-forge
gst-plugins-base          1.12.5               hde13a9d_0    conda-forge
gstreamer                 1.12.5               h5856ed1_0    conda-forge
icu                       58.2                 hfc679d8_0    conda-forge
idna                      2.7                   py36_1002    conda-forge
imagesize                 1.1.0                      py_0    conda-forge
ipykernel                 5.1.0           py36h24bf2e0_1001    conda-forge
ipython                   7.1.1           py36h24bf2e0_1000    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     4.3.4                 py36_1000    conda-forge
jedi                      0.13.1                py36_1000    conda-forge
jeepney                   0.4                        py_0    conda-forge
jinja2                    2.10                       py_1    conda-forge
jpeg                      9c                   h470a237_1    conda-forge
jsonschema                3.0.0a3               py36_1000    conda-forge
jupyter_client            5.2.3                      py_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
keyring                   16.1.0                py36_1000    conda-forge
lazy-object-proxy         1.3.1            py36h470a237_0    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libiconv                  1.15                 h470a237_3    conda-forge
libpng                    1.6.35               ha92aebf_2    conda-forge
libsodium                 1.0.16               h470a237_1    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
libuuid                   2.32.1               h470a237_2    conda-forge
libxcb                    1.13                 h470a237_2    conda-forge
libxml2                   2.9.8                h422b904_5    conda-forge
markupsafe                1.1.0            py36h470a237_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4            py36h470a237_0    conda-forge
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
numpydoc                  0.8.0                      py_1    conda-forge
openssl                   1.0.2p               h470a237_1    conda-forge
packaging                 18.0                       py_0    conda-forge
pandoc                    2.3.1                         0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.3.1                      py_0    conda-forge
pcre                      8.41                 hfc679d8_3    conda-forge
pexpect                   4.6.0                 py36_1000    conda-forge
pickleshare               0.7.5                 py36_1000    conda-forge
pip                       18.1                  py36_1000    conda-forge
pluggy                    0.8.0                      py_0    conda-forge
prompt_toolkit            2.0.7                      py_0    conda-forge
psutil                    5.4.8            py36h470a237_0    conda-forge
pthread-stubs             0.4                  h470a237_1    conda-forge
ptyprocess                0.6.0                 py36_1000    conda-forge
pycodestyle               2.4.0                      py_1    conda-forge
pycparser                 2.19                       py_0    conda-forge
pydocstyle                2.1.1                 py36_1000    conda-forge
pyflakes                  2.0.0                      py_0    conda-forge
pygments                  2.2.0                      py_1    conda-forge
pylint                    2.1.1                 py36_1000    conda-forge
pyopenssl                 18.0.0                py36_1000    conda-forge
pyparsing                 2.3.0                      py_0    conda-forge
pyqt                      5.6.0            py36h8210e8a_7    conda-forge
pyrsistent                0.14.7           py36h470a237_0    conda-forge
pysocks                   1.6.8                 py36_1002    conda-forge
python                    3.6.7                h5001a0f_1    conda-forge
python-dateutil           2.7.5                      py_0    conda-forge
python-jsonrpc-server     0.0.2                      py_0    conda-forge
python-language-server    0.21.2                   py36_0    conda-forge
pytz                      2018.7                     py_0    conda-forge
pyzmq                     17.1.2           py36hae99301_1    conda-forge
qdarkstyle                2.6.4                      py_0    conda-forge
qt                        5.6.2                hf70d934_9    conda-forge
qtawesome                 0.5.3              pyh8a2030e_0    conda-forge
qtconsole                 4.4.3                      py_0    conda-forge
qtpy                      1.5.2              pyh8a2030e_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
requests                  2.20.1                py36_1000    conda-forge
rope                      0.10.7                     py_1    conda-forge
secretstorage             3.1.0                 py36_1001    conda-forge
setuptools                40.6.2                   py36_0    conda-forge
sip                       4.18.1           py36hfc679d8_0    conda-forge
six                       1.11.0                py36_1001    conda-forge
snowballstemmer           1.2.1                      py_1    conda-forge
sphinx                    1.8.2                 py36_1000    conda-forge
sphinxcontrib-websupport  1.1.0                      py_1    conda-forge
spyder                    4.0.0.dev0                <pip>
spyder-kernels            1.1.0                      py_0    conda-forge
sqlite                    3.25.3               hb1c47c0_0    conda-forge
testpath                  0.4.2                 py36_1000    conda-forge
tk                        8.6.9                ha92aebf_0    conda-forge
tornado                   5.1.1            py36h470a237_0    conda-forge
traitlets                 4.3.2                 py36_1000    conda-forge
typed-ast                 1.1.0                    py36_0    conda-forge
urllib3                   1.23                  py36_1001    conda-forge
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.32.3                   py36_0    conda-forge
wrapt                     1.10.11          py36h470a237_1    conda-forge
xorg-libxau               1.0.8                h470a237_6    conda-forge
xorg-libxdmcp             1.1.2                h470a237_7    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
yapf                      0.24.0                     py_0    conda-forge
zeromq                    4.2.5                hfc679d8_6    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge
```

### Dependencies
<!--- Please go to the menu entry Help > Dependencies,
press the Copy to clipboard button and paste below --->

```
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.8.2 (OK)
psutil >=0.3      :  5.4.8 (OK)
pyls >=0.19.0     :  0.21.2 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  None (NOK)
numpy >=1.7       :  None (NOK)
sympy >=0.7.3     :  None (NOK)
cython >=0.21     :  None (NOK)
qtconsole >=4.2.0 :  4.4.3 (OK)
IPython >=4.0     :  7.1.1 (OK)
matplotlib >=2.0.0:  None (NOK)
pylint >=0.25     :  2.1.1 (OK)
```

**Dependencies on setup file:**

```
install_requires = [
    'cloudpickle',
    'pygments>=2.0',
    'qtconsole>=4.2.0',
    'nbconvert',
    'sphinx',
    'pylint',
    'psutil',
    'qtawesome>=0.4.1',
    'qtpy>=1.5.0',
    'pickleshare',
    'pyzmq',
    'chardet>=2.0.0',
    'numpydoc',
    'spyder-kernels>=1.0',
    'keyring;sys_platform!="linux2"',
    'pyqt5<5.10;python_version>="3"',
    'python-language-server[all]',
    'qdarkstyle',
    'pexpect;platform_system!="Windows"',
    'paramiko;platform_system=="Windows"'
]

```

Dependencies in requirements file:

```
cloudpickle
pygments>=2.0
qtconsole>=4.2.0
nbconvert
sphinx
pylint
psutil
qtawesome>=0.4.1
qtpy>=1.2.0
pickleshare
pyzmq
chardet>=2.0.0
numpydoc
pyqt5
keyring
spyder-kernels>=1.0
python-language-server
qdarkstyle
```


Discussion:
You're right. We simply forget about adding QDarkstyle to our list of required deps.
How is it constructed the list that is exhibited in the graphical interface? I have mentioned the incompatibility because in that list mention sphinx >=0.6.6, but none requirements nor setup require this condition. Other is "cloudpickle", that is in both files but not in the graphical list. Cython is in the graphical but is not in the files. For me, the graphical list should be loaded from the setup for example. :)

Besides that, it is a good idea to require qdarkstyle>=2.6.4 because it solves many issues :) Tks
@dpizetta The GUI dependencies dialog only pulls a handpicked modest-sized subset of our full dependency stack, leaving out non-vital direct deps while including some (like Sphinx) that are actually sub-dependencies, not direct dependencies in the requirements in and of themselves. The specific ones were selected due to being generally useful for problem solving and tracking down bugs to specific versions—the dependency list automatically posted here on bug reports is drawn from the same source. Unless we expect a significant number of bugs due to specific QDarkstyle verisons, it might not get added there.

We do have an open issue over on spyder-ide/spyder-docs#87 to add it as well as several other new deps for Spyder 4 beta 2 to our docs, once that's close to release and we're sure we know all the final new deps to add.

> Besides that, it is a good idea to require qdarkstyle>=2.6.4 because it solves many issues :) Tks

Yes indeed, many (if not most) reported by Spyder users and devs. I've mentioned this as well as a review suggestion somewhere recent; not sure if it actually got implemented though.

Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -263,6 +263,14 @@ def setup_logging(cli_options):
                             filename=log_file,
                             filemode='w+')
 
+# =============================================================================
+# Dependencies
+# =============================================================================
+
+QDARKSTYLE_REQVER = '>=2.6.4'
+dependencies.add("qdarkstyle", _("Dark style for the entire interface"),
+                 required_version=QDARKSTYLE_REQVER)
+
 
 #==============================================================================
 # Main Window


Test patch: