Skip to content

[Bug]: matplotlib simple example fails in Python 3.14 #30370

Closed as duplicate

Description

@bje-

Bug summary

Using the simplest Pyplot example as a minimal test case on Python 3.14 gives a RecursionError: maximum recursion depth exceeded in path.py.

Code for reproduction

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()

Actual outcome

... trails way back ...
  File "/home/bje/source/nemo/myenv/lib/python3.14/site-packages/matplotlib/path.py", line 285, in __deepcopy__
    p = copy.deepcopy(super(), memo)
  File "/usr/lib/python3.14/copy.py", line 157, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/usr/lib/python3.14/copy.py", line 234, in _reconstruct
    y = func(*args)
  File "/usr/lib/python3.14/copy.py", line 233, in <genexpr>
    args = (deepcopy(arg, memo) for arg in args)
            ~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.14/copy.py", line 138, in deepcopy
    y = copier(memo)
  File "/home/bje/source/nemo/myenv/lib/python3.14/site-packages/matplotlib/path.py", line 285, in __deepcopy__
    p = copy.deepcopy(super(), memo)
RecursionError: maximum recursion depth exceeded

Expected outcome

The simple example should Just Work.

Additional information

No response

Operating system

Ubuntu 24.04

Matplotlib Version

3.10.3

Matplotlib Backend

WxAgg

Python version

Python 3.14.0rc1

Jupyter version

No response

Installation

pip

Activity

  1. story645 commented on Jul 30, 2025

    @story645
    Member

    I think this is supposed to be fixed by #30198, which should be in the next release (which is in the works so should be out soon(ish)).

  2. bje- commented on Jul 30, 2025

    @bje-
    Author

    Yes, thanks, I see it's fixed in the nightly build.

  3. added this to the v3.10.4 milestone on Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions