From 148391a5a9a63785c6daaf6a82eb5bd72ac29272 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Sun, 27 Nov 2022 11:01:15 -0600 Subject: user/boost: add patches for python 3.11. fixes #890. --- user/boost/python-311-fix-open.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 user/boost/python-311-fix-open.patch (limited to 'user/boost/python-311-fix-open.patch') 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() -- cgit v1.2.3-70-g09d2