RobertJN64 / TKinterModernThemes

A collection of modern themes with code that makes it easy to integrate into a tkinter project.
MIT License
91 stars 7 forks source link

1.8 failing to load on python 3.7 #1

Closed asknevegamby closed 2 years ago

asknevegamby commented 2 years ago

With the latest update to 1.8 (perhaps some subversions earlier) our Continuous Integration sweep detected an import bug from one of our dependencies: this package. Specifically we detected that in WidgetFrame.py:9, we get an error of the form: ImportError: cannot import name 'Literal' from 'typing' Searching this bug on the net reveals that Literals are not supported in python before version 3.8. This is consistent with our test sweep, where it is only the 3.7 version trying to run with the latest version of this that fails, with the rest working, since they either use (another) specific version of this or a different python version.

Please make sure that your latest version viable for specific python versions is actually viable for that version, until then we will have to run with older versions of this package.

RobertJN64 commented 2 years ago

Hello,

This is now fixed in version 1.8.2. The bug was accidentally introduced in 1.8.0-rc0 when I used the Literal feature from the typing module to align with the latest version of tkinter. I have fixed it by using the typing-extensions module, which is the official backport of new features in the typing module from the standard library. I have also updated my unit tests to better catch these issues, they were disabled earlier because of the difficulty of loading tkinter on a headless server.

Please let me know if any other issues develop.