diff options
author | Alec Scott <hi@alecbcs.com> | 2024-08-18 23:28:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 08:28:19 +0200 |
commit | 428b4e340a61610fb10f9843e4a66fca99a661a7 (patch) | |
tree | d5805c7efb6aa91ae5b282e45ab1c51fd5442d14 /lib | |
parent | 20bf239a6acb9b17e0578bb8065a215ac7e4d7a8 (diff) | |
download | spack-428b4e340a61610fb10f9843e4a66fca99a661a7.tar.gz spack-428b4e340a61610fb10f9843e4a66fca99a661a7.tar.bz2 spack-428b4e340a61610fb10f9843e4a66fca99a661a7.tar.xz spack-428b4e340a61610fb10f9843e4a66fca99a661a7.zip |
Remove deprecated `--safe-only` in spack version cmd (#45765)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/versions.py | 15 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/versions.py | 7 |
2 files changed, 3 insertions, 19 deletions
diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index fb1a303713..2735b6a31f 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -24,11 +24,6 @@ def setup_parser(subparser): "-s", "--safe", action="store_true", help="only list safe versions of the package" ) output.add_argument( - "--safe-only", - action="store_true", - help="[deprecated] only list safe versions of the package", - ) - output.add_argument( "-r", "--remote", action="store_true", help="only list remote versions of the package" ) output.add_argument( @@ -47,17 +42,13 @@ def versions(parser, args): safe_versions = pkg.versions - if args.safe_only: - tty.warn('"--safe-only" is deprecated. Use "--safe" instead.') - args.safe = args.safe_only - if not (args.remote or args.new): if sys.stdout.isatty(): tty.msg("Safe versions (already checksummed):") if not safe_versions: if sys.stdout.isatty(): - tty.warn("Found no versions for {0}".format(pkg.name)) + tty.warn(f"Found no versions for {pkg.name}") tty.debug("Manually add versions to the package.") else: colify(sorted(safe_versions, reverse=True), indent=2) @@ -83,12 +74,12 @@ def versions(parser, args): if not remote_versions: if sys.stdout.isatty(): if not fetched_versions: - tty.warn("Found no versions for {0}".format(pkg.name)) + tty.warn(f"Found no versions for {pkg.name}") tty.debug( "Check the list_url and list_depth attributes of " "the package to help Spack find versions." ) else: - tty.warn("Found no unchecksummed versions for {0}".format(pkg.name)) + tty.warn(f"Found no unchecksummed versions for {pkg.name}") else: colify(sorted(remote_versions, reverse=True), indent=2) diff --git a/lib/spack/spack/test/cmd/versions.py b/lib/spack/spack/test/cmd/versions.py index 8506be8221..542365dacb 100644 --- a/lib/spack/spack/test/cmd/versions.py +++ b/lib/spack/spack/test/cmd/versions.py @@ -11,13 +11,6 @@ from spack.version import Version versions = SpackCommand("versions") -def test_safe_only_versions(): - """Only test the safe versions of a package. - (Using the deprecated command line argument) - """ - versions("--safe-only", "zlib") - - def test_safe_versions(): """Only test the safe versions of a package.""" |