Ticket #4542 enhancement closed fixed

Opened 3 years ago

Last modified 3 years ago

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

Reported by: jml Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation
Cc: jessica.mckellar@… Branch: branches/linereceiver-docs-4542-2
Author: exarkun Launchpad Bug:

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

1

Changed 3 years ago by exarkun

  • branch set to branches/linereceiver-docs-4542
  • branch_author set to exarkun

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

2

Changed 3 years ago by exarkun

  • owner glyph deleted
  • keywords review added

Please review

3

Changed 3 years ago by jesstess

  • owner set to jesstess

4

Changed 3 years ago by jesstess

  • owner changed from jesstess to exarkun
  • cc jessica.mckellar@… added
  • keywords review removed

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.

5

Changed 3 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'

6

Changed 3 years ago by exarkun

  • owner exarkun deleted
  • keywords review added

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!

7

Changed 3 years ago by TimAllen

  • keywords review removed
  • owner set to exarkun

Looks good to merge.

8

Changed 3 years ago by exarkun

9

Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(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.

10

Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.