[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Deprecate server descriptor annotation methods
commit 73e5bd3e4f51f60a998ae205ab7d684540d8d1a8
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Nov 18 13:50:06 2018 -0800
Deprecate server descriptor annotation methods
When I first began Stem reading from cached descriptors in tor's data directory
was our primary mechanism to get descriptor data. This is no longer the case.
Mostly we use stem.descriptor.remote or the control port.
I included these annotation methods for completeness (ie. 'hey, there's data
here so lets expose it'). That said, I've never heard of someone actually
finding this to be useful, and not that it's extremely rare for people to even
*get* descriptors that have these annotations lets just drop it.
Brought to mind thanks to a discussion about annotations with irl...
https://trac.torproject.org/projects/tor/ticket/28503
---
stem/descriptor/server_descriptor.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 748a2a9d..568af108 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -687,6 +687,12 @@ class ServerDescriptor(Descriptor):
@downloaded-at 2012-03-18 21:18:29
@source "173.254.216.66"
+ .. deprecated:: 1.8.0
+ Users very rarely read from cached descriptor files any longer. This
+ method will be removed in Stem 2.x. If you have some need for us to keep
+ this please `let me know
+ <https://trac.torproject.org/projects/tor/wiki/doc/stem/bugs>`_.
+
:returns: **dict** with the key/value pairs in our annotations
"""
@@ -708,6 +714,12 @@ class ServerDescriptor(Descriptor):
:func:`~stem.descriptor.server_descriptor.ServerDescriptor.get_annotations`
results, but with the unparsed lines and ordering retained.
+ .. deprecated:: 1.8.0
+ Users very rarely read from cached descriptor files any longer. This
+ method will be removed in Stem 2.x. If you have some need for us to keep
+ this please `let me know
+ <https://trac.torproject.org/projects/tor/wiki/doc/stem/bugs>`_.
+
:returns: **list** with the lines of annotation that came before this descriptor
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits