Age | Commit message (Collapse) | Author |
|
If we are e.g. loading a secondary file via config.source() before
config.load_autoconfig(False) has been called in the main one, we don't
care about the warning. Neither should :config-source fail if we started
with the warning for the main config.
Fixes #6099
|
|
(cherry picked from commit 985c711e49d9503e52964766fceda78802aae656)
|
|
|
|
- Re-add the force_rebuild key which we need internally again. This
partially reverts changes from:
* cd0000f728459f208c4cf69f29b603fbcab6ffb4
* 1a9b59fcfa73d1505834d8461ee166f07fb201cd
* 93ecd8f72f108743948f0d1881055ff2337058ec
- Instead of checking self.completion to figure out whether we need to
rebuild anything, check 'self' (i.e. the History table, not the
CompletionHistory table). If something went wrong during the last
rebuild, the CompletionHistory might still be empty, but History is what
actually matters to figure out whether to rebuild.
- Set force_rebuild while rebuilding the history, so that a possible
interruption of the process (e.g. by a killed process or crash)
results in another rebuild from scratch.
- Bump up the user version again, so that we re-add force_rebuild to the
database. This also forces another rebuild which helps with possible
inconsistent data when someone interrupted the earlier rebuild for
v2.0.0.
Fixes #6111
(cherry picked from commit 2b47bd01dbc15a02911989a190e2ef956aeedf27)
|
|
See #6065
(cherry picked from commit 38fec3726fc0aa518a3637574f7e3e0029df41d4)
|
|
When qutebrowser is installed as an .egg (like can happen with setup.py
install), importlib.resources.files(...) can return a zipfile.Path in
place of a pathlib.Path.
Unfortunately, those path objects don't support .glob(), nor do they
support things like .relative_to() or .as_posix(). Thus, if that's the
case, we need to implement our own poor globbing based on
.iterdir() (which they *do* support).
(cherry picked from commit 54bcdc1eefa86cc20790973d6997b60c3bba884c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Whoops...
|
|
Proper fix in progress...
|
|
Add a test and also allow setting a deprecated alias for a command
easily.
|
|
Seems to be flaky pretty consistantly there...
See #5390
|
|
See #5656, #5634
|
|
|
|
See #6068
Probably https://github.com/nedbat/coveragepy/issues/1106
|
|
This unfortunately gets quite a bit more cumbersome, as we can't easily
parametrize an annotation anymore - the former `typ` will just be lazily
evaluated as the string "typ".
Closes #5769
|
|
PEP 563: https://www.python.org/dev/peps/pep-0563/
See #5769
|
|
It's an alias to OSError since Python 3.3:
https://docs.python.org/3/library/exceptions.html
https://www.python.org/dev/peps/pep-3151/
|
|
See #4467
|
|
See #4467
|
|
See #4467, #5832
|
|
|
|
See #4667
|
|
See https://github.com/qutebrowser/qutebrowser/discussions/5999#discussioncomment-297309
|
|
Closes #6015
|
|
See #6022 and #5999
|
|
See #6022
|
|
See #6022
|
|
See #6022
|
|
See #6022
|
|
See #6022
|
|
See #6022
|
|
When the user does something like this with the new adblocking config:
c.content.host_blocking.lists = ...
Then we didn't notify her about the setting being renamed. Instead, she
got:
While getting 'content.host_blocking': No option 'content.host_blocking'
Unhandled exception: 'NoneType' object has no attribute 'lists'
Traceback (most recent call last):
File ".../qutebrowser/config/configfiles.py", line 805, in read_config_py
exec(code, module.__dict__)
File "/tmp/config.py", line 1, in <module>
c.content.host_blocking.lists = []
AttributeError: 'NoneType' object has no attribute 'lists'
This happens because we did something like (simplified):
with self._handle_error(...):
return self._config.get(...)
# End of method
Thus, if there was an error, nothing is returned and the method ends,
therefore returning an implicit None. When then trying to access .lists
on that None, we get the AttributeError.
Instead, we now permit this kind of wrong usage in config.py files.
If this is a qutebrowser-internal ConfigContainer, we would've already
raised in _handle_error() anyways.
What we now do instead is returning a new ConfigContainer, i.e.
allowing further access (while still capturing the error message).
Thus, this now leads to:
While getting 'content.host_blocking':
No option 'content.host_blocking'
While setting 'content.host_blocking.lists':
No option 'content.host_blocking.lists'
(this option was renamed to 'content.blocking.hosts.lists')
This still isn't optimal, but the best we can do without more magic:
At the point the first failure happens, we can't tell whether the user
wants to get an option or is just getting a prefix.
Fixes #5991
|
|
|
|
|
|
|
|
|
|
|
|
- Move the "completions" argument (to override completions) to BaseType
so any class can use it.
- Don't use **kwargs anywhere for better type checking.
- Make arguments kw-only where useful.
|
|
|
|
|
|
|
|
See https://github.com/jendrikseipp/vulture/pull/246
|
|
|
|
|