Skip to content

Commit 5acaec2

Browse files
committed
Python in extreme checking mode requires encoding
1 parent 33b4622 commit 5acaec2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,14 +819,14 @@ def apply_patch(patch_lines, source_lines):
819819
patch_file_name = pathlib.Path(__file__).parent / "tools" / "carray.patch"
820820

821821
try:
822-
source_file_lines = source_file_name.read_text().splitlines()
823-
patch_file_lines = patch_file_name.read_text().splitlines()
822+
source_file_lines = source_file_name.read_text(encoding="utf8").splitlines()
823+
patch_file_lines = patch_file_name.read_text(encoding="utf8").splitlines()
824824
except OSError:
825825
return False
826826

827827
if apply_patch(patch_file_lines, source_file_lines):
828828
pathlib.Path(source_file_name).rename(str(source_file_name) + ".orig")
829-
pathlib.Path(source_file_name).write_text("\n".join(source_file_lines) + "\n")
829+
pathlib.Path(source_file_name).write_text("\n".join(source_file_lines) + "\n", encoding="utf8")
830830
print(" Patched amalgamation with apsw carray update")
831831
return True
832832

0 commit comments

Comments
 (0)