[tor-commits] [stem/master] Improve string and integer normalization

atagar at torproject.org atagar at torproject.org
Mon May 14 00:44:57 UTC 2018


commit fb019cc06c5c7c2ae18d1c5b4d7c03bef69b88b8
Merge: 8a065f42 ec796c73
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun May 13 17:37:55 2018 -0700

    Improve string and integer normalization
    
    Like any library with python 2.x and 3.x compatibility we normalize strings
    (bytes/unicode) and integers (int/long). While fixing a normalization bug in
    stem.client I decided to revisit our str/int_type constants. Throughout most of
    our tests their usage was irrelevant, and in our library there were better
    options.

 stem/client/cell.py                               |  8 +++--
 stem/client/datatype.py                           |  5 +--
 stem/control.py                                   | 13 +++----
 stem/descriptor/__init__.py                       |  7 ++--
 stem/descriptor/certificate.py                    |  5 ++-
 stem/descriptor/reader.py                         | 13 +++----
 stem/descriptor/server_descriptor.py              |  3 +-
 stem/exit_policy.py                               | 15 ++++----
 stem/response/events.py                           | 42 +++++++++++++----------
 stem/util/__init__.py                             | 41 ++++++++++++++++++----
 stem/util/connection.py                           |  7 ++--
 stem/util/enum.py                                 |  4 +--
 stem/util/str_tools.py                            | 11 +++---
 stem/util/system.py                               |  5 +--
 test/settings.cfg                                 |  8 +++--
 test/unit/client/__init__.py                      |  4 +--
 test/unit/client/cell.py                          |  6 ++--
 test/unit/descriptor/microdescriptor.py           |  5 ++-
 test/unit/descriptor/networkstatus/document_v3.py | 41 +++++++++++-----------
 test/unit/descriptor/reader.py                    | 37 ++++++++++----------
 test/unit/descriptor/server_descriptor.py         |  7 ++--
 test/unit/tutorial_examples.py                    | 13 ++++---
 test/unit/util/system.py                          |  5 ++-
 23 files changed, 169 insertions(+), 136 deletions(-)



More information about the tor-commits mailing list