Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DEPRECATION message to python_qt_binding import #117

Open
wants to merge 3 commits into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/python_qt_binding/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,20 @@
setattr(sys, 'SELECT_QT_BINDING', MY_BINDING_NAME)
"""

import sys

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.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...cater to generating scripts..."

Slightly pedantic spelling correction

warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning, 2)

# 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
Expand Down