From 68352d53559ab86686ae1b786ce146ffcdc73bf4 Mon Sep 17 00:00:00 2001 From: Mike Hendricks Date: Fri, 13 Mar 2026 17:12:29 -0700 Subject: [PATCH] Replace uses of `exec_` with `exec` Qt6 has retired the python 2 workaround now that `exec` is not reserved. PyQt6 no longer supports `exec_` and Qt5 already supported `exec` in py3. --- examples/add_to_app.py | 2 +- examples/output_console.py | 2 +- preditor/excepthooks.py | 2 +- preditor/gui/app.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/add_to_app.py b/examples/add_to_app.py index b468402c..8f099fec 100644 --- a/examples/add_to_app.py +++ b/examples/add_to_app.py @@ -69,4 +69,4 @@ def raise_error(): act.triggered.connect(raise_error) main_gui.show() - app.exec_() + app.exec() diff --git a/examples/output_console.py b/examples/output_console.py index 16896376..b6d11a7b 100644 --- a/examples/output_console.py +++ b/examples/output_console.py @@ -240,4 +240,4 @@ def send_logging(self): main_gui = ExampleApp(init_preditor=not args.no_preditor) main_gui.show() - app.exec_() + app.exec() diff --git a/preditor/excepthooks.py b/preditor/excepthooks.py index fac0a6bd..5e2ccfb4 100644 --- a/preditor/excepthooks.py +++ b/preditor/excepthooks.py @@ -137,7 +137,7 @@ def ask_to_show_logger(self, *exc_info): ConsolePrEdit._errorPrompted = True errorDialog = config.error_dialog_class(config.root_window()) errorDialog.setText(exc_info) - errorDialog.exec_() + errorDialog.exec() # interrupted until dialog closed finally: diff --git a/preditor/gui/app.py b/preditor/gui/app.py index 465b641f..dd4f0a01 100644 --- a/preditor/gui/app.py +++ b/preditor/gui/app.py @@ -160,4 +160,4 @@ def start(self): """Exec's the QApplication if it hasn't already been started.""" if self.app_created and self.app and not self.app_has_exec: self.app_has_exec = True - Qt.QtCompat.QApplication.exec_() + Qt.QtCompat.QApplication.exec()