#1295 closed defect (duplicate)

code cleanup: stop using IFinishableConsumer in sftpd.py

Reported by: davidsarah Owned by: davidsarah
Priority: normal Milestone: 1.10.0
Component: code-frontend Version: 1.8.1
Keywords: cleanup sftp twisted Cc:
Launchpad Bug:

Description

Twisted's IFinishableConsumer interface is likely to be deprecated. OverwriteableFileConsumer in src/allmydata/frontends/sftpd.py uses it, but could probably just as well use IConsumer. I'd like to improve the test coverage of OverwriteableFileConsumer first, though.

Change History (14)

comment:1 Changed at 2011-01-07T05:02:33Z by davidsarah

  • Owner set to davidsarah
  • Status changed from new to assigned
  • Summary changed from stop using IFinishableConsumer in sftpd.py to code cleanup: stop using IFinishableConsumer in sftpd.py

comment:2 Changed at 2011-09-15T18:05:23Z by davidsarah

  • Milestone changed from undecided to soon

This will be done as part of #1525 (and I was right about it being a bad idea to use IFinishableConsumer; that was part of the reason for the issue in #1525).

Last edited at 2011-09-15T18:06:45Z by davidsarah (previous) (diff)

comment:3 Changed at 2012-03-14T23:48:39Z by david-sarah@…

In 421b8b9369cd018d:

Temporarily suppress the DeprecationWarning? about IFinishableConsumer; it's irritating, but not in a way that is likely to make me fix the underlying issue (#1525) any sooner :-). refs #1295

comment:4 Changed at 2012-03-14T23:51:11Z by david-sarah@…

In cef646c4a70537d6:

Fix a missing comma in the last patch. refs #1295

comment:5 Changed at 2012-03-15T17:21:23Z by david-sarah <david-sarah@…>

In cef646c4a70537d6:

Fix a missing comma in the last patch. refs #1295

comment:6 Changed at 2012-06-14T21:29:56Z by david-sarah@…

In 854afc095f033269:

Suppress DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer. This also unifies the handling of DeprecationWarnings? that need to be suppressed globally. refs #1295

comment:7 Changed at 2012-06-14T21:31:14Z by david-sarah@…

In 5513/1.9.2:

Suppress DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer. This also unifies the handling of DeprecationWarnings? that need to be suppressed globally. refs #1295

comment:8 Changed at 2012-06-14T21:34:04Z by david-sarah@…

In 2c4ea1df5fbf89c5:

Since DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer is suppressed globally, it doesn't need to be suppressed during import. refs #1295

comment:9 Changed at 2012-06-14T21:35:04Z by david-sarah@…

In 5515/1.9.2:

Since DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer is suppressed globally, it doesn't need to be suppressed during import. refs #1295

comment:10 Changed at 2012-06-14T21:37:41Z by davidsarah

The reason for the patches in comment:6 -- comment:9 was that sftpd.py wasn't being imported at the point where the suppression was active, so the suppression wasn't previously working.

comment:11 Changed at 2012-06-14T22:04:22Z by david-sarah <david-sarah@…>

In 2c4ea1df5fbf89c5:

Since DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer is suppressed globally, it doesn't need to be suppressed during import. refs #1295

comment:12 Changed at 2012-07-10T20:04:58Z by david-sarah@…

In 5862/cloud-backend:

Suppress DeprecationWarning? about twisted.internet.interfaces.IFinishableConsumer. This also unifies the handling of DeprecationWarnings? that need to be suppressed globally. refs #1295

comment:13 Changed at 2012-07-13T00:51:39Z by david-sarah@…

In 5865/cloud-backend:

Since DeprecationWarning about twisted.internet.interfaces.IFinishableConsumer is suppressed globally, it doesn't need to be suppressed during import. refs #1295

Last edited at 2013-02-25T18:19:37Z by zooko (previous) (diff)

comment:14 Changed at 2013-02-20T21:58:08Z by davidsarah

  • Milestone changed from soon to 1.10.0
  • Priority changed from minor to normal
  • Resolution set to duplicate
  • Status changed from assigned to closed

Twisted 12.3.0 has removed IFinishableConsumer, breaking the SFTP frontend when that version (or newer) is used. This means that just suppressing the warning is no longer sufficient, so I'm resolving this as a duplicate of #1525, which would fix the underlying problem.

Note: See TracTickets for help on using tickets.