101101 from cassandra .io .eventletreactor import EventletConnection
102102# PYTHON-1364
103103#
104- # At the moment eventlet initialization is chucking AttributeErrors due to it's dependence on pyOpenSSL
104+ # At the moment eventlet initialization is chucking AttributeErrors due to its dependence on pyOpenSSL
105105# and some changes in Python 3.12 which have some knock-on effects there.
106106except (ImportError , AttributeError ):
107107 EventletConnection = None
@@ -174,7 +174,7 @@ def _connection_reduce_fn(val,import_fn):
174174DefaultConnection = conn_class
175175
176176# Forces load of utf8 encoding module to avoid deadlock that occurs
177- # if code that is being imported tries to import the module in a seperate
177+ # if code that is being imported tries to import the module in a separate
178178# thread.
179179# See http://bugs.python.org/issue10923
180180"" .encode ('utf8' )
@@ -1024,7 +1024,7 @@ def default_retry_policy(self, policy):
10241024
10251025 application_version = ''
10261026 """
1027- A string identifiying this application's version to Insights
1027+ A string identifying this application's version to Insights
10281028 """
10291029
10301030 cloud = None
@@ -1154,7 +1154,7 @@ def __init__(self,
11541154 column_encryption_policy = None ):
11551155 """
11561156 ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as
1157- extablishing connection pools or refreshing metadata.
1157+ establishing connection pools or refreshing metadata.
11581158
11591159 Any of the mutable Cluster attributes may be set as keyword arguments to the constructor.
11601160 """
@@ -1461,7 +1461,7 @@ def register_user_type(self, keyspace, user_type, klass):
14611461 for.
14621462
14631463 `klass` should be a class with attributes whose names match the
1464- fields of the user-defined type. The constructor must accepts kwargs
1464+ fields of the user-defined type. The constructor must accept kwargs
14651465 for each of the fields in the UDT.
14661466
14671467 This method should only be called after the type has been created
@@ -3168,7 +3168,7 @@ def prepare_on_all_hosts(self, query, excluded_host, keyspace=None):
31683168 continue
31693169
31703170 if request_id is None :
3171- # the error has already been logged by ResponsFuture
3171+ # the error has already been logged by ResponseFuture
31723172 log .debug ("Failed to prepare query for host %s: %r" ,
31733173 host , future ._errors .get (host ))
31743174 continue
@@ -3965,7 +3965,7 @@ def _handle_status_change(self, event):
39653965 elif change_type == "DOWN" :
39663966 # Note that there is a slight risk we can receive the event late and thus
39673967 # mark the host down even though we already had reconnected successfully.
3968- # But it is unlikely, and don't have too much consequence since we'll try reconnecting
3968+ # This is unlikely, and will not have much consequence because we'll try reconnecting
39693969 # right away, so we favor the detection to make the Host.is_up more accurate.
39703970 if host is not None :
39713971 # this will be run by the scheduler
@@ -4447,7 +4447,7 @@ def _on_speculative_execute(self):
44474447 # PYTHON-836, the speculative queries must be after
44484448 # the query is sent from the main thread, otherwise the
44494449 # query from the main thread may raise NoHostAvailable
4450- # if the _query_plan has been exhausted by the specualtive queries.
4450+ # if the _query_plan has been exhausted by the speculative queries.
44514451 # This also prevents a race condition accessing the iterator.
44524452 # We reschedule this call until the main thread has succeeded
44534453 # making a query
@@ -4559,7 +4559,7 @@ def warnings(self):
45594559
45604560 Ensure the future is complete before trying to access this property
45614561 (call :meth:`.result()`, or after callback is invoked).
4562- Otherwise it may throw if the response has not been received.
4562+ Otherwise, it may throw if the response has not been received.
45634563 """
45644564 # TODO: When timers are introduced, just make this wait
45654565 if not self ._event .is_set ():
@@ -4575,7 +4575,7 @@ def custom_payload(self):
45754575
45764576 Ensure the future is complete before trying to access this property
45774577 (call :meth:`.result()`, or after callback is invoked).
4578- Otherwise it may throw if the response has not been received.
4578+ Otherwise, it may throw if the response has not been received.
45794579
45804580 :return: :ref:`custom_payload`.
45814581 """
@@ -5285,7 +5285,7 @@ def cancel_continuous_paging(self):
52855285 try :
52865286 self .response_future ._continuous_paging_session .cancel ()
52875287 except AttributeError :
5288- raise DriverException ("Attempted to cancel paging with no active session. This is only for requests with ContinuousdPagingOptions ." )
5288+ raise DriverException ("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions ." )
52895289
52905290 @property
52915291 def was_applied (self ):
@@ -5296,7 +5296,7 @@ def was_applied(self):
52965296 a :class:`.query.BatchStatement` containing LWT. In the latter case either all the batch
52975297 succeeds or fails.
52985298
5299- Only valid when one of the of the internal row factories is in use.
5299+ Only valid when one of the internal row factories is in use.
53005300 """
53015301 if self .response_future .row_factory not in (named_tuple_factory , dict_factory , tuple_factory ):
53025302 raise RuntimeError ("Cannot determine LWT result with row factory %s" % (self .response_future .row_factory ,))
0 commit comments