ipython / ipython/ipykernel

echokernel example does not include topic in 'stream' responses

Đang mở
#69 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

I believe there is a bug in the [echokernel example kernel](http://jupyter-client.readthedocs.org/en/latest/wrapperkernels.html#example), specifically:

``` python
if not silent:
stream_content = {'name': 'stdout', 'text': code}
self.send_response(self.iopub_socket, 'stream', stream_content)
```

This is sending a message across the PUBSUB `iopub_socket`, but it doesn't include an `identity` argument, so there is no PUBSUB being prefixed to the message. The fix seems to be:

``` python
if not silent:
stream_content = {'name': 'stdout', 'text': code}
self.send_response(self.iopub_socket, 'stream', stream_content, ident=self._topic('stream'))
```

But I'm a tad hesitant to put it in a pull request because it seems intentional to make the `_topic` private. Does anyone know the right way to fix this?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.