Let me guess ... You are using backtrader and had this issue while using it.
The error you have is :
File "/xxx/backtrader/plot/locator.py", line 35, in <module>
from matplotlib.dates import (HOURS_PER_DAY, MIN_PER_HOUR, SEC_PER_MIN,
ImportError: cannot import name 'warnings' from 'matplotlib.dates'
The root cause of the error is that at line 35 of above mentionned file (locator.py) there is an attempt to import "warnings" from matplotlib.dates :
from matplotlib.dates import (HOURS_PER_DAY, MIN_PER_HOUR, SEC_PER_MIN,
MONTHS_PER_YEAR, DAYS_PER_WEEK,
SEC_PER_HOUR, SEC_PER_DAY,
num2date, rrulewrapper, YearLocator,
MicrosecondLocator, warnings)
But if you look at the doc or the code, you will find that there is no warnings in matplotlib.dates. Digging in this file history on github, one can find that a line :
import warnings
have been removed on 7 sept 2019, this is probably the reason of the issue you noticed.
In Backtrader, there is a pull request awaiting for this issue :
https://github.com/mementum/backtrader/pull/418
You can either apply the fix yourself to the code if you forked it, or wait for the PR to be merged