@@ -71,58 +71,28 @@ def __init__( # type: ignore[no-untyped-def]
7171 address : str ,
7272 connect_options : dict ,
7373 kwargs : dict ,
74- worker_module = "deprecated" ,
7574 worker_class = "distributed.Nanny" ,
7675 remote_python = None ,
7776 loop = None ,
7877 name = None ,
7978 ):
8079 super ().__init__ ()
8180
82- if worker_module != "deprecated" :
83- raise ValueError (
84- "worker_module has been deprecated in favor of worker_class. "
85- "Please specify a Python class rather than a CLI module."
81+ if loop is not None :
82+ warnings .warn (
83+ "The `loop` parameter has been deprecated and has no effect." ,
84+ DeprecationWarning ,
85+ stacklevel = 2 ,
8686 )
8787
8888 self .address = address
8989 self .scheduler = scheduler
9090 self .worker_class = worker_class
9191 self .connect_options = connect_options
92- self .kwargs = copy .copy (kwargs )
9392 self .name = name
9493 self .remote_python = remote_python
95- if kwargs .get ("nprocs" ) is not None and kwargs .get ("n_workers" ) is not None :
96- raise ValueError (
97- "Both nprocs and n_workers were specified. Use n_workers only."
98- )
99- elif kwargs .get ("nprocs" ) is not None :
100- warnings .warn (
101- "The nprocs argument will be removed in a future release. It has been "
102- "renamed to n_workers." ,
103- FutureWarning ,
104- )
105- self .n_workers = self .kwargs .pop ("nprocs" , 1 )
106- else :
107- self .n_workers = self .kwargs .pop ("n_workers" , 1 )
108-
109- @property
110- def nprocs (self ):
111- warnings .warn (
112- "The nprocs attribute will be removed in a future release. It has been "
113- "renamed to n_workers." ,
114- FutureWarning ,
115- )
116- return self .n_workers
117-
118- @nprocs .setter
119- def nprocs (self , value ):
120- warnings .warn (
121- "The nprocs attribute will be removed in a future release. It has been "
122- "renamed to n_workers." ,
123- FutureWarning ,
124- )
125- self .n_workers = value
94+ self .kwargs = copy .copy (kwargs )
95+ self .n_workers = self .kwargs .pop ("n_workers" , 1 )
12696
12797 async def start (self ):
12898 try :
@@ -291,7 +261,6 @@ def SSHCluster(
291261 connect_options : dict | list [dict ] | None = None ,
292262 worker_options : dict | None = None ,
293263 scheduler_options : dict | None = None ,
294- worker_module : str = "deprecated" ,
295264 worker_class : str = "distributed.Nanny" ,
296265 remote_python : str | list [str ] | None = None ,
297266 ** kwargs : Any ,
@@ -387,12 +356,6 @@ def SSHCluster(
387356 worker_options = worker_options or {}
388357 scheduler_options = scheduler_options or {}
389358
390- if worker_module != "deprecated" :
391- raise ValueError (
392- "worker_module has been deprecated in favor of worker_class. "
393- "Please specify a Python class rather than a CLI module."
394- )
395-
396359 if set (kwargs ) & old_cluster_kwargs :
397360 from distributed .deploy .old_ssh import SSHCluster as OldSSHCluster
398361
0 commit comments