Discuss: How long should Leo support PyQt5?

26 views
Skip to first unread message

Edward K. Ream

unread,
Feb 15, 2022, 11:26:22 AM2/15/22
to leo-editor
Qt6 was released more than a year ago. I would like to remove support for PyQt5 soon after releasing Leo 6.6 final.

Don't panic.  Leo 6.6 will support both PyQt5 and PyQt6.

Supporting only PyQt6 will simplify the code and allow mypy and pylint to do a better job of spotting problems.

Your comments, please.

Edward

tbp1...@gmail.com

unread,
Feb 15, 2022, 12:27:49 PM2/15/22
to leo-editor
No need to simplify existing code that is working, since it's already been adjusted for both.  mypy and pylint are reasonable concerns, and maybe there will turn out to be a simple way to handle them.  So let's not rush!

Edward K. Ream

unread,
Feb 15, 2022, 5:42:57 PM2/15/22
to leo-editor
On Tue, Feb 15, 2022 at 11:27 AM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
No need to simplify existing code that is working, since it's already been adjusted for both.  mypy and pylint are reasonable concerns, and maybe there will turn out to be a simple way to handle them.  So let's not rush!

I agree. However, I may create a Qt6 branch to see whether mypy and pylint would work better.

Edward

tbp1...@gmail.com

unread,
Feb 15, 2022, 5:57:54 PM2/15/22
to leo-editor
Here is how I have been testing with either pyqt5 or 6.  No need for separate virtual environments.

After I install pyqt6, I go to the installation location (site-packages) and move all the pyqt6 folders (including the *.dist-info ones)  somewhere else.  In my case I'm using c:\Tom\qt623.  When I want to run with pyqt6, I set

PYTHONPATH=c:\Tom\qt623

When I want to run with pyqt5, I unset PYTHONPATH.  It would be easy to make a batch file to do this and launch Leo, but I haven't bothered so far.  

When you copy all the folders including the *.dist-info ones, then pip doesn't know that pyqt6 is installed, unless PYTHONPATH has been set.  That's a benefit when you need to work with different versions.

Edward K. Ream

unread,
Feb 17, 2022, 8:40:03 AM2/17/22
to leo-editor
On Tuesday, February 15, 2022 at 10:26:22 AM UTC-6 Edward K. Ream wrote:
Qt6 was released more than a year ago. I would like to remove support for PyQt5 soon after releasing Leo 6.6 final.

I think I'll put this plan on hold for another year :-)

Edward
Reply all
Reply to author
Forward
0 new messages