diff options
-rw-r--r-- | .github/CONTRIBUTING.asciidoc | 6 | ||||
-rw-r--r-- | doc/changelog.asciidoc | 5 | ||||
-rw-r--r-- | doc/help/commands.asciidoc | 5 | ||||
-rw-r--r-- | doc/help/settings.asciidoc | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-check-manifest.txt | 4 | ||||
-rw-r--r-- | misc/requirements/requirements-dev.txt | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-flake8.txt | 6 | ||||
-rw-r--r-- | misc/requirements/requirements-mypy.txt | 10 | ||||
-rw-r--r-- | misc/requirements/requirements-pyinstaller.txt | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-pylint.txt | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-pyroma.txt | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-sphinx.txt | 2 | ||||
-rw-r--r-- | misc/requirements/requirements-tests.txt | 6 | ||||
-rw-r--r-- | misc/requirements/requirements-tox.txt | 6 | ||||
-rw-r--r-- | misc/requirements/requirements-yamllint.txt | 2 | ||||
-rwxr-xr-x | misc/userscripts/qute-pass | 21 | ||||
-rw-r--r-- | qutebrowser/browser/hints.py | 27 | ||||
-rw-r--r-- | qutebrowser/browser/webengine/notification.py | 5 | ||||
-rw-r--r-- | qutebrowser/config/configdata.yml | 4 | ||||
-rw-r--r-- | requirements.txt | 4 |
20 files changed, 66 insertions, 57 deletions
diff --git a/.github/CONTRIBUTING.asciidoc b/.github/CONTRIBUTING.asciidoc index bf9f0e66b..0d03af336 100644 --- a/.github/CONTRIBUTING.asciidoc +++ b/.github/CONTRIBUTING.asciidoc @@ -5,11 +5,11 @@ open pull requests. - Before you start to work on something, please leave a comment on the relevant issue (or open one). This makes sure there is no duplicate work done. -- Either run the testsuite locally, or keep an eye on Travis CI / AppVeyor - after pushing changes. +- Either run the testsuite locally, or keep an eye on the CI at the end of the + pull request page after pushing changes. - If you are stuck somewhere or have questions, - https://github.com/qutebrowser/qutebrowser#getting-help[please ask]! + https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/index.asciidoc#getting-help[please ask]! See the link:../doc/contributing.asciidoc[full contribution documentation] for details and other useful hints. diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index e75bee169..68b5a7502 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -31,6 +31,8 @@ Fixed - Switching tabs via mouse wheel scrolling now works properly on macOS. Set `tabs.mousewheel_switching` to false if you prefer the previous behavior. +- Speculative fix for a crash when closing qutebrowser while a systray + notification is shown. Changed ~~~~~~~ @@ -41,6 +43,9 @@ Changed displaying a download prompt. - In Greasemonkey scripts, using "overrideMimeType" with GM_xmlhttpRequest is now supported. +- `:hint --rapid` is now supported for the `tab` hinting target no matter what + `tabs.background` is set to, as there are various scenarios where tabs can + open in the background. [[v2.3.1]] v2.3.1 (2021-07-28) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index f570a3ffd..49b17c3df 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -679,9 +679,8 @@ Start hinting. * +*-a*+, +*--add-history*+: Whether to add the spawned or yanked link to the browsing history. * +*-r*+, +*--rapid*+: Whether to do rapid hinting. With rapid hinting, the hint mode isn't left after a hint is followed, so you can easily - open multiple links. This is only possible with targets - `tab` (with `tabs.background=true`), `tab-bg`, - `window`, `run`, `hover`, `userscript` and `spawn`. + open multiple links. Note this won't work with targets + `tab-fg`, `fill`, `delete` and `right-click`. * +*-f*+, +*--first*+: Click the first hinted element without prompting. diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index d993ddddd..9b896107f 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -2254,7 +2254,7 @@ Default: +pass:[true]+ [[content.headers.referer]] === content.headers.referer When to send the Referer header. -The Referer header tells websites from which website you were coming from when visiting them. +The Referer header tells websites from which website you were coming from when visiting them. Note that with QtWebEngine, websites can override this preference by setting the `Referrer-Policy:` header, so that any websites visited from them get the full referer. No restart is needed with QtWebKit. This setting requires a restart. diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 6a3bc3756..d90908f76 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,9 +1,9 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==0.5.1 +build==0.6.0.post1 check-manifest==0.46 packaging==21.0 pep517==0.11.0 pyparsing==2.4.7 toml==0.10.2 -tomli==1.2.0 +tomli==1.2.1 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index daa926515..802d525d7 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -9,7 +9,7 @@ Deprecated==1.2.12 github3.py==2.0.0 hunter==3.3.8 idna==3.2 -jwcrypto==0.9.1 +jwcrypto==1.0 manhole==1.8.0 packaging==21.0 pycparser==2.20 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index cc041b538..eb3a04cbc 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -4,7 +4,7 @@ attrs==21.2.0 flake8==3.9.2 flake8-bugbear==21.4.3 flake8-builtins==1.5.3 -flake8-comprehensions==3.5.0 +flake8-comprehensions==3.6.0 flake8-copyright==0.2.2 flake8-debugger==4.0.0 flake8-deprecated==1.3 @@ -13,10 +13,10 @@ flake8-future-import==0.4.6 flake8-mock==0.3 flake8-polyfill==1.0.2 flake8-string-format==0.3.0 -flake8-tidy-imports==4.3.0 +flake8-tidy-imports==4.4.1 flake8-tuple==0.4.1 mccabe==0.6.1 -pep8-naming==0.12.0 +pep8-naming==0.12.1 pycodestyle==2.7.0 pydocstyle==6.1.1 pyflakes==2.3.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 20f6214cf..d652ff2a2 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,8 +1,8 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==4.0.0 -diff-cover==6.2.1 -importlib-metadata==4.6.3 +diff-cover==6.3.1 +importlib-metadata==4.6.4 importlib-resources==5.2.2 inflect==5.3.0 Jinja2==3.0.1 @@ -12,10 +12,10 @@ MarkupSafe==2.0.1 mypy==0.910 mypy-extensions==0.4.3 pluggy==0.13.1 -Pygments==2.9.0 +Pygments==2.10.0 PyQt5-stubs==5.15.2.0 toml==0.10.2 -types-dataclasses==0.1.5 -types-PyYAML==5.4.3 +types-dataclasses==0.1.7 +types-PyYAML==5.4.6 typing-extensions==3.10.0.0 zipp==3.5.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 47a7a77f8..480069c21 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py altgraph==0.17 -pyinstaller==4.5 +pyinstaller==4.5.1 pyinstaller-hooks-contrib==2021.2 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index d67faefee..0f9750f11 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -10,7 +10,7 @@ future==0.18.2 github3.py==2.0.0 idna==3.2 isort==4.3.21 -jwcrypto==0.9.1 +jwcrypto==1.0 lazy-object-proxy==1.4.3 mccabe==0.6.1 pefile==2021.5.24 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 8391a4e80..f8c789932 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -4,7 +4,7 @@ certifi==2021.5.30 charset-normalizer==2.0.4 docutils==0.17.1 idna==3.2 -Pygments==2.9.0 +Pygments==2.10.0 pyroma==3.2 requests==2.26.0 urllib3==1.26.6 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index f8d30ead9..e969e3809 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -10,7 +10,7 @@ imagesize==1.2.0 Jinja2==3.0.1 MarkupSafe==2.0.1 packaging==21.0 -Pygments==2.9.0 +Pygments==2.10.0 pyparsing==2.4.7 pytz==2021.1 requests==2.26.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index bf500a9dd..66eef0d24 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,8 +13,8 @@ filelock==3.0.12 Flask==2.0.1 glob2==0.7 hunter==3.3.8 -hypothesis==6.14.5 -icdiff==2.0.3 +hypothesis==6.14.7 +icdiff==2.0.4 idna==3.2 iniconfig==1.1.1 itsdangerous==2.0.1 @@ -31,7 +31,7 @@ pluggy==0.13.1 pprintpp==0.4.0 py==1.10.0 py-cpuinfo==8.0.0 -Pygments==2.9.0 +Pygments==2.10.0 pyparsing==2.4.7 pytest==6.2.4 pytest-bdd==4.1.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 638ec62ae..962da1f5e 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -4,7 +4,7 @@ backports.entry-points-selectable==1.1.0 distlib==0.3.2 filelock==3.0.12 packaging==21.0 -pip==21.2.2 +pip==21.2.4 platformdirs==2.2.0 pluggy==0.13.1 py==1.10.0 @@ -13,5 +13,5 @@ setuptools==57.4.0 six==1.16.0 toml==0.10.2 tox==3.24.1 -virtualenv==20.7.0 -wheel==0.36.2 +virtualenv==20.7.2 +wheel==0.37.0 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index cae97eeb6..31b751b19 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -2,4 +2,4 @@ pathspec==0.9.0 PyYAML==5.4.1 -yamllint==1.26.1 +yamllint==1.26.2 diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass index d7b0af819..76a82e9c3 100755 --- a/misc/userscripts/qute-pass +++ b/misc/userscripts/qute-pass @@ -23,11 +23,12 @@ demonstration can be seen here: https://i.imgur.com/KN3XuZP.gif. """ USAGE = """The domain of the site has to appear as a segment in the pass path, -for example: "github.com/cryzed" or "websites/github.com". How the username and -password are determined is freely configurable using the CLI arguments. As an -example, if you instead store the username as part of the secret (and use a -site's name as filename), instead of the default configuration, use -`--username-target secret` and `--username-pattern "username: (.+)"`. +for example: "github.com/cryzed" or "websites/github.com". Alternatively the +parameter `--unfiltered` may be used to get a list of all passwords. How the +username and password are determined is freely configurable using the CLI +arguments. As an example, if you instead store the username as part of the +secret (and use a site's name as filename), instead of the default configuration, +use `--username-target secret` and `--username-pattern "username: (.+)"`. The login information is inserted by emulating key events using qutebrowser's fake-key command in this manner: [USERNAME]<Tab>[PASSWORD], which is compatible @@ -92,6 +93,8 @@ argument_parser.add_argument('--merge-candidates', '-m', action='store_true', help='Merge pass candidates for fully-qualified and registered domain name') argument_parser.add_argument('--extra-url-suffixes', '-s', default='', help='Comma-separated string containing extra suffixes (e.g local)') +argument_parser.add_argument('--unfiltered', dest='unfiltered', action='store_true', + help='Show an unfiltered selection of all passwords in the store') argument_parser.add_argument('--always-show-selection', dest='always_show_selection', action='store_true', help='Always show selection, even if there is only a single match') group = argument_parser.add_mutually_exclusive_group() @@ -125,14 +128,14 @@ def qute_command(command): fifo.flush() -def find_pass_candidates(domain): +def find_pass_candidates(domain, unfiltered=False): candidates = [] if arguments.mode == "gopass": all_passwords = subprocess.run(["gopass", "list", "--flat" ], stdout=subprocess.PIPE).stdout.decode("UTF-8").splitlines() for password in all_passwords: - if domain in password: + if unfiltered or domain in password: candidates.append(password) else: for path, directories, file_names in os.walk(arguments.password_store, followlinks=True): @@ -145,7 +148,7 @@ def find_pass_candidates(domain): split_path = pass_path.split(os.path.sep) for secret in secrets: secret_base = os.path.splitext(secret)[0] - if domain not in (split_path + [secret_base]): + if not unfiltered and domain not in (split_path + [secret_base]): continue candidates.append(os.path.join(pass_path, secret_base)) @@ -225,7 +228,7 @@ def main(arguments): for target in filter(None, [extract_result.fqdn, extract_result.registered_domain, extract_result.ipv4, private_domain]): attempted_targets.append(target) - target_candidates = find_pass_candidates(target) + target_candidates = find_pass_candidates(target, unfiltered=arguments.unfiltered) if not target_candidates: continue diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index e127cd10a..6ac44adbc 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -684,9 +684,8 @@ class HintManager(QObject): Args: rapid: Whether to do rapid hinting. With rapid hinting, the hint mode isn't left after a hint is followed, so you can easily - open multiple links. This is only possible with targets - `tab` (with `tabs.background=true`), `tab-bg`, - `window`, `run`, `hover`, `userscript` and `spawn`. + open multiple links. Note this won't work with targets + `tab-fg`, `fill`, `delete` and `right-click`. add_history: Whether to add the spawned or yanked link to the browsing history. first: Click the first hinted element without prompting. @@ -754,18 +753,16 @@ class HintManager(QObject): if mode_manager.mode == usertypes.KeyMode.hint: modeman.leave(self._win_id, usertypes.KeyMode.hint, 're-hinting') - if rapid: - if target in [Target.tab_bg, Target.window, Target.run, - Target.hover, Target.userscript, Target.spawn, - Target.download, Target.normal, Target.current, - Target.yank, Target.yank_primary]: - pass - elif target == Target.tab and config.val.tabs.background: - pass - else: - name = target.name.replace('_', '-') - raise cmdutils.CommandError("Rapid hinting makes no sense " - "with target {}!".format(name)) + no_rapid_targets = [ + Target.tab_fg, # opens new tab + Target.fill, # exits hint mode + Target.right_click, # opens multiple context menus + Target.delete, # deleting elements shifts them + ] + if rapid and target in no_rapid_targets: + name = target.name.replace('_', '-') + raise cmdutils.CommandError( + f"Rapid hinting makes no sense with target {name}!") self._check_args(target, *args) diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py index 6b26157e6..e40b3e736 100644 --- a/qutebrowser/browser/webengine/notification.py +++ b/qutebrowser/browser/webengine/notification.py @@ -66,6 +66,7 @@ if TYPE_CHECKING: from qutebrowser.config import config from qutebrowser.misc import objects from qutebrowser.utils import qtutils, log, utils, debug, message, version +from qutebrowser.qt import sip bridge: Optional['NotificationBridgePresenter'] = None @@ -477,7 +478,9 @@ class SystrayNotificationAdapter(AbstractNotificationAdapter): @pyqtSlot(int) def on_web_closed(self, notification_id: int) -> None: assert notification_id == self.NOTIFICATION_ID, notification_id - self._systray.hide() + if not sip.isdeleted(self._systray): + # This can get called during shutdown + self._systray.hide() class MessagesNotificationAdapter(AbstractNotificationAdapter): diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 5f5a71b06..17f2013b9 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -649,7 +649,9 @@ content.headers.referer: When to send the Referer header. The Referer header tells websites from which website you were coming from - when visiting them. + when visiting them. Note that with QtWebEngine, websites can override this + preference by setting the `Referrer-Policy:` header, so that any websites + visited from them get the full referer. No restart is needed with QtWebKit. diff --git a/requirements.txt b/requirements.txt index 5cd4024f7..378b482de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,11 +3,11 @@ adblock==0.5.0 colorama==0.4.4 dataclasses==0.6 ; python_version<"3.7" -importlib-metadata==4.6.3 ; python_version<"3.8" +importlib-metadata==4.6.4 ; python_version<"3.8" importlib-resources==5.2.2 ; python_version<"3.9" Jinja2==3.0.1 MarkupSafe==2.0.1 -Pygments==2.9.0 +Pygments==2.10.0 PyYAML==5.4.1 typing-extensions==3.10.0.0 zipp==3.5.0 |