[tor-commits] [stem/master] DORMANT and ACTIVE signals
atagar at torproject.org
atagar at torproject.org
Thu Nov 29 01:09:16 UTC 2018
commit afbfb424c1a9a89cc7d798f21e7364e0d786e9f7
Author: Damian Johnson <atagar at torproject.org>
Date: Wed Nov 28 17:08:07 2018 -0800
DORMANT and ACTIVE signals
Stem support for a couple new signals. Sounds like a neat capability!
https://gitweb.torproject.org/torspec.git/commit/?id=4421149
---
docs/change_log.rst | 1 +
stem/__init__.py | 6 ++++++
stem/version.py | 2 ++
3 files changed, 9 insertions(+)
diff --git a/docs/change_log.rst b/docs/change_log.rst
index 675464ae..42485c09 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -48,6 +48,7 @@ The following are only available within Stem's `git repository
* **Controller**
* Controller events could fail to be delivered in a timely fashion (:trac:`27173`)
+ * **DORMANT** and **ACTIVE** :data:`~stem.Signal` (:spec:`4421149`)
* **Descriptors**
diff --git a/stem/__init__.py b/stem/__init__.py
index 771266fb..57ce93a4 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -49,6 +49,10 @@ Library for working with the tor process.
.. versionchanged:: 1.3.0
Added the HEARTBEAT signal.
+ .. versionchanged:: 1.8.0
+ Added the ACTIVE and DORMANT signals. You can check for Tor support for
+ these signals with the **DORMANT_MODE** :data:`~stem.version.Requirement`
+
========================= ===========
Signal Description
========================= ===========
@@ -60,6 +64,8 @@ Library for working with the tor process.
**NEWNYM** switch to new circuits, so new application requests don't share any circuits with old ones (this also clears our DNS cache)
**CLEARDNSCACHE** clears cached DNS results
**HEARTBEAT** trigger a heartbeat log message
+ **DORMANT** enables *dormant mode*, during which tor will avoid cpu and network usage
+ **ACTIVE** disables *dormant mode*
========================= ===========
.. data:: Flag (enum)
diff --git a/stem/version.py b/stem/version.py
index 979bcf95..01a95249 100644
--- a/stem/version.py
+++ b/stem/version.py
@@ -36,6 +36,7 @@ easily parsed and compared, for instance...
===================================== ===========
**AUTH_SAFECOOKIE** SAFECOOKIE authentication method
**DESCRIPTOR_COMPRESSION** `Expanded compression support for ZSTD and LZMA <https://gitweb.torproject.org/torspec.git/commit/?id=1cb56afdc1e55e303e3e6b69e90d983ee217d93f>`_
+ **DORMANT_MODE** **DORMANT** and **ACTIVE** :data:`~stem.Signal`
**DROPGUARDS** DROPGUARDS requests
**EVENT_AUTHDIR_NEWDESCS** AUTHDIR_NEWDESC events
**EVENT_BUILDTIMEOUT_SET** BUILDTIMEOUT_SET events
@@ -351,6 +352,7 @@ safecookie_req.greater_than(Version('0.2.3.13'))
Requirement = stem.util.enum.Enum(
('AUTH_SAFECOOKIE', safecookie_req),
('DESCRIPTOR_COMPRESSION', Version('0.3.1.1-alpha')),
+ ('DORMANT_MODE', Version('0.4.0.1-alpha')),
('DROPGUARDS', Version('0.2.5.1-alpha')),
('EVENT_AUTHDIR_NEWDESCS', Version('0.1.1.10-alpha')),
('EVENT_BUILDTIMEOUT_SET', Version('0.2.2.7-alpha')),
More information about the tor-commits
mailing list