Skip to content

Rename "qt4" to "qt"#1043

Merged
corranwebster merged 2 commits into
mainfrom
enh/move-qt4-to-qt
Apr 20, 2023
Merged

Rename "qt4" to "qt"#1043
corranwebster merged 2 commits into
mainfrom
enh/move-qt4-to-qt

Conversation

@corranwebster
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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