commit d55e956d988b6efe567c447c948c20349ff559aa Author: teor teor@torproject.org Date: Thu Dec 12 15:36:17 2019 +1000
scripts: Use __future__ imports to adopt 3.0 behaviour
Part of 28863. --- generateFallbackDirLine.py | 5 +++++ lookupFallbackDirContact.py | 5 +++++ updateFallbackDirs.py | 5 +++++ 3 files changed, 15 insertions(+)
diff --git a/generateFallbackDirLine.py b/generateFallbackDirLine.py index 768c98d..1766674 100755 --- a/generateFallbackDirLine.py +++ b/generateFallbackDirLine.py @@ -6,6 +6,11 @@ # Usage: # generateFallbackDirLine.py fingerprint ...
+# Future imports for Python 2.7, mandatory in 3.0 +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + import sys
import stem.descriptor.remote as remote diff --git a/lookupFallbackDirContact.py b/lookupFallbackDirContact.py index 8db4714..d656956 100755 --- a/lookupFallbackDirContact.py +++ b/lookupFallbackDirContact.py @@ -6,6 +6,11 @@ # Usage: # lookupFallbackDirContact.py fingerprint ...
+# Future imports for Python 2.7, mandatory in 3.0 +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + import sys
import stem.descriptor.remote as remote diff --git a/updateFallbackDirs.py b/updateFallbackDirs.py index d557b7c..86343d4 100755 --- a/updateFallbackDirs.py +++ b/updateFallbackDirs.py @@ -35,6 +35,11 @@ # https://trac.torproject.org/projects/tor/attachment/ticket/8374/dir_list.2.p... # Modifications by teor, 2015
+# Future imports for Python 2.7, mandatory in 3.0 +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + ## Imports: version-independent
import copy
tor-commits@lists.torproject.org