Bug 494716

Summary: Can't call some methods in Scripting DBus API in Python because they are overloaded
Product: [Plasma] kwin Reporter: Jin Liu <ad.liu.jin>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: kde
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jin Liu 2024-10-14 04:25:37 UTC
`loadScript` and `loadDeclarativeScript` methods have two overloads, so it's impossible to call the two-argument variant with the `pydbus` lib in Python, because the package automatically generates a class for the interface, but the language doesn't support overloads. A similar problem exists in Java.

It would be more convenient if the two-args variants are renamed to `loadScriptWithName` (maybe also keep the overloads for backward compatibility).
Comment 1 David Edmundson 2024-10-16 13:25:35 UTC
That would be an API break.  We can't
Comment 2 Jin Liu 2024-10-16 13:26:44 UTC
(In reply to David Edmundson from comment #1)
> That would be an API break.  We can't

"(maybe also keep the overloads for backward compatibility)" might prevent an API break.