@@ -3147,26 +3147,14 @@ def _retry_task(self, reuse_connection):
3147
3147
# otherwise, move onto another host
3148
3148
self .send_request ()
3149
3149
3150
- def result (self , timeout = _NOT_SET ):
3150
+ def result (self ):
3151
3151
"""
3152
3152
Return the final result or raise an Exception if errors were
3153
3153
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.
3169
3156
3157
+ Timeout is specified in the Session request execution functions.
3170
3158
If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.
3171
3159
This is a client-side timeout. For more information
3172
3160
about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.
@@ -3184,18 +3172,7 @@ def result(self, timeout=_NOT_SET):
3184
3172
... log.exception("Operation failed:")
3185
3173
3186
3174
"""
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 ()
3199
3176
if self ._final_result is not _NOT_SET :
3200
3177
if self ._paging_state is None :
3201
3178
return self ._final_result
0 commit comments