diff --git a/menuinst/_legacy/__init__.py b/menuinst/_legacy/__init__.py index c8037933..18968f42 100644 --- a/menuinst/_legacy/__init__.py +++ b/menuinst/_legacy/__init__.py @@ -80,7 +80,7 @@ def install(path, remove=False, prefix=None, recursing=False, root_prefix=None): pass if retcode != 0: - logging.warn( + logging.warning( "Insufficient permissions to write menu folder. " "Falling back to user location" ) diff --git a/menuinst/_legacy/win32.py b/menuinst/_legacy/win32.py index dffbce90..b33f2d7f 100644 --- a/menuinst/_legacy/win32.py +++ b/menuinst/_legacy/win32.py @@ -152,7 +152,7 @@ def __init__( # required. If the process isn't elevated, we get the # WindowsError if 'user' in dirs_src and used_mode == 'system': - logger.warn( + logger.warning( "Insufficient permissions to write menu folder. " "Falling back to user location" ) diff --git a/menuinst/api.py b/menuinst/api.py index 05045be9..0da9c4f5 100644 --- a/menuinst/api.py +++ b/menuinst/api.py @@ -154,7 +154,7 @@ def _install_adapter( kwargs["root_prefix"] = DEFAULT_BASE_PREFIX _legacy_install(json_path, remove=remove, prefix=prefix, **kwargs) else: - log.warn( + log.warning( "menuinst._legacy is only supported on Windows. " "Switch to the new-style menu definitions " "for cross-platform compatibility." diff --git a/menuinst/utils.py b/menuinst/utils.py index 7e5cf8be..653df112 100644 --- a/menuinst/utils.py +++ b/menuinst/utils.py @@ -408,7 +408,7 @@ def wrapper_elevate( logger.debug("Elevating command: %s", cmd) return_code = run_as_admin(cmd) except Exception as exc: - logger.warn("Elevation failed! Falling back to user mode.", exc_info=exc) + logger.warning("Elevation failed! Falling back to user mode.", exc_info=exc) else: os.environ.pop("_MENUINST_RECURSING", None) if return_code == 0: # success, we are done