[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #8565 [Stem]: run_tests.py --python3 fails if python < 2.7 is the default python version



#8565: run_tests.py --python3 fails if python < 2.7 is the default python version
---------------------+------------------------------------------------------
 Reporter:  Desoxy   |          Owner:  atagar
     Type:  defect   |         Status:  new   
 Priority:  trivial  |      Milestone:        
Component:  Stem     |        Version:        
 Keywords:           |         Parent:        
   Points:           |   Actualpoints:        
---------------------+------------------------------------------------------
 {{{
 desoxy@localhost:~/git/stem$ python --version
 Python 2.6.6
 desoxy@localhost:~/git/stem$ python run_tests.py --python3
 Traceback (most recent call last):
   File "run_tests.py", line 428, in <module>
     if CONFIG["argument.python3"] and sys.version_info.major != 3:
 AttributeError: 'tuple' object has no attribute 'major'
 }}}
 The reason is simple: sys.version_info only became a named tuple in Python
 v2.7 and later.[1]

 Assuming you want to keep compability with older Python versions, the
 attached one-line patch fixes this problem.

 1:
 http://docs.python.org/2/library/sys.html?highlight=sys#sys.version_info))

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8565>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs