diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 297890209..499ffaeaa 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -142,6 +142,8 @@ Removed - The long-deprecated `:prompt-yes`, `:prompt-no`, `:paste-primary` and `:paste` commands have been removed. +- The invocation `:download ` which was deprecated in v0.5.0 was + removed, use `:download --dest ` instead. - The `messages.unfocused` option which wasn't used anymore was removed. - The `x[xtb]` default bindings got removed again as many users accidentally triggered them. diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 370f675a8..ed0769683 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -334,12 +334,10 @@ Write the current configuration to a config.py file. [[download]] === download -Syntax: +:download [*--mhtml*] [*--dest* 'dest'] ['url'] ['dest-old']+ +Syntax: +:download [*--mhtml*] [*--dest* 'dest'] ['url']+ Download a given URL, or current page if no URL given. -The form `:download [url] [dest]` is deprecated, use `:download --dest [dest] [url]` instead. - ==== positional arguments * +'url'+: The URL to download. If not given, download the current page. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index ec84522c2..b9df08486 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1425,27 +1425,14 @@ class CommandDispatcher: raise cmdexc.CommandError(e) @cmdutils.register(instance='command-dispatcher', scope='window') - @cmdutils.argument('dest_old', hide=True) - def download(self, url=None, dest_old=None, *, mhtml_=False, dest=None): + def download(self, url=None, *, mhtml_=False, dest=None): """Download a given URL, or current page if no URL given. - The form `:download [url] [dest]` is deprecated, use `:download --dest - [dest] [url]` instead. - Args: url: The URL to download. If not given, download the current page. - dest_old: (deprecated) Same as dest. dest: The file path to write the download to, or None to ask. mhtml_: Download the current page and all assets as mhtml file. """ - if dest_old is not None: - message.warning(":download [url] [dest] is deprecated - use " - ":download --dest [dest] [url]") - if dest is not None: - raise cmdexc.CommandError("Can't give two destinations for the" - " download.") - dest = dest_old - # FIXME:qtwebengine do this with the QtWebEngine download manager? download_manager = objreg.get('qtnetwork-download-manager', scope='window', window=self._win_id) diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index 833f63cb4..26e3421a1 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -242,15 +242,6 @@ Feature: Downloading things from a website. ## Wrong invocations - Scenario: :download with deprecated dest-old argument - When I run :download http://localhost:(port)/ deprecated-argument - Then the warning ":download [url] [dest] is deprecated - use :download --dest [dest] [url]" should be shown - - Scenario: Two destinations given - When I run :download --dest destination2 http://localhost:(port)/ destination1 - Then the warning ":download [url] [dest] is deprecated - use :download --dest [dest] [url]" should be shown - And the error "Can't give two destinations for the download." should be shown - Scenario: :download --mhtml with a URL given When I run :download --mhtml http://foobar/ Then the error "Can only download the current page as mhtml." should be shown