5yutan5 / PyQtDarkTheme

A flat dark theme for PySide and PyQt.
https://pyqtdarktheme.readthedocs.io
MIT License
508 stars 81 forks source link

Python 3.12 Support #252

Open exislow opened 8 months ago

exislow commented 8 months ago

Please add Python 3.12 support to https://github.com/5yutan5/PyQtDarkTheme/blob/main/pyproject.toml

woopelderly commented 7 months ago

I created a PR here: https://github.com/5yutan5/PyQtDarkTheme/pull/253, however it required that Python 3.7 support was dropped. Not sure if this will cause anyone trouble.

luccassa commented 4 months ago

I am unable to get package working with 3.12.2. There seems to be no main in the package? Cannot use setup_theme and having problems with load_style sheet example. Installing with 3.11.3 worked fine for me.

lfss-zxj commented 4 months ago

AttributeError: module 'qdarktheme' has no attribute 'setup_theme'

djleo70 commented 4 months ago

AttributeError: module 'qdarktheme' has no attribute 'setup_theme'

+1 goddamn

clbarnes commented 2 months ago

AttributeError: module 'qdarktheme' has no attribute 'setup_theme'

The reason for this error is that you have the very old pyqtdarktheme <= 0.1.7 installed. That's the last version where the package maintainers did not specify an upper bound of supported python versions. Therefore, according to their metadata, those very old versions claim compatibility with all future python versions: pip looks through all versions until it finds one which claims to be compatible and installs that.

djleo70 commented 1 week ago

AttributeError: module 'qdarktheme' has no attribute 'setup_theme'

The reason for this error is that you have the very old pyqtdarktheme <= 0.1.7 installed. That's the last version where the package maintainers did not specify an upper bound of supported python versions. Therefore, according to their metadata, those very old versions claim compatibility with all future python versions: pip looks through all versions until it finds one which claims to be compatible and installs that.

The problem is that pip does not update beyond 0.1.7 if python version > 3.12 because of package requirements The workaround I've found so far is to use the following command:

pip install pyqtdarktheme==2.1.0 --ignore-requires-python

My projects still working

JWCook commented 3 days ago

@5yutan5 Do you have a few minutes to merge in #253 and publish a new release? It would be greatly appreciated.