Skip to content

Commit 7d2b853

Browse files
committed
Merge branch '5.0.x' of github.com:easybuilders/easybuild-framework into 5.0.x
2 parents 638e498 + 23c3298 commit 7d2b853

File tree

6 files changed

+5
-84
lines changed

6 files changed

+5
-84
lines changed

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -403,20 +403,6 @@ def get_toolchain_hierarchy(parent_toolchain, incl_capabilities=False):
403403
return toolchain_hierarchy
404404

405405

406-
@contextmanager
407-
def disable_templating(ec):
408-
"""Temporarily disable templating on the given EasyConfig
409-
410-
Usage:
411-
with disable_templating(ec):
412-
# Do what you want without templating
413-
# Templating set to previous value
414-
"""
415-
_log.deprecated("disable_templating(ec) was replaced by ec.disable_templating()", '5.0')
416-
with ec.disable_templating() as old_value:
417-
yield old_value
418-
419-
420406
class EasyConfig(object):
421407
"""
422408
Class which handles loading, reading, validation of easyconfigs
@@ -1860,19 +1846,10 @@ def det_installversion(version, toolchain_name, toolchain_version, prefix, suffi
18601846
_log.nosupport('Use det_full_ec_version from easybuild.tools.module_generator instead of %s' % old_fn, '2.0')
18611847

18621848

1863-
def get_easyblock_class(easyblock, name=None, error_on_failed_import=True, error_on_missing_easyblock=None, **kwargs):
1849+
def get_easyblock_class(easyblock, name=None, error_on_failed_import=True, error_on_missing_easyblock=True, **kwargs):
18641850
"""
18651851
Get class for a particular easyblock (or use default)
18661852
"""
1867-
if 'default_fallback' in kwargs:
1868-
msg = "Named argument 'default_fallback' for get_easyblock_class is deprecated, "
1869-
msg += "use 'error_on_missing_easyblock' instead"
1870-
_log.deprecated(msg, '4.0')
1871-
if error_on_missing_easyblock is None:
1872-
error_on_missing_easyblock = kwargs['default_fallback']
1873-
elif error_on_missing_easyblock is None:
1874-
error_on_missing_easyblock = True
1875-
18761853
cls = None
18771854
try:
18781855
if easyblock:

easybuild/framework/easyconfig/templates.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,10 @@
181181
# versionmajor, versionminor, versionmajorminor (eg '.'.join(version.split('.')[:2])) )
182182

183183

184-
def template_constant_dict(config, ignore=None, skip_lower=None, toolchain=None):
184+
def template_constant_dict(config, ignore=None, toolchain=None):
185185
"""Create a dict for templating the values in the easyconfigs.
186186
- config is a dict with the structure of EasyConfig._config
187187
"""
188-
if skip_lower is not None:
189-
_log.deprecated("Use of 'skip_lower' named argument for template_constant_dict has no effect anymore", '4.0')
190-
191188
# TODO find better name
192189
# ignore
193190
if ignore is None:

easybuild/tools/filetools.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def extract_file(fn, dest, cmd=None, extra_options=None, overwrite=False, forced
486486
return base_dir
487487

488488

489-
def which(cmd, retain_all=False, check_perms=True, log_ok=True, log_error=None, on_error=None):
489+
def which(cmd, retain_all=False, check_perms=True, log_ok=True, on_error=WARN):
490490
"""
491491
Return (first) path in $PATH for specified command, or None if command is not found
492492
@@ -495,17 +495,6 @@ def which(cmd, retain_all=False, check_perms=True, log_ok=True, log_error=None,
495495
:param log_ok: Log an info message where the command has been found (if any)
496496
:param on_error: What to do if the command was not found, default: WARN. Possible values: IGNORE, WARN, ERROR
497497
"""
498-
if log_error is not None:
499-
_log.deprecated("'log_error' named argument in which function has been replaced by 'on_error'", '5.0')
500-
# If set, make sure on_error is at least WARN
501-
if log_error and on_error == IGNORE:
502-
on_error = WARN
503-
elif not log_error and on_error is None: # If set to False, use IGNORE unless on_error is also set
504-
on_error = IGNORE
505-
# Set default
506-
# TODO: After removal of log_error from the parameters, on_error=WARN can be used instead of this
507-
if on_error is None:
508-
on_error = WARN
509498
if on_error not in (IGNORE, WARN, ERROR):
510499
raise EasyBuildError("Invalid value for 'on_error': %s", on_error)
511500

@@ -1734,7 +1723,7 @@ def convert_name(name, upper=False):
17341723

17351724

17361725
def adjust_permissions(provided_path, permission_bits, add=True, onlyfiles=False, onlydirs=False, recursive=True,
1737-
group_id=None, relative=True, ignore_errors=False, skip_symlinks=None):
1726+
group_id=None, relative=True, ignore_errors=False):
17381727
"""
17391728
Change permissions for specified path, using specified permission bits
17401729
@@ -1751,11 +1740,6 @@ def adjust_permissions(provided_path, permission_bits, add=True, onlyfiles=False
17511740
and directories (if onlyfiles is False) in path
17521741
"""
17531742

1754-
if skip_symlinks is not None:
1755-
depr_msg = "Use of 'skip_symlinks' argument for 'adjust_permissions' is deprecated "
1756-
depr_msg += "(symlinks are never followed anymore)"
1757-
_log.deprecated(depr_msg, '4.0')
1758-
17591743
provided_path = os.path.abspath(provided_path)
17601744

17611745
if recursive:
@@ -2091,13 +2075,6 @@ def path_matches(path, paths):
20912075
return False
20922076

20932077

2094-
def rmtree2(path, n=3):
2095-
"""Wrapper around shutil.rmtree to make it more robust when used on NFS mounted file systems."""
2096-
2097-
_log.deprecated("Use 'remove_dir' rather than 'rmtree2'", '5.0')
2098-
remove_dir(path)
2099-
2100-
21012078
def find_backup_name_candidate(src_file):
21022079
"""Returns a non-existing file to be used as destination for backup files"""
21032080

@@ -2204,11 +2181,6 @@ def cleanup(logfile, tempdir, testing, silent=False):
22042181
print_msg(msg, log=None, silent=testing or silent)
22052182

22062183

2207-
def copytree(src, dst, symlinks=False, ignore=None):
2208-
"""DEPRECATED and removed. Use copy_dir"""
2209-
_log.deprecated("Use 'copy_dir' rather than 'copytree'", '4.0')
2210-
2211-
22122184
def encode_string(name):
22132185
"""
22142186
This encoding function handles funky software names ad infinitum, like:

easybuild/tools/modules.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,18 +549,14 @@ def module_wrapper_exists(self, mod_name, modulerc_fn='.modulerc', mod_wrapper_r
549549

550550
return wrapped_mod
551551

552-
def exist(self, mod_names, mod_exists_regex_template=None, skip_avail=False, maybe_partial=True):
552+
def exist(self, mod_names, skip_avail=False, maybe_partial=True):
553553
"""
554554
Check if modules with specified names exists.
555555
556556
:param mod_names: list of module names
557-
:param mod_exists_regex_template: DEPRECATED and unused
558557
:param skip_avail: skip checking through 'module avail', only check via 'module show'
559558
:param maybe_partial: indicates if the module name may be a partial module name
560559
"""
561-
if mod_exists_regex_template is not None:
562-
self.log.deprecated('mod_exists_regex_template is no longer used', '5.0')
563-
564560
def mod_exists_via_show(mod_name):
565561
"""
566562
Helper function to check whether specified module name exists through 'module show'.

easybuild/tools/toolchain/toolchain.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,6 @@ def _check_dependencies(self, dependencies):
550550

551551
return deps
552552

553-
def add_dependencies(self, dependencies):
554-
"""
555-
[DEPRECATED] Verify if the given dependencies exist, and return them.
556-
557-
This method is deprecated.
558-
You should pass the dependencies to the 'prepare' method instead, via the 'deps' named argument.
559-
"""
560-
self.log.deprecated("use of 'Toolchain.add_dependencies' method", '4.0')
561-
self.dependencies = self._check_dependencies(dependencies)
562-
563553
def is_required(self, name):
564554
"""Determine whether this is a required toolchain element."""
565555
# default: assume every element is required

test/framework/easyconfig.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,17 +1538,6 @@ def test_get_easyblock_class(self):
15381538
self.assertErrorRegex(EasyBuildError, "Failed to import EB_TOY", get_easyblock_class, None, name='TOY')
15391539
self.assertEqual(get_easyblock_class(None, name='TOY', error_on_failed_import=False), None)
15401540

1541-
# also test deprecated default_fallback named argument
1542-
self.assertErrorRegex(EasyBuildError, "DEPRECATED", get_easyblock_class, None, name='gzip',
1543-
default_fallback=False)
1544-
1545-
orig_value = easybuild.tools.build_log.CURRENT_VERSION
1546-
easybuild.tools.build_log.CURRENT_VERSION = '3.9'
1547-
self.mock_stderr(True)
1548-
self.assertEqual(get_easyblock_class(None, name='gzip', default_fallback=False), None)
1549-
self.mock_stderr(False)
1550-
easybuild.tools.build_log.CURRENT_VERSION = orig_value
1551-
15521541
def test_letter_dir(self):
15531542
"""Test letter_dir_for function."""
15541543
test_cases = {

0 commit comments

Comments
 (0)