ipython / ipython/ipykernel

ZMQInteractiveShell.data_pub_class and datapub deprecation

Abierto
#469 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
734
Forks
412
Merge medio
1 d 5 h
PR fusionados (30 d)
8

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.