https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11 open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3. The newline parameter to these functions controls how universal newlines work. diff -ur a/tools/build/test/BoostBuild.py b/tools/build/test/BoostBuild.py --- a/tools/build/test/BoostBuild.py 2022-11-27 10:51:49.323319793 -0600 +++ b/tools/build/test/BoostBuild.py 2022-11-27 10:52:31.636168392 -0600 @@ -579,8 +579,6 @@ openMode = "r" if binary: openMode += "b" - else: - openMode += "U" f = open(name, openMode) result = f.read() f.close()