aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorStanley <46876382+slateny@users.noreply.github.com>2023-12-27 09:16:36 -0800
committerGitHub <noreply@github.com>2023-12-27 17:16:36 +0000
commit0651936ae2bc6999f488f8c519b8d07a06a11557 (patch)
tree3199097abe1b497474071a44ef9d276cd23a88f3 /Lib/tarfile.py
parentc66b577d9f7a11ffab57985fd6fb22e9dfd4f245 (diff)
downloadcpython-0651936ae2bc6999f488f8c519b8d07a06a11557.tar.gz
cpython-0651936ae2bc6999f488f8c519b8d07a06a11557.zip
gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610)
Diffstat (limited to 'Lib/tarfile.py')
-rwxr-xr-xLib/tarfile.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 5ada0ad626b..20e0394507f 100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -330,10 +330,11 @@ class _LowLevelFile:
class _Stream:
"""Class that serves as an adapter between TarFile and
a stream-like object. The stream-like object only
- needs to have a read() or write() method and is accessed
- blockwise. Use of gzip or bzip2 compression is possible.
- A stream-like object could be for example: sys.stdin,
- sys.stdout, a socket, a tape device etc.
+ needs to have a read() or write() method that works with bytes,
+ and the method is accessed blockwise.
+ Use of gzip or bzip2 compression is possible.
+ A stream-like object could be for example: sys.stdin.buffer,
+ sys.stdout.buffer, a socket, a tape device etc.
_Stream is intended to be used only internally.
"""