Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #8565

Closed
Open
Created Mar 22, 2013 by Trac@tracbot

run_tests.py --python3 fails if python < 2.7 is the default python version

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))

Trac:
Username: Desoxy

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking