Changelog + docs re #127
This commit is contained in:
parent
a69abd4606
commit
8e697988af
2
NEWS
2
NEWS
|
@ -15,6 +15,8 @@ Releases
|
|||
v1.10.0 (DD MM YYYY)
|
||||
--------------------
|
||||
|
||||
* #127: Turn `SFTPFile` into a context manager. Thanks to Michael Williamson
|
||||
* for the patch.
|
||||
* #116: Limit `Message.get_bytes` to an upper bound of 1MB to protect against
|
||||
potential DoS vectors. Thanks to `@mvschaik` for catch & patch.
|
||||
* #115: Add convenience `get_pty` kwarg to `Client.exec_command` so users not
|
||||
|
|
|
@ -198,7 +198,7 @@ class SFTPClient (BaseSFTP):
|
|||
Open a file on the remote server. The arguments are the same as for
|
||||
python's built-in C{file} (aka C{open}). A file-like object is
|
||||
returned, which closely mimics the behavior of a normal python file
|
||||
object.
|
||||
object, including the ability to be used as a context manager.
|
||||
|
||||
The mode indicates how the file is to be opened: C{'r'} for reading,
|
||||
C{'w'} for writing (truncating an existing file), C{'a'} for appending,
|
||||
|
|
|
@ -34,6 +34,9 @@ from paramiko.sftp_attr import SFTPAttributes
|
|||
class SFTPFile (BufferedFile):
|
||||
"""
|
||||
Proxy object for a file on the remote server, in client mode SFTP.
|
||||
|
||||
Instances of this class may be used as context managers in the same way
|
||||
that built-in Python file objects are.
|
||||
"""
|
||||
|
||||
# Some sftp servers will choke if you send read/write requests larger than
|
||||
|
|
Loading…
Reference in New Issue