Opened 6 years ago

Closed 6 years ago

#4542 enhancement closed fixed (fixed)

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

Reported by: jml 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


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 6 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/linereceiver-docs-4542

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

comment:2 Changed 6 years ago by exarkun

  • Keywords review added
  • Owner glyph deleted

Please review

comment:3 Changed 6 years ago by jesstess

  • Owner set to jesstess

comment:4 Changed 6 years ago by jesstess

  • Cc jesstess added
  • Keywords review removed
  • Owner changed from jesstess to exarkun

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 6 years ago by exarkun

  • Branch changed from branches/linereceiver-docs-4542 to branches/linereceiver-docs-4542-2

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

comment:6 Changed 6 years ago by exarkun

  • Keywords review added
  • Owner exarkun 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 6 years ago by TimAllen

  • Keywords review removed
  • Owner set to exarkun

Looks good to merge.

comment:9 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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 exarkun deleted
Note: See TracTickets for help on using tickets.