Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-11 Thread Landry Breuil
Le Sun, Feb 11, 2024 at 02:34:35PM +0100, Rafael Sadowski a écrit :
> On Fri Feb 09, 2024 at 08:02:41PM +0100, Landry Breuil wrote:
> > Le Fri, Feb 09, 2024 at 10:26:18AM +, Stuart Henderson a écrit :
> > > On 2024/02/09 10:14, Stuart Henderson wrote:
> > > > Is the "remove qtwebkit" approach because it's causing an actual
> > > > problem, or is it just that it's old? Can we switch to qtwebengine where
> > > > possible but still keep qtwebkit for things where it's still needed
> > > > for certain software to work properly? Rendering local HTML files isn't
> > > > a particularly high security risk.
> > > > 
> > > > Regarding qgis, it seems they _can't_ use qtwebengine:
> > > > https://github.com/qgis/QGIS/issues/49512#issuecomment-1244676849
> > > 
> > > Aha - there is https://github.com/qgis/QGIS/pull/53255 which has
> > > been merged into git master, so this requirement might go away soon.
> > 
> > yes, and https://github.com/qgis/QGIS/pull/55627 starts paving the way
> > for qtwebengine - at some point qgis will switch to qt6 which doesnt
> > have qtwebkit, so qtwebengine support will have to come (as
> > https://github.com/qgis/QGIS/issues/54965 said, with things that might
> > not be possible yet...)
> 
> It is confusing to follow all these PRs as a release note.
> 
> > 
> > but i can readd the dep on qtwebkit if it's here to stay in the
> > portstree a little longer :)
> > 
> 
> I have spoken to Stuart, we will stay with qtwebkit until qgis is ready.
> Can you keep an eye on it?

sure, i'll make sure to switch to qt6 and to qtwebengine as soon as
upstream deems it 'ready' :)



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-11 Thread Rafael Sadowski
On Fri Feb 09, 2024 at 08:02:41PM +0100, Landry Breuil wrote:
> Le Fri, Feb 09, 2024 at 10:26:18AM +, Stuart Henderson a écrit :
> > On 2024/02/09 10:14, Stuart Henderson wrote:
> > > Is the "remove qtwebkit" approach because it's causing an actual
> > > problem, or is it just that it's old? Can we switch to qtwebengine where
> > > possible but still keep qtwebkit for things where it's still needed
> > > for certain software to work properly? Rendering local HTML files isn't
> > > a particularly high security risk.
> > > 
> > > Regarding qgis, it seems they _can't_ use qtwebengine:
> > > https://github.com/qgis/QGIS/issues/49512#issuecomment-1244676849
> > 
> > Aha - there is https://github.com/qgis/QGIS/pull/53255 which has
> > been merged into git master, so this requirement might go away soon.
> 
> yes, and https://github.com/qgis/QGIS/pull/55627 starts paving the way
> for qtwebengine - at some point qgis will switch to qt6 which doesnt
> have qtwebkit, so qtwebengine support will have to come (as
> https://github.com/qgis/QGIS/issues/54965 said, with things that might
> not be possible yet...)

It is confusing to follow all these PRs as a release note.

> 
> but i can readd the dep on qtwebkit if it's here to stay in the
> portstree a little longer :)
> 

I have spoken to Stuart, we will stay with qtwebkit until qgis is ready.
Can you keep an eye on it?



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-09 Thread Landry Breuil
Le Fri, Feb 09, 2024 at 10:26:18AM +, Stuart Henderson a écrit :
> On 2024/02/09 10:14, Stuart Henderson wrote:
> > Is the "remove qtwebkit" approach because it's causing an actual
> > problem, or is it just that it's old? Can we switch to qtwebengine where
> > possible but still keep qtwebkit for things where it's still needed
> > for certain software to work properly? Rendering local HTML files isn't
> > a particularly high security risk.
> > 
> > Regarding qgis, it seems they _can't_ use qtwebengine:
> > https://github.com/qgis/QGIS/issues/49512#issuecomment-1244676849
> 
> Aha - there is https://github.com/qgis/QGIS/pull/53255 which has
> been merged into git master, so this requirement might go away soon.

yes, and https://github.com/qgis/QGIS/pull/55627 starts paving the way
for qtwebengine - at some point qgis will switch to qt6 which doesnt
have qtwebkit, so qtwebengine support will have to come (as
https://github.com/qgis/QGIS/issues/54965 said, with things that might
not be possible yet...)

but i can readd the dep on qtwebkit if it's here to stay in the
portstree a little longer :)



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-09 Thread Stuart Henderson
On 2024/02/09 10:14, Stuart Henderson wrote:
> Is the "remove qtwebkit" approach because it's causing an actual
> problem, or is it just that it's old? Can we switch to qtwebengine where
> possible but still keep qtwebkit for things where it's still needed
> for certain software to work properly? Rendering local HTML files isn't
> a particularly high security risk.
> 
> Regarding qgis, it seems they _can't_ use qtwebengine:
> https://github.com/qgis/QGIS/issues/49512#issuecomment-1244676849

Aha - there is https://github.com/qgis/QGIS/pull/53255 which has
been merged into git master, so this requirement might go away soon.



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-09 Thread Stuart Henderson
Is the "remove qtwebkit" approach because it's causing an actual
problem, or is it just that it's old? Can we switch to qtwebengine where
possible but still keep qtwebkit for things where it's still needed
for certain software to work properly? Rendering local HTML files isn't
a particularly high security risk.

Regarding qgis, it seems they _can't_ use qtwebengine:
https://github.com/qgis/QGIS/issues/49512#issuecomment-1244676849


On 2024/02/09 08:44, Landry Breuil wrote:
> Le Fri, Feb 09, 2024 at 08:19:12AM +0100, Landry Breuil a écrit :
> > Le Thu, Feb 08, 2024 at 09:06:44PM +0100, Rafael Sadowski a écrit :
> > > On Thu Feb 08, 2024 at 07:54:26PM +0100, Landry Breuil wrote:
> > > > Le Thu, Feb 08, 2024 at 03:12:17PM +0100, Rafael Sadowski a écrit :
> > > > > Here is a simple diff to remove qtwebkit from. I modified configure.py
> > > > > to make sure it will not picked up even it is present.
> > > > > 
> > > > > OK?
> > > > 
> > > > obvious question, but all the runtime consumers of py-qt5 been checked
> > > > for not actually relying on qtwebkit ?
> > > > 
> > > 
> > > I have prep'ed for webkit in all ports that use py-qt5.
> > > 
> > > What I see with my 99 years python experience:
> > > 
> > > - lots of "webkit" in qutebrowser, but it runs with py-qtwebengine and
> > >   that's all css -webkit hacks.
> > > - calibre and everything else looks good to me.
> > > - I don't know if qgis parts are relevant
> > 
> > the qgis bits look to be for a bundled copy of it.. i havent tried
> > runtime yet with qtwebkit disabled, but from what i've understood from
> > some gh issues/PR identifying objects on layers with html format should
> > still work.
> 
> now that i've tested 3.34.3p1, HTML query on features is rendered as
> plaintext, so i guess there's some kind of fallback
> mechanism/conversion.. not great, but i can live with that.
> 
> after some time i'll see what other features might be degraded.
> 



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-08 Thread Landry Breuil
Le Fri, Feb 09, 2024 at 08:19:12AM +0100, Landry Breuil a écrit :
> Le Thu, Feb 08, 2024 at 09:06:44PM +0100, Rafael Sadowski a écrit :
> > On Thu Feb 08, 2024 at 07:54:26PM +0100, Landry Breuil wrote:
> > > Le Thu, Feb 08, 2024 at 03:12:17PM +0100, Rafael Sadowski a écrit :
> > > > Here is a simple diff to remove qtwebkit from. I modified configure.py
> > > > to make sure it will not picked up even it is present.
> > > > 
> > > > OK?
> > > 
> > > obvious question, but all the runtime consumers of py-qt5 been checked
> > > for not actually relying on qtwebkit ?
> > > 
> > 
> > I have prep'ed for webkit in all ports that use py-qt5.
> > 
> > What I see with my 99 years python experience:
> > 
> > - lots of "webkit" in qutebrowser, but it runs with py-qtwebengine and
> >   that's all css -webkit hacks.
> > - calibre and everything else looks good to me.
> > - I don't know if qgis parts are relevant
> 
> the qgis bits look to be for a bundled copy of it.. i havent tried
> runtime yet with qtwebkit disabled, but from what i've understood from
> some gh issues/PR identifying objects on layers with html format should
> still work.

now that i've tested 3.34.3p1, HTML query on features is rendered as
plaintext, so i guess there's some kind of fallback
mechanism/conversion.. not great, but i can live with that.

after some time i'll see what other features might be degraded.



Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-08 Thread Landry Breuil
Le Thu, Feb 08, 2024 at 09:06:44PM +0100, Rafael Sadowski a écrit :
> On Thu Feb 08, 2024 at 07:54:26PM +0100, Landry Breuil wrote:
> > Le Thu, Feb 08, 2024 at 03:12:17PM +0100, Rafael Sadowski a écrit :
> > > Here is a simple diff to remove qtwebkit from. I modified configure.py
> > > to make sure it will not picked up even it is present.
> > > 
> > > OK?
> > 
> > obvious question, but all the runtime consumers of py-qt5 been checked
> > for not actually relying on qtwebkit ?
> > 
> 
> I have prep'ed for webkit in all ports that use py-qt5.
> 
> What I see with my 99 years python experience:
> 
> - lots of "webkit" in qutebrowser, but it runs with py-qtwebengine and
>   that's all css -webkit hacks.
> - calibre and everything else looks good to me.
> - I don't know if qgis parts are relevant

the qgis bits look to be for a bundled copy of it.. i havent tried
runtime yet with qtwebkit disabled, but from what i've understood from
some gh issues/PR identifying objects on layers with html format should
still work.




Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-08 Thread Rafael Sadowski
On Thu Feb 08, 2024 at 07:54:26PM +0100, Landry Breuil wrote:
> Le Thu, Feb 08, 2024 at 03:12:17PM +0100, Rafael Sadowski a écrit :
> > Here is a simple diff to remove qtwebkit from. I modified configure.py
> > to make sure it will not picked up even it is present.
> > 
> > OK?
> 
> obvious question, but all the runtime consumers of py-qt5 been checked
> for not actually relying on qtwebkit ?
> 

I have prep'ed for webkit in all ports that use py-qt5.

What I see with my 99 years python experience:

- lots of "webkit" in qutebrowser, but it runs with py-qtwebengine and
  that's all css -webkit hacks.
- calibre and everything else looks good to me.
- I don't know if qgis parts are relevant
- Could be a issue:
  pobj/fs-uae-launcher-3.1.68/fs-uae-launcher-3.1.68/fsui/qt/web_view.py:from 
PyQt5.QtWebKitWidgets import QWebView
  FreeBSD ships the same version without having webkit.

Thoughts?


pobj/py-qtpy-2.4.0-python3/QtPy-2.4.0/qtpy/QtWebEngineWidgets.py:# To test if 
we are using WebEngine or WebKit
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  webkit_version='537.36',
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  # QtWebKit
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  "AppleWebKit/537.36 (KHTML, like Gecko) "
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  # Not available with QtWebKit
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:
with_webkit: bool = True
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:
VersionParams('no-webkit', with_webkit=False),
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:
if params.with_webkit:
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  patches['qWebKitVersion'] = lambda: 'WEBKIT VERSION'
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  patches['objects.backend'] = usertypes.Backend.QtWebKit
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  substitutions['backend'] = 'new QtWebKit (WebKit WEBKIT VERSION)'
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_version.py:  
  monkeypatch.delattr(version, 'qtutils.qWebKitVersion', raising=False)
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:
('537.21', False),  # QtWebKit 5.1
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:
('602.1', True) # new QtWebKit TP5, 5.212 Alpha
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:def 
test_is_new_qtwebkit(monkeypatch, version, is_new):
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:
monkeypatch.setattr(qtutils, 'qWebKitVersion', lambda: version)
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:
assert qtutils.is_new_qtwebkit() == is_new
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_qtutils.py:
(usertypes.Backend.QtWebKit, ['--single-process'], False),
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_javascript.py:   
 webkit_only: bool = False
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_javascript.py:   
 Case('\x00', r'\x00', webkit_only=True),
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_javascript.py:   
 Case('\x00\x00', r'\x00\x00', webkit_only=True),
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_javascript.py:   
 Case('\ufeff', r'\ufeff', webkit_only=True),
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_javascript.py:   
 if web_tab.backend == usertypes.Backend.QtWebEngine and case.webkit_only:
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/utils/test_debug.py:
qwebpage = pytest.importorskip("qutebrowser.qt.webkitwidgets").QWebPage
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/misc/test_sessions.py:QWebView
 = pytest.importorskip('qutebrowser.qt.webkitwidgets').QWebView
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/misc/test_sessions.py:from 
qutebrowser.browser.webkit import tabhistory
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/mainwindow/test_tabwidget.py:
usertypes.Backend.QtWebKit)
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/javascript/test_js_execution.py:def
 test_simple_js_webkit(webview, js_enabled, expected):
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/javascript/test_js_execution.py:
"""With QtWebKit, evaluateJavaScript works when JS is on."""
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/javascript/test_js_execution.py:
# QtWebKit is available
pobj/qutebrowser-3.0.2/qutebrowser-3.0.2/tests/unit/javascript/test_js_execution.py:
from qutebrowser.qt.webkit import QWebSettings  # pylint: 
disable=no-name-in-module

Re: remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-08 Thread Landry Breuil
Le Thu, Feb 08, 2024 at 03:12:17PM +0100, Rafael Sadowski a écrit :
> Here is a simple diff to remove qtwebkit from. I modified configure.py
> to make sure it will not picked up even it is present.
> 
> OK?

obvious question, but all the runtime consumers of py-qt5 been checked
for not actually relying on qtwebkit ?



remove x11/qt5/qtwebkit from x11/py-qt5

2024-02-08 Thread Rafael Sadowski
Here is a simple diff to remove qtwebkit from. I modified configure.py
to make sure it will not picked up even it is present.

OK?

diff --git a/x11/py-qt5/Makefile b/x11/py-qt5/Makefile
index e122384c90f..8848bfd29e5 100644
--- a/x11/py-qt5/Makefile
+++ b/x11/py-qt5/Makefile
@@ -5,7 +5,7 @@ DPB_PROPERTIES= parallel
 MODPY_EGG_VERSION= 5.15.9
 DISTNAME=  PyQt5-${MODPY_EGG_VERSION}
 PKGNAME=   py-qt5-${MODPY_EGG_VERSION}
-REVISION=  1
+REVISION=  2
 
 CATEGORIES=x11 devel
 
@@ -21,9 +21,8 @@ WANTLIB += Qt5MultimediaWidgets Qt5Network Qt5Nfc Qt5OpenGL 
Qt5Positioning
 WANTLIB += Qt5PositioningQuick Qt5PrintSupport Qt5Qml Qt5QmlModels
 WANTLIB += Qt5Quick Qt5QuickWidgets Qt5RemoteObjects Qt5Sensors
 WANTLIB += Qt5SerialPort Qt5Sql Qt5Svg Qt5Test Qt5TextToSpeech
-WANTLIB += Qt5WebChannel Qt5WebKit Qt5WebKitWidgets Qt5WebSockets
-WANTLIB += Qt5Widgets Qt5X11Extras Qt5Xml Qt5XmlPatterns dbus-1
-WANTLIB += m ${MODPY_WANTLIB}
+WANTLIB += Qt5WebChannel Qt5WebSockets Qt5Widgets Qt5X11Extras
+WANTLIB += Qt5Xml Qt5XmlPatterns dbus-1 m ${MODPY_WANTLIB}
 
 FLAVORS=   python3
 FLAVOR=python3
@@ -50,7 +49,6 @@ LIB_DEPENDS=  ${MODPY_LIB_DEPENDS} \
x11/qt5/qtsvg \
x11/qt5/qttools \
x11/qt5/qtwebchannel \
-   x11/qt5/qtwebkit \
x11/qt5/qtwebsockets \
x11/qt5/qtx11extras \
x11/qt5/qtxmlpatterns
diff --git a/x11/py-qt5/patches/patch-configure_py 
b/x11/py-qt5/patches/patch-configure_py
index ea53c858d05..d4c37a62814 100644
--- a/x11/py-qt5/patches/patch-configure_py
+++ b/x11/py-qt5/patches/patch-configure_py
@@ -1,7 +1,27 @@
 Index: configure.py
 --- configure.py.orig
 +++ configure.py
-@@ -2157,7 +2157,18 @@ def run_command(cmd, verbose):
+@@ -96,10 +96,6 @@ MODULE_METADATA = {
+ 'QtWebChannel': ModuleMetadata(
+ qmake_QT=['webchannel', 'network',
+ '-gui']),
+-'QtWebKit': ModuleMetadata(qmake_QT=['webkit', 'network']),
+-'QtWebKitWidgets':  ModuleMetadata(
+-qmake_QT=['webkitwidgets',
+-'printsupport']),
+ 'QtWebSockets': ModuleMetadata(qmake_QT=['websockets', '-gui']),
+ 'QtWidgets':ModuleMetadata(qmake_QT=['widgets'], 
qpy_lib=True),
+ 'QtWinExtras':  ModuleMetadata(qmake_QT=['winextras', 'widgets']),
+@@ -1306,8 +1302,6 @@ def check_modules(target_config, disabled_modules, ver
+ 'qsvgwidget.h', 'new QSvgWidget()')
+ check_module(target_config, disabled_modules, verbose, 'QtTest', 'QtTest',
+ 'QTest::qSleep(0)')
+-check_module(target_config, disabled_modules, verbose, 'QtWebKit',
+-'qwebkitglobal.h', 'qWebKitVersion()')
+ check_module(target_config, disabled_modules, verbose, 'QtWebKitWidgets',
+ 'qwebpage.h', 'new QWebPage()')
+ check_module(target_config, disabled_modules, verbose, 'QtWidgets',
+@@ -2157,7 +2151,18 @@ def run_command(cmd, verbose):
  """ Run a command and display the output if requested.  cmd is the command
  to run.  verbose is set if the output is to be displayed.
  """
@@ -20,7 +40,7 @@ Index: configure.py
  if verbose:
  sys.stdout.write(cmd + "\n")
  
-@@ -2902,7 +2913,7 @@ Type 'no' to decline the terms of the license.
+@@ -2902,7 +2907,7 @@ Type 'no' to decline the terms of the license.
  sys.stdout.flush()
  
  try:
diff --git a/x11/py-qt5/pkg/PLIST b/x11/py-qt5/pkg/PLIST
index ae8c0694878..0675e87f2de 100644
--- a/x11/py-qt5/pkg/PLIST
+++ b/x11/py-qt5/pkg/PLIST
@@ -34,8 +34,6 @@ 
lib/python${MODPY_VERSION}/site-packages/PyQt5-${MODPY_EGG_VERSION}.dist-info/RE
 @so lib/python${MODPY_VERSION}/site-packages/PyQt5/QtTest${MODPY_ABI3SO}.so
 @so 
lib/python${MODPY_VERSION}/site-packages/PyQt5/QtTextToSpeech${MODPY_ABI3SO}.so
 @so 
lib/python${MODPY_VERSION}/site-packages/PyQt5/QtWebChannel${MODPY_ABI3SO}.so
-@so lib/python${MODPY_VERSION}/site-packages/PyQt5/QtWebKit${MODPY_ABI3SO}.so
-@so 
lib/python${MODPY_VERSION}/site-packages/PyQt5/QtWebKitWidgets${MODPY_ABI3SO}.so
 @so 
lib/python${MODPY_VERSION}/site-packages/PyQt5/QtWebSockets${MODPY_ABI3SO}.so
 @so lib/python${MODPY_VERSION}/site-packages/PyQt5/QtWidgets${MODPY_ABI3SO}.so
 @so 
lib/python${MODPY_VERSION}/site-packages/PyQt5/QtX11Extras${MODPY_ABI3SO}.so
@@ -728,25 +726,6 @@ 
lib/python${MODPY_VERSION}/site-packages/PyQt5/bindings/QtWebChannel/QtWebChanne
 
lib/python${MODPY_VERSION}/site-packages/PyQt5/bindings/QtWebChannel/QtWebChannelmod.sip
 
lib/python${MODPY_VERSION}/site-packages/PyQt5/bindings/QtWebChannel/qwebchannel.sip
 
lib/python${MODPY_VERSION}/site-packages/PyQt5/bindings/QtWebChannel/qwebchannelabstracttransport.sip
-lib/python${MODPY_VERSION}/site-packages/PyQt5/bindings/QtWebKit/