Bug 494716 - Can't call some methods in Scripting DBus API in Python because they are overloaded
Summary: Can't call some methods in Scripting DBus API in Python because they are over...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (other bugs)
Version First Reported In: 6.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-14 04:25 UTC by Jin Liu
Modified: 2024-10-16 13:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.