Closed mgorny closed 8 months ago
I’m seeing the same issue while trying to update the python-qdarkstyle
package in Fedora Linux.
+ /usr/bin/python3 -m qdarkstyle --all
* OPERATING SYSTEM---------------------------------------------------------------
- System........................ Linux
- Release....................... 6.5.5-200.fc38.x86_64
- Platform...................... Linux-6.5.5-200.fc38.x86_64-x86_64-with-glibc2.38.9000
- Version....................... #1 SMP PREEMPT_DYNAMIC Sun Sep 24 15:52:44 UTC 2023
* PYTHON DISTRIBUTION------------------------------------------------------------
- Version....................... 3.12.0
- C Compiler.................... GCC 13.2.1 20230918 (Red Hat 13.2.1-3)
- C API Version................. 1013
- Implementation................ cpython
- Implementation Version........ 3.12.0
* QT BINDINGS--------------------------------------------------------------------
- PyQt5 Version................. 5.15.9
- PyQt5 Qt Version.............. 5.15.11
* QT ABSTRACTIONS----------------------------------------------------------------
- qtpy Version.................. 2.4.1
- qtpy Binding.................. pyqt5
- qtpy Binding Variable......... os.environ['QT_API']
- qtpy Import Name.............. qtpy
- qtpy Status................... OK
* PYTHON PACKAGES----------------------------------------------------------------
- helpdev....................... 0.7.1
- QDarkStyle.................... 3.2
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/builddir/build/BUILD/QDarkStyleSheet-5eda73d310b6baf21be18d698f7a7a00ebf10686/qdarkstyle/utils/__main__.py", line 97, in <module>
sys.exit(main())
^^^^^^
File "/builddir/build/BUILD/QDarkStyleSheet-5eda73d310b6baf21be18d698f7a7a00ebf10686/qdarkstyle/utils/__main__.py", line 93, in main
process_palette(palette=palette, compile_for=args.create)
File "/builddir/build/BUILD/QDarkStyleSheet-5eda73d310b6baf21be18d698f7a7a00ebf10686/qdarkstyle/utils/__init__.py", line 70, in process_palette
create_qss(palette=palette)
File "/builddir/build/BUILD/QDarkStyleSheet-5eda73d310b6baf21be18d698f7a7a00ebf10686/qdarkstyle/utils/scss.py", line 162, in create_qss
stylesheet = _create_qss(main_scss_filepath, qss_filepath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/QDarkStyleSheet-5eda73d310b6baf21be18d698f7a7a00ebf10686/qdarkstyle/utils/scss.py", line 100, in _create_qss
qtsass.compile_filename(main_scss_path, qss_filepath,
File "/usr/lib/python3.12/site-packages/qtsass/api.py", line 131, in compile_filename
css = compile(string, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/qtsass/api.py", line 103, in compile
return qt_conform(sass.compile(**kwargs))
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/site-packages/sass.py", line 725, in compile
raise CompileError(v)
sass.CompileError: Error: Undefined variable: "$COLOR-DISABLED".
on line 49:16 of ../qss/_styles
from line 4:9 of stdin
>> color: $COLOR_DISABLED;
---------------^
This is now blocking upgrading to spyder-5.5.0:
andrew@andrew-gentoo-laptop ~ % spyder
QSocketNotifier: Can only be used with threads started with QThread
fromIccProfile: failed minimal tag size sanity
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.11/spyder", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/spyder/app/start.py", line 256, in main
mainwindow.main(options, args)
File "/usr/lib/python3.11/site-packages/spyder/app/mainwindow.py", line 1847, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/spyder/app/utils.py", line 289, in create_window
main.setup()
File "/usr/lib/python3.11/site-packages/spyder/app/mainwindow.py", line 752, in setup
internal_plugins = find_internal_plugins()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/spyder/app/find_plugins.py", line 40, in find_internal_plugins
mod = importlib.import_module(entry_point.module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/spyder/plugins/pylint/plugin.py", line 22, in <module>
from spyder.plugins.pylint.confpage import PylintConfigPage
File "/usr/lib/python3.11/site-packages/spyder/plugins/pylint/confpage.py", line 16, in <module>
from spyder.plugins.pylint.main_widget import (MAX_HISTORY_ENTRIES,
File "/usr/lib/python3.11/site-packages/spyder/plugins/pylint/main_widget.py", line 90, in <module>
class CategoryItem(QTreeWidgetItem):
File "/usr/lib/python3.11/site-packages/spyder/plugins/pylint/main_widget.py", line 102, in CategoryItem
'icon': ima.icon("convention")
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/spyder/utils/icon_manager.py", line 439, in icon
kwargs['color_disabled'] = QStylePalette.COLOR_DISABLED
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'DarkPalette' has no attribute 'COLOR_DISABLED'
Hey guys, for now you can copy/paste the package assets from the PyPI tarball until we have time to address this.
Hey guys, for now you can copy/paste the package assets from the PyPI tarball until we have time to address this.
Thanks for the suggestion! In Fedora Linux we’ll need to wait for a proper solution, since our packaging guidelines explicitly forbid shipping precompiled CSS assets.
Thank you all for reporting, could you check the develop version? I this new version solves the problem. @ccordoba12 if you have time, could you check in Spyder this version? Now all the icons and resources are up to date. If everything is ok, I can generate the build/pypi. Thanks
I haven’t tested with Spyder, but I tried building a 3.2.1 prerelease package for Fedora Linux using 969fd6042659e8cd3a18d95710e697013887a133, and I was able to compile assets using python3 -m qdarkstyle.utils --create pyqt5
.
Yeah, that one looks fine. Thanks!
@ccordoba12 if you have time, could you check in Spyder this version?
@dpizetta, it seems that everything is in order for Spyder. Specifically, I ran the following commands in a clean virtualenv:
cd QDarkStyleSheet # my clone of this repo with your latest changes
pip install -e .
pip install spyder
Spyder runs without problems and picks up correctly the color for disabled icons we added in 3.2.
Let me know if you need anything else I can help you with.
Thanks you all, new release in PyPI
Describe Your Environment
Description / Steps to Reproduce [if necessary]
The test suite in the 3.2 release and git as of 5eda73d310b6baf21be18d698f7a7a00ebf10686 fails:
I can reproduce by running e.g.:
(I needed to add
-develop
as otherwiseqtsass
wasn't pulled in)Actual Result