ipython / ipython/ipykernel

echokernel example does not include topic in 'stream' responses

オープン
#69 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
734
フォーク
412
平均マージ
1日 5時間
マージ済み PR(30日)
8

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。