[tor-commits] [stem/master] Unified codebase for python2 and python3

atagar at torproject.org atagar at torproject.org
Sun Jan 4 02:29:04 UTC 2015


commit 5312483bb175bbee821c302565b77b56371ba82b
Merge: 539b635 8b332ed
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Jan 3 18:24:43 2015 -0800

    Unified codebase for python2 and python3
    
    Feature branch from Foxboron that allows our codebase to run directly under
    both python2 and python3. With this we no longer need to run 2to3 to install
    or test with python3...
    
      https://trac.torproject.org/projects/tor/ticket/14075
    
    This overhaul was done by doing a 2to3 conversion, then making changes so we
    remain compatible with python 2.6 and 2.7. As such, it's a pretty long diff.
    Tip for anyone else that wants to review this...
    
      % git diff [commit range] --word-diff=color --word-diff-regex=.
    
    Makes this much more manageable. ;)

 docs/change_log.rst                                |    3 +
 docs/conf.py                                       |   10 +-
 docs/faq.rst                                       |   12 +-
 docs/republish.py                                  |    6 +-
 run_tests.py                                       |   67 ++--
 setup.py                                           |    6 -
 stem/__init__.py                                   |    9 +
 stem/connection.py                                 |   20 +-
 stem/control.py                                    |   61 ++--
 stem/descriptor/__init__.py                        |    6 +-
 stem/descriptor/export.py                          |    8 +-
 stem/descriptor/extrainfo_descriptor.py            |   10 +-
 stem/descriptor/microdescriptor.py                 |    6 +-
 stem/descriptor/networkstatus.py                   |   28 +-
 stem/descriptor/reader.py                          |   22 +-
 stem/descriptor/remote.py                          |    8 +-
 stem/descriptor/router_status_entry.py             |   10 +-
 stem/descriptor/server_descriptor.py               |   15 +-
 stem/descriptor/tordnsel.py                        |    2 +-
 stem/exit_policy.py                                |   17 +-
 stem/interpreter/__init__.py                       |   24 +-
 stem/interpreter/commands.py                       |    6 +-
 stem/process.py                                    |    2 +-
 stem/response/__init__.py                          |    8 +-
 stem/response/events.py                            |   19 +-
 stem/util/conf.py                                  |    4 +-
 stem/util/connection.py                            |   11 +-
 stem/util/enum.py                                  |    4 +-
 stem/util/log.py                                   |    2 +-
 stem/util/str_tools.py                             |   12 +-
 stem/util/system.py                                |   16 +-
 test/integ/connection/connect.py                   |   12 +-
 test/integ/control/base_controller.py              |   36 +-
 test/integ/control/controller.py                   |    6 +-
 test/integ/descriptor/server_descriptor.py         |    8 +-
 test/integ/process.py                              |    6 +-
 test/integ/socket/control_message.py               |   42 +--
 test/integ/socket/control_socket.py                |    4 +-
 test/integ/util/conf.py                            |   20 +-
 test/integ/util/proc.py                            |    6 +-
 test/integ/util/system.py                          |   52 +--
 test/integ/version.py                              |    2 +-
 test/mocking.py                                    |    4 +-
 test/output.py                                     |    4 +-
 test/runner.py                                     |    6 +-
 test/unit/connection/connect.py                    |   17 +-
 test/unit/descriptor/export.py                     |   15 +-
 test/unit/descriptor/extrainfo_descriptor.py       |  228 ++++++------
 test/unit/descriptor/microdescriptor.py            |   75 ++--
 .../descriptor/networkstatus/bridge_document.py    |   36 +-
 .../networkstatus/directory_authority.py           |    2 +-
 test/unit/descriptor/networkstatus/document_v2.py  |  118 +++---
 test/unit/descriptor/networkstatus/document_v3.py  |  374 ++++++++++----------
 .../descriptor/networkstatus/key_certificate.py    |   12 +-
 test/unit/descriptor/reader.py                     |   63 ++--
 test/unit/descriptor/router_status_entry.py        |   30 +-
 test/unit/descriptor/server_descriptor.py          |  333 ++++++++---------
 test/unit/descriptor/tordnsel.py                   |    2 +-
 test/unit/exit_policy/policy.py                    |   34 +-
 test/unit/exit_policy/rule.py                      |   52 +--
 test/unit/response/authchallenge.py                |    2 +-
 test/unit/response/control_line.py                 |   78 ++--
 test/unit/response/control_message.py              |   52 +--
 test/unit/response/events.py                       |    2 +-
 test/unit/response/protocolinfo.py                 |   40 +--
 test/unit/tutorial.py                              |   47 +--
 test/unit/tutorial_examples.py                     |   81 +++--
 test/unit/util/conf.py                             |   60 ++--
 test/unit/util/connection.py                       |   26 +-
 test/unit/util/enum.py                             |   20 +-
 test/unit/util/proc.py                             |   31 +-
 test/unit/util/str_tools.py                        |   80 ++---
 test/unit/util/system.py                           |   96 ++---
 test/unit/version.py                               |    4 +-
 test/util.py                                       |   68 ----
 75 files changed, 1351 insertions(+), 1369 deletions(-)



More information about the tor-commits mailing list