From 5b08a6492b22a22b291be483321009fd85be63fa Mon Sep 17 00:00:00 2001 From: native-api Date: Thu, 22 Sep 2022 10:59:03 +0300 Subject: [PATCH] Add missing patch for 3.7.14 (#2469) --- ...error-when-opening-header-with-non-U.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 plugins/python-build/share/python-build/patches/3.7.14/Python-3.7.14/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch diff --git a/plugins/python-build/share/python-build/patches/3.7.14/Python-3.7.14/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch b/plugins/python-build/share/python-build/patches/3.7.14/Python-3.7.14/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch new file mode 100644 index 00000000..773b69fa --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.7.14/Python-3.7.14/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch @@ -0,0 +1,30 @@ +From 245427d207ee88a4ba26a66c3de350bcbcc036f2 Mon Sep 17 00:00:00 2001 +From: Ronald Oussoren +Date: Sat, 14 Nov 2020 16:07:47 +0100 +Subject: [PATCH] bpo-42351: Avoid error when opening header with non-UTF8 + encoding (GH-23279) + +grep_headers_for() would error out when a header contained +text that cannot be interpreted as UTF-8. + +cherry-picked from 7a27c7ed4b by Pedro Fonini +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index f211989aac..467362813d 100644 +--- a/setup.py ++++ b/setup.py +@@ -159,7 +159,7 @@ def is_macosx_sdk_path(path): + + def grep_headers_for(function, headers): + for header in headers: +- with open(header, 'r') as f: ++ with open(header, 'r', errors='surrogateescape') as f: + if function in f.read(): + return True + return False +-- +2.34.1 +