summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.asciidoc3
-rw-r--r--misc/requirements/requirements-check-manifest.txt4
-rw-r--r--misc/requirements/requirements-dev.txt7
-rw-r--r--misc/requirements/requirements-mypy.txt2
-rw-r--r--misc/requirements/requirements-pyinstaller.txt2
-rw-r--r--misc/requirements/requirements-pyroma.txt4
-rw-r--r--misc/requirements/requirements-sphinx.txt2
-rw-r--r--misc/requirements/requirements-tests.txt12
-rw-r--r--misc/requirements/requirements-tox.txt11
-rw-r--r--pytest.ini4
-rw-r--r--qutebrowser/browser/webengine/webengineelem.py16
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py4
-rw-r--r--qutebrowser/keyinput/modeparsers.py2
-rw-r--r--qutebrowser/utils/version.py5
-rw-r--r--scripts/dev/changelog_urls.json5
-rw-r--r--tests/conftest.py2
-rw-r--r--tests/end2end/data/hints/link_inject.html19
-rw-r--r--tests/end2end/features/conftest.py8
-rw-r--r--tests/end2end/features/hints.feature7
-rw-r--r--tests/end2end/fixtures/quteprocess.py13
-rw-r--r--tests/helpers/testutils.py22
21 files changed, 112 insertions, 42 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 8a5bb6ce3..043d1303e 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -27,6 +27,9 @@ Fixed
- Setting `url.auto_search` to `dns` works correctly now with Qt 6.
- Counts passed via keypresses now have a digit limit (4300) to avoid
exceptions due to cats sleeping on numpads. (#7834)
+- Navigating via hints to a remote URL from a file:// one works again. (#7847)
+- The timers related to the tab audible indicator and the auto follow timeout
+ no longer accumulate connections over time. (#7888)
[[v3.0.0]]
v3.0.0 (2023-08-18)
diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt
index e02724e12..fd8e314be 100644
--- a/misc/requirements/requirements-check-manifest.txt
+++ b/misc/requirements/requirements-check-manifest.txt
@@ -1,7 +1,9 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
-build==0.10.0
+build==1.0.3
check-manifest==0.49
+importlib-metadata==6.8.0
packaging==23.1
pyproject_hooks==1.0.0
tomli==2.0.1
+zipp==3.16.2
diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt
index 2c73d53d1..3ecea73b4 100644
--- a/misc/requirements/requirements-dev.txt
+++ b/misc/requirements/requirements-dev.txt
@@ -1,7 +1,6 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
-bleach==6.0.0
-build==0.10.0
+build==1.0.3
bump2version==1.0.1
certifi==2023.7.22
cffi==1.15.1
@@ -20,6 +19,7 @@ manhole==1.8.0
markdown-it-py==3.0.0
mdurl==0.1.2
more-itertools==10.1.0
+nh3==0.2.14
packaging==23.1
pkginfo==1.9.6
ply==3.11
@@ -30,7 +30,7 @@ Pympler==1.0.1
pyproject_hooks==1.0.0
PyQt-builder==1.15.2
python-dateutil==2.8.2
-readme-renderer==41.0
+readme-renderer==42.0
requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
@@ -43,5 +43,4 @@ twine==4.0.2
typing_extensions==4.7.1
uritemplate==4.1.1
# urllib3==2.0.4
-webencodings==0.5.1
zipp==3.16.2
diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt
index 55585ad40..14ec7c124 100644
--- a/misc/requirements/requirements-mypy.txt
+++ b/misc/requirements/requirements-mypy.txt
@@ -16,6 +16,6 @@ types-colorama==0.4.15.12
types-docutils==0.20.0.3
types-Pygments==2.16.0.0
types-PyYAML==6.0.12.11
-types-setuptools==68.1.0.0
+types-setuptools==68.2.0.0
typing_extensions==4.7.1
zipp==3.16.2
diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt
index 8dd0ea6ec..2f0b35e0d 100644
--- a/misc/requirements/requirements-pyinstaller.txt
+++ b/misc/requirements/requirements-pyinstaller.txt
@@ -2,4 +2,4 @@
altgraph==0.17.3
pyinstaller @ git+https://github.com/pyinstaller/pyinstaller.git@79f62ef29822169ae00cd4271390d0e3175476ad
-pyinstaller-hooks-contrib==2023.7
+pyinstaller-hooks-contrib==2023.8
diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt
index 0bed26a8d..ba65ace11 100644
--- a/misc/requirements/requirements-pyroma.txt
+++ b/misc/requirements/requirements-pyroma.txt
@@ -1,10 +1,11 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
-build==0.10.0
+build==1.0.3
certifi==2023.7.22
charset-normalizer==3.2.0
docutils==0.20.1
idna==3.4
+importlib-metadata==6.8.0
packaging==23.1
Pygments==2.16.1
pyproject_hooks==1.0.0
@@ -13,3 +14,4 @@ requests==2.31.0
tomli==2.0.1
trove-classifiers==2023.8.7
urllib3==2.0.4
+zipp==3.16.2
diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt
index 3557eab6c..77158cace 100644
--- a/misc/requirements/requirements-sphinx.txt
+++ b/misc/requirements/requirements-sphinx.txt
@@ -12,7 +12,7 @@ Jinja2==3.1.2
MarkupSafe==2.1.3
packaging==23.1
Pygments==2.16.1
-pytz==2023.3
+pytz==2023.3.post1
requests==2.31.0
snowballstemmer==2.2.0
Sphinx==7.1.2
diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt
index f49b0cf5f..c6375cf49 100644
--- a/misc/requirements/requirements-tests.txt
+++ b/misc/requirements/requirements-tests.txt
@@ -7,13 +7,13 @@ certifi==2023.7.22
charset-normalizer==3.2.0
cheroot==10.0.0
click==8.1.7
-coverage==7.3.0
+coverage==7.3.1
exceptiongroup==1.1.3
execnet==2.0.2
-filelock==3.12.2
+filelock==3.12.3
Flask==2.3.3
hunter==3.6.1
-hypothesis==6.82.6
+hypothesis==6.84.3
idna==3.4
importlib-metadata==6.8.0
iniconfig==2.0.0
@@ -30,7 +30,7 @@ parse-type==0.6.2
pluggy==1.3.0
py-cpuinfo==9.0.0
Pygments==2.16.1
-pytest==7.4.0
+pytest==7.4.2
pytest-bdd==6.1.1
pytest-benchmark==4.0.0
pytest-cov==4.1.0
@@ -46,8 +46,8 @@ requests==2.31.0
requests-file==1.5.1
six==1.16.0
sortedcontainers==2.4.0
-soupsieve==2.4.1
-tldextract==3.4.4
+soupsieve==2.5
+tldextract==3.5.0
toml==0.10.2
tomli==2.0.1
typing_extensions==4.7.1
diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt
index ef2f11955..58ea4e0a7 100644
--- a/misc/requirements/requirements-tox.txt
+++ b/misc/requirements/requirements-tox.txt
@@ -4,14 +4,15 @@ cachetools==5.3.1
chardet==5.2.0
colorama==0.4.6
distlib==0.3.7
-filelock==3.12.2
+filelock==3.12.3
packaging==23.1
pip==23.2.1
platformdirs==3.10.0
pluggy==1.3.0
-pyproject-api==1.5.4
-setuptools==68.1.2
+pyproject-api==1.6.1
+setuptools==68.2.0
tomli==2.0.1
-tox==4.10.0
-virtualenv==20.24.3
+tox==4.11.3
+typing_extensions==4.7.1
+virtualenv==20.24.5
wheel==0.41.2
diff --git a/pytest.ini b/pytest.ini
index 8d7cf2e95..f2f746284 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -59,6 +59,8 @@ qt_log_ignore =
^QObject::connect: Connecting from COMPAT signal \(QSocketNotifier::activated\(int\)\)$
# Randomly started showing up on Qt 5.15.2
^QBackingStore::endPaint\(\) called with active painter; did you forget to destroy it or call QPainter::end\(\) on it\?$
+ # Qt 6.5 after system update, from qt-qt.accessibility.atspi
+ Error in contacting registry: "org\.freedesktop\.DBus\.Error\.Disconnected" "Not connected to D-Bus server"
xfail_strict = true
filterwarnings =
error
@@ -66,5 +68,5 @@ filterwarnings =
# Python 3.12: https://github.com/jendrikseipp/vulture/issues/314
ignore:ast\.Str is deprecated and will be removed in Python 3\.14; use ast\.Constant instead:DeprecationWarning:vulture\.core
# Python 3.12: https://github.com/ionelmc/pytest-benchmark/issues/240
- ignore:datetime\.utcnow\(\) is deprecated and scheduled for removal in a future version\. Use timezone-aware objects to represent datetimes in UTC. datetime\.now\(datetime\.UTC\)\.:DeprecationWarning:pytest_benchmark\.utils
+ ignore:(datetime\.)?datetime\.utcnow\(\) is deprecated and scheduled for removal in a future version\. Use timezone-aware objects to represent datetimes in UTC. (datetime\.)?datetime\.now\(datetime\.UTC\)\.:DeprecationWarning:pytest_benchmark\.utils
faulthandler_timeout = 90
diff --git a/qutebrowser/browser/webengine/webengineelem.py b/qutebrowser/browser/webengine/webengineelem.py
index 20c3a36d4..c387ebbcf 100644
--- a/qutebrowser/browser/webengine/webengineelem.py
+++ b/qutebrowser/browser/webengine/webengineelem.py
@@ -215,14 +215,16 @@ class WebEngineElement(webelem.AbstractWebElement):
return False
# Qt 6.3+ needs a user interaction to allow navigations from qute:// to
- # outside qute:// (like e.g. on qute://bookmarks).
+ # outside qute:// (like e.g. on qute://bookmarks), as well as from file:// to
+ # outside of file:// (e.g. users having a local bookmarks.html).
versions = version.qtwebengine_versions()
- if (
- baseurl.scheme() == "qute" and
- url.scheme() != "qute" and
- versions.webengine >= utils.VersionNumber(6, 3)
- ):
- return True
+ for scheme in ["qute", "file"]:
+ if (
+ baseurl.scheme() == scheme and
+ url.scheme() != scheme and
+ versions.webengine >= utils.VersionNumber(6, 3)
+ ):
+ return True
return url.scheme() not in urlutils.WEBENGINE_SCHEMES
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 54c576ebf..938e100ff 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -816,6 +816,8 @@ class WebEngineAudio(browsertab.AbstractAudio):
page.recentlyAudibleChanged.connect(self._delayed_recently_audible_changed)
self._tab.url_changed.connect(self._on_url_changed)
config.instance.changed.connect(self._on_config_changed)
+ self._silence_timer.timeout.connect(functools.partial(
+ self.recently_audible_changed.emit, False))
# WORKAROUND for recentlyAudibleChanged being emitted without delay from the moment
# that audio is dropped.
@@ -831,8 +833,6 @@ class WebEngineAudio(browsertab.AbstractAudio):
# Ignore all subsequent calls while the tab is muted with an active timer
if timer.isActive():
return
- timer.timeout.connect(
- functools.partial(self.recently_audible_changed.emit, recently_audible))
timer.start()
def set_muted(self, muted: bool, override: bool = False) -> None:
diff --git a/qutebrowser/keyinput/modeparsers.py b/qutebrowser/keyinput/modeparsers.py
index fdb085a1f..7db169097 100644
--- a/qutebrowser/keyinput/modeparsers.py
+++ b/qutebrowser/keyinput/modeparsers.py
@@ -84,6 +84,7 @@ class NormalKeyParser(CommandKeyParser):
self._inhibited = False
self._inhibited_timer = usertypes.Timer(self, 'normal-inhibited')
self._inhibited_timer.setSingleShot(True)
+ self._inhibited_timer.timeout.connect(self._clear_inhibited)
def __repr__(self) -> str:
return utils.get_repr(self)
@@ -113,7 +114,6 @@ class NormalKeyParser(CommandKeyParser):
timeout))
self._inhibited = True
self._inhibited_timer.setInterval(timeout)
- self._inhibited_timer.timeout.connect(self._clear_inhibited)
self._inhibited_timer.start()
@pyqtSlot()
diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py
index 888172535..75df73ffa 100644
--- a/qutebrowser/utils/version.py
+++ b/qutebrowser/utils/version.py
@@ -611,6 +611,11 @@ class WebEngineVersions:
# 6.5.1: Security fixes up to 112.0.5615.138 (2023-04-18)
# 6.5.2: Security fixes up to 114.0.5735.133 (2023-06-13)
utils.VersionNumber(6, 5): '108.0.5359.220',
+
+ # Qt 6.6: Chromium 112
+ # 112.0.5615.213 (~2023-04-18)
+ # 6.6.0: Security fixes up to 116.0.5845.110 (?) (2023-08-22)
+ utils.VersionNumber(6, 6): '112.0.5615.213',
}
def __post_init__(self) -> None:
diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json
index 89d3b332a..5a9c9b34a 100644
--- a/scripts/dev/changelog_urls.json
+++ b/scripts/dev/changelog_urls.json
@@ -144,7 +144,6 @@
"setuptools": "https://setuptools.readthedocs.io/en/latest/history.html",
"pefile": "https://github.com/erocarrera/pefile/commits/master",
"SecretStorage": "https://github.com/mitya57/secretstorage/blob/master/changelog",
- "bleach": "https://github.com/mozilla/bleach/blob/main/CHANGES",
"jeepney": "https://gitlab.com/takluyver/jeepney/-/blob/master/docs/release-notes.rst",
"keyring": "https://github.com/jaraco/keyring/blob/main/NEWS.rst",
"jaraco.classes": "https://github.com/jaraco/jaraco.classes/blob/main/NEWS.rst",
@@ -153,7 +152,6 @@
"requests-toolbelt": "https://github.com/requests/toolbelt/blob/master/HISTORY.rst",
"rfc3986": "https://rfc3986.readthedocs.io/en/latest/release-notes/index.html",
"twine": "https://twine.readthedocs.io/en/stable/changelog.html",
- "webencodings": "https://github.com/gsnedders/python-webencodings/commits/master",
"PyJWT": "https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst",
"rich": "https://github.com/Textualize/rich/blob/master/CHANGELOG.md",
"ply": "https://github.com/dabeaz/ply/blob/master/CHANGES",
@@ -165,5 +163,6 @@
"markdown-it-py": "https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md",
"mdurl": "https://github.com/executablebooks/mdurl/commits/master",
"blinker": "https://blinker.readthedocs.io/en/stable/#changes",
- "exceptiongroup": "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst"
+ "exceptiongroup": "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst",
+ "nh3": "https://github.com/messense/nh3/commits/main"
}
diff --git a/tests/conftest.py b/tests/conftest.py
index 424c92c91..2fea48c43 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -44,7 +44,7 @@ hypothesis.settings.register_profile(
deadline=None,
suppress_health_check=[
hypothesis.HealthCheck.function_scoped_fixture,
- hypothesis.HealthCheck.too_slow,
+ hypothesis.HealthCheck.too_slow
]
)
)
diff --git a/tests/end2end/data/hints/link_inject.html b/tests/end2end/data/hints/link_inject.html
new file mode 100644
index 000000000..7ef352028
--- /dev/null
+++ b/tests/end2end/data/hints/link_inject.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>A link to use hints on</title>
+ <script>
+ function injectPort() {
+ const queryString = document.location.search;
+ const params = new URLSearchParams(queryString);
+ const port = params.get("port")
+ let link = document.getElementById("link");
+ link.href = link.href.replace("<port>", port);
+ }
+ </script>
+ </head>
+ <body onload="injectPort()">
+ <a href="http://localhost:<port>/data/hello.txt" id="link">Follow me!</a>
+ </body>
+</html>
diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py
index 9dd497c0b..089f0c42c 100644
--- a/tests/end2end/features/conftest.py
+++ b/tests/end2end/features/conftest.py
@@ -33,8 +33,7 @@ def _get_echo_exe_path():
Path to the "echo"-utility.
"""
if utils.is_windows:
- return os.path.join(testutils.abs_datapath(), 'userscripts',
- 'echo.bat')
+ return str(testutils.abs_datapath() / 'userscripts' / 'echo.bat')
else:
return shutil.which("echo")
@@ -199,6 +198,7 @@ def open_path(quteproc, server, path):
- With "... as a URL", it's opened according to new_instance_open_target.
"""
path = path.replace('(port)', str(server.port))
+ path = testutils.substitute_testdata(path)
new_tab = False
new_bg_tab = False
@@ -270,7 +270,7 @@ def run_command(quteproc, server, tmpdir, command):
invalid = False
command = command.replace('(port)', str(server.port))
- command = command.replace('(testdata)', testutils.abs_datapath())
+ command = testutils.substitute_testdata(command)
command = command.replace('(tmpdir)', str(tmpdir))
command = command.replace('(dirsep)', os.sep)
command = command.replace('(echo-exe)', _get_echo_exe_path())
@@ -364,7 +364,7 @@ def hint(quteproc, args):
@bdd.when(bdd.parsers.parse('I hint with args "{args}" and follow {letter}'))
def hint_and_follow(quteproc, args, letter):
- args = args.replace('(testdata)', testutils.abs_datapath())
+ args = testutils.substitute_testdata(args)
args = args.replace('(python-executable)', sys.executable)
quteproc.send_cmd(':hint {}'.format(args))
quteproc.wait_for(message='hints: *')
diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature
index 80348c908..ddf42132f 100644
--- a/tests/end2end/features/hints.feature
+++ b/tests/end2end/features/hints.feature
@@ -44,6 +44,13 @@ Feature: Using hints
- data/hints/link_blank.html
- data/hello.txt
+ # https://github.com/qutebrowser/qutebrowser/issues/7842
+ @qtwebkit_skip
+ Scenario: Following a hint from a local file to a remote origin
+ When I open file://(testdata)/hints/link_inject.html?port=(port)
+ And I hint with args "links" and follow a
+ Then data/hello.txt should be loaded
+
Scenario: Following a hint to link with sub-element and force to open in current tab.
When I open data/hints/link_span.html
And I hint with args "links current" and follow a
diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py
index a3929ed7e..9a093bba8 100644
--- a/tests/end2end/fixtures/quteprocess.py
+++ b/tests/end2end/fixtures/quteprocess.py
@@ -61,6 +61,12 @@ def is_ignored_lowlevel_message(message):
# Randomly started showing up on Qt 5.15.2
'QPaintDevice: Cannot destroy paint device that is being painted',
+
+ # Qt 6.6 on GitHub Actions
+ (
+ 'libva error: vaGetDriverNameByIndex() failed with unknown libva error, '
+ 'driver_name = (null)'
+ )
]
return any(testutils.pattern_match(pattern=pattern, value=message)
for pattern in ignored_messages)
@@ -194,6 +200,11 @@ def is_ignored_chromium_message(line):
# [5464:5464:0318/024215.821650:ERROR:interface_endpoint_client.cc(687)] Message 6 rejected by interface blink.mojom.WidgetHost
# [5718:5718:0318/031330.803863:ERROR:interface_endpoint_client.cc(687)] Message 3 rejected by interface blink.mojom.Widget
"Message * rejected by interface blink.mojom.Widget*",
+
+ # GitHub Actions, Qt 6.6
+ # [9895:9983:0904/043039.500565:ERROR:gpu_memory_buffer_support_x11.cc(49)]
+ # dri3 extension not supported.
+ "dri3 extension not supported.",
]
return any(testutils.pattern_match(pattern=pattern, value=message)
for pattern in ignored_messages)
@@ -393,7 +404,7 @@ class QuteProc(testprocess.Process):
verbatim.
"""
special_schemes = ['about:', 'qute:', 'chrome:', 'view-source:',
- 'data:', 'http:', 'https:']
+ 'data:', 'http:', 'https:', 'file:']
server = self.request.getfixturevalue('server')
server_port = server.port if port is None else port
diff --git a/tests/helpers/testutils.py b/tests/helpers/testutils.py
index dc6fdac32..d74c46fcb 100644
--- a/tests/helpers/testutils.py
+++ b/tests/helpers/testutils.py
@@ -192,8 +192,26 @@ def pattern_match(*, pattern, value):
def abs_datapath():
"""Get the absolute path to the end2end data directory."""
- file_abs = os.path.abspath(os.path.dirname(__file__))
- return os.path.join(file_abs, '..', 'end2end', 'data')
+ path = pathlib.Path(__file__).parent / '..' / 'end2end' / 'data'
+ return path.resolve()
+
+
+def substitute_testdata(path):
+ r"""Replace the (testdata) placeholder in path with `abs_datapath()`.
+
+ If path is starting with file://, return path as an URI with file:// removed. This
+ is useful if path is going to be inserted into an URI:
+
+ >>> path = substitute_testdata("C:\Users\qute")
+ >>> f"file://{path}/slug # results in valid URI
+ 'file:///C:/Users/qute/slug'
+ """
+ if path.startswith('file://'):
+ testdata_path = abs_datapath().as_uri().replace('file://', '')
+ else:
+ testdata_path = str(abs_datapath())
+
+ return path.replace('(testdata)', testdata_path)
@contextlib.contextmanager