Age | Commit message (Collapse) | Author |
|
|
|
|
|
This reverts commit 60e3775160b50721ae6d72ce32feae83df494164.
|
|
|
|
Closes #6298
|
|
See #6298
|
|
|
|
|
|
Otherwise, when e.g. doing "<Meta+Up>": "gg" in bindings.key_mappings,
there's a crash like:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 105, in eventFilter
return handler(typing.cast(QKeyEvent, event))
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 75, in _handle_key_event
return man.handle_event(event)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 462, in handle_event
return handler(cast(QKeyEvent, event))
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 283, in _handle_keypress
match = parser.handle(event, dry_run=dry_run)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeparsers.py", line 105, in handle
match = super().handle(e, dry_run=dry_run)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 309, in handle
result = self._match_key_mapping(result.sequence)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 246, in _match_key_mapping
mapped = sequence.with_mappings(
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/keyutils.py", line 675, in with_mappings
assert len(new_seq) == 1
AssertionError
While this isn't the intended way to use this setting, we shouldn't
crash - and let's just make it work instead of forbidding it.
|
|
|
|
|
|
|
|
Otherwise, if there's a fatal error message shown during init, we try to
open something via IPC before we're fully initialized. This can e.g.
lead to a KeyError for qtnetwork-download-manager:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qutebrowser/app.py", line 120, in <lambda>
process_pos_args(args, cwd=cwd, via_ipc=True,
File "/usr/lib/python3/dist-packages/qutebrowser/app.py", line 230, in process_pos_args
win_id = mainwindow.get_window(via_ipc, force_window=True)
File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 89, in get_window
window = MainWindow(private=None)
File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 220, in __init__
self._init_downloadmanager()
File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 350, in _init_downloadmanager
qtnetwork_download_manager = objreg.get('qtnetwork-download-manager')
File "/usr/lib/python3/dist-packages/qutebrowser/utils/objreg.py", line 249, in get
return reg[name]
File "/usr/lib/python3.8/collections/__init__.py", line 1010, in __getitem__
raise KeyError(key)
KeyError: 'qtnetwork-download-manager'
|
|
|
|
|
|
|
|
|
|
Fixes #3418
|
|
|
|
With QtNetwork, we can get multiple errors at once (reproduced e.g. by
using the Superfish certificate on badssl.com). With QtWebEngine, we can
only get one error.
Things like "is this error coming from a third-party resource" are hard
to reason about if there is a list of errors, so change
CertificateErrorWrapper so that it's exposed as one single error to the
rest of the code.
|
|
This was added in d385206ea0d3470826242fcda79f1917e8746cda 'to not hang on unexpected SSL errors', but there is no reason those should happen in tests.
|
|
Closes #5156
|
|
Pathlib /tests/conftest.py
|
|
|
|
|
|
|
|
|
|
|
|
Pathlib /unit/javascript
|
|
|
|
|
|
As for the mypy unreachable warning, see:
See https://github.com/python/mypy/issues/7214
and https://github.com/python/mypy/issues/8766
Includes cherry-pick of 27ad47825279a39141efd11ec9cc54ff2a872517
|
|
This makes CompletionParser.parse simpler and makes ParseResult.cmd and
.args non-Optional. Them being Optional would mean we would've to either
resort to more complex typing with Literal, or to check whether they are
really non-None everywhere.
Since fallback=True is only used at one point, let's just handle this at
the calling site instead.
In theory, this changes the behavior when the cmdstr is empty and
self._partial_match is set, because we now raise early and
self._completion_match isn't called anymore. In practice, I think this
shouldn't make a difference anywhere, and tests seem to agree.
If cmdstr is empty and self._partial_match is False, the behavior should
be the same, because objects.commands[''] will raise KeyError.
|
|
|
|
|
|
See https://github.com/qutebrowser/qutebrowser/pull/5967#issuecomment-791373157
but no issues with circular imports here, from what I can see...
|
|
|
|
We need to import the module before a QApplication is created, so that
it can set everything up properly. This needs to happen even with the
QtWebKit backend configured, so that a proper error can be printed later
in backendproblem.py if QtWebKit is unavailable.
For QtWebEngine, this is done implicitly in qtargs.py before getting
QtWebEngine arguments.
For QtWebKit, this used to be done implicitly via version.py importing
webenginesettings, but that's not the case anymore since
fb0154ae26b09accc08c9ab7fa7cbcbe9fe2578c.
Either way, it's better to be explicit about this.
|
|
Paths are different on macOS/Windows
|
|
|
|
|
|
See #6300
|
|
|
|
|
|
|
|
See #6300
(cherry picked from commit 9f67a763ef86805f0981f037ccd2fb5cb0e84b88)
|
|
|
|
Fixes #6302
|
|
arount the OTP token is omitted
|
|
|