#27675 closed defect (fixed)

test_rebind.py depends on python >=2.7 or >=3.1

Reported by: catalyst Owned by: rl1987
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: mikeperry Sponsor:

Description (last modified by catalyst)

It looks like test_rebind.py added as part of #17873 doesn't work for me on macOS 10.12.6, which has with python 2.6. test_rebind.py uses str.format() without a field name or number, which is new in python 2.7 or 3.1. It also tries to run with python3 (for unknown reasons), but ends up not necessarily doing so because test_rebind.sh explicitly runs $PYTHON or python.

Replacing instances of {} in format strings with {0} seems to work.

What is our minimum required python version anyway?

Child Tickets

Change History (7)

comment:1 Changed 11 months ago by nickm

From IRC: we require 2.7 or later.

comment:2 Changed 11 months ago by catalyst

Description: modified (diff)
Summary: test_rebind.py breaks on macOS, depends on python >=2.7 or >=3.1test_rebind.py depends on python >=2.7 or >=3.1

I had a wayward python 2.6 in my PATH in front of /usr/bin. It looks like macOS 10.12 has python 2.7.

It might still be a good idea to delete the misleading #!/usr/bin/python3 from test_rebind.py.

comment:3 Changed 11 months ago by rl1987

Owner: set to rl1987
Status: newaccepted

Will look into this later this week.

comment:4 Changed 11 months ago by rl1987

Status: acceptedneeds_review

comment:5 Changed 11 months ago by asn

Reviewer: mikeperry

comment:6 Changed 11 months ago by rl1987

Rebased, squashed and added changes file: https://github.com/torproject/tor/pull/365

comment:7 Changed 11 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

looks ok to me; merged it.

Note: See TracTickets for help on using tickets.