From 86a442fb62cf188dd5a859d9fe6c65d27297f4d7 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 4 Oct 2021 19:45:36 -0500 Subject: [PATCH] Make find_weak_odrs work with Python 3.6 `text` is an alias for `universal_newlines` but wasn't introduced until Python 3.7 --- build_tools/find_weak_odrs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/find_weak_odrs.py b/build_tools/find_weak_odrs.py index da7a45d12..c10a74d3b 100755 --- a/build_tools/find_weak_odrs.py +++ b/build_tools/find_weak_odrs.py @@ -12,7 +12,7 @@ import subprocess output = subprocess.check_output( "nm --radix=d -g --demangle -l --print-size CMakeFiles/fishlib.dir/src/*.o", shell=True, - text=True, + universal_newlines=True, ) files_by_name = {} # Symbol to set of paths sizes_by_name = {} # Symbol to set of int sizes @@ -47,7 +47,7 @@ for name, sizes in sizes_by_name.items(): print("\t\t%s" % filename) if odr_violations == 0: - print("No ODR violations found, hooray") + print("No ODR violations found, hooray\n") # Show potential weak symbols. suspicious_odrs = 0