From 62d960cc1b1a38174673d61f5a2d36aabd79a830 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Tue, 14 Apr 2020 16:50:04 +0200 Subject: [PATCH] completion: removing argcomplete support this feature doesn't seem to be working anyway. This can be revisited in the future but this allows us to drop the python3-argcomplete dependency for now Signed-off-by: Julien Fortin --- README.rst | 2 +- debian/control | 2 +- debian/ifupdown2.bash-completion | 1 - docs/source/gettingstarted.rst | 2 +- ifupdown2/completion/ifup | 9 --------- ifupdown2/ifupdown/argv.py | 2 -- setup.py | 1 - 7 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 debian/ifupdown2.bash-completion delete mode 100644 ifupdown2/completion/ifup diff --git a/README.rst b/README.rst index c6a5e75..fd3216a 100644 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ You might need to manually download dependencies. Mandatory dependencies: .. code-block:: console - $ apt-get install build-essential devscripts dh-systemd fakeroot python-all python-docutils iproute2 python-ipaddr python-argcomplete python-setuptools + $ apt-get install build-essential devscripts dh-systemd fakeroot python-all python-docutils iproute2 python-ipaddr python-setuptools Suggested dependencies: diff --git a/debian/control b/debian/control index 1a615db..0ceb560 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Architecture: all Provides: ifupdown Conflicts: ifupdown Replaces: ifupdown -Depends: ${python3:Depends}, ${misc:Depends}, iproute2, python3-argcomplete +Depends: ${python3:Depends}, ${misc:Depends}, iproute2 Suggests: isc-dhcp-client, bridge-utils, ethtool, python3-gvgen, python3-mako Description: Network Interface Management tool similar to ifupdown ifupdown2 is ifupdown re-written in Python. It replaces ifupdown and provides diff --git a/debian/ifupdown2.bash-completion b/debian/ifupdown2.bash-completion deleted file mode 100644 index a136a3e..0000000 --- a/debian/ifupdown2.bash-completion +++ /dev/null @@ -1 +0,0 @@ -ifupdown2/completion/ifup diff --git a/docs/source/gettingstarted.rst b/docs/source/gettingstarted.rst index 4d7f6cb..5829689 100644 --- a/docs/source/gettingstarted.rst +++ b/docs/source/gettingstarted.rst @@ -6,7 +6,7 @@ Prerequisites * python-ifupdown2 is currently only tested on debian wheezy * python-ifupdown2 needs python version 2.6 or greater * Depends on: python-stdeb (for deb builds), python-docutils - (for rst2man), python-argcomplete, 'python-ipaddr' + (for rst2man), 'python-ipaddr' * Depends on python-gvgen package for printing interface graphs (this will be made optional in the future) * Optional dependency for template engine: python-mako diff --git a/ifupdown2/completion/ifup b/ifupdown2/completion/ifup deleted file mode 100644 index 0be547f..0000000 --- a/ifupdown2/completion/ifup +++ /dev/null @@ -1,9 +0,0 @@ - -_python_argcomplete() { - local IFS=' ' - COMPREPLY=( $(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1 "$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) ) - if [[ $? != 0 ]]; then - unset COMPREPLY - fi -} -complete -F _python_argcomplete ifup ifdown ifquery ifreload diff --git a/ifupdown2/ifupdown/argv.py b/ifupdown2/ifupdown/argv.py index 5a27164..cb32e05 100644 --- a/ifupdown2/ifupdown/argv.py +++ b/ifupdown2/ifupdown/argv.py @@ -8,7 +8,6 @@ import sys import argparse -import argcomplete try: from ifupdown2.ifupdown.utils import utils @@ -77,7 +76,6 @@ class Parse: elif self.op == 'query': self.update_ifquery_argparser(argparser) self.update_common_argparser(argparser) - argcomplete.autocomplete(argparser) try: self.args = argparser.parse_args(self.argv) diff --git a/setup.py b/setup.py index 1831e5e..4c342c9 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,6 @@ from setuptools import setup from setuptools import find_packages INSTALL_REQUIRES = [ - 'argcomplete', ] DATA_FILES = [