matplotlib / matplotlib/ipympl

DeprecationWarning with traitlets when using %matplotlib widget

オープン
#236 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jupyter Notebook
スター
1.7k
フォーク
234
PR マージ指標
30日以内にマージされた PR はありません

説明

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:

import warnings
import matplotlib.pyplot as plt

%matplotlib widget
warnings.simplefilter("always", DeprecationWarning) 
plt.subplots()

I get the following warnings

/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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、提供された Python スニペットと %matplotlib widget バックエンドを使って警告を再現し、次に traceback に記載されている Canvas と Toolbar の初期化を追跡します。ipympl、ipywidgets、traitlets の記載されたバージョンで動作を比較します。完了条件は、例でこれらの DeprecationWarning メッセージが出力されなくなり、動作が適切な回帰チェックでカバーされていることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
jupyter-notebook, python
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。