Replace deprecated logger.warn with warning
From [Python docs](https://docs.python.org/3/library/logging.html#logging.Logger.warning):
_There is an obsolete method `warn` which is functionally identical to `warning`. As `warn` is deprecated, please do not use it - use `warning` instead._

_The documentation is not available anymore as the PR was closed or merged._