This is an automated email from the ASF dual-hosted git repository.

zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f3e8cda0ed8 [fix](docker) resolve Python Logger warnings (#50922)
f3e8cda0ed8 is described below

commit f3e8cda0ed8244214292903e1d62ce57053f0c8c
Author: Emmanuel Ferdman <[email protected]>
AuthorDate: Wed Jun 18 18:05:52 2025 +0300

    [fix](docker) resolve Python Logger warnings (#50922)
    
    This small PR resolves the deprecation warnings of the `logger` library:
    ```python
    DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
    ```
---
 docker/runtime/doris-compose/command.py  | 4 ++--
 docker/runtime/doris-compose/database.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docker/runtime/doris-compose/command.py 
b/docker/runtime/doris-compose/command.py
index 1194b3d1f15..32a5167d2c7 100644
--- a/docker/runtime/doris-compose/command.py
+++ b/docker/runtime/doris-compose/command.py
@@ -924,11 +924,11 @@ class DownCommand(Command):
                                                       "down",
                                                       options=options)
                 except Exception as e:
-                    LOG.warn("down cluster has exception: " + str(e))
+                    LOG.warning("down cluster has exception: " + str(e))
             try:
                 utils.remove_docker_network(cluster_name)
             except Exception as e:
-                LOG.warn("remove network has exception: " + str(e))
+                LOG.warning("remove network has exception: " + str(e))
             if args.clean:
                 cluster_path = CLUSTER.get_cluster_path(cluster_name)
                 if os.path.exists(cluster_path):
diff --git a/docker/runtime/doris-compose/database.py 
b/docker/runtime/doris-compose/database.py
index f46635033b8..b05f1cb118a 100644
--- a/docker/runtime/doris-compose/database.py
+++ b/docker/runtime/doris-compose/database.py
@@ -281,11 +281,11 @@ class DBManager(object):
                         dict(zip(fields, row)) for row in cursor.fetchall()
                     ]
             except Exception as e:
-                LOG.warn(
+                LOG.warning(
                     f"Error occurred: fe {self.fe_ip}:{self.fe_port}, sql 
`{sql}`, err {e}"
                 )
                 if "timed out" in str(e).lower() and attempt < retries - 1:
-                    LOG.warn(
+                    LOG.warning(
                         f"Query timed out, fe {self.fe_ip}:{self.fe_port}. 
Retrying {attempt + 1}/{retries}..."
                     )
                     self._reset_conn()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to