Bug 273866 - devel/py-qt5-pyqt depends on deprecated www/qt5-webkit
Summary: devel/py-qt5-pyqt depends on deprecated www/qt5-webkit
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL: https://www.freshports.org/devel/py-q...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-16 19:58 UTC by rkoberman
Modified: 2023-12-02 02:14 UTC (History)
8 users (show)

See Also:


Attachments
disable webkit in py-qt5-pyqt (4.38 KB, patch)
2023-09-18 19:31 UTC, Tijl Coosemans
no flags Details | Diff
devel/py-qt5-pyqt: Disable QtWebkit bindings (3.42 KB, patch)
2023-11-02 00:44 UTC, Jason E. Hale
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rkoberman 2023-09-16 19:58:17 UTC
hplib depends on py-qt5-pyqt which depends on qt5-webkit. qt5-webkit has been deprecated and scheduled for removal at the end of 2023. Is any move to qt6 on the horizon from HP?
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2023-09-18 18:57:05 UTC
hplip does not need webkit, so this is a pyqt problem.  I don't think hplip will switch to Qt6 before distros switch to Plasma 6.
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2023-09-18 19:31:01 UTC
Created attachment 245004 [details]
disable webkit in py-qt5-pyqt

Turns out I removed webkit support from pyqt in my local tree a few months ago.  Here's the patch for that.  This breaks ports that depend on it of course, but I guess such ports would be removed together with webkit at the end of this year anyway.  The alternative would be to make webkit support optional.
Comment 3 Adriaan de Groot freebsd_committer freebsd_triage 2023-09-19 14:03:24 UTC
Thanks tijl@, I think we'll just land the "remove webkit from pyqt" bits .. and possiblyexplor pyqt+webengine, which Riverbank Computing seems to suggest is a separate product.
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-28 16:53:54 UTC
Is there anything blocking this from landing in the tree ?
Comment 5 Jason E. Hale freebsd_committer freebsd_triage 2023-10-28 17:53:54 UTC
(In reply to Muhammad Moinur Rahman from comment #4)
We would first have to go through all of the ports depending on devel/py-qt5-pyqt and see if any actually require the qt5-webkit bindings. Once that is done, mark the ones that do DEPRECATED with the same EXPIRATION_DATE as qt5-webkit. If nothing needs them, then we could certainly disable the webkit bindings sooner.
Comment 6 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-28 19:09:18 UTC
I have started an exp-run with this patch. Will update once finished.
Comment 7 Jason E. Hale freebsd_committer freebsd_triage 2023-10-28 20:14:26 UTC
(In reply to Muhammad Moinur Rahman from comment #6)
Thanks! I'm not sure if an exp-run will tell everything, though. Some projects that require the bindings at runtime may build fine whether they are present during the build or not. I've started to grep the sources for 'PyQt5.QtWebKit'. I'm about a third of the way through the list and so far have had hits on:
audio/carla
devel/py-pyface
devel/tortoisehg

Need to get to bed, though, and save the rest for tomorrow.
Comment 8 Jason E. Hale freebsd_committer freebsd_triage 2023-10-29 17:36:51 UTC
After going through all the ports that depend on py-qt5-pyqt manually, I am only seeing 3 ports that use the WebKit bindings. multimedia/openshot can use py-qt5-webengine instead and that is a dead simple dependency add. devel/py-pyface and devel/tortoisehg that I listed previously were false positives upon closer examination.

audio/carla - still actively developed and maintained. CC-ing maintainer. Could possibly patch out.
emulators/fs-uae-launcher - master branch upstream removed the need for this, but project seems dead (2 years); maintained by ports@ and probably won't be missed.
multimedia/openshot - can use py-qt5-webengine as backend instead (autodetected), dep just needs added.
net-im/scudcloud - already marked DEPRECATED; very dead project (5 years).
Comment 9 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-29 17:47:00 UTC
(In reply to Jason E. Hale from comment #8)
Let me know if there is anything I can do to push these changes.
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2023-10-29 20:26:34 UTC
I am not too familiar with Python's Qt bindings.
Here is the upstream issue: https://github.com/falkTX/Carla/issues/1833
Please feel free to patch it if you know how.
Comment 11 Yuri Victorovich freebsd_committer freebsd_triage 2023-10-29 20:32:34 UTC
Based on the upstream response WebKit is not really used in the project.
Due to the nature of Python code these import statements can be safely ignored.
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-10-29 20:39:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ff956251efce04c6e9756057f38327992e56f519

commit ff956251efce04c6e9756057f38327992e56f519
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-10-29 19:09:15 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-10-29 20:37:03 +0000

    multimedia/openshot: Prepare for www/qt5-webkit removal

    www/qt5-webkit is scheduled to be removed at the end of the year [1]
    along with its corresponding python bindings from devel/py-qt5-pyqt. [2]
    In the meantime, this port will continue to default to the WebKit
    backend unless otherwise specified via the commandline arguments
    '-b webengine' or, synonymously, '--web-backend webengine'. After
    www/qt5-webkit deletion, it will automatically use the bindings from
    www/py-qt5-webengine.

    [1] https://cgit.freebsd.org/ports/commit/?id=e8e65e7574de0b374caaa3da0ba6a26a67103e62

    PR:             273866 [2]
    With hat:       kde@

 multimedia/openshot/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 13 Jason E. Hale freebsd_committer freebsd_triage 2023-10-29 21:09:01 UTC
(In reply to Yuri Victorovich from comment #11)
Thanks for your quick response Yuri and also that of the developer. I'm still a little skeptical and will try to run it without the WebKit bindings, but I am not familiar with this software at all. In the "modgui stuff", as the developer said, is exactly where I found the WebKit bindings being used. I looked back in the history and they had disabled it when they were transitioning from Qt4 to Qt5, so that is why I suggested it might be possible to disable it again. But since that the developer says it doesn't really work, I'm not exactly sure how to compare runtime with WebKit and no WebKit.
Comment 14 Yuri Victorovich freebsd_committer freebsd_triage 2023-10-29 21:15:46 UTC
(In reply to Jason E. Hale from comment #13)

Personally, I would trust the upstream developer.

The main function of Carla is to instantiate LV2 plugins.

Carla's GUI window allows to add any LV2 plugins installed by ports audio/*-lv2.

It works as long as it is able to add them and to display plugins' own GUI windows.
Comment 15 Tatsuki Makino 2023-10-29 22:32:29 UTC
Thank you for your efforts.
And sorry, comment #12 changes are not enough.
The web backend used is fixed to webkit by multimedia/openshot/files/patch-src_launch.py
At the very least, this file must also be deleted.

I think there was some other odd behavior, but I forget :)
Comment 16 Jason E. Hale freebsd_committer freebsd_triage 2023-10-29 23:23:55 UTC
(In reply to Tatsuki Makino from comment #15)
Aha! That answers a lot of questions. Thank you very much! :) I was only looking at the source directly and was seriously starting to doubt my sanity and ability to read code when it kept defaulting to WebKit, when WebEngine is clearly the default option according to https://github.com/OpenShot/openshot-qt/blob/v3.1.1/src/windows/views/webview.py#L163, despite what the help message says.

True, that patch should be removed, but if you can recall whatever weirdness you were experiencing with WebEngine, Iā€™d certainly like to address that before WebKit is removed.
Comment 17 Jason E. Hale freebsd_committer freebsd_triage 2023-11-02 00:44:08 UTC
Created attachment 246055 [details]
devel/py-qt5-pyqt: Disable QtWebkit bindings

Update the patch to disable the QtWebkit bindings. Previous patch was using CONFIGURE_ARGS with has no effect in PyQt ports. SIP_ARGS needs to be used instead with the syntax --disable MODULE (space in between, not '='). There were also pkg-plist issues.
Comment 18 Jason E. Hale freebsd_committer freebsd_triage 2023-11-02 01:35:22 UTC
I've updated emulators/fs-uae-launcher to the latest upstream version and it should be fine without WebKit.

The only problematic port remaining is net-im/scudcloud which is abandonware (https://github.com/raelgc/scudcloud/issues/628) and set to expire on 2023-11-28.

multimedia/openshot/files/patch-src_launch.py also needs to be removed.

After these tasks are complete, the WebKit bindings can be disabled in py-qt5-pyqt.
Comment 19 commit-hook freebsd_committer freebsd_triage 2023-12-02 02:11:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2133960e55fe5aa3bee22b25aeccdd54e868b5b0

commit 2133960e55fe5aa3bee22b25aeccdd54e868b5b0
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-11-02 00:33:10 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-12-02 02:09:35 +0000

    devel/py-qt5-pyqt: Disable QtWebKit bindings

    www/qt5-webkit is set to expire 2023-12-31 and we no longer have ports
    that require the QtWebKit python bindings.

    PR:             273866
    Reported by:    <rkoberman@gmail.com>

 devel/py-qt5-pyqt/Makefile                           |  5 ++++-
 devel/py-qt5-pyqt/pkg-plist                          | 19 -------------------
 multimedia/openshot/files/patch-src_launch.py (gone) | 11 -----------
 3 files changed, 4 insertions(+), 31 deletions(-)
Comment 20 Jason E. Hale freebsd_committer freebsd_triage 2023-12-02 02:14:33 UTC
The last port using the WebKit bindings has been removed and I've disable them in devel/py-qt5-pyqt.