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

[tor-commits] [stem/master] Deprecate server descriptor's hidden_service_dir field



commit b5b22ec965135263f26d25e7cd338d82828f3e84
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Apr 4 13:53:18 2018 -0700

    Deprecate server descriptor's hidden_service_dir field
    
    This field has never been populated...
    
      https://gitweb.torproject.org/torspec.git/commit/?id=43c2f78
    
    We'll drop it in Stem 2.0. Interestingly when we added this I forgot to include
    it in our docs so... cool. Think I won't correct that. ;P
---
 stem/descriptor/server_descriptor.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 8aed42c6..4f2bcbec 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -341,10 +341,11 @@ def _parse_hibernating_line(descriptor, entries):
 def _parse_hidden_service_dir_line(descriptor, entries):
   value = _value('hidden-service-dir', entries)
 
-  if value:
-    descriptor.hidden_service_dir = value.split(' ')
-  else:
-    descriptor.hidden_service_dir = ['2']
+  # TODO: Remove the following field in Stem 2.0. It has never been populated...
+  #
+  #   https://gitweb.torproject.org/torspec.git/commit/?id=43c2f78
+
+  descriptor.hidden_service_dir = ['2']
 
 
 def _parse_uptime_line(descriptor, entries):
@@ -527,6 +528,10 @@ class ServerDescriptor(Descriptor):
   .. versionchanged:: 1.6.0
      Added the extra_info_sha256_digest, protocols, and bridge_distribution
      attributes.
+
+  .. versionchanged:: 1.7.0
+     Deprecated the hidden_service_dir field, it's never been populated
+     (:spec:`43c2f78`). This field will be removed in Stem 2.0.
   """
 
   ATTRIBUTES = {

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