Fix deprecation warning on Matplotlib 3.7 and above

Raise minimum matplotlib version to 3.5 (still supported on Python 3.8
on Windows 7).

This fixes support with future Matplotlib 3.9, which removes
matplotlib.cm.get_cmap(). Newer versions of dependencies may be chosen
when installing corrscope using pip/pipx and wheels, rather than Poetry
or official binaries (which always use locked dependencies).
pull/463/head
nyanpasu64 2024-02-05 13:25:26 -08:00
rodzic 61626e7057
commit 6d69ec6d95
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -580,7 +580,7 @@ class AbstractMatplotlibRenderer(_RendererBackend, ABC):
# List of colors at
# https://matplotlib.org/gallery/color/colormap_reference.html
# Discussion at https://github.com/matplotlib/matplotlib/issues/10840
cmap: ListedColormap = matplotlib.cm.get_cmap("Accent")
cmap: ListedColormap = matplotlib.colormaps["Accent"]
colors = cmap.colors
axes.set_prop_cycle(color=colors)

2
poetry.lock wygenerowano
Wyświetl plik

@ -1311,4 +1311,4 @@ qt6 = ["PyQt6"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "b5adece2ad1161acc71ae3612c339131e9c5c5b545e48ba6c6724ac8bad6446c"
content-hash = "cb73596aed629b4f95d99c079bc01bfe75f161973659e13cfcde8486baef5774"

Wyświetl plik

@ -23,7 +23,7 @@ python = "^3.8"
"ruamel.yaml" = "^0.17"
numpy = "^1.21"
click = "^8.0.1"
matplotlib = "^3.1"
matplotlib = "^3.5"
attrs = "^21.2.0"
appdirs = "^1.4.4"
atomicwrites = "^1.4.0"