matplotlib / matplotlib/ipympl
ipympl does not work in JupyterLite
还没有人认领这个 Issue。
- 主要语言
- Jupyter Notebook
- 星标
- 1.7k
- 派生
- 234
- PR 合并指标
- 30 天内没有已合并 PR
描述
Describe the issue
Due to a dependency on tornado https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L22, ipympl does not work in JupyterLite
We might be able to implement a custom Timer https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L118 based entirely on asyncio (which works on JupyterLite).
Workaround
As a workaround, one could do
import sys
import types
sys.modules['tornado'] = types.ModuleType('tornadofake')
Disclaimer, I would not be held responsible for anything that would go wrong if you copy this code!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 matplotlib 的 lib/matplotlib/backends/backend_webagg_core.py 开始,重点查看第 22 行附近的 tornado 依赖项和第 118 行附近的 Timer。检查 ipympl 在 JupyterLite 中如何使用此 backend,然后验证该 integration 在没有 tornado 的情况下也能在那里正常工作,并且交互式 timer 仍能使用现有的 asyncio 支持正常运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- jupyter-notebook, python
- 领域
- frontend, web-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100