Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MNT]: Python 3.14: multiple RecursionErrors when running tests  #29185

Description

@befeleme

Summary

I try to build matplotlib in Fedora Linux with Python 3.14a2. The build fails, there's over 1900 tests erroring/failing because of RecursionErrors. An example traceback is copied below.

I wonder whether this has something to do with "super objects are now pickleable and copyable. (Contributed by Serhiy Storchaka in gh-125767.)"

___________________________ test_arc_pathpatch[png] ____________________________
[gw0] linux -- Python 3.14.0 /usr/bin/python3

args = ()
kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_arc_pathpatch[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)

/usr/lib64/python3.14/contextlib.py:85: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/figure.py:3395: in savefig
    self.canvas.print_figure(fname, **kwargs)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/backend_bases.py:2204: in print_figure
    result = print_method(
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/backend_bases.py:2054: in <lambda>
    print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/backends/backend_agg.py:496: in print_png
    self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/backends/backend_agg.py:444: in _print_pil
    FigureCanvasAgg.draw(self)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/backends/backend_agg.py:387: in draw
    self.figure.draw(self.renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/artist.py:95: in draw_wrapper
    result = draw(artist, renderer, *args, **kwargs)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/artist.py:72: in draw_wrapper
    return draw(artist, renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/figure.py:3162: in draw
    mimage._draw_list_compositing_images(
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/image.py:132: in _draw_list_compositing_images
    a.draw(renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/artist.py:72: in draw_wrapper
    return draw(artist, renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/mpl_toolkits/mplot3d/axes3d.py:460: in draw
    axis.draw_grid(renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/artist.py:72: in draw_wrapper
    return draw(artist, renderer)
../BUILDROOT/usr/lib64/python3.14/site-packages/mpl_toolkits/mplot3d/axis3d.py:649: in draw_grid
    ticks = self._update_ticks()
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/axis.py:1301: in _update_ticks
    major_ticks = self.get_major_ticks(len(major_locs))
../BUILDROOT/usr/lib64/python3.14/site-packages/mpl_toolkits/mplot3d/axis3d.py:174: in get_major_ticks
    ticks = super().get_major_ticks(numticks)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/axis.py:1663: in get_major_ticks
    self._copy_tick_props(self.majorTicks[0], tick)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/axis.py:1617: in _copy_tick_props
    dest.tick1line.update_from(src.tick1line)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/lines.py:1357: in update_from
    self._marker = MarkerStyle(marker=other._marker)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/markers.py:248: in __init__
    self._set_marker(marker)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/markers.py:323: in _set_marker
    self.__dict__ = copy.deepcopy(marker.__dict__)
/usr/lib64/python3.14/copy.py:140: in deepcopy
    y = copier(x, memo)
/usr/lib64/python3.14/copy.py:211: in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
/usr/lib64/python3.14/copy.py:147: in deepcopy
    y = copier(memo)
../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/path.py:285: in __deepcopy__
    p = copy.deepcopy(super(), memo)
/usr/lib64/python3.14/copy.py:166: in deepcopy
    y = _reconstruct(x, memo, *rv)
/usr/lib64/python3.14/copy.py:243: in _reconstruct
    y = func(*args)
/usr/lib64/python3.14/copy.py:242: in <genexpr>
    args = (deepcopy(arg, memo) for arg in args)
/usr/lib64/python3.14/copy.py:147: in deepcopy
    y = copier(memo)
E   RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)

Proposed fix

No response

Activity

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions