Skip to content

Commit 2888383

Browse files
committed
IPython.parallel py3compat
1 parent 5acc971 commit 2888383

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

IPython/parallel/apps/ipcontrollerapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def init_schedulers(self):
367367
# IOPub relay (in a Process)
368368
q = mq(zmq.PUB, zmq.SUB, zmq.PUB, b'N/A',b'iopub')
369369
q.bind_in(f.client_url('iopub'))
370-
q.setsockopt_in(zmq.IDENTITY, ident+"_iopub")
370+
q.setsockopt_in(zmq.IDENTITY, ident + b"_iopub")
371371
q.bind_out(f.engine_url('iopub'))
372372
q.setsockopt_out(zmq.SUBSCRIBE, b'')
373373
q.connect_mon(monitor_url)

IPython/parallel/client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def __init__(self, url_file=None, profile=None, profile_dir=None, ipython_dir=No
449449
# configure and construct the session
450450
extra_args['packer'] = cfg['pack']
451451
extra_args['unpacker'] = cfg['unpack']
452-
extra_args['key'] = cfg['exec_key']
452+
extra_args['key'] = cast_bytes(cfg['exec_key'])
453453

454454
self.session = Session(**extra_args)
455455

IPython/parallel/controller/hub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ def register_engine(self, reg, msg):
896896

897897
content = dict(id=eid,status='ok')
898898
# check if requesting available IDs:
899-
if uuid in self.by_ident:
899+
if cast_bytes(uuid) in self.by_ident:
900900
try:
901901
raise KeyError("uuid %r in use" % uuid)
902902
except:
@@ -1014,7 +1014,7 @@ def finish_registration(self, heart):
10141014
self.ids.add(eid)
10151015
self.keytable[eid] = ec.uuid
10161016
self.engines[eid] = ec
1017-
self.by_ident[ec.uuid] = ec.id
1017+
self.by_ident[cast_bytes(ec.uuid)] = ec.id
10181018
self.queues[eid] = list()
10191019
self.tasks[eid] = list()
10201020
self.completed[eid] = list()

IPython/parallel/controller/scheduler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,11 +756,11 @@ def launch_scheduler(in_addr, out_addr, mon_addr, not_addr, reg_addr, config=Non
756756
ctx = zmq.Context()
757757
loop = ioloop.IOLoop()
758758
ins = ZMQStream(ctx.socket(zmq.ROUTER),loop)
759-
ins.setsockopt(zmq.IDENTITY, identity+'_in')
759+
ins.setsockopt(zmq.IDENTITY, identity + b'_in')
760760
ins.bind(in_addr)
761761

762762
outs = ZMQStream(ctx.socket(zmq.ROUTER),loop)
763-
outs.setsockopt(zmq.IDENTITY, identity+'_out')
763+
outs.setsockopt(zmq.IDENTITY, identity + b'_out')
764764
outs.bind(out_addr)
765765
mons = zmqstream.ZMQStream(ctx.socket(zmq.PUB),loop)
766766
mons.connect(mon_addr)

0 commit comments

Comments
 (0)