r47071 - Update deprecation helpers.

adiroiban-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Thu, 24 Mar 2016 18:20:08 -0600 (MDT)
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: adiroiban
Date: Thu Mar 24 18:20:00 2016
New Revision: 47071

Modified:
   branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdconf.py
   branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdtap.py

Log:
Update deprecation helpers.

Modified: branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdconf.py
==============================================================================
--- branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdconf.py	(original)
+++ branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdconf.py	Thu Mar 24 18:20:00 2016
@@ -6,7 +6,7 @@
 Parser for inetd.conf files
 """
 
-from twisted.python.deprecate import deprecated
+from twisted.python.deprecate import deprecatedModuleAttribute
 from twisted.python.versions import Version
 
 
@@ -28,10 +28,10 @@
     """
     DEPRECATED. Invalid rpc services file
     """
-
-    @deprecated(Version("Twisted", 16, 0, 0))
-    def __init__(self, *args, **kwargs):
-        InvalidConfError(self, *args, **kwargs)
+    deprecatedModuleAttribute(
+        Version("Twisted", 16, 1, 0),
+        "The RPC service configuration is no longer maintained.",
+        __name__, "InvalidRPCServicesConfError")
 
 
 
@@ -185,11 +185,13 @@
 
     @ivar self.services: dict mapping rpc service names to rpc ports.
     """
+    deprecatedModuleAttribute(
+        Version("Twisted", 16, 1, 0),
+        "The RPC service configuration is no longer maintained.",
+        __name__, "RPCServicesConf")
 
     defaultFilename = '/etc/rpc'
 
-
-    @deprecated(Version("Twisted", 16, 0, 0))
     def __init__(self):
         self.services = {}
 

Modified: branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdtap.py
==============================================================================
--- branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdtap.py	(original)
+++ branches/runner-rpcserver-deprecation-8123-2/twisted/runner/inetdtap.py	Thu Mar 24 18:20:00 2016
@@ -14,7 +14,7 @@
 
 from twisted.runner import inetd, inetdconf
 from twisted.python import log, usage
-from twisted.python.deprecate import deprecated
+from twisted.python.deprecate import deprecatedModuleAttribute
 from twisted.python.versions import Version
 from twisted.internet.protocol import ServerFactory
 from twisted.application import internet, service as appservice
@@ -52,10 +52,10 @@
     """
     DEPRECATED.
     """
-
-    @deprecated(Version("Twisted", 16, 0, 0))
-    def __init__(self, rpcVersions, rpcConf, proto, service):
-        pass
+    deprecatedModuleAttribute(
+        Version("Twisted", 16, 1, 0),
+        "The RPC server is no longer maintained.",
+        __name__, "RPCServer")