summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-11-09 08:15:46 +0100
committerGitHub <noreply@github.com>2023-11-09 08:15:46 +0100
commit26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2 (patch)
tree3af85ee55f1f764b050f30f422573d8395f1130f /lib
parent3405fe60f177d1bfdde1b9828ea2207ecfb5b891 (diff)
downloadspack-26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2.tar.gz
spack-26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2.tar.bz2
spack-26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2.tar.xz
spack-26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2.zip
modules: remove deprecated code and test data (#40966)
This removes a few deprecated attributes from the schema of the "modules" section. Test data for deprecated options is removed as well.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/schema/modules.py18
-rw-r--r--lib/spack/spack/test/data/modules/lmod/blacklist.yaml14
-rw-r--r--lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml30
-rw-r--r--lib/spack/spack/test/data/modules/tcl/blacklist.yaml12
-rw-r--r--lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml25
-rw-r--r--lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml8
-rw-r--r--lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml2
7 files changed, 3 insertions, 106 deletions
diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py
index 3814c6810c..fb4130d345 100644
--- a/lib/spack/spack/schema/modules.py
+++ b/lib/spack/spack/schema/modules.py
@@ -18,9 +18,7 @@ import spack.schema.projections
#: IS ADDED IMMEDIATELY BELOW THE MODULE TYPE ATTRIBUTE
spec_regex = (
r"(?!hierarchy|core_specs|verbose|hash_length|defaults|filter_hierarchy_specs|hide|"
- r"whitelist|blacklist|" # DEPRECATED: remove in 0.20.
- r"include|exclude|" # use these more inclusive/consistent options
- r"projections|naming_scheme|core_compilers|all)(^\w[\w-]*)"
+ r"include|exclude|projections|naming_scheme|core_compilers|all)(^\w[\w-]*)"
)
#: Matches a valid name for a module set
@@ -46,14 +44,7 @@ module_file_configuration = {
"default": {},
"additionalProperties": False,
"properties": {
- # DEPRECATED: remove in 0.20.
- "environment_blacklist": {
- "type": "array",
- "default": [],
- "items": {"type": "string"},
- },
- # use exclude_env_vars instead
- "exclude_env_vars": {"type": "array", "default": [], "items": {"type": "string"}},
+ "exclude_env_vars": {"type": "array", "default": [], "items": {"type": "string"}}
},
},
"template": {"type": "string"},
@@ -80,11 +71,6 @@ module_type_configuration = {
"properties": {
"verbose": {"type": "boolean", "default": False},
"hash_length": {"type": "integer", "minimum": 0, "default": 7},
- # DEPRECATED: remove in 0.20.
- "whitelist": array_of_strings,
- "blacklist": array_of_strings,
- "blacklist_implicits": {"type": "boolean", "default": False},
- # whitelist/blacklist have been replaced with include/exclude
"include": array_of_strings,
"exclude": array_of_strings,
"exclude_implicits": {"type": "boolean", "default": False},
diff --git a/lib/spack/spack/test/data/modules/lmod/blacklist.yaml b/lib/spack/spack/test/data/modules/lmod/blacklist.yaml
deleted file mode 100644
index 8c88214380..0000000000
--- a/lib/spack/spack/test/data/modules/lmod/blacklist.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-# DEPRECATED: remove this in v0.20
-# See `exclude.yaml` for the new syntax
-enable:
- - lmod
-lmod:
- core_compilers:
- - 'clang@3.3'
- hierarchy:
- - mpi
- blacklist:
- - callpath
-
- all:
- autoload: direct
diff --git a/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml b/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml
deleted file mode 100644
index 997501e08b..0000000000
--- a/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-# DEPRECATED: remove this in v0.20
-# See `alter_environment.yaml` for the new syntax
-enable:
- - lmod
-lmod:
- core_compilers:
- - 'clang@3.3'
-
- hierarchy:
- - mpi
-
- all:
- autoload: none
- filter:
- environment_blacklist:
- - CMAKE_PREFIX_PATH
- environment:
- set:
- '{name}_ROOT': '{prefix}'
-
- 'platform=test target=x86_64':
- environment:
- set:
- FOO: 'foo'
- unset:
- - BAR
-
- 'platform=test target=core2':
- load:
- - 'foo/bar'
diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist.yaml
deleted file mode 100644
index 4ffeb135e9..0000000000
--- a/lib/spack/spack/test/data/modules/tcl/blacklist.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-# DEPRECATED: remove this in v0.20
-# See `exclude.yaml` for the new syntax
-enable:
- - tcl
-tcl:
- whitelist:
- - zmpi
- blacklist:
- - callpath
- - mpi
- all:
- autoload: direct
diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml
deleted file mode 100644
index 128200d6ec..0000000000
--- a/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# DEPRECATED: remove this in v0.20
-# See `alter_environment.yaml` for the new syntax
-enable:
- - tcl
-tcl:
- all:
- autoload: none
- filter:
- environment_blacklist:
- - CMAKE_PREFIX_PATH
- environment:
- set:
- '{name}_ROOT': '{prefix}'
-
- 'platform=test target=x86_64':
- environment:
- set:
- FOO: 'foo'
- OMPI_MCA_mpi_leave_pinned: '1'
- unset:
- - BAR
-
- 'platform=test target=core2':
- load:
- - 'foo/bar'
diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml
deleted file mode 100644
index b49bc80b5e..0000000000
--- a/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-# DEPRECATED: remove this in v0.20
-# See `exclude_implicits.yaml` for the new syntax
-enable:
- - tcl
-tcl:
- blacklist_implicits: true
- all:
- autoload: direct
diff --git a/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml b/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml
index b03f966c7c..75b4cd09d2 100644
--- a/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml
+++ b/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml
@@ -4,7 +4,7 @@ tcl:
all:
autoload: none
filter:
- environment_blacklist:
+ exclude_env_vars:
- CMAKE_PREFIX_PATH
environment:
set: