Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate run_cmd and run_cmd_qa & co, move them to easybuild._deprecated module #4433

Merged
merged 13 commits into from
Apr 17, 2024
Merged
841 changes: 841 additions & 0 deletions easybuild/_deprecated.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion easybuild/base/fancylogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def deprecated(self, msg, cur_ver, max_ver, depth=2, exception=None, log_callbac
if loose_cv.version[:depth] >= loose_mv.version[:depth]:
self.raiseException("DEPRECATED (since v%s) functionality used: %s" % (max_ver, msg), exception=exception)
else:
deprecation_msg = "Deprecated functionality, will no longer work in v%s: %s" % (max_ver, msg)
deprecation_msg = "Deprecated functionality, will no longer work in EasyBuild v%s: %s" % (max_ver, msg)
log_callback(deprecation_msg)

def _handleFunction(self, function, levelno, **kwargs):
Expand Down
8 changes: 1 addition & 7 deletions easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
from easybuild.framework.easyconfig.tools import dump_env_easyblock, get_paths_for
from easybuild.framework.easyconfig.templates import TEMPLATE_NAMES_EASYBLOCK_RUN_STEP, template_constant_dict
from easybuild.framework.extension import Extension, resolve_exts_filter_template
from easybuild.tools import LooseVersion, config, run
from easybuild.tools import LooseVersion, config
from easybuild.tools.build_details import get_build_stats
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, dry_run_warning, dry_run_set_dirs
from easybuild.tools.build_log import print_error, print_msg, print_warning
Expand Down Expand Up @@ -4246,7 +4246,6 @@ def build_and_install_one(ecdict, init_env):

# restore original environment, and then sanitize it
_log.info("Resetting environment")
run.errors_found_in_log = 0
restore_env(init_env)
sanitize_env()

Expand Down Expand Up @@ -4449,11 +4448,6 @@ def ensure_writable_log_dir(log_dir):
req_time = time2str(end_timestamp - start_timestamp)
print_msg("%s: Installation %s %s (took %s)" % (summary, ended, succ, req_time), log=_log, silent=silent)

# check for errors
if run.errors_found_in_log > 0:
_log.warning("%d possible error(s) were detected in the "
"build logs, please verify the build.", run.errors_found_in_log)

if app.postmsg:
print_msg("\nWARNING: %s\n" % app.postmsg, log=_log, silent=silent)

Expand Down