[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Rename `Controller` to `AsyncController`
commit 8ef1d67abae624c6219064af75c7203bc67231c2
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Thu Apr 23 20:18:28 2020 +0300
Rename `Controller` to `AsyncController`
---
stem/control.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index 6648727f..b7050626 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -995,7 +995,7 @@ class BaseController(object):
self._event_notice.clear()
-class Controller(BaseController):
+class AsyncController(BaseController):
"""
Connection with Tor's control socket. This is built on top of the
BaseController and provides a more user friendly API for library users.
@@ -1033,7 +1033,7 @@ class Controller(BaseController):
else:
control_port = stem.socket.ControlPort(address, int(port))
- return Controller(control_port)
+ return AsyncController(control_port)
@staticmethod
def from_socket_file(path: str = '/var/run/tor/control') -> 'stem.control.Controller':
@@ -1048,7 +1048,7 @@ class Controller(BaseController):
"""
control_socket = stem.socket.ControlSocketFile(path)
- return Controller(control_socket)
+ return AsyncController(control_socket)
def __init__(self, control_socket: stem.socket.ControlSocket, is_authenticated: bool = False) -> None:
self._is_caching_enabled = True
@@ -1066,7 +1066,7 @@ class Controller(BaseController):
self._last_address_exc = None # type: Optional[BaseException]
self._last_fingerprint_exc = None # type: Optional[BaseException]
- super(Controller, self).__init__(control_socket, is_authenticated)
+ super(AsyncController, self).__init__(control_socket, is_authenticated)
def _sighup_listener(event: stem.response.events.SignalEvent) -> None:
if event.signal == Signal.RELOAD:
@@ -1100,7 +1100,7 @@ class Controller(BaseController):
async def close(self) -> None:
self.clear_cache()
- await super(Controller, self).close()
+ await super(AsyncController, self).close()
async def authenticate(self, *args: Any, **kwargs: Any) -> None:
"""
@@ -3772,7 +3772,7 @@ class Controller(BaseController):
await self.msg('DROPGUARDS')
async def _post_authentication(self) -> None:
- await super(Controller, self)._post_authentication()
+ await super(AsyncController, self)._post_authentication()
# try to re-attach event listeners to the new instance
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits