[tor-commits] [stem/master] Drop obsolete hidden_service_dir attribute

atagar at torproject.org atagar at torproject.org
Mon Feb 10 03:14:50 UTC 2020


commit 15bec6376b12108dbfb896d208d4294de53a3235
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Feb 9 17:02:31 2020 -0800

    Drop obsolete hidden_service_dir attribute
---
 stem/descriptor/server_descriptor.py      | 10 ----------
 test/unit/descriptor/server_descriptor.py |  2 --
 2 files changed, 12 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 4a54e42f..36ddb624 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -502,10 +502,6 @@ class ServerDescriptor(Descriptor):
 
   .. versionchanged:: 1.7.0
      Added the is_hidden_service_dir attribute.
-
-  .. 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 = {
@@ -610,12 +606,6 @@ class ServerDescriptor(Descriptor):
 
     entries, self._unparsed_exit_policy = _descriptor_components(stem.util.str_tools._to_unicode(raw_contents), validate, extra_keywords = ('accept', 'reject'), non_ascii_fields = ('contact', 'platform'))
 
-    # TODO: Remove the following field in Stem 2.0. It has never been populated...
-    #
-    #   https://gitweb.torproject.org/torspec.git/commit/?id=43c2f78
-
-    self.hidden_service_dir = ['2']
-
     if validate:
       self._parse(entries, validate)
 
diff --git a/test/unit/descriptor/server_descriptor.py b/test/unit/descriptor/server_descriptor.py
index 55b1ac42..6524f9d8 100644
--- a/test/unit/descriptor/server_descriptor.py
+++ b/test/unit/descriptor/server_descriptor.py
@@ -147,9 +147,7 @@ Qlx9HNCqCY877ztFRC624ja2ql6A2hBcuoYMbkHjcQ4=
     self.assertEqual(expected_signature, desc.signature)
     self.assertEqual([], desc.get_unrecognized_lines())
     self.assertEqual('2C7B27BEAB04B4E2459D89CA6D5CD1CC5F95A689', desc.digest())
-
     self.assertEqual('@type server-descriptor 1.0', str(desc.type_annotation()))
-    self.assertEqual(['2'], desc.hidden_service_dir)  # obsolete field
 
   def test_metrics_descriptor_multiple(self):
     """





More information about the tor-commits mailing list