From 4798d3b5dbbc69ce72699b3e17552b236e242da0 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 24 Feb 2021 18:46:33 -0500 Subject: [PATCH] Drop lingering rpc_module_paths refs --- docs/index.rst | 2 +- examples/actor_spawning_and_causality_with_daemon.py | 2 +- examples/asynchronous_generators.py | 2 +- examples/remote_error_propagation.py | 2 +- tests/test_rpc.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 94d295d..4ed5a47 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -182,7 +182,7 @@ Here is a similar example using the latter method: .. literalinclude:: ../examples/actor_spawning_and_causality_with_daemon.py -The ``rpc_module_paths`` `kwarg` above is a list of module path +The ``enable_modules`` `kwarg` above is a list of module path strings that will be loaded and made accessible for execution in the remote actor through a call to ``Portal.run()``. For now this is a simple mechanism to restrict the functionality of the remote diff --git a/examples/actor_spawning_and_causality_with_daemon.py b/examples/actor_spawning_and_causality_with_daemon.py index 85f3bb8..b052871 100644 --- a/examples/actor_spawning_and_causality_with_daemon.py +++ b/examples/actor_spawning_and_causality_with_daemon.py @@ -17,7 +17,7 @@ async def main(): portal = await n.start_actor( 'frank', # enable the actor to run funcs from this current module - rpc_module_paths=[__name__], + enable_modules=[__name__], ) print(await portal.run(movie_theatre_question)) diff --git a/examples/asynchronous_generators.py b/examples/asynchronous_generators.py index c0ff5d3..99b0a13 100644 --- a/examples/asynchronous_generators.py +++ b/examples/asynchronous_generators.py @@ -22,7 +22,7 @@ async def main(): portal = await n.start_actor( 'donny', - rpc_module_paths=[__name__], + enable_modules=[__name__], ) # this async for loop streams values from the above diff --git a/examples/remote_error_propagation.py b/examples/remote_error_propagation.py index 5a4cb37..aa2a73b 100644 --- a/examples/remote_error_propagation.py +++ b/examples/remote_error_propagation.py @@ -12,7 +12,7 @@ async def main(): for i in range(3): real_actors.append(await n.start_actor( f'actor_{i}', - rpc_module_paths=[__name__], + enable_modules=[__name__], )) # start one actor that will fail immediately diff --git a/tests/test_rpc.py b/tests/test_rpc.py index 546c7c4..6d15896 100644 --- a/tests/test_rpc.py +++ b/tests/test_rpc.py @@ -94,7 +94,7 @@ def test_rpc_errors(arb_addr, to_call, testdir): func_name=funcname, exposed_mods=exposed_mods, func_defined=True if func_defined else False, - rpc_module_paths=subactor_exposed_mods, + enable_modules=subactor_exposed_mods, ) def run():