Replace logger.warn by logger.warning
These print unwanted warning messages, as per https://docs.python.org/3/library/logging.html#logging.warning
_The documentation is not available anymore as the PR was closed or merged._