You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by dj...@apache.org on 2026/04/22 06:18:40 UTC
(cloudberry) 02/02: Fix Python 3.12 SyntaxWarning in orphaned_toast_tables_check.py
This is an automated email from the ASF dual-hosted git repository.
tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit bff77156d5d859e286577242d3e8d9759afbd7da
Author: Dianjin Wang <wa...@gmail.com>
AuthorDate: Tue Apr 21 10:41:47 2026 +0800
Fix Python 3.12 SyntaxWarning in orphaned_toast_tables_check.py
Use raw string literal (r""") for SQL query in orphaned_toast_tables_check.py
to avoid SyntaxWarning on Python 3.12.
The query contains `\d` for PostgreSQL regex which Python 3.12 incorrectly
interprets as an invalid escape sequence, causing test failures on Ubuntu 24.04.
See: https://github.com/apache/cloudberry/issues/1686
---
gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py b/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
index 21ec8d18047..789e1b139d2 100644
--- a/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
+++ b/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
@@ -25,7 +25,7 @@ class OrphanedToastTablesCheck:
# pg_depend back to pg_class, and if the table oids don't match and/or
# one is missing, the TOAST table is considered to be an orphan.
# Note: Handles toast tables <pg_toast_temp_*> which is created/used by InitTempTableNamespace().
- self.orphaned_toast_tables_query = """
+ self.orphaned_toast_tables_query = r"""
SELECT
gp_segment_id AS content_id,
toast_table_oid,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org