Opened 7 years ago

Closed 6 years ago

#4542 enhancement closed fixed (fixed)

`LineReceiver` API documentation should indicate when delimiter is stripped etc

Reported by: Jonathan Lange Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation
Cc: jesstess Branch: branches/linereceiver-docs-4542-2
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

LineReceiver.lineReceived is called with a line sans delimiter. LineReceiver.sendLine will add the delimiter to whatever is passed to it. These facts should be included in the API documentation for LineReceiver.

Change History (10)

comment:1 Changed 7 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/linereceiver-docs-4542

(In [29607]) Branching to 'linereceiver-docs-4542'

comment:2 Changed 7 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Glyph deleted

Please review

comment:3 Changed 7 years ago by jesstess

Owner: set to jesstess

comment:4 Changed 7 years ago by jesstess

Cc: jesstess added
Keywords: review removed
Owner: changed from jesstess to Jean-Paul Calderone

Thanks for working on this, exarkun. Some review feedback:

  • copyright bump
  • the two sendLines need @type markup for the 'line' parameter.
  • "return self.transport.writeSequence((line,self.delimiter))" ===> "return self.transport.writeSequence((line, self.delimiter))"
  • IntNStringReceiver.stringReceived has the 'msg' parameter but adds epytext markup for 'string' (the rest of the stringReceived methods in the file pass 'string'). [ this doesn't cause a pydoctor error :-( ]

side note:

  • SafeNetstringReceiver is deprecated in the docstring but not with any code support

Other than that, this looks good to merge.

comment:5 Changed 7 years ago by Jean-Paul Calderone

Branch: branches/linereceiver-docs-4542branches/linereceiver-docs-4542-2

(In [29783]) Branching to 'linereceiver-docs-4542-2'

comment:6 Changed 7 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone deleted

Some wicked conflicts with the netstring branch that just landed. I merged forward and resolved them, ended up changing a few more things than were mentioned in the review, so another check would be nice.

Everything mentioned should be fixed now. There's #4546 for SafeNetstringReceiver.

Thanks for the review!

comment:7 Changed 7 years ago by TimAllen

Keywords: review removed
Owner: set to Jean-Paul Calderone

Looks good to merge.

comment:8 Changed 6 years ago by Jean-Paul Calderone

comment:9 Changed 6 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [29883]) Merge linereceiver-docs-4542-2

Author: exarkun Reviewer: jesstess, screwtape Fixes: #4542

Make the single parameter to the sendString methods of classes in twisted.protocols.basic consistently named and document it. Do the same for the parameter to the stringReceived and lineReceived methods as well.

comment:10 Changed 6 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.