diff --git a/kallithea/lib/auth.py b/kallithea/lib/auth.py --- a/kallithea/lib/auth.py +++ b/kallithea/lib/auth.py @@ -765,7 +765,7 @@ class LoginRequired(object): if not _api_key: log.debug("API KEY *NOT* present in request") else: - log.warn("API KEY ****%s *NOT* valid" % _api_key[-4:]) + log.warning("API KEY ****%s *NOT* valid" % _api_key[-4:]) log.debug('Checking if %s is authenticated @ %s' % (user.username, loc)) reason = 'RegularAuth' if user.is_authenticated else 'APIAuth' @@ -776,7 +776,7 @@ class LoginRequired(object): ) return func(*fargs, **fkwargs) else: - log.warn('user %s authenticating with:%s NOT authenticated on func: %s: ' + log.warning('user %s authenticating with:%s NOT authenticated on func: %s: ' 'IP_ACCESS:%s API_ACCESS:%s' % (user, reason, loc, ip_access_valid, api_access_valid) ) diff --git a/kallithea/lib/auth_modules/auth_internal.py b/kallithea/lib/auth_modules/auth_internal.py --- a/kallithea/lib/auth_modules/auth_internal.py +++ b/kallithea/lib/auth_modules/auth_internal.py @@ -64,7 +64,7 @@ class KallitheaAuthPlugin(auth_modules.K log.debug('userobj was:%s skipping' % (userobj, )) return None if userobj.extern_type != self.name: - log.warn("userobj:%s extern_type mismatch got:`%s` expected:`%s`" + log.warning("userobj:%s extern_type mismatch got:`%s` expected:`%s`" % (userobj, userobj.extern_type, self.name)) return None diff --git a/kallithea/lib/auth_modules/auth_pam.py b/kallithea/lib/auth_modules/auth_pam.py --- a/kallithea/lib/auth_modules/auth_pam.py +++ b/kallithea/lib/auth_modules/auth_pam.py @@ -132,7 +132,7 @@ class KallitheaAuthPlugin(auth_modules.K user_attrs["firstname"] = match.group('first_name') user_attrs["lastname"] = match.group('last_name') except Exception: - log.warn("Cannot extract additional info for PAM user") + log.warning("Cannot extract additional info for PAM user") pass log.debug("pamuser: \n%s" % formatted_json(user_attrs)) diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py --- a/kallithea/lib/db_manage.py +++ b/kallithea/lib/db_manage.py @@ -472,7 +472,7 @@ class DbManage(object): # check write access, warn user about non writeable paths elif not os.access(path, os.W_OK) and path_ok: - log.warn('No write permission to given path %s' % (path,)) + log.warning('No write permission to given path %s' % (path,)) if not ask_ok('Given path %s is not writeable, do you want to ' 'continue with read only mode ? [y/n]' % (path,)): log.error('Canceled by user') diff --git a/kallithea/lib/utils.py b/kallithea/lib/utils.py --- a/kallithea/lib/utils.py +++ b/kallithea/lib/utils.py @@ -237,10 +237,10 @@ def get_filesystem_repos(path, recursive def _get_repos(p): if not os.access(p, os.R_OK) or not os.access(p, os.X_OK): - log.warn('ignoring repo path without access: %s' % (p,)) + log.warning('ignoring repo path without access: %s' % (p,)) return if not os.access(p, os.W_OK): - log.warn('repo path without write access: %s' % (p,)) + log.warning('repo path without write access: %s' % (p,)) for dirpath in os.listdir(p): if os.path.isfile(os.path.join(p, dirpath)): continue