ipython / ipython/ipykernel

ZMQInteractiveShell.data_pub_class and datapub deprecation

Offen
#469 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
734
Forks
412
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
8

Beschreibung

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!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.