log.warn() --> log.warning()
This commit is contained in:
		| @@ -1050,8 +1050,8 @@ class Cluster(object): | ||||
|         Synchronously refresh the schema metadata. | ||||
|         By default timeout for this operation is governed by :attr:`~.Cluster.max_schema_agreement_wait` | ||||
|         and :attr:`~.Cluster.control_connection_timeout`. | ||||
|         Passing schema_agreement_wait here overrides :attr:`~.Cluster.max_schema_agreement_wait`. Setting  | ||||
|         schema_agreement_wait <= 0 will bypass schema agreement and refresh schema immediately. | ||||
|         Passing schema_agreement_wait here overrides :attr:`~.Cluster.max_schema_agreement_wait`. | ||||
|         Setting schema_agreement_wait <= 0 will bypass schema agreement and refresh schema immediately. | ||||
|         RuntimeWarning is raised if schema refresh fails for any reason. | ||||
|         """ | ||||
|         if not self.control_connection.refresh_schema(keyspace, table, usertype, schema_agreement_wait): | ||||
| @@ -2007,8 +2007,8 @@ class ControlConnection(object): | ||||
|                     log.debug("[control connection] triggers table not found") | ||||
|                     triggers_result = {} | ||||
|                 elif isinstance(triggers_result, Unauthorized): | ||||
|                     log.warn("[control connection] this version of Cassandra does not allow access to schema_triggers metadata with authorization enabled (CASSANDRA-7967); " | ||||
|                              "The driver will operate normally, but will not reflect triggers in the local metadata model, or schema strings.") | ||||
|                     log.warning("[control connection] this version of Cassandra does not allow access to schema_triggers metadata with authorization enabled (CASSANDRA-7967); " | ||||
|                                 "The driver will operate normally, but will not reflect triggers in the local metadata model, or schema strings.") | ||||
|                     triggers_result = {} | ||||
|                 else: | ||||
|                     raise triggers_result | ||||
| @@ -2086,7 +2086,7 @@ class ControlConnection(object): | ||||
|  | ||||
|             tokens = row.get("tokens") | ||||
|             if not tokens: | ||||
|                 log.warn("Excluding host (%s) with no tokens in system.peers table of %s." % (addr, connection.host)) | ||||
|                 log.warning("Excluding host (%s) with no tokens in system.peers table of %s." % (addr, connection.host)) | ||||
|                 continue | ||||
|  | ||||
|             found_hosts.add(addr) | ||||
| @@ -2223,8 +2223,8 @@ class ControlConnection(object): | ||||
|                 self._time.sleep(0.2) | ||||
|                 elapsed = self._time.time() - start | ||||
|  | ||||
|             log.warn("Node %s is reporting a schema disagreement: %s", | ||||
|                      connection.host, schema_mismatches) | ||||
|             log.warning("Node %s is reporting a schema disagreement: %s", | ||||
|                         connection.host, schema_mismatches) | ||||
|             return False | ||||
|  | ||||
|     def _get_schema_mismatches(self, peers_result, local_result, local_address): | ||||
|   | ||||
| @@ -513,7 +513,7 @@ class _ReplicationStrategy(object): | ||||
|         try: | ||||
|             rs_instance = rs_class(options_map) | ||||
|         except Exception as exc: | ||||
|             log.warn("Failed creating %s with options %s: %s", strategy_name, options_map, exc) | ||||
|             log.warning("Failed creating %s with options %s: %s", strategy_name, options_map, exc) | ||||
|             return None | ||||
|  | ||||
|         return rs_instance | ||||
|   | ||||
| @@ -183,7 +183,7 @@ class _ReconnectionHandler(object): | ||||
|             # call on_exception for logging purposes even if next_delay is None | ||||
|             if self.on_exception(exc, next_delay): | ||||
|                 if next_delay is None: | ||||
|                     log.warn( | ||||
|                     log.warning( | ||||
|                         "Will not continue to retry reconnection attempts " | ||||
|                         "due to an exhausted retry schedule") | ||||
|                 else: | ||||
|   | ||||
| @@ -103,11 +103,12 @@ def named_tuple_factory(colnames, rows): | ||||
|     try: | ||||
|         Row = namedtuple('Row', clean_column_names) | ||||
|     except Exception: | ||||
|         log.warn("Failed creating named tuple for results with column names %s (cleaned: %s) (see Python 'namedtuple' documentation for details on name rules). " | ||||
|                  "Results will be returned with positional names. " | ||||
|                  "Avoid this by choosing different names, using SELECT \"<col name>\" AS aliases, " | ||||
|                  "or specifying a different row_factory on your Session" % | ||||
|                  (colnames, clean_column_names)) | ||||
|         log.warning("Failed creating named tuple for results with column names %s (cleaned: %s) " | ||||
|                     "(see Python 'namedtuple' documentation for details on name rules). " | ||||
|                     "Results will be returned with positional names. " | ||||
|                     "Avoid this by choosing different names, using SELECT \"<col name>\" AS aliases, " | ||||
|                     "or specifying a different row_factory on your Session" % | ||||
|                     (colnames, clean_column_names)) | ||||
|         Row = namedtuple('Row', clean_column_names, rename=True) | ||||
|  | ||||
|     return [Row(*row) for row in rows] | ||||
| @@ -190,7 +191,7 @@ class Statement(object): | ||||
|     :class:`~.TokenAwarePolicy` is configured for | ||||
|     :attr:`.Cluster.load_balancing_policy` | ||||
|  | ||||
|     It is set implicitly on :class:`.BoundStatement`, and :class:`.BatchStatement`,  | ||||
|     It is set implicitly on :class:`.BoundStatement`, and :class:`.BatchStatement`, | ||||
|     but must be set explicitly on :class:`.SimpleStatement`. | ||||
|  | ||||
|     .. versionadded:: 2.1.3 | ||||
| @@ -326,7 +327,7 @@ class PreparedStatement(object): | ||||
|     column_metadata = None | ||||
|     query_id = None | ||||
|     query_string = None | ||||
|     keyspace = None # change to prepared_keyspace in major release | ||||
|     keyspace = None  # change to prepared_keyspace in major release | ||||
|  | ||||
|     routing_key_indexes = None | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Adam Holmberg
					Adam Holmberg