summaryrefslogtreecommitdiff
path: root/user/boost/python-311-fix-open.patch
blob: 4d238d3a22089403a4b3f7395fb197812c68761a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()