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 摘要。