spyoungtech / FreeSimpleGUI

The free-forever GUI library
GNU Lesser General Public License v3.0
313 stars 43 forks source link

Feature request - Keep Python 3.7+ support #28

Closed deajan closed 1 month ago

deajan commented 2 months ago

Hello,

Currently investigating FreeSimpleGUI as PySimpleGUI drop-in replacement. I build a couple of programs on intentionnaly old distributions (Debian 7 and RHEL 7) in order for Nuitka compiled versions to be downwards compatible with at least these systems (since the builds are glibc minimum version dependant).

While I did upgrade those distros to Python 3.7 without too much hassle, it's a real pain to get Python 3.8 to work on these because of OpenSSL bindings. The same applies for Windows, where Python 3.7 is the last version supporting Vista.

I also make recent Python 3.11 builds of course, but I try to maintain as much backwards compatibility as possible, since my programs are industry oriented.

Since FreeSimpleGUI's future is supposed to be Python 3.8, I am not able to use it to maintain compatibility. Would it be alot of work to keep FreeSimpleGUI Python 3.7+ compatible ?

Best regards.

spyoungtech commented 2 months ago

First, let me assure that I do understand the value in keeping things compatible and I do keep this balance in mind and do try to avoid breaking compatibility, especially when it is trivial to avoid it (like when we applied pyupgrade to the codebase). That said, I'm not sure I want the project to be in a position where EOL Python versions are supported, at least not officially. Though, not supporting Python 3.7 doesn't necessarily mean I intend to leave its users in the lurch completely or will refuse to answer questions or not lift a finger to deal with real fixable problems.

To be sure, there absolutely is a goal of this project to be a good steward for the project and former users of PySimpleGUI, including those using legacy Python versions. To that end, I promise I will actively avoid doing silly things like start using walrus operators, or other trivial changes that would widely break compatibility with older versions entirely. If a trivial patch fixes a compatibility issue (on the balance against any drawbacks for supported versions), I will gladly accept those, too, for example.

At the same time, this must be balanced with forward progress and maintainability. I probably won't always be able to make sure every single feature, new or old, will remain compatible with legacy Python versions or that those versions will be tested before each release. Hopefully, wide compatibility across features will be maintained with 3.7 for some time. But the fact being that those versions will not be tested and that there's an estimated less than 2% of users using legacy Python versions (based on historical daily PyPI downloads for PySimpleGUI v4, and less than 1% for this fork currently), issues understandably may go unnoticed for some time and be difficult to backtrack on later. Legacy users at some point may just have to rely on previous versions.

I understand this may not necessarily be exactly the response you may have hoped for, but I do hope it explains my good intentions and how I plan to move this project forward.

Would it be alot of work to keep FreeSimpleGUI Python 3.7+ compatible ?

At this point, I'm not sure. The biggest potential obstacle I know about right now is that I am hoping, eventually, to get this library properly typed and not all typing features are available in 3.7 and, therefore, even if someone was willing to make necessary patches, some day we may be at the mercy of the Python version support policy for typing_extensions though I'm not aware at this time any specific typing features that will be needed that are not in 3.7

deajan commented 2 months ago

I understand. Perhaps you can make a last 3.6 compat release with #27 included, so I can just point my PyPI requirements to that one ?

spyoungtech commented 2 months ago

@deajan the latest release includes the changes in #27

The most recent release shouldn't necessarily be incompatible with 3.6 as far as I know. Though, because 3.6 doesn't support module level __getattr__, use of deprecated global names will cause an error.

If this doesn't work for you and it's really important, I will create a backport release with this change based off a commit closer to the original commit where we forked from PySimpleGUI 4.x

deajan commented 2 months ago

@spyoungtech The "eldest" builds I need are Python 3.7 I've upgraded my project to FreeSimpleGUI 5.1.1, and my builds seem to work fine. So I'll stick with this release until I drop support for very old linux systems.

Thank you.