Opened 7 years ago

Closed 6 years ago

#4580 task closed fixed (fixed)

Turn `twisted.protocols.ftp.SenderProtocol` into a regular `IConsumer`

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: easy
Cc: Thijs Triemstra Branch: branches/convert-SenderProtocol-4580-2
branch-diff, diff-cov, branch-cov, buildbot
Author: cyli, exarkun

Description

SenderProtocol implements IFinishableConsumer which is going to be deprecated (#2661). We should change this to be a plain IConsumer.

Change History (16)

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

It seems there are several possible approaches here:

  1. Move IFinishableConsumer into ftp.py and just treat it as an ftp-specific interface. Let SenderProtocol continue to implement it.
  2. Delete the declaration in SenderProtocol that the class implements IFinishableConsumer. Change any documentation which talks about an object that provides IFinishableConsumer to instead talk about an object that provides IFinishableConsumer and also has a finish method.
  3. Delete the declaration in SenderProtocol that the class implements IFinishableConsumer. Where an IFinishableConsumer was being returned (typically as part of a tuple), return an extra finish callable as a separate object.
  4. Invert the interfaces to accept a producer instead of returning a consumer. Define some interface to hook arbitrary producers up to consumers.

comment:2 Changed 6 years ago by Ying Li

Author: cyli
Branch: branches/convert-SenderProtocol-4580

(In [30433]) Branching to 'convert-SenderProtocol-4580'

comment:3 Changed 6 years ago by Ying Li

(In [30434]) Changed SenderProtocol to not implement interfaces.IFinishableConsumer

refs #4580

comment:4 Changed 6 years ago by Ying Li

Keywords: easy review added
Owner: Glyph deleted

comment:5 Changed 6 years ago by Thijs Triemstra

Cc: Thijs Triemstra added
Keywords: review removed
Owner: set to Ying Li

IFinishableConsumer needs an @since marker.

comment:6 Changed 6 years ago by Ying Li

(In [30455]) Added @since marker to IFinishableConsumer

refs #4580

comment:7 Changed 6 years ago by Ying Li

Keywords: review added
Owner: Ying Li deleted

comment:8 in reply to:  6 Changed 6 years ago by Thijs Triemstra

Replying to cyli:

(In [30455]) Added @since marker to IFinishableConsumer

refs #4580

Sorry to be anal about this but I think the syntax is @since: 11.0 :)

comment:9 Changed 6 years ago by Ying Li

(In [30459]) Changed the @since marker text

refs #4580

comment:10 Changed 6 years ago by therve

Keywords: review removed
Owner: set to Ying Li

Almost there: '@since: 11.0', not '@since 11.0'

Please merge once fixed.

comment:11 Changed 6 years ago by <automation>

Owner: Ying Li deleted

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

Author: cylicyli, exarkun
Branch: branches/convert-SenderProtocol-4580branches/convert-SenderProtocol-4580-2

(In [30984]) Branching to 'convert-SenderProtocol-4580-2'

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

(In [30986]) Fix epytext markup

refs #4580

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

Resolution: fixed
Status: newclosed

(In [30987]) Merge convert-SenderProtocol-4580-2

Author: cyli Reviewer: therve Fixes: #4580

Add IFinishableConsumer to the ftp module, the only user of it, so that it can be removed from the more general twisted.internet.interfaces module.

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

Resolution: fixed
Status: closedreopened

(In [30991]) Revert r30987 - api doc regression caused by mis-merge

Reopens #4580

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

Resolution: fixed
Status: reopenedclosed

(In [30992]) Merge convert-SenderProtocol-4580-2

Author: cyli Reviewer: therve Fixes: #4580

Add IFinishableConsumer to the ftp module, the only user of it, so that it can be removed from the more general twisted.internet.interfaces module.

This commit should actually properly merge the branch, instead of a random older revision of it.

Note: See TracTickets for help on using tickets.