[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Tests fail to run with python 3.8
commit af52d8b16f6623e3bdf0b470697b91a69b497dc2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed Jun 12 13:18:20 2019 -0700
Tests fail to run with python 3.8
Python's platform module removed its linux_distribution() method...
https://trac.torproject.org/projects/tor/ticket/30847
https://docs.python.org/3/library/platform.html#platform.linux_distribution
https://stackoverflow.com/questions/49554443/platform-linux-distribution-deprecated-what-are-the-alternatives
This method was only used for display purposes to indicate the OS where the
tests were ran. No big whoop if we simply omit the information.
---
test/task.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/task.py b/test/task.py
index be518ca7..1c14e64e 100644
--- a/test/task.py
+++ b/test/task.py
@@ -120,7 +120,10 @@ def _check_platform_version():
extra = platform.release()
elif platform.system() == 'Darwin':
extra = platform.release()
- elif platform.system() == 'Linux':
+ elif platform.system() == 'Linux' and hasattr(platform, 'linux_distribution'):
+ # TODO: platform.linux_distribution() was removed in python 3.8
+ # https://trac.torproject.org/projects/tor/ticket/30847
+
extra = ' '.join(platform.linux_distribution()[:2])
else:
extra = None
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits