ipython / ipython/ipykernel

ZMQInteractiveShell.data_pub_class and datapub deprecation

未關閉
#469 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
734
分支
412
平均合併
1 天 5 小時
30 天內合併 PR
8

描述

I definitely don't understand understand everything that's going on here, but in hunting down a deprecation error in our tests, I noticed that the following line seems to be causing a `DeprecationWarning` related to `ipykernel.datapub` being [deprecated](https://github.com/ipython/ipykernel/blob/ef701eaac9adbc26eea6c2e0aa4452c838a27c81/ipykernel/datapub.py#L5):

https://github.com/ipython/ipykernel/blob/ef701eaac9adbc26eea6c2e0aa4452c838a27c81/ipykernel/zmqshell.py#L445

If I switch that line to
```python
class ZMQInteractiveShell(InteractiveShell):
...
data_pub_class = Type('ipyparallel.engine.datapub.ZMQDataPublisher')
```
then the deprecation warning goes away. of course, `ipyparallel` is not a dependency of `ipykernel`, so i guess that would break unless the user had it in their environment (or it was added as a dependency). What is the recommended "future-proof" approach here?

thanks!

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。