Opened 2 years ago

Closed 2 years ago

#5765 task closed fixed (fixed)

Remove deprecated code in twisted.python.log

Reported by: thijs Owned by: spiv
Priority: low Milestone:
Component: core Keywords:
Cc: thijs Branch: branches/remove-deprecated-log-functions-5765
(diff, github, buildbot, log)
Author: Launchpad Bug:

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 2 years ago.

Download all attachments as: .zip

Change History (11)

Changed 2 years ago by thijs

comment:1 Changed 2 years ago by thijs

  • Keywords review added

comment:2 Changed 2 years ago by spiv

  • Owner set to spiv
  • Status changed from new to assigned

comment:3 Changed 2 years ago by spiv

  • Keywords review removed
  • Owner changed from spiv to thijs
  • Status changed from assigned to new

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 2 years ago by spiv

  • Owner changed from thijs to spiv
  • Status changed from new to assigned

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

comment:5 Changed 2 years ago by spiv

  • Branch set to branches/remove-deprecated-log-functions5765
  • Keywords review added

comment:6 Changed 2 years ago by spiv

  • Branch changed from branches/remove-deprecated-log-functions5765 to branches/remove-deprecated-log-functions-5765

comment:7 Changed 2 years ago by spiv

  • Owner spiv deleted
  • Status changed from assigned to new

comment:8 Changed 2 years ago by cyli

  • 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 2 years ago by cyli

comment:10 Changed 2 years ago by spiv

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

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