[tor-commits] [stem/master] Drop renamed fingerprint attribute
atagar at torproject.org
atagar at torproject.org
Mon Feb 10 03:14:50 UTC 2020
commit bae1ef0ab944cb930fe349821c844ee87bf47414
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Feb 9 14:34:10 2020 -0800
Drop renamed fingerprint attribute
Old alias for v3ident.
---
stem/descriptor/networkstatus.py | 10 ----------
test/unit/descriptor/networkstatus/directory_authority.py | 10 +++++-----
test/unit/descriptor/networkstatus/document_v3.py | 4 ++--
3 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 1cab602c..743076be 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -1560,10 +1560,6 @@ class DirectoryAuthority(Descriptor):
**\\*** mandatory attribute
- .. versionchanged:: 1.4.0
- Renamed our 'fingerprint' attribute to 'v3ident' (prior attribute exists
- for backward compatability, but is deprecated).
-
.. versionchanged:: 1.6.0
Added the is_shared_randomness_participate, shared_randomness_commitments,
shared_randomness_previous_reveal_count,
@@ -1702,12 +1698,6 @@ class DirectoryAuthority(Descriptor):
else:
self._entries = entries
- # TODO: Due to a bug we had a 'fingerprint' rather than 'v3ident' attribute
- # for a long while. Keeping this around for backward compatability, but
- # this will be dropped in stem's 2.0 release.
-
- self.fingerprint = self.v3ident
-
def _parse_dir_address_line(descriptor, entries):
# "dir-address" IPPort
diff --git a/test/unit/descriptor/networkstatus/directory_authority.py b/test/unit/descriptor/networkstatus/directory_authority.py
index 80d70927..325fad12 100644
--- a/test/unit/descriptor/networkstatus/directory_authority.py
+++ b/test/unit/descriptor/networkstatus/directory_authority.py
@@ -23,7 +23,7 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority.create()
self.assertTrue(authority.nickname.startswith('Unnamed'))
- self.assertEqual(40, len(authority.fingerprint))
+ self.assertEqual(40, len(authority.v3ident))
self.assertEqual('no.place.com', authority.hostname)
self.assertEqual(9030, authority.dir_port)
self.assertEqual(9090, authority.or_port)
@@ -42,7 +42,7 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority.create(is_vote = True)
self.assertTrue(authority.nickname.startswith('Unnamed'))
- self.assertEqual(40, len(authority.fingerprint))
+ self.assertEqual(40, len(authority.v3ident))
self.assertEqual('no.place.com', authority.hostname)
self.assertEqual(9030, authority.dir_port)
self.assertEqual(9090, authority.or_port)
@@ -73,7 +73,7 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority(content, is_vote = False)
self.assertEqual('gabelmoo-legacy', authority.nickname)
- self.assertEqual('81349FC1F2DBA2C2C11B45CB9706637D480AB913', authority.fingerprint)
+ self.assertEqual('81349FC1F2DBA2C2C11B45CB9706637D480AB913', authority.v3ident)
self.assertEqual('131.188.40.189', authority.hostname)
self.assertEqual('131.188.40.189', authority.address)
self.assertEqual(80, authority.dir_port)
@@ -148,7 +148,7 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority(content, False)
self.assertEqual(None, authority.nickname)
- self.assertEqual(None, authority.fingerprint)
+ self.assertEqual(None, authority.v3ident)
self.assertEqual(None, authority.hostname)
self.assertEqual(None, authority.address)
self.assertEqual(None, authority.dir_port)
@@ -171,7 +171,7 @@ class TestDirectoryAuthority(unittest.TestCase):
self.assertRaises(ValueError, DirectoryAuthority, content, True)
authority = DirectoryAuthority(content, False)
- self.assertEqual(None, authority.fingerprint)
+ self.assertEqual(None, authority.v3ident)
def test_malformed_address(self):
"""
diff --git a/test/unit/descriptor/networkstatus/document_v3.py b/test/unit/descriptor/networkstatus/document_v3.py
index 93f98d77..22d49b5f 100644
--- a/test/unit/descriptor/networkstatus/document_v3.py
+++ b/test/unit/descriptor/networkstatus/document_v3.py
@@ -132,7 +132,7 @@ ci356fosgLiM1sVqCUkNdA==
authority = document.directory_authorities[0]
self.assertEqual(2, len(document.directory_authorities))
self.assertEqual('test001a', authority.nickname)
- self.assertEqual('596CD48D61FDA4E868F4AA10FF559917BE3B1A35', authority.fingerprint)
+ self.assertEqual('596CD48D61FDA4E868F4AA10FF559917BE3B1A35', authority.v3ident)
self.assertEqual('127.0.0.1', authority.hostname)
self.assertEqual('127.0.0.1', authority.address)
self.assertEqual(7001, authority.dir_port)
@@ -256,7 +256,7 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
authority = document.directory_authorities[0]
self.assertEqual(1, len(document.directory_authorities))
self.assertEqual('turtles', authority.nickname)
- self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', authority.fingerprint)
+ self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', authority.v3ident)
self.assertEqual('76.73.17.194', authority.hostname)
self.assertEqual('76.73.17.194', authority.address)
self.assertEqual(9030, authority.dir_port)
More information about the tor-commits
mailing list