Tkinter deallocation warnings after plotting tests
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- matplotlib, python
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Start with the three named tests in tests/integration/test_contour_plot_examples.py and reproduce the warnings in the stated Python 3.14, pytest and matplotlib environment. Trace how those tests create and clean up figures and Tkinter objects, then check whether cleanup occurs outside the GUI event loop. Done means the deallocation warnings are resolved and the integration tests pass; the issue does not identify a fix or more specific files to inspect.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Warnings are emitted during the integration test suite when Tkinter objects are finalised:
PytestUnraisableExceptionWarning:
Exception ignored while calling deallocator
<function Variable.__del__ ...>
RuntimeError: main thread is not in main loop
The same error also occurs in tkinter.Image.__del__, where Tkinter attempts to delete an image from the Tcl/Tk interpreter.
The warnings have been observed in association with the following tests:
test_example_29_global_average_annual_temperaturetest_example_7_lat_pressure_zonal_meantest_example_10_latitude_time_hovmuller
emerging there in practice as:
tests/integration/test_contour_plot_examples.py::test_example_10_latitude_time_hovmuller
/home/slb93/miniconda3/envs/cfplot-test-env/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function Image.__del__ at 0x7f6ee9513530>: None
Traceback (most recent call last):
File "/home/slb93/miniconda3/envs/cfplot-test-env/lib/python3.14/tkinter/__init__.py", line 4332, in __del__
self.tk.call('image', 'delete', self.name)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
The warnings appear to arise during GUI-object cleanup rather than directly from the plotting operations. The available traceback does not yet establish whether figures or Tkinter objects are being retained beyond the lifetime of the GUI event loop, or whether this is a Matplotlib/Tkinter backend cleanup issue.
Environment
- Python: 3.14
- Test framework: pytest
- Plotting library: matplotlib
- GUI library involved in traceback: Tkinter
- Environment:
cfplot-test-env
- Ngôn ngữ chính
- Python
- Star
- 21
- Fork
- 11
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NCAS-CMS/cf-plot
-
docs infrastructure testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Testing is far too fragileĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
-
testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Add `AGENTS.md` fileĐang mởdocs enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
Tất cả issue của NCAS-CMS/cf-plot
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
521xueweihan/HelloGitHub#4237 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jejjohnson/gaussx#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mock-core-configs/etc/mock/rocky-10-riscv64.cfg contains the wrong architecture in config_opts['root']Có thể đã có người làm @jasonmontleon đã nhận 4 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
rpm-software-management/mock#1834 ·
-
Switch to `container` resource detector in declarative configuration doc after 1.46.0 rebaseĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
elastic/elastic-otel-python#683 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retriesĐang mởfollow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày