Skip to content

[Bug]: Pillow 11.3 raises a deprecation warning when using TkAgg #30280

@Vincent-Maladiere

Description

@Vincent-Maladiere

Bug summary

The 'mode' parameter from Image.fromarray has been deprecated, which is used in matplotlib to plot figures using the tkinter backend.

Code for reproduction

# python -Wd
import matplotlib
from matplotlib import pyplot
matplotlib.use("tkagg")
pyplot.subplots()

Actual outcome

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)

Expected outcome

No deprecation warning

Additional information

No response

Operating system

Ubuntu (this bug is also present on Windows)

Matplotlib Version

3.10.3 (pillow==11.3.0)

Matplotlib Backend

TkAgg

Python version

Python 3.12.4

Jupyter version

No response

Installation

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions