Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility issues with matplotlib 3.8.0 #441

Open
jpata opened this issue Sep 15, 2023 · 6 comments
Open

compatibility issues with matplotlib 3.8.0 #441

jpata opened this issue Sep 15, 2023 · 6 comments

Comments

@jpata
Copy link

jpata commented Sep 15, 2023

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)
@fred-renner
Copy link

same issue here

@jonas-eschle
Copy link
Contributor

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?

ikrommyd added a commit to ikrommyd/egamma-tnp that referenced this issue Sep 16, 2023
@lgray
Copy link
Contributor

lgray commented Sep 16, 2023

Looks like this interface was made internal and deprecated some time ago: https://matplotlib.org/stable/api/docstring_api.html#matplotlib-docstring

@lgray
Copy link
Contributor

lgray commented Sep 16, 2023

If you're willing to depend on an internal interface the fix is easy. @andrzejnovak

@andrzejnovak
Copy link
Member

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.

@ikrommyd
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants