Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3b0abb01
Commit
3b0abb01
authored
Feb 24, 2019
by
Giampaolo Rodola
Committed by
Inada Naoki
Feb 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33671: allow setting shutil.copyfile() bufsize globally (GH-12016)
parent
ef4ac967
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Lib/shutil.py
Lib/shutil.py
+3
-1
No files found.
Lib/shutil.py
View file @
3b0abb01
...
@@ -187,9 +187,11 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
...
@@ -187,9 +187,11 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
else
:
else
:
fdst_write
(
mv
)
fdst_write
(
mv
)
def
copyfileobj
(
fsrc
,
fdst
,
length
=
COPY_BUFSIZE
):
def
copyfileobj
(
fsrc
,
fdst
,
length
=
0
):
"""copy data from file-like object fsrc to file-like object fdst"""
"""copy data from file-like object fsrc to file-like object fdst"""
# Localize variable access to minimize overhead.
# Localize variable access to minimize overhead.
if
not
length
:
length
=
COPY_BUFSIZE
fsrc_read
=
fsrc
.
read
fsrc_read
=
fsrc
.
read
fdst_write
=
fdst
.
write
fdst_write
=
fdst
.
write
while
True
:
while
True
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment