[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #9380 [BridgeDB]: BridgeDB should use stem for parsing descriptors according to torspec



#9380: BridgeDB should use stem for parsing descriptors according to torspec
-------------------------+-------------------------------------------------
     Reporter:  sysrqb   |      Owner:  isis
         Type:           |     Status:  needs_review
  enhancement            |  Milestone:
     Priority:  normal   |    Version:
    Component:           |   Keywords:  stem,bridgedb-0.2.x,bridgedb-
  BridgeDB               |  parsers
   Resolution:           |  Parent ID:
Actual Points:           |
       Points:           |
-------------------------+-------------------------------------------------

Comment (by isis):

 General review, not specifically on any commits:

  1. We don't normally throw out code or unittests, we throw old code into
 `lib/bridgedb/test/deprecated.py`, and then use a `monkey.MonkeyPatcher`
 in `lib/bridgedb/test/test_Tests.py` to run unitests with the old code and
 the new code to ensure compatibility (except in the cases where we want to
 change behaviours).

  2. In this case, apart from fixing the duplicated transports issue
 (#11216), I would actually prefer that the parsers behave the same.

   Case in point: while it ''was'' in the tor-spec.txt (until a few months
 ago) that the `"a"` line in a `networkstatus-bridges` file could be an
 IPv4 ''or'' IPv6 address, in reality, in implementation, this was never
 true. They ''only'' contain IPv6 addresses.

   I guess what I mean to say is "just because the spec says something,
 doesn't at all mean that it's true, because nobody ever sees these
 descriptors in their unsanitised form (esp. the extrainfo ones) and
 therefore these things rarely get checked. We need to be certain that
 BridgeDB will still behave the same way after switching to Stem's parsers,
 otherwise things might get ugly.

  3. Everything in BridgeDB whose filename starts with a capital letter is
 slated to be killed with fire. Try not to add new code to those files.
 Make new lowercased modules wherever you think they should live.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9380#comment:22>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs