Skip to content

Commit bf6b637

Browse files
committed
Rename parallelLegacy to _parallelLegacy
1 parent 060a960 commit bf6b637

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

easybuild/framework/easyblock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,9 +2248,9 @@ def set_parallel(self):
22482248
self.log.debug("Desired parallelism specified via 'parallel' build option: %s", par)
22492249

22502250
# Transitional only in case some easyblocks still set/change cfg['parallel']
2251-
# Use parallelLegacy to avoid deprecation warnings
2251+
# Use _parallelLegacy to avoid deprecation warnings
22522252
# Remove for EasyBuild 5.0
2253-
cfg_par = self.cfg['parallelLegacy']
2253+
cfg_par = self.cfg['_parallelLegacy']
22542254
if cfg_par is not None:
22552255
if par is None:
22562256
par = cfg_par

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def new_ec_method(self, key, *args, **kwargs):
122122
_log.deprecated("Easyconfig parameter 'parallel' is deprecated, "
123123
"use 'maxparallel' or the parallel property instead.", '5.0')
124124
# Use a "hidden" property for now to match behavior as closely as possible
125-
key = 'parallelLegacy'
125+
key = '_parallelLegacy'
126126
elif key in DEPRECATED_PARAMETERS:
127127
depr_key = key
128128
key, ver = DEPRECATED_PARAMETERS[depr_key]
@@ -145,7 +145,9 @@ def is_local_var_name(name):
145145
"""
146146
res = False
147147
if name.startswith(LOCAL_VAR_PREFIX) or name.startswith('_'):
148-
res = True
148+
# Remove with EasyBuild 5.0
149+
if name != '_parallelLegacy':
150+
res = True
149151
# __builtins__ is always defined as a 'local' variables
150152
# single-letter local variable names are allowed (mainly for use in list comprehensions)
151153
# in Python 2, variables defined in list comprehensions leak to the outside (no longer the case in Python 3)
@@ -519,7 +521,7 @@ def __init__(self, path, extra_options=None, build_specs=None, validate=True, hi
519521
# Storage for parallel property. Mark as unset initially
520522
self._parallel = None
521523
# Legacy value, remove with EasyBuild 5.0
522-
self._config['parallelLegacy'] = [None, '', ('', )]
524+
self._config['_parallelLegacy'] = [None, '', ('', )]
523525

524526
# parse easyconfig file
525527
self.build_specs = build_specs
@@ -726,7 +728,7 @@ def parse(self):
726728
if 'parallel' in ec_vars:
727729
# Replace value and issue better warning for EC params (as opposed to warnings meant for easyblocks)
728730
self.log.deprecated("Easyconfig parameter 'parallel' is deprecated, use 'maxparallel' instead.", '5.0')
729-
ec_vars['parallelLegacy'] = ec_vars.pop('parallel')
731+
ec_vars['_parallelLegacy'] = ec_vars.pop('parallel')
730732

731733
# provide suggestions for typos. Local variable names are excluded from this check
732734
possible_typos = [(key, difflib.get_close_matches(key.lower(), self._config.keys(), 1, 0.85))
@@ -1248,7 +1250,7 @@ def parallel(self, value):
12481250
self._parallel = value
12491251
self.template_values['parallel'] = value
12501252
# Backwards compat only. Remove with EasyBuild 5.0
1251-
self._config['parallelLegacy'][0] = value
1253+
self._config['_parallelLegacy'][0] = value
12521254

12531255
def dump(self, fp, always_overwrite=True, backup=False, explicit_toolchains=False):
12541256
"""

0 commit comments

Comments
 (0)