compatibility issues with matplotlib 3.8.0
The latest mplhep 0.3.28 seems incompatible with the latest matplotlib 3.8.0
File "/home/runner/work/particleflow/particleflow/mlpf/pipeline.py", line 1262, in plots
import mplhep
File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/mplhep/__init__.py", line 10, in <module>
from . import alice, atlas, cms, label, lhcb, plot
File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/mplhep/alice.py", line 5, in <module>
from matplotlib import docstring
ImportError: cannot import name 'docstring' from 'matplotlib' (/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/matplotlib/__init__.py)
same issue here
For anyone coming across this issue, for now, just restrict matplotlib below 3.8, i.e. "matplotlib<3.8"
Addressing this in #442 , solves it temporarily, but we should have a long-term solution. @andrzejnovak maybe?
Looks like this interface was made internal and deprecated some time ago: https://matplotlib.org/stable/api/docstring_api.html#matplotlib-docstring
If you're willing to depend on an internal interface the fix is easy. @andrzejnovak
Thanks for reporting everyone. Things should be fixed in 0.3.29 with @lgray's suggestion, but I'll leave this open for now until that's made more permanent.
matplotlib docs state that "Its use is deprecated and it will be removed in a future version.", so a permanent fix is definitely gonna be required at some point.