diff options
Diffstat (limited to 'user/boost/python-311-fix-open.patch')
-rw-r--r-- | user/boost/python-311-fix-open.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/user/boost/python-311-fix-open.patch b/user/boost/python-311-fix-open.patch new file mode 100644 index 000000000..4d238d3a2 --- /dev/null +++ b/user/boost/python-311-fix-open.patch @@ -0,0 +1,22 @@ +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() |