This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 1107fbd0ac45ea24152d2f028466ee3cf3dfd426 Author: Xing Guo <higuox...@gmail.com> AuthorDate: Thu Jul 6 20:58:24 2023 +0800 Remove the deprecated 'universal newline' mode from open(). (#15933) The 'universal mode', or `open('rU')` has been deprecated in Python3. We should remove it from our source code. The 'universal mode' is enabled by default in Python3. Ref: https://docs.python.org/3.5/library/functions.html#open --- gpMgmt/bin/analyzedb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpMgmt/bin/analyzedb b/gpMgmt/bin/analyzedb index a2ad49a7ff..e18294a03e 100755 --- a/gpMgmt/bin/analyzedb +++ b/gpMgmt/bin/analyzedb @@ -576,7 +576,7 @@ class AnalyzeDb(Operation): tablenames = parse_tables_from_file(self.conn, self.config_file) canonical_tables = validate_tables(self.conn, tablenames) all_root_partitions = run_sql(self.conn, GET_ALL_ROOT_PARTITION_TABLES_SQL) - cfg_file = open(self.config_file, 'rU') + cfg_file = open(self.config_file, 'r') for line in cfg_file: # XXX: The file format does not allow listing tables with spaces in the name, # even when quoted @@ -1196,7 +1196,7 @@ def validate_dir(path): # Parse a list of tables from the config file. def parse_tables_from_file(conn, include_file): - in_file = open(include_file, 'rU') + in_file = open(include_file, 'r') line_no = 1 tables = [] for line in in_file: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org