Skip to content

bpo-33671: allow setting shutil.copyfile() bufsize globally #12016

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 1 commit into from
Feb 24, 2019
Merged

bpo-33671: allow setting shutil.copyfile() bufsize globally #12016

merged 1 commit into from
Feb 24, 2019

Conversation

giampaolo
Copy link
Contributor

@giampaolo giampaolo commented Feb 24, 2019

Looking back at BPO-33671 / PR #7160: since copyfileobj() is used by all copy* functions one may want to set file.read() bufsize globally as shutil.COPY_BUFSIZE = .... This may be useful on Windows where bufsize defaults to 1 MiB. I decided not to document shutil.COPY_BUFSIZE because I consider it a corner case.

https://bugs.python.org/issue33671

@giampaolo giampaolo requested a review from vstinner February 24, 2019 09:37
@giampaolo giampaolo changed the title BPO-33671: allow setting shutil.copyfile()'s file.read() bufsize globally bpo-33671: allow setting shutil.copyfile()'s file.read() bufsize globally Feb 24, 2019
@methane methane changed the title bpo-33671: allow setting shutil.copyfile()'s file.read() bufsize globally bpo-33671: allow setting shutil.copyfile() bufsize globally Feb 24, 2019
@methane methane merged commit 3b0abb0 into python:master Feb 24, 2019
@giampaolo giampaolo deleted the shutil-copyfile-bufsize branch February 25, 2019 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants