Show More
@@ -31,7 +31,13 b' from zope.interface import Interface, implements, Attribute' | |||||
31 | from twisted.internet.base import DelayedCall |
|
31 | from twisted.internet.base import DelayedCall | |
32 | DelayedCall.debug = True |
|
32 | DelayedCall.debug = True | |
33 |
|
33 | |||
34 | from foolscap import Referenceable, DeadReferenceError |
|
34 | try: | |
|
35 | # This is preferred in foolscap v > 0.4.3 | |||
|
36 | from foolscap.api import Referenceable, DeadReferenceError | |||
|
37 | except ImportError: | |||
|
38 | # Fallback for older versions | |||
|
39 | from foolscap import Referenceable, DeadReferenceError | |||
|
40 | ||||
35 | from foolscap.referenceable import RemoteReference |
|
41 | from foolscap.referenceable import RemoteReference | |
36 |
|
42 | |||
37 | from IPython.kernel.pbutil import packageFailure, unpackageFailure |
|
43 | from IPython.kernel.pbutil import packageFailure, unpackageFailure |
@@ -17,7 +17,12 b' __docformat__ = "restructuredtext en"' | |||||
17 |
|
17 | |||
18 | import os |
|
18 | import os | |
19 |
|
19 | |||
20 | from foolscap import Tub, UnauthenticatedTub |
|
20 | try: | |
|
21 | # This is preferred in foolscap v > 0.4.3 | |||
|
22 | from foolscap.api import Tub, UnauthenticatedTub | |||
|
23 | except ImportError: | |||
|
24 | # Fallback for older versions | |||
|
25 | from foolscap import Tub, UnauthenticatedTub | |||
21 |
|
26 | |||
22 | def check_furl_file_security(furl_file, secure): |
|
27 | def check_furl_file_security(furl_file, secure): | |
23 | """Remove the old furl_file if changing security modes.""" |
|
28 | """Remove the old furl_file if changing security modes.""" |
@@ -24,7 +24,12 b' from zope.interface import Interface, implements' | |||||
24 | from twisted.internet import defer |
|
24 | from twisted.internet import defer | |
25 | from twisted.python import components, failure, log |
|
25 | from twisted.python import components, failure, log | |
26 |
|
26 | |||
27 | from foolscap import Referenceable |
|
27 | try: | |
|
28 | # This is preferred in foolscap v > 0.4.3 | |||
|
29 | from foolscap.api import Referenceable | |||
|
30 | except ImportError: | |||
|
31 | # Fallback for older versions | |||
|
32 | from foolscap import Referenceable | |||
28 |
|
33 | |||
29 | from IPython.kernel import error |
|
34 | from IPython.kernel import error | |
30 | from IPython.kernel.util import printer |
|
35 | from IPython.kernel.util import printer |
@@ -25,7 +25,12 b' from zope.interface import Interface, implements' | |||||
25 | from twisted.internet import defer |
|
25 | from twisted.internet import defer | |
26 | from twisted.python import components, failure |
|
26 | from twisted.python import components, failure | |
27 |
|
27 | |||
28 | from foolscap import Referenceable |
|
28 | try: | |
|
29 | # This is preferred in foolscap v > 0.4.3 | |||
|
30 | from foolscap.api import Referenceable | |||
|
31 | except ImportError: | |||
|
32 | # Fallback for older versions | |||
|
33 | from foolscap import Referenceable | |||
29 |
|
34 | |||
30 | from IPython.kernel.twistedutil import blockingCallFromThread |
|
35 | from IPython.kernel.twistedutil import blockingCallFromThread | |
31 | from IPython.kernel import error, task as taskmodule, taskclient |
|
36 | from IPython.kernel import error, task as taskmodule, taskclient |
General Comments 0
You need to be logged in to leave comments.
Login now