From 42ce8eaa137ca8ca0f49b696259e06a4df8fa44b Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Wed, 16 Nov 2022 11:19:08 +0100 Subject: [PATCH] Fix #512: Bad metadata for two delegate methods in the WebKit bindings --- docs/changelog.rst | 7 +++++++ pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py | 3 ++- pyobjc-framework-WebKit/Lib/WebKit/_metadata.py | 9 +++------ pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py | 9 ++------- pyobjc-framework-WebKit/metadata/WebKit.fwinfo | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c3ce376d35..81a720dde0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,6 +3,13 @@ What's new in PyObjC An overview of the relevant changes in new, and older, releases. +Version 9.0.1 +------------- + +* #512: Fix metadata for ``webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:`` and + ``webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:`` in the WebKit + bindings. + Version 9.0 ----------- diff --git a/pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py b/pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py index 44b9ee32be..b37d33e314 100644 --- a/pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py +++ b/pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py @@ -1,6 +1,6 @@ # This file is generated by objective.metadata # -# Last update: Sun Feb 20 19:31:42 2022 +# Last update: Wed Nov 16 11:17:31 2022 # # flake8: noqa @@ -34,6 +34,7 @@ def selAorI(a, b): enums = """$JSC_OBJC_API_ENABLED@1$WEBKIT_VERSION_1_0@256$WEBKIT_VERSION_1_1@272$WEBKIT_VERSION_1_2@288$WEBKIT_VERSION_1_3@304$WEBKIT_VERSION_2_0@512$WEBKIT_VERSION_3_0@768$WEBKIT_VERSION_3_1@784$WEBKIT_VERSION_4_0@1024$WEBKIT_VERSION_LATEST@39321$kJSClassAttributeNoAutomaticPrototype@2$kJSClassAttributeNone@0$kJSPropertyAttributeDontDelete@8$kJSPropertyAttributeDontEnum@4$kJSPropertyAttributeNone@0$kJSPropertyAttributeReadOnly@2$kJSTypeBoolean@2$kJSTypeNull@1$kJSTypeNumber@3$kJSTypeObject@5$kJSTypeString@4$kJSTypeSymbol@6$kJSTypeUndefined@0$kJSTypedArrayTypeArrayBuffer@9$kJSTypedArrayTypeBigInt64Array@11$kJSTypedArrayTypeBigUint64Array@12$kJSTypedArrayTypeFloat32Array@7$kJSTypedArrayTypeFloat64Array@8$kJSTypedArrayTypeInt16Array@1$kJSTypedArrayTypeInt32Array@2$kJSTypedArrayTypeInt8Array@0$kJSTypedArrayTypeNone@10$kJSTypedArrayTypeUint16Array@5$kJSTypedArrayTypeUint32Array@6$kJSTypedArrayTypeUint8Array@3$kJSTypedArrayTypeUint8ClampedArray@4$""" misc.update({}) misc.update({}) +misc.update({}) functions = { "JSObjectSetPropertyForKey": ( b"v^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}^{OpaqueJSValue=}I^^{OpaqueJSValue=}", diff --git a/pyobjc-framework-WebKit/Lib/WebKit/_metadata.py b/pyobjc-framework-WebKit/Lib/WebKit/_metadata.py index 9315d27e3a..f7ed0d1597 100644 --- a/pyobjc-framework-WebKit/Lib/WebKit/_metadata.py +++ b/pyobjc-framework-WebKit/Lib/WebKit/_metadata.py @@ -1,6 +1,6 @@ # This file is generated by objective.metadata # -# Last update: Fri Aug 12 15:17:41 2022 +# Last update: Wed Nov 16 11:17:30 2022 # # flake8: noqa @@ -927,10 +927,7 @@ def selAorI(a, b): 4: { "callable": { "retval": {"type": b"v"}, - "arguments": { - 0: {"type": b"^v"}, - 1: {"type": sel32or64(b"i", b"q")}, - }, + "arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}}, }, "type": "@?", }, @@ -1540,7 +1537,7 @@ def selAorI(a, b): 5: { "callable": { "retval": {"type": b"v"}, - "arguments": {0: {"type": b"^v"}}, + "arguments": {0: {"type": b"^v"}, 1: {"type": b"Z"}}, }, "type": "@?", }, diff --git a/pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py b/pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py index 5670eade1b..67b646a6e4 100644 --- a/pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py +++ b/pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py @@ -48,11 +48,6 @@ def test_enum_types(self): def testProtocols10_10(self): self.assertProtocolExists("WKUIDelegate") - self.assertArgIsBlock( - TestWKUIDelegateHelper.webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950 - 3, - b"v", - ) self.assertArgIsBlock( TestWKUIDelegateHelper.webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950 3, @@ -61,12 +56,12 @@ def testProtocols10_10(self): self.assertArgIsBlock( TestWKUIDelegateHelper.webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950 3, - b"v", + b"vZ", ) self.assertArgIsBlock( TestWKUIDelegateHelper.webView_runJavaScriptTextInputPanelWithPrompt_defaultText_initiatedByFrame_completionHandler_, # noqa: B950 4, - b"v", + b"v@", ) self.assertArgIsBlock( TestWKUIDelegateHelper.webView_runOpenPanelWithParameters_initiatedByFrame_completionHandler_, # noqa: B950 diff --git a/pyobjc-framework-WebKit/metadata/WebKit.fwinfo b/pyobjc-framework-WebKit/metadata/WebKit.fwinfo index 9d8464d231..f5175e14e4 100644 --- a/pyobjc-framework-WebKit/metadata/WebKit.fwinfo +++ b/pyobjc-framework-WebKit/metadata/WebKit.fwinfo @@ -1707,10 +1707,7 @@ "typestr": "^v" }, "1": { - "typestr": [ - "i", - "q" - ] + "typestr": "@" } }, "retval": { @@ -1802,6 +1799,9 @@ "arguments": { "0": { "typestr": "^v" + }, + "1": { + "typestr": "Z" } }, "retval": {