Use Logger.warning instead of Logger.warn

Logger.warn is deprecated
https://docs.python.org/3/library/logging.html#logging.Logger.warning
Merge pull request #3528 from vstoykov/logger-warnings

Use Logger.warning instead of Logger.warn