Skip to content

Commit

Permalink
Remove deprecated option --print-deps-only
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzymadness committed Nov 8, 2021
1 parent 4bb6244 commit 1246dbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion src/tox_current_env/hooks3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def tox_addoption(parser):
action="store_true",
dest="print_deps_only",
default=False,
help="Deprecated, equivalent to `--print-deps-to -`",
help="Deprecated, equivalent to `--print-deps-to -`. Not available with tox 4.",
)
parser.add_argument(
"--print-deps-to",
Expand Down
19 changes: 0 additions & 19 deletions src/tox_current_env/hooks4.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ def tox_add_option(parser):
default=False,
help="Run tests in current environment, not creating any virtual environment",
)
parser.add_argument(
"--print-deps-only",
action="store_true",
dest="print_deps_only",
default=False,
help="Deprecated, equivalent to `--print-deps-to -`",
)
parser.add_argument(
"--print-deps-to",
"--print-deps-to-file",
Expand Down Expand Up @@ -62,18 +55,6 @@ def tox_add_core_config(core_conf, config):
config.options.default_runner = "current-env"
return

if config.options.print_deps_only:
warnings.warn(
"--print-deps-only is deprecated; use `--print-deps-to -`",
DeprecationWarning,
)
if not config.options.print_deps_to:
config.options.print_deps_to = sys.stdout
else:
raise RuntimeError(
"--print-deps-only cannot be used together " "with --print-deps-to"
)

if getattr(config.options.print_deps_to, "name", object()) == getattr(
config.options.print_extras_to, "name", object()
):
Expand Down

0 comments on commit 1246dbc

Please sign in to comment.