Skip to content

Commit

Permalink
Migrate AsyncSSH to new async/await syntax
Browse files Browse the repository at this point in the history
This commit updates AsyncSSH to use the modern async/await syntax,
now requiring Python 3.6 or later. The plan is to make these changes
available as AsyncSSH 2.0.0, with those wishing to continue to use
AsyncSSH on Python 3.4 or 3.5 staying on the AsyncSSH 1.x releases.

In preparation for moving to 2.0, the following additional changes
have also been made:

* Removed optional loop argument from all public AsyncSSH APIs,
  consistent with the deprecation of this argument in the asyncio
  package in Python 3.8. Calls will now always use the event loop
  which is active at the time of the call.

* Removed deprecated "session_encoding" and "session_errors" arguments
  from create_server() and listen() functions. These arguments were
  renamed to "encoding" and "errors" back in version 1.16.0 to be
  consistent with other AsyncSSH APIs.

* Removed get_environment(), get_command(), and get_subsystem() methods
  on SSHServerProcess class. This information was made available as
  "env", "command", and "subsystem" properties of SSHServerProcess in
  AsyncSSH 1.11.0.

* Removed support for non-async context managers on AsyncSSH connections
  and processes and SFTP client connections and file objects. Callers
  should use "async with" to invoke the async the context managers on
  these objects.
  • Loading branch information
ronf committed Oct 22, 2019
1 parent e671ef9 commit f467b78
Show file tree
Hide file tree
Showing 42 changed files with 4,399 additions and 6,294 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,2 +1,2 @@
include CONTRIBUTING.rst COPYRIGHT LICENSE README.rst pylintrc tox.ini
include examples/*.py tests/*.py tests_py35/*.py
include examples/*.py tests/*.py
8 changes: 4 additions & 4 deletions README.rst
Expand Up @@ -2,7 +2,7 @@ AsyncSSH: Asynchronous SSH for Python
=====================================

AsyncSSH is a Python package which provides an asynchronous client and
server implementation of the SSHv2 protocol on top of the Python 3.4+
server implementation of the SSHv2 protocol on top of the Python 3.6+
asyncio framework.

.. code:: python
Expand Down Expand Up @@ -81,7 +81,7 @@ License

This package is released under the following terms:

Copyright (c) 2013-2018 by Ron Frederick <ronf@timeheart.net> and others.
Copyright (c) 2013-2019 by Ron Frederick <ronf@timeheart.net> and others.

This program and the accompanying materials are made available under
the terms of the Eclipse Public License v2.0 which accompanies this
Expand All @@ -104,9 +104,9 @@ Public License FAQ <https://www.eclipse.org/legal/epl-2.0/faq.php>`_.
Prerequisites
-------------

To use ``asyncssh``, you need the following:
To use ``asyncssh`` 2.0 or later, you need the following:

* Python 3.4 or later
* Python 3.6 or later
* cryptography (PyCA) 2.7 or later

Installation
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
@@ -1,9 +1,8 @@
environment:
matrix:
- TOXENV: py34
- TOXENV: py35
- TOXENV: py36
- TOXENV: py37
- TOXENV: py38

image:
- Visual Studio 2017
Expand Down

0 comments on commit f467b78

Please sign in to comment.