[tor-bugs] #7843 [Stem]: Test and support python 3.x
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Jan 4 15:49:41 UTC 2013
#7843: Test and support python 3.x
-------------------------+--------------------------------------------------
Reporter: atagar | Owner: atagar
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by robinson):
Damian,
Some comments:
1. remember to allow for specifying the python3 binary location
2. run_tests.py also needs to be run through 2to3
3. there are several cross-version changes I believe can be had now
For 2 (above), maybe python3 testing should be a separate command? For
example, a shell script which does:
{{{
mkdir python3-tests
2to3 --write --no-diffs --nobackups --write-unchanged-files --output-
dir=python3-tests stem test run_tests.py
( cd python3-tests; $PYTHON3 ./run_tests.py )
}}}
For 3 (above): are you interested in some low-hanging Py2->Py3 fruit? For
example:
{{{
- import Queue
+ import Queue as queue
}}}
and change Queue.Queue initializations to queue.Queue. Then only one line
(the import statement) is changed by 2to3 (because the Queue module was
renamed to queue in Py3).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7843#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list