[tor-bugs] #30946 [Circumvention/BridgeDB]: Port BridgeDB to Python 3

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 17 18:29:00 UTC 2019


#30946: Port BridgeDB to Python 3
------------------------------------+--------------------------
 Reporter:  phw                     |          Owner:  (none)
     Type:  defect                  |         Status:  assigned
 Priority:  Medium                  |      Milestone:
Component:  Circumvention/BridgeDB  |        Version:
 Severity:  Normal                  |     Resolution:
 Keywords:  python                  |  Actual Points:
Parent ID:                          |         Points:  10
 Reviewer:                          |        Sponsor:
------------------------------------+--------------------------

Comment (by phw):

 Here's a summary of what I've accomplished so far:
 * I ran the tool [https://python-future.org/futurize.html futurize] over
 BridgeDB's code, which can do simple code transformations from Python 2 to
 Python 3.
 * The switch to Python 3 resulted in several API incompatibilities in our
 dependencies. These are annoying to deal with but not a big issue.
 * The biggest issue is that strings and bytes can no longer be mixed in
 Python 3. We have hundreds of failed unit tests because of this, and
 fixing these isn't always as simple as turning a string into a bytes type.
 Sometimes, it requires thinking if a given function should return a string
 or a bytes type, and making sure that these choices are consistent
 throughout the code.

 So far, I've spent 12 hours on this ticket and haven't made much progress,
 but progress shouldn't be linear: once I've addressed issues in BridgeDB's
 "critical path", significantly more unit tests should pass. I managed to
 get the unit tests from:
 {{{
 FAILED (skips=7, failures=40, errors=344, successes=666)
 }}}
 to
 {{{
 FAILED (skips=8, failures=31, errors=278, successes=737)
 }}}

 I expect this to take several more days of work.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30946#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list