Ticket #4065: callable-in-twisted-compat.diff

File callable-in-twisted-compat.diff, 7.3 KB (added by Carlos Valiente, 9 years ago)
  • twisted/internet/base.py

    === modified file 'twisted/internet/base.py'
    1717import traceback
    19 from twisted.python.compat import set
     19from twisted.python.compat import callable, set
    2020from twisted.python.util import unsignedID
    2121from twisted.internet.interfaces import IReactorCore, IReactorTime, IReactorThreads
    2222from twisted.internet.interfaces import IResolverSimple, IReactorPluggableResolver
  • twisted/internet/defer.py

    === modified file 'twisted/internet/defer.py'
    1414# Twisted imports
    1515from twisted.python import log, failure, lockfile
     16from twisted.python.compat import callable
    1617from twisted.python.util import unsignedID, mergeFunctionMetadata
    1819class AlreadyCalledError(Exception):
  • twisted/internet/task.py

    === modified file 'twisted/internet/task.py'
    1515from zope.interface import implements
    1717from twisted.python import reflect
     18from twisted.python.compat import callable
    1819from twisted.python.failure import Failure
    2021from twisted.internet import base, defer
  • twisted/mail/imap4.py

    === modified file 'twisted/mail/imap4.py'
    4343from twisted.internet import error
    4444from twisted.internet.defer import maybeDeferred
    4545from twisted.python import log, text
     46from twisted.python.compat import callable
    4647from twisted.internet import interfaces
    4849from twisted import cred
  • twisted/mail/test/test_mail.py

    === modified file 'twisted/mail/test/test_mail.py'
    3030from twisted.internet.error import ProcessDone, ProcessTerminated
    3131from twisted.internet import address
    3232from twisted.python import failure
     33from twisted.python.compat import callable
    3334from twisted.python.filepath import FilePath
    3435from twisted.python.hashlib import md5
  • twisted/manhole/service.py

    === modified file 'twisted/manhole/service.py'
    1010from twisted import copyright
    1111from twisted.spread import pb
    1212from twisted.python import log, failure
     13from twisted.python.compat import callable
    1314from twisted.cred import portal
    1415from twisted.application import service
    1516from zope.interface import implements, Interface
  • twisted/python/compat.py

    === modified file 'twisted/python/compat.py'
    166166except NameError:
    167167    from sets import ImmutableSet as frozenset
     171    callable = callable
     172except NameError:
     173    import collections
     174    def callable(obj):
     175        return isinstance(obj, collections.Callable)
  • twisted/python/log.py

    === modified file 'twisted/python/log.py'
    1717from zope.interface import Interface
    1919from twisted.python import util, context, reflect
     20from twisted.python.compat import callable
  • twisted/python/zshcomp.py

    === modified file 'twisted/python/zshcomp.py'
    137137import itertools, sys, commands, os.path
    139139from twisted.python import reflect, util, usage
     140from twisted.python.compat import callable
    140141from twisted.scripts.mktap import IServiceMaker
    142143class MyOptions(usage.Options):
  • twisted/spread/pb.py

    === modified file 'twisted/spread/pb.py'
    3636# Twisted Imports
    3737from twisted.python import log, failure, reflect
    3838from twisted.python.versions import Version
     39from twisted.python.compat import callable
    3940from twisted.python.deprecate import deprecated
    4041from twisted.python.hashlib import md5
    4142from twisted.internet import defer, protocol
  • twisted/spread/util.py

    === modified file 'twisted/spread/util.py'
    1111from twisted.internet import defer
    1212from twisted.python.failure import Failure
     13from twisted.python.compat import callable
    1314from twisted.spread import pb
    1415from twisted.protocols import basic
    1516from twisted.internet import interfaces
  • twisted/trial/test/test_assertions.py

    === modified file 'twisted/trial/test/test_assertions.py'
    99from pprint import pformat
    1111from twisted.python import reflect, failure
     12from twisted.python.compat import callable
    1213from twisted.python.deprecate import deprecated, getVersionString
    1314from twisted.python.versions import Version
    1415from twisted.python.util import dsu
  • twisted/trial/test/test_pyunitcompat.py

    === modified file 'twisted/trial/test/test_pyunitcompat.py'
    1010from zope.interface import implements
    1212from twisted.python import reflect
     13from twisted.python.compat import callable
    1314from twisted.python.failure import Failure
    1415from twisted.trial import util
    1516from twisted.trial.unittest import TestCase, PyUnitResultAdapter
  • twisted/vfs/backends/osfs.py

    === modified file 'twisted/vfs/backends/osfs.py'
    77import os.path
    88import errno
     10from twisted.python.compat import callable
    1011from twisted.vfs import ivfs
    1213from zope.interface import implements
  • twisted/web/soap.py

    === modified file 'twisted/web/soap.py'
    1919import SOAPpy
    2121# twisted imports
     22from twisted.python.compat import callable
    2223from twisted.web import server, resource, client
    2324from twisted.internet import defer
  • twisted/web/xmlrpc.py

    === modified file 'twisted/web/xmlrpc.py'
    1515from twisted.web import resource, server, http
    1616from twisted.internet import defer, protocol, reactor
    1717from twisted.python import log, reflect, failure
     18from twisted.python.compat import callable
    1920# These are deprecated, use the class level definitions
    2021NOT_FOUND = 8001
  • twisted/web2/xmlrpc.py

    === modified file 'twisted/web2/xmlrpc.py'
    1818from twisted.web2 import responsecode, http, http_headers
    1919from twisted.internet import defer
    2020from twisted.python import log, reflect
     21from twisted.python.compat import callable
    2223# Useful so people don't need to import xmlrpclib directly
    2324Fault = xmlrpclib.Fault
  • twisted/words/protocols/irc.py

    === modified file 'twisted/words/protocols/irc.py'
    3737from twisted.persisted import styles
    3838from twisted.protocols import basic
    3939from twisted.python import log, reflect, text
     40from twisted.python.compat import callable
    4142NUL = chr(0)
    4243CR = chr(015)