From e4d59687a77362bd5ba7b64abfa1f52662e51c1f Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 7 Nov 2021 19:40:25 -0500 Subject: [PATCH 1/3] fix regression in force_qt_qpi --- qtpy/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qtpy/__init__.py b/qtpy/__init__.py index 7ac6e66c..2c5558ef 100644 --- a/qtpy/__init__.py +++ b/qtpy/__init__.py @@ -100,9 +100,8 @@ class PythonQtWarning(Warning): PYQT5 = True PYQT6 = PYSIDE2 = PYSIDE6 = False -# When `FORCE_QT_API` is set, we disregard -# any previously imported python bindings. -if 'FORCE_QT_API' in os.environ: +# Unless `FORCE_QT_API` is set, we use previousl imported python bindings. +if not os.environ.get('FORCE_QT_API'): if 'PyQt6' in sys.modules: API = initial_api if initial_api in PYQT6_API else 'pyqt6' elif 'PyQt5' in sys.modules: From e60d456de8eb2c19c79001c02a020e48e6731739 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 7 Nov 2021 20:00:17 -0500 Subject: [PATCH 2/3] Update qtpy/__init__.py --- qtpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtpy/__init__.py b/qtpy/__init__.py index 2c5558ef..33da3639 100644 --- a/qtpy/__init__.py +++ b/qtpy/__init__.py @@ -100,7 +100,7 @@ class PythonQtWarning(Warning): PYQT5 = True PYQT6 = PYSIDE2 = PYSIDE6 = False -# Unless `FORCE_QT_API` is set, we use previousl imported python bindings. +# Unless `FORCE_QT_API` is set, we use previously imported python bindings. if not os.environ.get('FORCE_QT_API'): if 'PyQt6' in sys.modules: API = initial_api if initial_api in PYQT6_API else 'pyqt6' From 2c903ea146e73849fe606397267254174f1a1567 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 7 Nov 2021 20:15:08 -0500 Subject: [PATCH 3/3] Update qtpy/__init__.py --- qtpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtpy/__init__.py b/qtpy/__init__.py index 33da3639..6a548dc3 100644 --- a/qtpy/__init__.py +++ b/qtpy/__init__.py @@ -100,7 +100,7 @@ class PythonQtWarning(Warning): PYQT5 = True PYQT6 = PYSIDE2 = PYSIDE6 = False -# Unless `FORCE_QT_API` is set, we use previously imported python bindings. +# Unless `FORCE_QT_API` is set, use previously imported Qt Python bindings if not os.environ.get('FORCE_QT_API'): if 'PyQt6' in sys.modules: API = initial_api if initial_api in PYQT6_API else 'pyqt6'