From 5356e9f268fceaf1aa9bb0a03ce2f1aa4dce194d Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 23 Nov 2022 20:37:03 +0100 Subject: [PATCH] feat: add manage.py backward compatible script Part-of: --- api/manage.py | 15 +++++++++++++++ changes/changelog.d/manage-py.deprecation | 1 + 2 files changed, 16 insertions(+) create mode 100755 api/manage.py create mode 100644 changes/changelog.d/manage-py.deprecation diff --git a/api/manage.py b/api/manage.py new file mode 100755 index 000000000..ed67fd617 --- /dev/null +++ b/api/manage.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import warnings + +from funkwhale_api.main import main + +warnings.warn( + DeprecationWarning( + "the './manage.py' script has been deprecated, please use the 'funkwhale-manage' " + "entrypoint instead (e.g. 'funkwhale-manage migrate')" + ) +) + +if __name__ == "__main__": + SystemExit(main()) diff --git a/changes/changelog.d/manage-py.deprecation b/changes/changelog.d/manage-py.deprecation new file mode 100644 index 000000000..ebc8963ff --- /dev/null +++ b/changes/changelog.d/manage-py.deprecation @@ -0,0 +1 @@ +Deprecate the api manage.py script in favor of the funkwhale-manage entrypoint