@@ -3147,26 +3147,14 @@ def _retry_task(self, reuse_connection):
31473147 # otherwise, move onto another host
31483148 self .send_request ()
31493149
3150- def result (self , timeout = _NOT_SET ):
3150+ def result (self ):
31513151 """
31523152 Return the final result or raise an Exception if errors were
31533153 encountered. If the final result or error has not been set
3154- yet, this method will block until that time.
3155-
3156- .. versionchanged:: 2.6.0
3157-
3158- **`timeout` is deprecated. Use timeout in the Session execute functions instead.
3159- The following description applies to deprecated behavior:**
3160-
3161- You may set a timeout (in seconds) with the `timeout` parameter.
3162- By default, the :attr:`~.default_timeout` for the :class:`.Session`
3163- this was created through will be used for the timeout on this
3164- operation.
3165-
3166- This timeout applies to the entire request, including any retries
3167- (decided internally by the :class:`.policies.RetryPolicy` used with
3168- the request).
3154+ yet, this method will block until it is set, or the timeout
3155+ set for the request expires.
31693156
3157+ Timeout is specified in the Session request execution functions.
31703158 If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.
31713159 This is a client-side timeout. For more information
31723160 about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.
@@ -3184,18 +3172,7 @@ def result(self, timeout=_NOT_SET):
31843172 ... log.exception("Operation failed:")
31853173
31863174 """
3187- if timeout is not _NOT_SET and not ResponseFuture ._warned_timeout :
3188- msg = "ResponseFuture.result timeout argument is deprecated. Specify the request timeout via Session.execute[_async]."
3189- warnings .warn (msg , DeprecationWarning )
3190- log .warning (msg )
3191- ResponseFuture ._warned_timeout = True
3192- else :
3193- timeout = None
3194-
3195- self ._event .wait (timeout )
3196- # TODO: remove this conditional when deprecated timeout parameter is removed
3197- if not self ._event .is_set ():
3198- self ._on_timeout ()
3175+ self ._event .wait ()
31993176 if self ._final_result is not _NOT_SET :
32003177 if self ._paging_state is None :
32013178 return self ._final_result
0 commit comments