Deprecate Twisted.

This commit is contained in:
Valentin Lorentz 2015-05-20 22:57:24 +02:00
parent 83a91b8453
commit ecdd16c004
2 changed files with 3 additions and 15 deletions

View File

@ -112,6 +112,9 @@ class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
maxDelay = property(lambda self: conf.supybot.drivers.maxReconnectWait())
protocol = SupyIrcProtocol
def __init__(self, irc):
drivers.log.warning('Twisted driver is deprecated. You should '
'consider switching to Socket (set '
'supybot.drivers.module to Socket).')
self.irc = irc
drivers.ServersMixin.__init__(self, irc)
(server, port) = self._getNextServer()

View File

@ -182,21 +182,6 @@ def newDriver(irc, moduleName=None):
if moduleName is None:
moduleName = conf.supybot.drivers.module()
if moduleName == 'default':
# XXX Twisted has been causing problems lately, so we're going to use
# the Socket driver by default, now. Leaving behind the code for using
# Twisted by default in case someone steps up and fixes the Twisted
# driver.
'''
try:
import supybot.drivers.Twisted
moduleName = 'supybot.drivers.Twisted'
except ImportError:
# We formerly used 'del' here, but 2.4 fixes the bug that we added
# the 'del' for, so we need to make sure we don't complain if the
# module is cleaned up already.
sys.modules.pop('supybot.drivers.Twisted', None)
moduleName = 'supybot.drivers.Socket'
'''
moduleName = 'supybot.drivers.Socket'
elif not moduleName.startswith('supybot.drivers.'):
moduleName = 'supybot.drivers.' + moduleName