Opened 11 months ago

Closed 9 months ago

#10251 defect closed fixed (fixed)

IReactorTCP.connectTCP incorrectly documents its 'host' parameter's type

Reported by: Richard van der Hoff Owned by: Tom Most <twm@…>
Priority: normal Milestone:
Component: core Keywords: review
Cc: Branch: 10251-connecttcp-host-type
branch-diff, diff-cov, branch-cov, buildbot


IReactorTCP.connectTCP claims that its host parameter should be a bytes.

However, this is inconsistent with usage elsewhere in Twisted, and furthermore the implementation in PosixReactorBase assumes otherwise. (It will *work* with bytes, but other documentation suggests it expects a str.)

Change History (4)

comment:1 Changed 11 months ago by Richard van der Hoff

Verdict from the mailing list: this should be treated as a simple bug in the interface definition, and fixed.

Any IReactorTCP implementation that strictly implemented the interface-as-written by _only_ accepting bytes wouldn't work, so there isn't any compatibility hazard.

comment:2 Changed 9 months ago by Tom Most

Branch: 10251-connecttcp-host-type
Owner: set to Tom Most
Status: newassigned

comment:3 Changed 9 months ago by Tom Most

Keywords: review added
Owner: Tom Most deleted
Status: assignednew

comment:4 Changed 9 months ago by Tom Most <twm@…>

Owner: set to Tom Most <twm@…>
Resolution: fixed
Status: newclosed

In ec7445d6:

Error: Processor CommitTicketReference failed
 does not appear to be a Git repository. See the log for more information.
Note: See TracTickets for help on using tickets.