Files
ghidra/GhidraBuild
Jakub Stasiak c17a70b536 pyghidra: Remove print from ghidra_builtins
Starting with [1] there is still technically a print override
applied in pyghidra/script.py

        printer = _build_script_print(self._script.writer)
        super().__setitem__("print", printer)

but its interface is the same as the builtin print:

    def _build_script_print(stdout):
        @functools.wraps(print)
        def wrapper(*objects, sep=' ', end='\n', file=None, flush=False):
            ...
        return wrapper

and very much incompatible with the interface that the stubs used to
declare:

    @typing.overload
    def print(message: typing.Union[java.lang.String, str], color: java.awt.Color):
        ...

    @typing.overload
    def print(message: typing.Union[java.lang.String, str]):
        ...

This is similar to [2] and [3].

[1] 92d0f1dacf ("Python3 support")
[2] cc15fdf691 ("GP-0: ghidra_builtins stubs no longer hides the python set type (Closes #7222)")
[3] https://github.com/NationalSecurityAgency/ghidra/issues/7222
2025-12-30 22:00:10 +01:00
..
2025-08-21 06:07:03 -04:00