randimage
randimage copied to clipboard
matplotlib.cm.get_cmap is deprecated
Hi, thanks for this package - loving the aesthetic of the generated images.
When running my own tests the following warning is being thrown:
/code/.tox/py311/lib/python3.11/site-packages/randimage/coloredpath.py:13: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
Whilst not critical to fix it may cause problems in the future as matplotlib does not have any version restrictions so when the function is removed this library will break. Two possible fixes:
- Add a maximum version restriction to
matplotlibso that it won't install with the version in which the function is removed.- e.g.
matplotlib<3.9
- e.g.
- Update
randimageto use the new function. I'll note that doing this probably means adding in a minimum version restriction.