Show More
@@ -14,10 +14,11 b' try:' | |||
|
14 | 14 | except ImportError: |
|
15 | 15 | import pickle |
|
16 | 16 | |
|
17 | from IPython.utils import py3compat | |
|
18 | from IPython.utils.importstring import import_item | |
|
19 | from IPython.utils.py3compat import string_types, iteritems, buffer_to_bytes_py2 | |
|
20 | ||
|
17 | 21 | from . import codeutil # This registers a hook when it's imported |
|
18 | from . import py3compat | |
|
19 | from .importstring import import_item | |
|
20 | from .py3compat import string_types, iteritems, buffer_to_bytes_py2 | |
|
21 | 22 | |
|
22 | 23 | from IPython.config import Application |
|
23 | 24 | from IPython.utils.log import get_logger |
@@ -13,7 +13,7 b' except:' | |||
|
13 | 13 | # IPython imports |
|
14 | 14 | from IPython.utils.py3compat import PY3, buffer_to_bytes_py2 |
|
15 | 15 | from IPython.utils.data import flatten |
|
16 |
from |
|
|
16 | from ipython_kernel.pickleutil import ( | |
|
17 | 17 | can, uncan, can_sequence, uncan_sequence, CannedObject, |
|
18 | 18 | istype, sequence_types, PICKLE_PROTOCOL, |
|
19 | 19 | ) |
@@ -2,8 +2,8 b'' | |||
|
2 | 2 | import pickle |
|
3 | 3 | |
|
4 | 4 | import nose.tools as nt |
|
5 |
from |
|
|
6 |
from |
|
|
5 | from ipython_kernel import codeutil | |
|
6 | from ipython_kernel.pickleutil import can, uncan | |
|
7 | 7 | |
|
8 | 8 | def interactive(f): |
|
9 | 9 | f.__module__ = '__main__' |
@@ -11,7 +11,7 b' import nose.tools as nt' | |||
|
11 | 11 | # from unittest import TestCaes |
|
12 | 12 | from ipython_kernel.serialize import serialize_object, deserialize_object |
|
13 | 13 | from IPython.testing import decorators as dec |
|
14 |
from |
|
|
14 | from ipython_kernel.pickleutil import CannedArray, CannedClass | |
|
15 | 15 | from IPython.utils.py3compat import iteritems |
|
16 | 16 | from IPython.parallel import interactive |
|
17 | 17 |
@@ -27,7 +27,7 b" min_pyzmq = '2.1.11'" | |||
|
27 | 27 | |
|
28 | 28 | check_for_zmq(min_pyzmq, 'ipython_parallel') |
|
29 | 29 | |
|
30 |
from |
|
|
30 | from ipython_kernel.pickleutil import Reference | |
|
31 | 31 | |
|
32 | 32 | from .client.asyncresult import * |
|
33 | 33 | from .client.client import Client |
@@ -503,7 +503,7 b' class DirectView(View):' | |||
|
503 | 503 | |
|
504 | 504 | adds support for closures, etc. |
|
505 | 505 | |
|
506 |
This calls |
|
|
506 | This calls ipython_kernel.pickleutil.use_dill() here and on each engine. | |
|
507 | 507 | """ |
|
508 | 508 | pickleutil.use_dill() |
|
509 | 509 | return self.apply(pickleutil.use_dill) |
@@ -18,7 +18,7 b' from ipython_parallel.error import UnmetDependency' | |||
|
18 | 18 | from ipython_parallel.util import interactive |
|
19 | 19 | from IPython.utils import py3compat |
|
20 | 20 | from IPython.utils.py3compat import string_types |
|
21 |
from |
|
|
21 | from ipython_kernel.pickleutil import can, uncan | |
|
22 | 22 | |
|
23 | 23 | class depend(object): |
|
24 | 24 | """Dependency decorator, for use with tasks. |
@@ -81,7 +81,7 b' class dependent(object):' | |||
|
81 | 81 | def _require(*modules, **mapping): |
|
82 | 82 | """Helper for @require decorator.""" |
|
83 | 83 | from ipython_parallel.error import UnmetDependency |
|
84 |
from |
|
|
84 | from ipython_kernel.pickleutil import uncan | |
|
85 | 85 | user_ns = globals() |
|
86 | 86 | for name in modules: |
|
87 | 87 | try: |
@@ -21,7 +21,7 b' __docformat__ = "restructuredtext en"' | |||
|
21 | 21 | # import |
|
22 | 22 | import os |
|
23 | 23 | |
|
24 |
from |
|
|
24 | from ipython_kernel.pickleutil import can, uncan | |
|
25 | 25 | |
|
26 | 26 | import ipython_parallel as pmod |
|
27 | 27 | from ipython_parallel.util import interactive |
@@ -29,6 +29,12 b' except:' | |||
|
29 | 29 | import pickle |
|
30 | 30 | |
|
31 | 31 | try: |
|
32 | # py3 | |
|
33 | PICKLE_PROTOCOL = pickle.DEFAULT_PROTOCOL | |
|
34 | except AttributeError: | |
|
35 | PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL | |
|
36 | ||
|
37 | try: | |
|
32 | 38 | # We are using compare_digest to limit the surface of timing attacks |
|
33 | 39 | from hmac import compare_digest |
|
34 | 40 | except ImportError: |
@@ -52,7 +58,6 b' from IPython.utils.traitlets import (CBytes, Unicode, Bool, Any, Instance, Set,' | |||
|
52 | 58 | DottedObjectName, CUnicode, Dict, Integer, |
|
53 | 59 | TraitError, |
|
54 | 60 | ) |
|
55 | from IPython.utils.pickleutil import PICKLE_PROTOCOL | |
|
56 | 61 | from jupyter_client.adapter import adapt |
|
57 | 62 | |
|
58 | 63 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now