mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Deprecate Twisted.
This commit is contained in:
parent
83a91b8453
commit
ecdd16c004
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user