-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Warn if using a deprecated and/or unsupported Qt 5 version #284
Comments
@ccordoba12 said in response to @dalthviz on #261 :
The issue is that PyQt <5.9/Pyside <5.12 is already likely broken in 2.0, since it hasn't been tested for years and any explicit compat code was removed, so developers will not be warned about it. For the reasons explained above, the very same ones that justified a However, particularly since it looks like we'll still have it for the initial 2.0 release, the |
I think we should show an UserWarning or maybe a RuntimeWarning on 2.0 if we detect that QtPy is being used with Qt <5.12 Maybe the message can go along the lines of saying something like: We detected that you are using an old version of Qt 5. We recommend you to update to a more recent version (Qt >5.12) Regarding that detection on 1.11.3, I'm not totally sure what type of warning or message to put. |
Under PyQt 5.9 is what is untested and deprecated, so I wouldn't suggest a user-visible
The rationale is identical to the |
So a Also, just in case, what do you think @ccordoba12 ? |
Yup, that's my take, with the following revisions as mentioned above:
So I'd suggest
In addition, if and when we confirm plans to deprecate and eventually remove PyQt <5.12 on QtPy 2.x, we would want to add a |
Makes sense to me 👍 |
Do you have some time to work on this @CAM-Gerlach ? I think that after this is done we could release |
Sure; I was working on |
Although it seems you already decided how to proceed, I just want to say that I also agree with this. |
@ccordoba12 FYI, we revised that slightly since that comment; here is the current consensus (as is presently implemented in PR #289 )
In addition, if and when we confirm plans to deprecate and eventually remove PyQt <5.12 on QtPy 2.x, we would want to add a |
Yes, I think that's a good idea too. |
Great, happy to help with that too; just ping me if/when that is decided and for what version. |
PR: Add warning for deprecated/EoL Qt5 & PyQt5/PySide2 versions to fix #284
Since #261 was implemented in PR #283 , we're now issuing a
DeprecationWarning
for QtPy 1.x when used with Qt versions and bindings that are deprecated, untested in QtPy 1.x, and unsupported in QtPy 2.0.Given Qt/PyQt versions <5.9 and Pyside2 versions <5.12 are equally deprecated, untested in QtPy 1.x and officially unsupported in QtPy 2.0 (since we've removed any compat code for them, AFAIK), it would seem to make sense to issue an equivalent
DeprecationWarning
in QtPy 1.x for that case as well.Furthermore, we might want to elevate the warning to a
UserWarning
or aPythonQtError
in QtPy 2.0, given that serious runtime breakage may occur, just as we currently do in 2.0 for the Qt 4 bindings, so users see it up front rather than having things mysteriously break later.Depending on what is decided in #233 or elsewhere for future QtPy 2.0 versions going forward, we could also consider introducing a DeprecationWarning in QtPy 2.0 for PyQt <5.12 in that version, if in #233 it is decided to that be our support target for future follow-on versions. However, if that's not immediately decided or out of scope here, that could be punted again to another followup issue.
Relevant conversation history on #261:
I said
@dalthviz said
I said:
@dalthviz said
I said
@dalthviz said
I said
@ccordoba12 said
I said
@ccordoba12 said
@dalthviz said
@ccordoba12 said
I said
Originally posted by @CAM-Gerlach in #261 (comment)
The text was updated successfully, but these errors were encountered: