diff --git a/conda_lock/_vendor/conda/auxlib/packaging.py b/conda_lock/_vendor/conda/auxlib/packaging.py index 7172b7ed..cb9d5547 100644 --- a/conda_lock/_vendor/conda/auxlib/packaging.py +++ b/conda_lock/_vendor/conda/auxlib/packaging.py @@ -114,7 +114,7 @@ def _git_describe_tags(path): call("git update-index --refresh", path, raise_on_error=False) except CalledProcessError as e: # git is probably not installed - log.warn(repr(e)) + log.warning(repr(e)) return None response = call("git describe --tags --long", path, raise_on_error=False) if response.rc == 0: @@ -164,7 +164,7 @@ def get_version(dunder_file): try: return _get_version_from_version_file(path) or _get_version_from_git_clone(path) except CalledProcessError as e: - log.warn(repr(e)) + log.warning(repr(e)) return None except Exception as e: log.exception(e) diff --git a/conda_lock/_vendor/conda/core/envs_manager.py b/conda_lock/_vendor/conda/core/envs_manager.py index 26972e0a..10adc3ce 100644 --- a/conda_lock/_vendor/conda/core/envs_manager.py +++ b/conda_lock/_vendor/conda/core/envs_manager.py @@ -48,7 +48,7 @@ def register_env(location): fh.write('\n') except EnvironmentError as e: if e.errno in (EACCES, EROFS, ENOENT): - log.warn("Unable to register environment. Path not writable or missing.\n" + log.warning("Unable to register environment. Path not writable or missing.\n" " environment location: %s\n" " registry file: %s", location, user_environments_txt_file) else: diff --git a/conda_lock/_vendor/conda/core/link.py b/conda_lock/_vendor/conda/core/link.py index 94283042..1a8973c9 100644 --- a/conda_lock/_vendor/conda/core/link.py +++ b/conda_lock/_vendor/conda/core/link.py @@ -1254,7 +1254,7 @@ def run_script(prefix, prec, action='post-link', env_prefix=None, activate=False response.stdout, response.stderr, response.rc) raise LinkError(message) else: - log.warn("%s script failed for package %s\n" + log.warning("%s script failed for package %s\n" "consider notifying the package maintainer", action, prec.dist_str()) return False else: diff --git a/conda_lock/_vendor/conda/core/path_actions.py b/conda_lock/_vendor/conda/core/path_actions.py index cd1d8050..7d99bf8d 100644 --- a/conda_lock/_vendor/conda/core/path_actions.py +++ b/conda_lock/_vendor/conda/core/path_actions.py @@ -959,7 +959,7 @@ def verify(self): touch(user_environments_txt_file, mkdir=True, sudo_safe=True) self._verified = True except NotWritableError: - log.warn("Unable to create environments file. Path not writable.\n" + log.warning("Unable to create environments file. Path not writable.\n" " environment location: %s\n", user_environments_txt_file) def execute(self): diff --git a/conda_lock/_vendor/conda/core/prefix_data.py b/conda_lock/_vendor/conda/core/prefix_data.py index 0b023b1c..e55a21fa 100644 --- a/conda_lock/_vendor/conda/core/prefix_data.py +++ b/conda_lock/_vendor/conda/core/prefix_data.py @@ -188,7 +188,7 @@ def _load_single_record(self, prefix_record_json_path): if (n, v, b) != (prefix_record.name, prefix_record.version, prefix_record.build): raise ValueError() except ValueError: - log.warn("Ignoring malformed prefix record at: %s", prefix_record_json_path) + log.warning("Ignoring malformed prefix record at: %s", prefix_record_json_path) # TODO: consider just deleting here this record file in the future return @@ -291,7 +291,7 @@ def _load_site_packages(self): exc_type, exc_value, exc_traceback = sys.exc_info() import traceback tb = traceback.format_exception(exc_type, exc_value, exc_traceback) - log.warn("Problem reading non-conda package record at %s. Please verify that you " + log.warning("Problem reading non-conda package record at %s. Please verify that you " "still need this, and if so, that this is still installed correctly. " "Reinstalling this package may help.", af) log.debug("ValidationError: \n%s\n", "\n".join(tb)) diff --git a/conda_lock/_vendor/conda/core/solve.py b/conda_lock/_vendor/conda/core/solve.py index e48cc4e6..5eed82d2 100644 --- a/conda_lock/_vendor/conda/core/solve.py +++ b/conda_lock/_vendor/conda/core/solve.py @@ -649,7 +649,7 @@ def _add_specs(self, ssc): ssc.specs_map[s.name] = MatchSpec(s, optional=False) pin_overrides.add(s.name) else: - log.warn("pinned spec %s conflicts with explicit specs. " + log.warning("pinned spec %s conflicts with explicit specs. " "Overriding pinned spec.", s) # we want to freeze any packages in the env that are not conflicts, so that the diff --git a/conda_lock/_vendor/conda/exceptions.py b/conda_lock/_vendor/conda/exceptions.py index 744d81b5..5c186da1 100644 --- a/conda_lock/_vendor/conda/exceptions.py +++ b/conda_lock/_vendor/conda/exceptions.py @@ -1248,7 +1248,7 @@ def print_unexpected_error_report(self, error_report): message_builder.append(get_env_vars_str(error_report['conda_info'])) message_builder.append(get_main_info_str(error_report['conda_info'])) except Exception as e: - log.warn("%r", e, exc_info=True) + log.warning("%r", e, exc_info=True) message_builder.append('conda info could not be constructed.') message_builder.append('%r' % e) message_builder.append('') @@ -1277,7 +1277,7 @@ def print_expected_error_report(self, error_report): message_builder.append(get_env_vars_str(error_report['conda_info'])) message_builder.append(get_main_info_str(error_report['conda_info'])) except Exception as e: - log.warn("%r", e, exc_info=True) + log.warning("%r", e, exc_info=True) message_builder.append('conda info could not be constructed.') message_builder.append('%r' % e) message_builder.append('') diff --git a/conda_lock/_vendor/conda/gateways/disk/__init__.py b/conda_lock/_vendor/conda/gateways/disk/__init__.py index 6ba5f934..28a24c71 100644 --- a/conda_lock/_vendor/conda/gateways/disk/__init__.py +++ b/conda_lock/_vendor/conda/gateways/disk/__init__.py @@ -52,7 +52,7 @@ def sleep_some(n, exc): # errno.ENOTEMPTY OSError(41, 'The directory is not empty') raise else: - log.warn("Uncaught backoff with errno %s %d", errorcode[e.errno], e.errno) + log.warning("Uncaught backoff with errno %s %d", errorcode[e.errno], e.errno) raise except CalledProcessError as e: sleep_some(n, e) diff --git a/conda_lock/_vendor/conda/gateways/disk/create.py b/conda_lock/_vendor/conda/gateways/disk/create.py index c9c841ba..69bd1fbe 100644 --- a/conda_lock/_vendor/conda/gateways/disk/create.py +++ b/conda_lock/_vendor/conda/gateways/disk/create.py @@ -237,7 +237,7 @@ def make_menu(prefix, file_path, remove=False): if not on_win: return elif basename(prefix).startswith('_'): - log.warn("Environment name starts with underscore '_'. Skipping menu installation.") + log.warning("Environment name starts with underscore '_'. Skipping menu installation.") return try: diff --git a/conda_lock/_vendor/conda/gateways/disk/delete.py b/conda_lock/_vendor/conda/gateways/disk/delete.py index 432eddec..19995129 100644 --- a/conda_lock/_vendor/conda/gateways/disk/delete.py +++ b/conda_lock/_vendor/conda/gateways/disk/delete.py @@ -140,7 +140,7 @@ def unlink_or_rename_to_trash(path): log.debug("{} is missing. Conda was not installed correctly or has been " "corrupted. Please file an issue on the conda github repo." .format(trash_script)) - log.warn("Could not remove or rename {}. Please remove this file manually (you " + log.warning("Could not remove or rename {}. Please remove this file manually (you " "may need to reboot to free file handles)".format(path)) diff --git a/conda_lock/_vendor/conda/gateways/disk/permissions.py b/conda_lock/_vendor/conda/gateways/disk/permissions.py index 3064506b..982ec3c8 100644 --- a/conda_lock/_vendor/conda/gateways/disk/permissions.py +++ b/conda_lock/_vendor/conda/gateways/disk/permissions.py @@ -38,7 +38,7 @@ def make_writable(path): log.debug("tried make writable but failed: %s\n%r", path, e) return False else: - log.warn("Error making path writable: %s\n%r", path, e) + log.warning("Error making path writable: %s\n%r", path, e) raise diff --git a/conda_lock/_vendor/conda/lock.py b/conda_lock/_vendor/conda/lock.py index 549fb7c5..06a6b5c9 100644 --- a/conda_lock/_vendor/conda/lock.py +++ b/conda_lock/_vendor/conda/lock.py @@ -54,7 +54,7 @@ def touch(file_name, times=None): with open(file_name, 'a'): os.utime(file_name, times) except (OSError, IOError) as e: - log.warn("Failed to create lock, do not run conda in parallel processes [errno %d]", + log.warning("Failed to create lock, do not run conda in parallel processes [errno %d]", e.errno) @@ -128,7 +128,7 @@ def __init__(self, directory_path, retries=10): os.makedirs(self.directory_path) log.debug("forced to create %s", self.directory_path) except (OSError, IOError) as e: - log.warn("Failed to create directory %s [errno %d]", self.directory_path, e.errno) + log.warning("Failed to create directory %s [errno %d]", self.directory_path, e.errno) Locked = DirectoryLock diff --git a/conda_lock/_vendor/conda/plan.py b/conda_lock/_vendor/conda/plan.py index 01b5f5ea..2968fce4 100644 --- a/conda_lock/_vendor/conda/plan.py +++ b/conda_lock/_vendor/conda/plan.py @@ -275,7 +275,7 @@ def _get_best_prec_match(precs): break else: prec_matches = precs - log.warn("Multiple packages found:%s", dashlist(prec_matches)) + log.warning("Multiple packages found:%s", dashlist(prec_matches)) return prec_matches[0] diff --git a/conda_lock/_vendor/conda/trust/signature_verification.py b/conda_lock/_vendor/conda/trust/signature_verification.py index a7310e9d..ea5ce70e 100644 --- a/conda_lock/_vendor/conda/trust/signature_verification.py +++ b/conda_lock/_vendor/conda/trust/signature_verification.py @@ -53,7 +53,7 @@ def enabled(self): try: import conda_content_trust # noqa: F401 except ImportError: - log.warn( + log.warning( "metadata signature verification requested, " "but `conda-content-trust` is not installed." ) @@ -66,12 +66,12 @@ def enabled(self): # ensure the trusted_root exists if self.trusted_root is None: - log.warn("could not find trusted_root data for metadata signature verification") + log.warning("could not find trusted_root data for metadata signature verification") return False # ensure the key_mgr exists if self.key_mgr is None: - log.warn("could not find key_mgr data for metadata signature verification") + log.warning("could not find key_mgr data for metadata signature verification") return False # signature verification is enabled @@ -150,7 +150,7 @@ def key_mgr(self): verify_delegation("key_mgr", untrusted, self.trusted_root) except (ConnectionError, HTTPError) as err: - log.warn(err) + log.warning(err) except Exception as err: # TODO: more error handling raise @@ -228,7 +228,7 @@ def __call__(self, info, fn, signatures): try: verify_delegation("pkg_mgr", envelope, self.key_mgr) except SignatureError: - log.warn(f"invalid signature for {fn}") + log.warning(f"invalid signature for {fn}") status = "(WARNING: metadata signature verification failed)" else: status = "(INFO: package metadata is signed by Anaconda and trusted)" diff --git a/conda_lock/_vendor/conda/utils.py b/conda_lock/_vendor/conda/utils.py index 880d2b2e..c8d3bc81 100644 --- a/conda_lock/_vendor/conda/utils.py +++ b/conda_lock/_vendor/conda/utils.py @@ -479,7 +479,7 @@ def get_comspec(): environ["COMSPEC"] = comspec break else: - log.warn("cmd.exe could not be found. Looked in SystemRoot and windir env vars.\n") + log.warning("cmd.exe could not be found. Looked in SystemRoot and windir env vars.\n") # fails with KeyError if still undefined return environ["COMSPEC"]