From c4d71eae2f5760059f0378e622db5ed615e934ab Mon Sep 17 00:00:00 2001 From: Sam Bradshaw <33942237+roxgib@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:49:02 +1000 Subject: [PATCH] Use platform.platform() in supportText() (#1999) From [the documentation](https://docs.python.org/3.9/library/platform.html#platform.platform): > Returns a single string identifying the underlying platform with as much useful information as possible. The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. Changed in version 3.8: On macOS, the function now uses mac_ver(), if it returns a non-empty release string, to get the macOS version rather than the darwin version. The main advantage of this change is that it provides the architecture of the platform, which is increasingly relevant as ARM systems are becoming more common. --- qt/aqt/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index 5acef4687..1d6163937 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -905,12 +905,7 @@ def supportText() -> str: from aqt import mw - if is_win: - platname = f"Windows {platform.win32_ver()[0]}" - elif is_mac: - platname = f"Mac {platform.mac_ver()[0]}" - else: - platname = "Linux" + platname = platform.platform() def schedVer() -> str: try: