← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:py3-no-class-advice into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:py3-no-class-advice into launchpad-buildd:master.

Commit message:
Switch RotatableFileLogObserver from class advice to a class decorator

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383184
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:py3-no-class-advice into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index e549316..1dbadf3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 launchpad-buildd (190) UNRELEASED; urgency=medium
 
   * Switch to git; add Vcs-* fields.
+  * Switch RotatableFileLogObserver from class advice to a class decorator.
 
  -- Colin Watson <cjwatson@xxxxxxxxxx>  Tue, 28 Apr 2020 10:19:27 +0100
 
diff --git a/lpbuildd/log.py b/lpbuildd/log.py
index 1b402cd..c0197fc 100644
--- a/lpbuildd/log.py
+++ b/lpbuildd/log.py
@@ -15,14 +15,13 @@ from twisted.python import (
     log,
     logfile,
     )
-from zope.interface import implements
+from zope.interface import implementer
 
 
+@implementer(log.ILogObserver)
 class RotatableFileLogObserver:
     """A log observer that uses a log file and reopens it on SIGHUP."""
 
-    implements(log.ILogObserver)
-
     def __init__(self, logfilepath):
         """Set up the logfile and possible signal handler.