Opened 6 months ago

Closed 6 months ago

#29913 closed defect (fixed)

Stop assuming that /usr/bin/python3 exists

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: fast-fix, python3, asn-merge, nickm-merge
Cc: Actual Points: 0.2
Parent ID: Points: 0.1
Reviewer: cohosh Sponsor:

Description

python3 is in /usr/local/bin on my system, so I see:

$ scripts/maint/practracker/practracker.py 
-bash: scripts/maint/practracker/practracker.py: /usr/bin/python3: bad interpreter: No such file or directory

Child Tickets

Change History (5)

comment:1 Changed 6 months ago by teor

Actual Points: 0.2
Status: assignedneeds_review

comment:2 Changed 6 months ago by asn

Reviewer: cohosh

comment:3 Changed 6 months ago by cohosh

Status: needs_reviewmerge_ready

It looks good to me. I just want to call attention to ticket #11608 as a reminder that wherever we're using /usr/bin/python, this can refer to python2 or python3 depending on how the system is set up. This should be fine since we're replacing /usr/bin/python3 for only scripts that work with both.

comment:4 Changed 6 months ago by teor

Keywords: asn-merge nickm-merge added

Thanks!
We'll stop supporting python2 in 2020 when it is no longer supported (and when macOS moves to python3 as the default).

comment:5 in reply to:  4 Changed 6 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged to master!

Replying to teor:

Thanks!
We'll stop supporting python2 in 2020 when it is no longer supported (and when macOS moves to python3 as the default).

(This is assuming that python3 is actually as ubiquitous by then as we need it to be. If we need to build on older distributions that don't have it, we might need to keep python2 compatibility for some things for a while. I hope that isn't the case, though.)

Note: See TracTickets for help on using tickets.