matplotlib / matplotlib/ipympl

Warnings with backend_nbagg

未关闭
#488 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Jupyter Notebook
星标
1.7k
派生
234
PR 合并指标
30 天内没有已合并 PR

描述

Issue

There is a warning being triggered when running pytest with the following instruction:

ipympl.backend_nbagg.new_figure_manager_given_figure(1, matplotlib.figure.Figure()))

The warning is the following:

 /Users/luisaleixo/.pyenv/versions/3.9.6/envs/cara/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized 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)

It is not possible to downgrade the triatlets version for this project.

Versions

Name: ipympl
Version: 0.9.1

Name: pytest
Version: 6.2.5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用 issue 中所示的 pytest 和 ipympl.backend_nbagg.new_figure_manager_given_figure 调用来复现该警告。跟踪 Toolbar 的初始化过程及其与 ipywidgets 和 traitlets 的交互。复现时不再发出报告中的 DeprecationWarning,且相关的 pytest 运行通过,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
jupyter, python
领域
backend, testing-qa
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。