[tor-bugs] #9485 [Pluggable transport]: Cleanup of pyptlib internals

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 15 13:30:02 UTC 2013


#9485: Cleanup of pyptlib internals
---------------------------------+------------------------------------------
 Reporter:  infinity0            |          Owner:  asn
     Type:  defect               |         Status:  new
 Priority:  normal               |      Milestone:     
Component:  Pluggable transport  |        Version:     
 Keywords:  pyptlib              |         Parent:     
   Points:                       |   Actualpoints:     
---------------------------------+------------------------------------------

Comment(by asn):

 Discussed this with Ximin on IRC.

 First part of review:

 * Change the `fromEnv()` business to happen in `__init__()` or in
 `init()`.
 * Update the sphinx docs with the new API.
 * Some tests for the new API. It would be awesome to have tests for
 closures like `validate_transports()` too.
 * validate_sever_bindaddr -> validate_server_bindaddr
 * `_declareSupports` expects a list according to its docstring:
 `type(transports)` should never be `str`. I like keeping the dynamic type
 madness to the minimum :)
 * You really don't want to do `self.reportMethodError(t, 'unsupported
 transport')`. We are supposed to ignore transports we don't recognize. If
 you send a single method error, the whole transport proxy will get
 destroyed by Tor.

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


More information about the tor-bugs mailing list