def test_deprecated(self): """ L{client.ThreadedResolver} is deprecated. Instantiating it emits a deprecation warning pointing at the code that does the instantiation. """ client.ThreadedResolver() warnings = self.flushWarnings(offendingFunctions=[self.test_deprecated]) self.assertEqual( warnings[0]['message'], "twisted.names.client.ThreadedResolver is deprecated since " "Twisted 9.0, use twisted.internet.base.ThreadedResolver " "instead.") self.assertEqual(warnings[0]['category'], DeprecationWarning) self.assertEqual(len(warnings), 1)
############################# threadable.init() if aztk_config.setup.get("site", "environment") == "sandbox": reactor.suggestThreadPoolSize(3) else: try: reactor.suggestThreadPoolSize(25) except Exception, ex: print Exception print ex sys.exit(1) ################################## ## Setup Threaded Name Resolver ## ################################## reactor.installResolver(client.ThreadedResolver(reactor)) __version__ = "$Revision: 1.18 $" class Application(object): """ This is the main application definition. All instances of an AZKT server will be started with this class. """ def __init__(self, profile): """ @param profile: Server profile as mentioned in install.cfg """ self.profile = profile