Show More
@@ -40,7 +40,7 b' from pprint import saferepr' | |||
|
40 | 40 | |
|
41 | 41 | import IPython |
|
42 | 42 | from IPython.kernel.engineservice import ThreadedEngineService |
|
43 |
from IPython.frontend.frontendbase import Async |
|
|
43 | from IPython.frontend.frontendbase import AsyncFrontEndBase | |
|
44 | 44 | |
|
45 | 45 | from twisted.internet.threads import blockingCallFromThread |
|
46 | 46 | from twisted.python.failure import Failure |
@@ -96,14 +96,14 b' class AutoreleasePoolWrappedThreadedEngineService(ThreadedEngineService):' | |||
|
96 | 96 | return d |
|
97 | 97 | |
|
98 | 98 | |
|
99 |
class IPythonCocoaController(NSObject, Async |
|
|
99 | class IPythonCocoaController(NSObject, AsyncFrontEndBase): | |
|
100 | 100 | userNS = objc.ivar() #mirror of engine.user_ns (key=>str(value)) |
|
101 | 101 | waitingForEngine = objc.ivar().bool() |
|
102 | 102 | textView = objc.IBOutlet() |
|
103 | 103 | |
|
104 | 104 | def init(self): |
|
105 | 105 | self = super(IPythonCocoaController, self).init() |
|
106 |
Async |
|
|
106 | AsyncFrontEndBase.__init__(self, | |
|
107 | 107 | engine=AutoreleasePoolWrappedThreadedEngineService()) |
|
108 | 108 | if(self != None): |
|
109 | 109 | self._common_init() |
@@ -11,7 +11,7 b'' | |||
|
11 | 11 | isa = PBXContainerItemProxy; |
|
12 | 12 | containerPortal = 4C96F4FE0E199AB500B03430 /* Project object */; |
|
13 | 13 | proxyType = 1; |
|
14 |
remoteGlobalIDString = 4C96F50C0E199AF100B03430 |
|
|
14 | remoteGlobalIDString = 4C96F50C0E199AF100B03430; | |
|
15 | 15 | remoteInfo = "Cocoa Frontend Plugin"; |
|
16 | 16 | }; |
|
17 | 17 | /* End PBXContainerItemProxy section */ |
@@ -355,7 +355,7 b' class FrontEndBase(object):' | |||
|
355 | 355 | |
|
356 | 356 | |
|
357 | 357 | |
|
358 |
class Async |
|
|
358 | class AsyncFrontEndBase(FrontEndBase): | |
|
359 | 359 | """ |
|
360 | 360 | Overrides FrontEndBase to wrap execute in a deferred result. |
|
361 | 361 | All callbacks are made as callbacks on the deferred result. |
@@ -19,7 +19,7 b' import unittest' | |||
|
19 | 19 | from IPython.frontend import frontendbase |
|
20 | 20 | from IPython.kernel.engineservice import EngineService |
|
21 | 21 | |
|
22 |
class FrontEndCallbackChecker(frontendbase.Async |
|
|
22 | class FrontEndCallbackChecker(frontendbase.AsyncFrontEndBase): | |
|
23 | 23 | """FrontEndBase subclass for checking callbacks""" |
|
24 | 24 | def __init__(self, engine=None, history=None): |
|
25 | 25 | super(FrontEndCallbackChecker, self).__init__(engine=engine, |
@@ -44,7 +44,7 b' class FrontEndCallbackChecker(frontendbase.AsynchronousFrontEndBase):' | |||
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | |
|
47 |
class TestAsync |
|
|
47 | class TestAsyncFrontendBase(unittest.TestCase): | |
|
48 | 48 | def setUp(self): |
|
49 | 49 | """Setup the EngineService and FrontEndBase""" |
|
50 | 50 | |
@@ -53,7 +53,7 b' class TestAsynchronousFrontendBase(unittest.TestCase):' | |||
|
53 | 53 | |
|
54 | 54 | def test_implements_IFrontEnd(self): |
|
55 | 55 | assert(frontendbase.IFrontEnd.implementedBy( |
|
56 |
frontendbase.Async |
|
|
56 | frontendbase.AsyncFrontEndBase)) | |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | def test_is_complete_returns_False_for_incomplete_block(self): |
General Comments 0
You need to be logged in to leave comments.
Login now