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

Rename "qt4" to "qt" #1043

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Rename "qt4" to "qt" #1043

merged 2 commits into from
Apr 20, 2023

Conversation

corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Apr 20, 2023

Rename *.qt4.* modules as *.qt.* and adapt imports to account for changes in Pyface 8.0 and TraitsUI 8.0 while keeping backwards compatibility.

It also removes some lingering PyQt4 support code.

This has some overlap with #1028 but doesn't fix everything that that PR does, so we still need that, or need to merge it into this.

As best I can tell, this change will break one test in an internal downstream project so we don't need to do any magic backwards compatibility mapping like we did in Pyface or TraitsUI.

@corranwebster corranwebster marked this pull request as ready for review April 20, 2023 08:48
Comment on lines +20 to +23
try:
from traitsui.qt.editor import Editor
except ModuleNotFoundError:
from traitsui.qt4.editor import Editor
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this PR's change force us to use a traitsui which doesn't have a qt4 subpackage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's currently backward compatible because it was low effort to do that (only 3-4 places needed try/excepts to achieve it) and it simplifies releasing.

@corranwebster corranwebster merged commit 6c6ac95 into main Apr 20, 2023
@corranwebster corranwebster deleted the enh/move-qt4-to-qt branch April 20, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants