core: Cache RunnableLambda deps (#29200)

`RunnableLambda`'s `deps` may do costly OS operation by calling
`get_function_nonlocals`.
So it's better to cache it.
See #29043
This commit is contained in:
Christophe Bornet
2025-01-23 19:09:07 +01:00
committed by GitHub
parent f795ab99ec
commit 618e550f06

View File

@@ -4457,7 +4457,7 @@ class RunnableLambda(Runnable[Input, Output]):
module_name=module,
)
@property
@functools.cached_property
def deps(self) -> list[Runnable]:
"""The dependencies of this Runnable.