This issue is relevant to the following ticket: #29913 (moved)
In short, the problem in #29913 (moved) was that Python 3 scripts cannot depend on a hardcoded path in order to find the Python 3 executable, because the path itself is not immutable. (For instance, as seen in that ticket itself.
Unfortunately, the same exact issue also applies to Python 2 scripts and their relevant executables.
Trac: Username: alwayslivid
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
This change will be particularly useful for people that are using FreeBSD, have compiled Python on a Linux machine, or use non-traditional setups of Python.
I'd also like to check with Nick (another maintainer), to see if this change go in 0.4.3, or 0.4.4,
Here are the tradeoffs:
It's a long-standing bug on BSD, so it's not urgent
We still haven't checked if all of our scripts work on python 3 (see #33196 (moved)), and this change could make more scripts use python 3 on more machines
Trac: Version: Tor: 0.4.2.5 toN/A Milestone: N/Ato Tor: 0.4.3.x-final Keywords: N/Adeleted, extra-review added Cc: N/Ato nickm Status: new to needs_review
I checked some of the scripts and changed "python" to "python2" wherever the syntax wouldn't allow using Python 3. I also imported print_function from future in some cases.
I checked some of the scripts and changed "python" to "python2" wherever the syntax wouldn't allow using Python 3.
We'd like to transition to Python 3, since python 2 is not supported. So let's leave those scripts with "python" and fix the Python 3
Transitioning from Python 2 to 3 would be pretty great, especially when you take how critical Tor and its surrounding software is into account. For the time being, however, this change would potentially break some of the scripts, considering that python can also refer to python3 and some scripts simply aren't suited for python3 right now. Maybe this explicit mention of python2 would also mobilize more people to work on that. (I'd like to do some work on that myself later on.)
I'm not sure whether I misinterpreted something, but the changes of the aforementioned tree (#33193 (moved)) don't seem to be conflicting with my own changes in any capacity.
I checked some of the scripts and changed "python" to "python2" wherever the syntax wouldn't allow using Python 3.
We'd like to transition to Python 3, since python 2 is not supported. So let's leave those scripts with "python" and fix the Python 3
Transitioning from Python 2 to 3 would be pretty great, especially when you take how critical Tor and its surrounding software is into account. For the time being, however, this change would potentially break some of the scripts, considering that python can also refer to python3 and some scripts simply aren't suited for python3 right now. Maybe this explicit mention of python2 would also mobilize more people to work on that. (I'd like to do some work on that myself later on.)
Some OSes don't install Python 2 as python2, so we can't change to /usr/bin/env python2 in the current tor 0.4.3 alpha series.
Maybe it would be best to leave all these changes until 0.4.4, when we have time to fix any Python 3 issues?
I'm not sure whether I misinterpreted something, but the changes of the aforementioned tree (#33193 (moved)) don't seem to be conflicting with my own changes in any capacity.
I wasn't sure if there were conflicts.
But I thought if you were trying to fix issues with Python 3, you might want to re-use some of those fixes.