Opened 5 years ago

Closed 5 years ago

#5765 task closed fixed (fixed)

Remove deprecated code in twisted.python.log

Reported by: Thijs Triemstra Owned by: spiv
Priority: low Milestone:
Component: core Keywords:
Cc: Thijs Triemstra Branch: branches/remove-deprecated-log-functions-5765
branch-diff, diff-cov, branch-cov, buildbot
Author:

Description

The following methods in twisted.python.log are deprecated since Twisted 2.5 and can be removed:

  • startKeepingErrors
  • flushErrors and _flushErrors
  • ignoreErrors and _ignore
  • clearIgnores and _clearIgnores

Attachments (1)

log-5765.patch (4.2 KB) - added by Thijs Triemstra 5 years ago.

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by Thijs Triemstra

Attachment: log-5765.patch added

comment:1 Changed 5 years ago by Thijs Triemstra

Keywords: review added

comment:2 Changed 5 years ago by spiv

Owner: set to spiv
Status: newassigned

comment:3 Changed 5 years ago by spiv

Keywords: review removed
Owner: changed from spiv to Thijs Triemstra
Status: assignednew

I don't understand why twisted.trial.unittest._LogObserver._add still assigns to log._flushErrors etc. Isn't the point of this patch that log._flushErrors and friends don't exist anymore?

If those lines were deleted, this patch looks fine to me.

comment:4 Changed 5 years ago by spiv

Owner: changed from Thijs Triemstra to spiv
Status: newassigned

As I expected, tests still pass without those lines. I'll make that change and put it up for review.

comment:5 Changed 5 years ago by spiv

Branch: branches/remove-deprecated-log-functions5765
Keywords: review added

comment:6 Changed 5 years ago by spiv

Branch: branches/remove-deprecated-log-functions5765branches/remove-deprecated-log-functions-5765

comment:7 Changed 5 years ago by spiv

Owner: spiv deleted
Status: assignednew

comment:8 Changed 5 years ago by Ying Li

Keywords: review removed
Owner: set to spiv

Thanks for reviewing and fixing this spiv! I was wondering about those too - this looks good to me. Please merge.

comment:9 Changed 5 years ago by Ying Li

comment:10 Changed 5 years ago by spiv

Resolution: fixed
Status: newclosed

(In [34813]) Merge remove-deprecated-log-functions-5765: Removes deprecated functions from twisted.python.log.

Authors: thijs, spiv Reviewers: spiv, cyli Fixes: #5765

Removes startKeepingErrors, flushErrors, _flushErrors, ignoreErrors, _ignore, clearIgnores and _clearIgnores from twisted.python.log. They've been deprecated since Twisted 2.5.

Note: See TracTickets for help on using tickets.