[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Adding the HEARTBEAT signal type



commit 73f04de83faa5f6f560cd1305efd0faa409a2314
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Tue Nov 25 10:34:27 2014 -0800

    Adding the HEARTBEAT signal type
    
    New type of signal accepted by tor...
    
      https://gitweb.torproject.org/torspec.git/commitdiff/1d1c11f12ab9cf32f44e29a9f322dd8fd04ecf9b
---
 docs/change_log.rst |    4 ++--
 stem/__init__.py    |    2 ++
 stem/control.py     |    2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/change_log.rst b/docs/change_log.rst
index 30c01a1..4034884 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -50,6 +50,8 @@ The following are only available within Stem's `git repository
   * Added :class:`~stem.exit_policy.ExitPolicy` methods for more easily handling 'private' policies (the `default prefix <https://www.torproject.org/docs/tor-manual.html.en#ExitPolicyRejectPrivate>`_) and the defaultly appended suffix. This includes :func:`~stem.exit_policy.ExitPolicy.has_private`, :func:`~stem.exit_policy.ExitPolicy.strip_private`, :func:`~stem.exit_policy.ExitPolicy.has_default`, and :func:`~stem.exit_policy.ExitPolicy.strip_default` :class:`~stem.exit_policy.ExitPolicy` methods in addition to :func:`~stem.exit_policy.ExitPolicyRule.is_private` and :func:`~stem.exit_policy.ExitPolicyRule.is_default` for the :class:`~stem.exit_policy.ExitPolicyRule`. (:trac:`10107`)
   * Added the reason attribute to the :class:`~stem.response.events.HSDescEvent` (:spec:`7908c8d`)
   * :func:`~stem.process.launch_tor_with_config` could cause a "Too many open files" OSError if called too many times (:trac:`13141`)
+  * The :func:`~stem.control.Controller.get_exit_policy` method errored if tor couldn't determine our external address
+  * The Controller's methods for retrieving descriptors could raise unexpected ValueErrors if tor didn't have any descriptors available
 
  * **Descriptors**
 
@@ -101,8 +103,6 @@ among numerous other improvements and fixes.
   * The :func:`~stem.control.Controller.add_event_listener` method couldn't accept event types that Stem didn't already recognize
   * The :class:`~stem.exit_policy.ExitPolicy` class couldn't be pickled
   * Tor instances spawned with :func:`~stem.process.launch_tor` and :func:`~stem.process.launch_tor_with_config` could hang due to unread stdout content, we now close stdout and stderr once tor finishes bootstrapping (:trac:`9862`)
-  * The :func:`~stem.control.Controller.get_exit_policy` method errored if tor couldn't determine our external address
-  * The Controller's methods for retrieving descriptors could raise unexpected ValueErrors if tor didn't have any descriptors available
 
  * **Descriptors**
 
diff --git a/stem/__init__.py b/stem/__init__.py
index eb84be7..310f4ab 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -46,6 +46,7 @@ Library for working with the tor process.
   **HALT** or **TERM**      exit tor immediately
   **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
   ========================= ===========
 
 .. data:: Flag (enum)
@@ -604,6 +605,7 @@ Signal = stem.util.enum.UppercaseEnum(
   'TERM',
   'NEWNYM',
   'CLEARDNSCACHE',
+  'HEARTBEAT',
 )
 
 CircStatus = stem.util.enum.UppercaseEnum(
diff --git a/stem/control.py b/stem/control.py
index 431e360..f947aca 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2892,6 +2892,8 @@ class Controller(BaseController):
     * Effective Rate = min(BandwidthRate, RelayBandwidthRate, MaxAdvertisedBandwidth)
     * Effective Burst = min(BandwidthBurst, RelayBandwidthBurst)
 
+    .. versionadded:: 1.3.0
+
     :param object default: response if the query fails
     :param bool burst: provides the burst bandwidth, otherwise this provides
       the standard rate

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits