From 8593357ab03ac0ea9d2d4492830fc6d1438228cb Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Jan 2026 18:52:09 +0800 Subject: [PATCH] Drop Python 3.8 support --- gns3/main.py | 6 +++--- gns3/qt/__init__.py | 3 +-- setup.py | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gns3/main.py b/gns3/main.py index ee549dde..db82469a 100644 --- a/gns3/main.py +++ b/gns3/main.py @@ -184,9 +184,9 @@ def main(): # catch exceptions to write them in a file sys.excepthook = exceptionHook - # we only support Python 3 version >= 3.8 - if sys.version_info < (3, 8): - raise SystemExit("Python 3.8 or higher is required") + # we only support Python 3 version >= 3.9 + if sys.version_info < (3, 9): + raise SystemExit("Python 3.9 or higher is required") if parse_version(QtCore.QT_VERSION_STR) < parse_version("6.3.1"): raise SystemExit("Requirement is PyQt6 version 6.3.1 or higher, got version {}".format(QtCore.QT_VERSION_STR)) diff --git a/gns3/qt/__init__.py b/gns3/qt/__init__.py index 628989cc..b8d54a26 100644 --- a/gns3/qt/__init__.py +++ b/gns3/qt/__init__.py @@ -181,8 +181,7 @@ class LogQMessageBox(QtWidgets.QMessageBox): Return a logger in the context of the caller in order to have the correct information in the log """ - if sys.version_info < (3, 5): - return logging.getLogger('qt') + try: caller = inspect.stack()[2] location = "{}:{}".format(os.path.basename(caller.filename), caller.lineno) diff --git a/setup.py b/setup.py index 4d4510b0..0f75f49d 100644 --- a/setup.py +++ b/setup.py @@ -19,9 +19,9 @@ import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand -# we only support Python 3 version >= 3.8 -if len(sys.argv) >= 2 and sys.argv[1] == "install" and sys.version_info < (3, 8): - raise SystemExit("Python 3.8 or higher is required") +# we only support Python 3 version >= 3.9 +if len(sys.argv) >= 2 and sys.argv[1] == "install" and sys.version_info < (3, 9): + raise SystemExit("Python 3.9 or higher is required") class PyTest(TestCommand): @@ -93,7 +93,6 @@ setup( "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11",