Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

DeprecationWarning with traitlets when using %matplotlib widget

Đang mở
#236 1 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
jupyter-notebook, python
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện cảnh báo với đoạn mã Python được cung cấp và backend %matplotlib widget, sau đó lần theo quá trình khởi tạo Canvas và Toolbar được đề cập trong traceback. So sánh hành vi với các phiên bản ipympl, ipywidgets và traitlets được liệt kê; công việc được xem là hoàn tất khi ví dụ không còn phát ra các thông báo DeprecationWarning này và hành vi được bao phủ bởi một kiểm tra hồi quy phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Jupyter Notebook
Star
1.7k
Fork
234
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của matplotlib/ipympl

Tất cả issue của matplotlib/ipympl

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.