diff --git a/swh/provenance/cli.py b/swh/provenance/cli.py --- a/swh/provenance/cli.py +++ b/swh/provenance/cli.py @@ -105,19 +105,6 @@ atexit.register(exit) -@cli.command(name="create", deprecated=True) -@click.option("--maintenance-db", default=None) -@click.option("--drop/--no-drop", "drop_db", default=False) -@click.pass_context -def create(ctx, maintenance_db, drop_db): - """Deprecated, please use: - swh db create provenance - and - swh db init provenance - instead. - """ - - @cli.command(name="iter-revisions") @click.argument("filename") @click.option("-a", "--track-all", default=True, type=bool) diff --git a/swh/provenance/tests/test_cli.py b/swh/provenance/tests/test_cli.py --- a/swh/provenance/tests/test_cli.py +++ b/swh/provenance/tests/test_cli.py @@ -6,7 +6,6 @@ from click.testing import CliRunner import psycopg2 import pytest -import yaml from swh.core.cli import swh as swhmain import swh.core.cli.db # noqa ; ensure cli is loaded @@ -20,7 +19,6 @@ assert "Commands:" in result.output commands = result.output.split("Commands:")[1] for command in ( - "create", "find-all", "find-first", "iter-origins", @@ -29,22 +27,6 @@ assert f" {command} " in commands -def test_cli_create_deprecated(provenance_db, tmp_path): - conffile = tmp_path / "config.yml" - conf = { - "provenance": { - "cls": "local", - "with_path": True, - }, - } - yaml.dump(conf, conffile.open("w")) - result = CliRunner().invoke( - swhmain, ["provenance", "--config-file", str(conffile), "create", "--drop"] - ) - assert result.exit_code == 0, result.output - assert "DeprecationWarning" in result.output - - TABLES = { "dbflavor", "dbversion",