matplotlib / matplotlib/ipympl
DeprecationWarning with traitlets when using %matplotlib widget
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 1.7k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Describe the issue
It seems that the widget backend is doing something that is deprecated, and I thought I should make a note of it here.
Example:
```python
import warnings
import matplotlib.pyplot as plt
%matplotlib widget
warnings.simplefilter("always", DeprecationWarning)
plt.subplots()
```
I get the following warnings
```python-trace
/home/maij/.local/lib/python3.6/site-packages/ipywidgets/widgets/widget.py:412: DeprecationWarning: Passing unrecoginized arguments to super(Canvas).__init__().
__init__() missing 1 required positional argument: 'figure'
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
super(Widget, self).__init__(**kwargs)
/home/maij/.local/lib/python3.6/site-packages/ipywidgets/widgets/widget.py:412: DeprecationWarning: Passing unrecoginized arguments to super(Toolbar).__init__().
__init__() missing 1 required positional argument: 'canvas'
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
super(Widget, self).__init__(**kwargs)
```
## Versions
```
3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0]
ipympl version: 0.5.6
jupyter core : 4.6.3
jupyter-notebook : 6.0.3
qtconsole : 4.7.4
ipython : 7.13.0
ipykernel : 5.2.0
jupyter client : 6.1.3
jupyter lab : 2.1.4
nbconvert : 6.0.0a0
ipywidgets : 7.5.1
nbformat : 5.0.4
traitlets : 4.3.3
JupyterLab v2.1.4
Known labextensions:
app dir: /usr/local/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
@jupyter-widgets/jupyterlab-sidecar v0.5.0 enabled OK
jupyter-matplotlib v0.7.2 enabled OK
shared_kernel v0.1.0 enabled OK
```
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo la advertencia con el fragmento de Python proporcionado y el backend `%matplotlib widget`, y luego sigue la inicialización de Canvas y Toolbar mencionada en el traceback. Compara el comportamiento con las versiones indicadas de ipympl, ipywidgets y traitlets; la tarea estará terminada cuando el ejemplo ya no emita estos mensajes de DeprecationWarning y el comportamiento esté cubierto por una comprobación de regresión adecuada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- jupyter-notebook, python
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100