[tor-commits] [stem/master] Deprecate the AuthDirNewDescEvent class

atagar at torproject.org atagar at torproject.org
Sat Sep 9 21:47:16 UTC 2017


commit e2fd50a86fad43d6a64971f291fecc517958c2f0
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Sep 9 14:45:47 2017 -0700

    Deprecate the AuthDirNewDescEvent class
    
    Tor version 0.3.2.1 removes this event type so deprecating our class for it...
    
      https://trac.torproject.org/projects/tor/ticket/22377
      https://gitweb.torproject.org/torspec.git/commit/?id=6e887ba
---
 docs/change_log.rst     | 1 +
 stem/control.py         | 5 +++++
 stem/response/events.py | 7 ++++++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/docs/change_log.rst b/docs/change_log.rst
index 40764efb..1bf01c5d 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -56,6 +56,7 @@ The following are only available within Stem's `git repository
   * Better error message when :func:`~stem.control.Controller.set_conf` fails due to an option being immutable
   * :func:`~stem.control.Controller.is_geoip_unavailable` now determines if database is available right away
   * Deprecated :func:`~stem.control.Controller.is_geoip_unavailable`, this is now available via getinfo instead (:trac:`23237`, :spec:`dc973f8`)
+  * Deprecated :class:`~stem.respose.events.AuthDirNewDescEvent` (:trac:`22377`, :spec:`6e887ba`)
   * Caching manual information as sqlite rather than stem.util.conf, making :func:`stem.manual.Manual.from_cache` about ~8x faster
   * Added :func:`~stem.manual.database` to get a cursor for the manual cache
   * Failed to parse torrcs without a port on ipv6 exit policy entries
diff --git a/stem/control.py b/stem/control.py
index 53e8f9b3..2f1268ef 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -181,6 +181,11 @@ If you're fine with allowing your script to raise exceptions then this can be mo
   Enums are mapped to :class:`~stem.response.events.Event` subclasses as
   follows...
 
+  .. deprecated:: 1.6.0
+
+     Tor dropped EventType.AUTHDIR_NEWDESCS as of version 0.3.2.1.
+     (:spec:`6e887ba`)
+
   ======================= ===========
   EventType               Event Class
   ======================= ===========
diff --git a/stem/response/events.py b/stem/response/events.py
index 5cfd9a66..45e4677b 100644
--- a/stem/response/events.py
+++ b/stem/response/events.py
@@ -211,7 +211,12 @@ class AuthDirNewDescEvent(Event):
   descriptors. The descriptor type contained within this event is unspecified
   so the descriptor contents are left unparsed.
 
-  The AUTHDIR_NEWDESCS event was introduced in tor version 0.1.1.10-alpha.
+  The AUTHDIR_NEWDESCS event was introduced in tor version 0.1.1.10-alpha and
+  removed in 0.3.2.1-alpha. (:spec:`6e887ba`)
+
+  .. deprecated:: 1.6.0
+
+     Tor dropped this event as of version 0.3.2.1. (:spec:`6e887ba`)
 
   :var stem.AuthDescriptorAction action: what is being done with the descriptor
   :var str message: explanation of why we chose this action



More information about the tor-commits mailing list