Skip to content

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 17 Oct 05:48

Changed

  • sftppath requires pathapi>=0.1.2,<0.2 (it allowed >=0.1.0): 0.1.2
    provides AsyncPath, which AsyncSFTPPath builds on. Upgrading sftppath upgrades
    pathapi with it.

Added

  • AsyncSFTPPath, a pathapi.AsyncPath for an SFTP server whose requests are
    made on the caller's event loop with asyncssh, not on a worker thread: stat(),
    lstat(), exists(), is_dir(), is_file(), iterdir(), walk(), open(),
    read_*(), write_*(), mkdir(), unlink(), rmdir(), rename(), and the
    recursive copy() and rm() of a directory on one server. The other methods,
    glob() among them, run on worker threads as AsyncPath runs them. It is
    built like SFTPPath or from one, opens its connection on first use, and
    closes it on aclose() or async with. It needs the asyncssh extra and a
    pathapi that provides AsyncPath (pathapi>=0.1.2); without them
    import sftppath still works and naming the class raises an ImportError
    that says what is missing.
  • rm() and copy() take max_workers, the keyword of pathapi's recursive
    rm() and copy() (a class runs serially unless it declares _threadsafe,
    which these classes do not). The generic walks pass it on; the asyncssh native
    walks ignore it and stay bounded by max_concurrency. Nothing changes for a
    call that does not give it, and it works with the pathapi release that
    lacks it as long as it is not given.

Full Changelog: v0.1.1...v0.1.2