10000 gh-135648: Document that `shutil.copyfileobj` doesn't flush by freakboy3742 · Pull Request #135737 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135648: Document that shutil.copyfileobj doesn't flush #135737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update emscripten build script to follow documented advice.
  • Loading branch information
freakboy3742 committed Jun 20, 2025
commit 6f0d22db18436d672f334f468c197d359c82814a
3 changes: 2 additions & 1 deletion Tools/wasm/emscripten/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ def make_build_python(context, working_dir):
@subdir(HOST_BUILD_DIR, clean_ok=True)
def make_emscripten_libffi(context, working_dir):
shutil.rmtree(working_dir / "libffi-3.4.6", ignore_errors=True)
with tempfile.NamedTemporaryFile(suffix=".tar.gz") as tmp_file:
with tempfile.NamedTemporaryFile(suffix=".tar.gz", delete_on_close=False) as tmp_file:
with urlopen(
"https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz"
) as response:
shutil.copyfileobj(response, tmp_file)
tmp_file.close()
shutil.unpack_archive(tmp_file.name, working_dir)
call(
[EMSCRIPTEN_DIR / "make_libffi.sh"],
Expand Down
Loading
0