Skip to content

Commit b7353fa

Browse files
committed
Remove encoding from binary file operations
Fix #4940
1 parent 5554fa6 commit b7353fa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sdk/python/packages/flet-cli/src/flet_cli/__pyinstaller/macos_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ def assemble_app_bundle(app_path, tar_path):
107107

108108

109109
def __load_info_plist(app_path):
110-
with open(__get_plist_path(app_path), "rb", encoding="utf-8") as fp:
110+
with open(__get_plist_path(app_path), "rb") as fp:
111111
return plistlib.load(fp)
112112

113113

114114
def __save_info_plist(app_path, pl):
115-
with open(__get_plist_path(app_path), "wb", encoding="utf-8") as fp:
115+
with open(__get_plist_path(app_path), "wb") as fp:
116116
plistlib.dump(pl, fp)
117117

118118

sdk/python/packages/flet-cli/src/flet_cli/utils/distros.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def download_with_progress(url, dest_path, progress: Optional[Progress] = None):
1515

1616
if progress:
1717
task = progress.add_task("Downloading...", total=total_size)
18-
with open(dest_path, "wb", encoding="utf-8") as out_file:
18+
with open(dest_path, "wb") as out_file:
1919
while chunk := response.read(block_size):
2020
out_file.write(chunk)
2121
if progress:

sdk/python/packages/flet/src/flet/utils/hashing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def sha1(input_string):
99

1010
def calculate_file_hash(path, blocksize=65536):
1111
h = hashlib.sha256()
12-
with open(path, "rb", encoding="utf-8") as f:
12+
with open(path, "rb") as f:
1313
while True:
1414
data = f.read(blocksize)
1515
if not data:

0 commit comments

Comments
 (0)