From e033b6bd1ffcd1b3d63e78653f94ec5384106200 Mon Sep 17 00:00:00 2001 From: Christoph Hellmann Santos Date: Tue, 30 Aug 2022 17:50:49 +0200 Subject: [PATCH 1/3] Add DEPRECATION message to python_qt_binding import --- src/python_qt_binding/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py index 1e209de..4ec46ee 100644 --- a/src/python_qt_binding/__init__.py +++ b/src/python_qt_binding/__init__.py @@ -52,6 +52,13 @@ """ import sys +import warnings + +_DEPRECATION_MESSAGE = ("Using python_qt_bindings package in python is deprecated." + "The package should be replaced by python3-qtpy system dep." + "python_qt_bindings will only cater generation scrips in the future.") +warnings.warn(_DEPRECATION_MESSAGE, + DeprecationWarning, 2) from python_qt_binding.binding_helper import loadUi # noqa: F401 from python_qt_binding.binding_helper import QT_BINDING # noqa: F401 From 00c52e9bf71b37bd410cb7d451acff03a08c4a90 Mon Sep 17 00:00:00 2001 From: Christoph Hellmann Santos Date: Tue, 30 Aug 2022 17:57:36 +0200 Subject: [PATCH 2/3] Fix linitng problems --- src/python_qt_binding/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py index 4ec46ee..f8797c8 100644 --- a/src/python_qt_binding/__init__.py +++ b/src/python_qt_binding/__init__.py @@ -54,17 +54,17 @@ import sys import warnings +from python_qt_binding.binding_helper import loadUi # noqa: F401 +from python_qt_binding.binding_helper import QT_BINDING # noqa: F401 +from python_qt_binding.binding_helper import QT_BINDING_MODULES +from python_qt_binding.binding_helper import QT_BINDING_VERSION # noqa: F401 + _DEPRECATION_MESSAGE = ("Using python_qt_bindings package in python is deprecated." "The package should be replaced by python3-qtpy system dep." "python_qt_bindings will only cater generation scrips in the future.") warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, 2) -from python_qt_binding.binding_helper import loadUi # noqa: F401 -from python_qt_binding.binding_helper import QT_BINDING # noqa: F401 -from python_qt_binding.binding_helper import QT_BINDING_MODULES -from python_qt_binding.binding_helper import QT_BINDING_VERSION # noqa: F401 - # register binding modules as sub modules of this package (python_qt_binding) for easy importing for module_name, module in QT_BINDING_MODULES.items(): sys.modules[__name__ + '.' + module_name] = module From 9cf32eb7c10ca3d901c66822cadb1c9b05a95d78 Mon Sep 17 00:00:00 2001 From: Christoph Hellmann Santos Date: Tue, 30 Aug 2022 18:00:33 +0200 Subject: [PATCH 3/3] Fix Linting --- src/python_qt_binding/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py index f8797c8..e32cfdc 100644 --- a/src/python_qt_binding/__init__.py +++ b/src/python_qt_binding/__init__.py @@ -51,14 +51,14 @@ setattr(sys, 'SELECT_QT_BINDING', MY_BINDING_NAME) """ -import sys -import warnings - from python_qt_binding.binding_helper import loadUi # noqa: F401 from python_qt_binding.binding_helper import QT_BINDING # noqa: F401 from python_qt_binding.binding_helper import QT_BINDING_MODULES from python_qt_binding.binding_helper import QT_BINDING_VERSION # noqa: F401 +import sys +import warnings + _DEPRECATION_MESSAGE = ("Using python_qt_bindings package in python is deprecated." "The package should be replaced by python3-qtpy system dep." "python_qt_bindings will only cater generation scrips in the future.")