summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.asciidoc8
-rw-r--r--misc/requirements/requirements-dev.txt4
-rw-r--r--misc/requirements/requirements-mypy.txt4
-rw-r--r--misc/requirements/requirements-pylint.txt6
-rw-r--r--misc/requirements/requirements-sphinx.txt4
-rw-r--r--misc/requirements/requirements-tests.txt12
-rw-r--r--misc/requirements/requirements-tox.txt4
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py10
-rw-r--r--qutebrowser/components/braveadblock.py10
-rw-r--r--requirements.txt2
-rw-r--r--tests/end2end/test_invocations.py72
11 files changed, 103 insertions, 33 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 00d10b0cd..93319b653 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -50,6 +50,14 @@ Fixed
- When `:edit-text` is used, but the existing text in the input isn't
representable in the configured encoding (`editor.encoding`), qutebrowser would
crash. It now shows a proper error instead.
+- The testsuite should now work properly on aarch64.
+- When QtWebEngine is in a "stuck" state while `:selection-follow` was used,
+ this could cause a crash in qutebrowser. This is now fixed (speculatively, due
+ to lack of a reproducer).
+- When the brave adblock data (`adblock-cache.dat`) got corrupted, qutebrowser
+ would crash when trying to load it. It now displays an error instead.
+- Combining `/S` (silent) and `/allusers` when uninstalling via the Windows
+ installer now works properly.
[[v2.2.2]]
v2.2.2 (2021-05-20)
diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt
index 2621579f6..7e1159089 100644
--- a/misc/requirements/requirements-dev.txt
+++ b/misc/requirements/requirements-dev.txt
@@ -1,7 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
bump2version==1.0.1
-certifi==2020.12.5
+certifi==2021.5.30
cffi==1.14.5
chardet==4.0.0
cryptography==3.4.7
@@ -21,4 +21,4 @@ sip==6.1.0
six==1.16.0
toml==0.10.2
uritemplate==3.0.1
-# urllib3==1.26.4
+# urllib3==1.26.5
diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt
index dc5ebd36b..22261972c 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==5.1.1
-importlib-metadata==4.0.1
+diff-cover==5.1.2
+importlib-metadata==4.3.1
importlib-resources==5.1.4
inflect==5.3.0
Jinja2==3.0.1
diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt
index 13358f6d5..13b1ef98b 100644
--- a/misc/requirements/requirements-pylint.txt
+++ b/misc/requirements/requirements-pylint.txt
@@ -1,7 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
astroid==2.3.3 # rq.filter: < 2.4
-certifi==2020.12.5
+certifi==2021.5.30
cffi==1.14.5
chardet==4.0.0
cryptography==3.4.7
@@ -12,7 +12,7 @@ isort==4.3.21
jwcrypto==0.8
lazy-object-proxy==1.4.3
mccabe==0.6.1
-pefile==2021.5.13
+pefile==2021.5.24
pycparser==2.20
pylint==2.4.4 # rq.filter: < 2.5
python-dateutil==2.8.1
@@ -21,5 +21,5 @@ requests==2.25.1
six==1.16.0
typed-ast==1.4.3 ; python_version<"3.8"
uritemplate==3.0.1
-# urllib3==1.26.4
+# urllib3==1.26.5
wrapt==1.11.2
diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt
index 0ccea857f..ab8ceb6e5 100644
--- a/misc/requirements/requirements-sphinx.txt
+++ b/misc/requirements/requirements-sphinx.txt
@@ -2,7 +2,7 @@
alabaster==0.7.12
Babel==2.9.1
-certifi==2020.12.5
+certifi==2021.5.30
chardet==4.0.0
docutils==0.17.1
idna==2.10
@@ -22,4 +22,4 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
-urllib3==1.26.4
+urllib3==1.26.5
diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt
index 06879bde3..0cdd02555 100644
--- a/misc/requirements/requirements-tests.txt
+++ b/misc/requirements/requirements-tests.txt
@@ -3,18 +3,18 @@
apipkg==1.5
attrs==21.2.0
beautifulsoup4==4.9.3
-certifi==2020.12.5
+certifi==2021.5.30
chardet==4.0.0
cheroot==8.5.2
click==8.0.1
coverage==5.5
EasyProcess==0.3
-execnet==1.8.0
+execnet==1.8.1
filelock==3.0.12
Flask==2.0.1
glob2==0.7
hunter==3.3.3
-hypothesis==6.13.4
+hypothesis==6.13.10
icdiff==1.9.1
idna==2.10
iniconfig==1.1.1
@@ -44,10 +44,10 @@ pytest-instafail==0.4.2
pytest-mock==3.6.1
pytest-qt==3.3.0
pytest-repeat==0.9.1
-pytest-rerunfailures==9.1.1
+pytest-rerunfailures==10.0
pytest-xdist==2.2.1
pytest-xvfb==2.0.0
-PyVirtualDisplay==2.1
+PyVirtualDisplay==2.2
requests==2.25.1
requests-file==1.5.1
six==1.16.0
@@ -55,6 +55,6 @@ sortedcontainers==2.4.0
soupsieve==2.2.1
tldextract==3.1.0
toml==0.10.2
-urllib3==1.26.4
+urllib3==1.26.5
vulture==2.3
Werkzeug==2.0.1
diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt
index b9e5a46c5..8bb7820ce 100644
--- a/misc/requirements/requirements-tox.txt
+++ b/misc/requirements/requirements-tox.txt
@@ -1,7 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
appdirs==1.4.4
-distlib==0.3.1
+distlib==0.3.2
filelock==3.0.12
packaging==20.9
pip==21.1.2
@@ -12,5 +12,5 @@ setuptools==57.0.0
six==1.16.0
toml==0.10.2
tox==3.23.1
-virtualenv==20.4.6
+virtualenv==20.4.7
wheel==0.36.2
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 011ae6514..f9b636bde 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -401,6 +401,16 @@ class WebEngineCaret(browsertab.AbstractCaret):
self._js_call('reverseSelection')
def _follow_selected_cb_wrapped(self, js_elem, tab):
+ if sip.isdeleted(self):
+ # Sometimes, QtWebEngine JS callbacks seem to be stuck, and will
+ # later get executed when the tab is closed. However, at this point,
+ # the WebEngineCaret is already gone.
+ log.webview.warning(
+ "Got follow_selected callback for deleted WebEngineCaret. "
+ "This is most likely due to a QtWebEngine bug, please report a "
+ "qutebrowser issue if you know a way to reproduce this.")
+ return
+
try:
self._follow_selected_cb(js_elem, tab)
finally:
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index 0a39d5491..bd30f5d29 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -211,7 +211,15 @@ class BraveAdBlocker:
if cache_exists:
logger.debug("Loading cached adblock data: %s", self._cache_path)
- self._engine.deserialize_from_file(str(self._cache_path))
+ try:
+ self._engine.deserialize_from_file(str(self._cache_path))
+ except ValueError as e:
+ if str(e) != "DeserializationError":
+ # All Rust exceptions get turned into a ValueError by
+ # python-adblock
+ raise
+ message.error("Reading adblock filter data failed (corrupted data?). "
+ "Please run :adblock-update.")
else:
if (
config.val.content.blocking.adblock.lists
diff --git a/requirements.txt b/requirements.txt
index 370007fe4..4163885b9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,7 +3,7 @@
adblock==0.4.4
colorama==0.4.4
dataclasses==0.6 ; python_version<"3.7"
-importlib-metadata==4.0.1 ; python_version<"3.8"
+importlib-metadata==4.3.1 ; python_version<"3.8"
importlib-resources==5.1.4 ; python_version<"3.9"
Jinja2==3.0.1
MarkupSafe==2.0.1
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index bf3d65ae6..97c04eb0d 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -26,6 +26,7 @@ import logging
import importlib
import re
import json
+import platform
import pytest
from PyQt5.QtCore import QProcess, QPoint
@@ -39,6 +40,14 @@ ascii_locale = pytest.mark.skipif(sys.hexversion >= 0x03070000,
"locale with LC_ALL=C")
+# For some reason (some floating point rounding differences?), color values are
+# slightly different (and wrong!) on ARM machines. We adjust our expected values
+# accordingly, since we don't really care about the exact value, we just want to
+# know that the underlying Chromium is respecting our preferences.
+# FIXME what to do about 32-bit ARM?
+IS_ARM = platform.machine() == 'aarch64'
+
+
def _base_args(config):
"""Get the arguments to pass with every invocation."""
args = ['--debug', '--json-logging', '--no-err-windows']
@@ -517,7 +526,8 @@ def test_preferred_colorscheme_with_dark_mode(
# No workaround known.
expected_text = 'Light preference detected.'
# light website color, inverted by darkmode
- expected_color = testutils.Color(127, 127, 127)
+ expected_color = (testutils.Color(123, 125, 123) if IS_ARM
+ else testutils.Color(127, 127, 127))
xfail = "Chromium bug 1177973"
elif qtwe_version == utils.VersionNumber(5, 15, 2):
# Our workaround breaks when dark mode is enabled...
@@ -529,7 +539,8 @@ def test_preferred_colorscheme_with_dark_mode(
# Qt 5.14 and 5.15.0/.1 work correctly.
# Hopefully, so does Qt 6.x in the future?
expected_text = 'Dark preference detected.'
- expected_color = testutils.Color(34, 34, 34) # dark website color
+ expected_color = (testutils.Color(33, 32, 33) if IS_ARM
+ else testutils.Color(34, 34, 34)) # dark website color
xfail = False
pos = QPoint(0, 0)
@@ -630,30 +641,51 @@ def test_cookies_store(quteproc_new, request, short_tmpdir, store):
quteproc_new.wait_for_quit()
+# The 'colors' dictionaries in the parametrize decorator below have (QtWebEngine
+# version, CPU architecture) as keys. Either of those (or both) can be None to
+# say "on all other Qt versions" or "on all other CPU architectures".
@pytest.mark.parametrize('filename, algorithm, colors', [
(
'blank',
'lightness-cielab',
{
- '5.15': testutils.Color(18, 18, 18),
- '5.14': testutils.Color(27, 27, 27),
- None: testutils.Color(0, 0, 0),
+ ('5.15', None): testutils.Color(18, 18, 18),
+ ('5.15', 'aarch64'): testutils.Color(16, 16, 16),
+ ('5.14', None): testutils.Color(27, 27, 27),
+ ('5.14', 'aarch64'): testutils.Color(24, 24, 24),
+ (None, None): testutils.Color(0, 0, 0),
}
),
- ('blank', 'lightness-hsl', {None: testutils.Color(0, 0, 0)}),
- ('blank', 'brightness-rgb', {None: testutils.Color(0, 0, 0)}),
+ ('blank', 'lightness-hsl', {(None, None): testutils.Color(0, 0, 0)}),
+ ('blank', 'brightness-rgb', {(None, None): testutils.Color(0, 0, 0)}),
(
'yellow',
'lightness-cielab',
{
- '5.15': testutils.Color(35, 34, 0),
- '5.14': testutils.Color(35, 34, 0),
- None: testutils.Color(204, 204, 0),
+ ('5.15', None): testutils.Color(35, 34, 0),
+ ('5.15', 'aarch64'): testutils.Color(33, 32, 0),
+ ('5.14', None): testutils.Color(35, 34, 0),
+ ('5.14', 'aarch64'): testutils.Color(33, 32, 0),
+ (None, None): testutils.Color(204, 204, 0),
+ }
+ ),
+ (
+ 'yellow',
+ 'lightness-hsl',
+ {
+ (None, None): testutils.Color(204, 204, 0),
+ (None, 'aarch64'): testutils.Color(206, 207, 0),
+ },
+ ),
+ (
+ 'yellow',
+ 'brightness-rgb',
+ {
+ (None, None): testutils.Color(0, 0, 204),
+ (None, 'aarch64'): testutils.Color(0, 0, 206),
}
),
- ('yellow', 'lightness-hsl', {None: testutils.Color(204, 204, 0)}),
- ('yellow', 'brightness-rgb', {None: testutils.Color(0, 0, 204)}),
])
def test_dark_mode(webengine_versions, quteproc_new, request,
filename, algorithm, colors):
@@ -669,7 +701,17 @@ def test_dark_mode(webengine_versions, quteproc_new, request,
ver = webengine_versions.webengine
minor_version = str(ver.strip_patch())
- expected = colors.get(minor_version, colors[None])
+
+ arch = platform.machine()
+ for key in [
+ (minor_version, arch),
+ (minor_version, None),
+ (None, arch),
+ (None, None),
+ ]:
+ if key in colors:
+ expected = colors[key]
+ break
quteproc_new.open_path(f'data/darkmode/{filename}.html')
@@ -696,9 +738,11 @@ def test_dark_mode_mathml(quteproc_new, request, qtbot):
quteproc_new.wait_for_js('Image loaded')
# First make sure loading finished by looking outside of the image
+ expected = testutils.Color(0, 0, 206) if IS_ARM else testutils.Color(0, 0, 204)
+
quteproc_new.get_screenshot(
probe_pos=QPoint(105, 0),
- probe_color=testutils.Color(0, 0, 204),
+ probe_color=expected,
)
# Then get the actual formula color, probing again in case it's not displayed yet...