From 73e30e47389cad42944ebd1391ca66375dcd70e6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 23 Aug 2022 20:03:31 +0200 Subject: js: Handle stylesheets in cross-origin frames gracefully Otherwise the exception gets shown since the recent message change. --- qutebrowser/javascript/stylesheet.js | 13 ++++++++++--- tests/end2end/features/misc.feature | 7 +++++++ tests/end2end/features/test_misc_bdd.py | 6 ++++++ tests/end2end/fixtures/webserver_sub.py | 6 ++++++ tests/end2end/templates/https-iframe.html | 10 ++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 tests/end2end/templates/https-iframe.html diff --git a/qutebrowser/javascript/stylesheet.js b/qutebrowser/javascript/stylesheet.js index 21a62b25d..1f1bdbd57 100644 --- a/qutebrowser/javascript/stylesheet.js +++ b/qutebrowser/javascript/stylesheet.js @@ -132,11 +132,18 @@ window._qutebrowser.stylesheet = (function() { css_content = css; } // Propagate the new CSS to all child frames. - // FIXME:qtwebengine This does not work for cross-origin frames. for (let i = 0; i < window.frames.length; ++i) { const frame = window.frames[i]; - if (frame._qutebrowser && frame._qutebrowser.stylesheet) { - frame._qutebrowser.stylesheet.set_css(css); + try { + if (frame._qutebrowser && frame._qutebrowser.stylesheet) { + frame._qutebrowser.stylesheet.set_css(css); + } + } catch (exc) { + if (exc instanceof DOMException && exc.name === "SecurityError") { + // FIXME:qtwebengine This does not work for cross-origin frames. + } else { + throw exc; + } } } }; diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 367042c16..ff7e55b2c 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -148,6 +148,13 @@ Feature: Various utility commands. When I open restrictive-csp Then the javascript message "Refused to apply inline style because it violates the following Content Security Policy directive: *" should be logged + @qtwebkit_skip + Scenario: Third-party iframes in qutebrowser stylesheet script + When I load a third-party iframe + # rerun set_css in stylesheet.js + And I set content.user_stylesheets to [] + Then the javascript message "Uncaught SecurityError: Blocked a frame with origin * from accessing a frame with origin *. *" should be logged + # :debug-webaction Scenario: :debug-webaction with valid value diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py index 44920d19f..a4bae5c2d 100644 --- a/tests/end2end/features/test_misc_bdd.py +++ b/tests/end2end/features/test_misc_bdd.py @@ -21,6 +21,12 @@ import pytest_bdd as bdd bdd.scenarios('misc.feature') +@bdd.when("I load a third-party iframe") +def load_iframe(quteproc, server, ssl_server): + quteproc.set_setting('content.tls.certificate_errors', 'load-insecurely') + quteproc.open_path(f'https-iframe/{ssl_server.port}', port=server.port) + + @bdd.then(bdd.parsers.parse('the PDF {filename} should exist in the tmpdir')) def pdf_exists(quteproc, tmpdir, filename): path = tmpdir / filename diff --git a/tests/end2end/fixtures/webserver_sub.py b/tests/end2end/fixtures/webserver_sub.py index d7e030c3f..2bc83a38d 100644 --- a/tests/end2end/fixtures/webserver_sub.py +++ b/tests/end2end/fixtures/webserver_sub.py @@ -267,6 +267,12 @@ def https_script(port): return flask.render_template('https-script.html', port=port) +@app.route('/https-iframe/') +def https_iframe(port): + """Get an iframe loaded via HTTPS.""" + return flask.render_template('https-iframe.html', port=port) + + @app.route('/response-headers') def response_headers(): """Return a set of response headers from the query string.""" diff --git a/tests/end2end/templates/https-iframe.html b/tests/end2end/templates/https-iframe.html new file mode 100644 index 000000000..5abe7ae91 --- /dev/null +++ b/tests/end2end/templates/https-iframe.html @@ -0,0 +1,10 @@ + + + + + HTTPS iframe + + + + + -- cgit v1.2.3-54-g00ecf From 1886eac29749541964f654a476086914570fbe06 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 23 Aug 2022 20:10:38 +0200 Subject: js: Be more precise about webelem exception --- qutebrowser/javascript/webelem.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qutebrowser/javascript/webelem.js b/qutebrowser/javascript/webelem.js index b4cef24bc..9bc8068e5 100644 --- a/qutebrowser/javascript/webelem.js +++ b/qutebrowser/javascript/webelem.js @@ -197,8 +197,13 @@ window._qutebrowser.webelem = (function() { try { frame.document; // eslint-disable-line no-unused-expressions return true; - } catch (err) { - return false; + } catch (exc) { + if (exc instanceof DOMException && exc.name === "SecurityError") { + // FIXME:qtwebengine This does not work for cross-origin frames. + return false; + } else { + throw exc; + } } } -- cgit v1.2.3-54-g00ecf From 0c68fe7c8922d18dfa33c230606ff4584794e654 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 23 Aug 2022 20:16:12 +0200 Subject: js: Eschew the extraenous else --- qutebrowser/javascript/webelem.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qutebrowser/javascript/webelem.js b/qutebrowser/javascript/webelem.js index 9bc8068e5..1a753c380 100644 --- a/qutebrowser/javascript/webelem.js +++ b/qutebrowser/javascript/webelem.js @@ -201,9 +201,8 @@ window._qutebrowser.webelem = (function() { if (exc instanceof DOMException && exc.name === "SecurityError") { // FIXME:qtwebengine This does not work for cross-origin frames. return false; - } else { - throw exc; } + throw exc; } } -- cgit v1.2.3-54-g00ecf From 40125ca73b61bfc74e733063af4826af2a5bcacb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 23 Aug 2022 22:21:40 +0200 Subject: Fix half-finished test --- qutebrowser/javascript/.eslintrc.yaml | 1 + qutebrowser/javascript/stylesheet.js | 1 + tests/end2end/features/misc.feature | 2 +- tests/end2end/features/test_misc_bdd.py | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qutebrowser/javascript/.eslintrc.yaml b/qutebrowser/javascript/.eslintrc.yaml index 939500aa3..43fd1b6e6 100644 --- a/qutebrowser/javascript/.eslintrc.yaml +++ b/qutebrowser/javascript/.eslintrc.yaml @@ -61,3 +61,4 @@ rules: prefer-named-capture-group: "off" function-call-argument-newline: "off" no-negated-condition: "off" + no-console: "off" diff --git a/qutebrowser/javascript/stylesheet.js b/qutebrowser/javascript/stylesheet.js index 1f1bdbd57..8293e0767 100644 --- a/qutebrowser/javascript/stylesheet.js +++ b/qutebrowser/javascript/stylesheet.js @@ -141,6 +141,7 @@ window._qutebrowser.stylesheet = (function() { } catch (exc) { if (exc instanceof DOMException && exc.name === "SecurityError") { // FIXME:qtwebengine This does not work for cross-origin frames. + console.log(`Failed to style frame: ${exc.message}`) } else { throw exc; } diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index ff7e55b2c..b541954eb 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -153,7 +153,7 @@ Feature: Various utility commands. When I load a third-party iframe # rerun set_css in stylesheet.js And I set content.user_stylesheets to [] - Then the javascript message "Uncaught SecurityError: Blocked a frame with origin * from accessing a frame with origin *. *" should be logged + Then the javascript message "Failed to style frame: Blocked a frame with origin * from accessing *" should be logged # :debug-webaction diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py index a4bae5c2d..3ede5ffe2 100644 --- a/tests/end2end/features/test_misc_bdd.py +++ b/tests/end2end/features/test_misc_bdd.py @@ -25,6 +25,10 @@ bdd.scenarios('misc.feature') def load_iframe(quteproc, server, ssl_server): quteproc.set_setting('content.tls.certificate_errors', 'load-insecurely') quteproc.open_path(f'https-iframe/{ssl_server.port}', port=server.port) + msg = quteproc.wait_for(message="Certificate error: *") + msg.expected = True + msg = quteproc.wait_for(message="Certificate error: *") + msg.expected = True @bdd.then(bdd.parsers.parse('the PDF {filename} should exist in the tmpdir')) -- cgit v1.2.3-54-g00ecf From dd1cc314d0a0e6531a61cc7ac77ebd980ce00fbc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 23 Aug 2022 22:56:06 +0200 Subject: Fix lint --- qutebrowser/javascript/stylesheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/javascript/stylesheet.js b/qutebrowser/javascript/stylesheet.js index 8293e0767..e91e338e1 100644 --- a/qutebrowser/javascript/stylesheet.js +++ b/qutebrowser/javascript/stylesheet.js @@ -141,7 +141,7 @@ window._qutebrowser.stylesheet = (function() { } catch (exc) { if (exc instanceof DOMException && exc.name === "SecurityError") { // FIXME:qtwebengine This does not work for cross-origin frames. - console.log(`Failed to style frame: ${exc.message}`) + console.log(`Failed to style frame: ${exc.message}`); } else { throw exc; } -- cgit v1.2.3-54-g00ecf From 038361d8aa52bb8d3a9e79d03161e6ae164b2291 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 29 Aug 2022 09:31:24 +0200 Subject: Improve error message on unresolved executables No more confusing 'No program defined' --- qutebrowser/misc/guiprocess.py | 13 ++++++++----- tests/unit/misc/test_guiprocess.py | 17 ++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/qutebrowser/misc/guiprocess.py b/qutebrowser/misc/guiprocess.py index e14169f93..772417023 100644 --- a/qutebrowser/misc/guiprocess.py +++ b/qutebrowser/misc/guiprocess.py @@ -266,18 +266,21 @@ class GUIProcess(QObject): QProcess.WriteError: f"Write error for {what}", QProcess.ReadError: f"Read error for {what}", } - error_string = self._proc.errorString() - msg = ': '.join([error_descriptions[error], error_string]) # We can't get some kind of error code from Qt... # https://bugreports.qt.io/browse/QTBUG-44769 # but we pre-resolve the executable in Python, which also checks if it's # runnable. - if self.resolved_cmd is None: # pragma: no branch - msg += f'\nHint: Make sure {self.cmd!r} exists and is executable' + if self.resolved_cmd is None: + # No point in showing the "No program defined" we got due to + # passing None into Qt. + error_string = f"{self.cmd!r} doesn't exist or isn't executable" if version.is_flatpak(): - msg += ' inside the Flatpak container' + error_string += " inside the Flatpak container" + else: # pragma: no cover + error_string = self._proc.errorString() + msg = ': '.join([error_descriptions[error], error_string]) message.error(msg) def _elide_output(self, output: str) -> str: diff --git a/tests/unit/misc/test_guiprocess.py b/tests/unit/misc/test_guiprocess.py index aaff5154e..fa90391a8 100644 --- a/tests/unit/misc/test_guiprocess.py +++ b/tests/unit/misc/test_guiprocess.py @@ -403,16 +403,15 @@ def test_failing_to_start(qtbot, proc, caplog, message_mock, monkeypatch, is_fla with qtbot.wait_signal(proc.error, timeout=5000): proc.start('this_does_not_exist_either', []) + expected_msg = ( + "Testprocess 'this_does_not_exist_either' failed to start:" + " 'this_does_not_exist_either' doesn't exist or isn't executable" + ) + if is_flatpak: + expected_msg += " inside the Flatpak container" + msg = message_mock.getmsg(usertypes.MessageLevel.error) - assert msg.text.startswith( - "Testprocess 'this_does_not_exist_either' failed to start:") - - if not utils.is_windows: - expected_msg = ( - "Hint: Make sure 'this_does_not_exist_either' exists and is executable") - if is_flatpak: - expected_msg += ' inside the Flatpak container' - assert msg.text.endswith(expected_msg) + assert msg.text == expected_msg assert not proc.outcome.running assert proc.outcome.status is None -- cgit v1.2.3-54-g00ecf From 47ef2ca41d6f1f3981b4667105f9a1ce535beee6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 29 Aug 2022 20:03:37 +0200 Subject: Relax errors shown in the UI - Hide CSP error even if it's prefixed by [Report only] - Always hide errors from Greasemonkey scripts --- doc/help/settings.asciidoc | 5 +++-- qutebrowser/config/configdata.yml | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 93c43cd8b..110a24cad 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -2415,13 +2415,13 @@ Default: - +pass:[userscript:_qute_stylesheet]+: -* +pass:[Refused to apply inline style because it violates the following Content Security Policy directive: *]+ +* +pass:[*Refused to apply inline style because it violates the following Content Security Policy directive: *]+ [[content.javascript.log_message.levels]] === content.javascript.log_message.levels Javascript message sources/levels to show in the qutebrowser UI. When a JavaScript message is logged from a location matching the glob pattern given in the key, and is from one of the levels listed as value, it's surfaced as a message in the qutebrowser UI. -By default, errors happening in qutebrowser internally or in userscripts are shown to the user. +By default, errors happening in qutebrowser internally are shown to the user. Type: <> @@ -2433,6 +2433,7 @@ Default: - +pass:[userscript:*]+: * +pass:[error]+ +- +pass:[userscript:GM-*]+: empty [[content.javascript.modal_dialog]] === content.javascript.modal_dialog diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 8a676145d..3e94fc4ed 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -950,12 +950,14 @@ content.javascript.log_message.levels: keytype: String valtype: name: FlagList + none_ok: true valid_values: - info: Show JS info as messages. - warning: Show JS warnings as messages. - error: Show JS errors as messages. default: "qute:*": ["error"] + "userscript:GM-*": [] "userscript:*": ["error"] desc: >- Javascript message sources/levels to show in the qutebrowser UI. @@ -964,8 +966,8 @@ content.javascript.log_message.levels: pattern given in the key, and is from one of the levels listed as value, it's surfaced as a message in the qutebrowser UI. - By default, errors happening in qutebrowser internally or in userscripts are - shown to the user. + By default, errors happening in qutebrowser internally are shown to the + user. content.javascript.log_message.excludes: type: @@ -977,7 +979,7 @@ content.javascript.log_message.excludes: valtype: String default: "userscript:_qute_stylesheet": - - "Refused to apply inline style because it violates the following Content + - "*Refused to apply inline style because it violates the following Content Security Policy directive: *" desc: >- Javascript messages to *not* show in the UI, despite a corresponding -- cgit v1.2.3-54-g00ecf From 7c573bcc7e1982734ff0f1c042e4d78f8f7fe6e9 Mon Sep 17 00:00:00 2001 From: Tomasz Cebula Date: Fri, 9 Sep 2022 10:21:14 +0200 Subject: Fix for dissapearing Widgets --- qutebrowser/mainwindow/statusbar/bar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index e2b6e5786..7bf42675d 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -287,6 +287,8 @@ class StatusBar(QWidget): self.backforward, self.tabindex, self.keystring, self.prog, self.clock, *self._text_widgets]: assert isinstance(widget, QWidget) + if widget in [self.prog, self.backforward]: + widget.enabled=False widget.hide() self._hbox.removeWidget(widget) self._text_widgets.clear() -- cgit v1.2.3-54-g00ecf From de7bb2791fa494d080a15ce30ce9dc49d455fa7c Mon Sep 17 00:00:00 2001 From: Tomasz Cebula Date: Sat, 10 Sep 2022 09:44:17 +0200 Subject: Style and type adjustment for the widget fix Added proper whitespace and mypy type ignore --- qutebrowser/mainwindow/statusbar/bar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index 7bf42675d..c78426100 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -288,7 +288,7 @@ class StatusBar(QWidget): self.keystring, self.prog, self.clock, *self._text_widgets]: assert isinstance(widget, QWidget) if widget in [self.prog, self.backforward]: - widget.enabled=False + widget.enabled = False # type: ignore[attr-defined] widget.hide() self._hbox.removeWidget(widget) self._text_widgets.clear() -- cgit v1.2.3-54-g00ecf From 9c460903c583a87320a89e95f78314e494eefbdb Mon Sep 17 00:00:00 2001 From: Tomasz Cebula Date: Sat, 10 Sep 2022 09:53:05 +0200 Subject: Another style fix --- qutebrowser/mainwindow/statusbar/bar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index c78426100..7e5a8ff2c 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -288,7 +288,7 @@ class StatusBar(QWidget): self.keystring, self.prog, self.clock, *self._text_widgets]: assert isinstance(widget, QWidget) if widget in [self.prog, self.backforward]: - widget.enabled = False # type: ignore[attr-defined] + widget.enabled = False # type: ignore[attr-defined] widget.hide() self._hbox.removeWidget(widget) self._text_widgets.clear() -- cgit v1.2.3-54-g00ecf From 79bb6670d8969b850965cd5d895bcd8f09d59311 Mon Sep 17 00:00:00 2001 From: toofar Date: Fri, 16 Sep 2022 16:40:57 +1200 Subject: bar: Test enabled attribute on progress and backforward There is now some code in statusbar relying on the enabled attribute stopping events from being processed (or at least stopping them from showing the widget again). So add tests to make sure that behaviour keeps working. Also split the big test in test_backforward into a couple of smaller ones and pull some common lines out to a (still clunky) fixture. --- .../unit/mainwindow/statusbar/test_backforward.py | 71 ++++++++++++++-------- tests/unit/mainwindow/statusbar/test_progress.py | 8 +++ 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/tests/unit/mainwindow/statusbar/test_backforward.py b/tests/unit/mainwindow/statusbar/test_backforward.py index d3e033b34..ac73f8ee1 100644 --- a/tests/unit/mainwindow/statusbar/test_backforward.py +++ b/tests/unit/mainwindow/statusbar/test_backforward.py @@ -31,55 +31,72 @@ def backforward_widget(qtbot): return widget +@pytest.fixture +def tabs(tabbed_browser_stubs): + tabbed_browser = tabbed_browser_stubs[0] + tabbed_browser.widget.current_index = 1 + return tabbed_browser + + @pytest.mark.parametrize('can_go_back, can_go_forward, expected_text', [ (False, False, ''), (True, False, '[<]'), (False, True, '[>]'), (True, True, '[<>]'), ]) -def test_backforward_widget(backforward_widget, tabbed_browser_stubs, - fake_web_tab, can_go_back, can_go_forward, - expected_text): +def test_widget_state(backforward_widget, tabs, + fake_web_tab, can_go_back, can_go_forward, + expected_text): """Ensure the Backforward widget shows the correct text.""" tab = fake_web_tab(can_go_back=can_go_back, can_go_forward=can_go_forward) - tabbed_browser = tabbed_browser_stubs[0] - tabbed_browser.widget.current_index = 1 - tabbed_browser.widget.tabs = [tab] + tabs.widget.tabs = [tab] backforward_widget.enabled = True - backforward_widget.on_tab_cur_url_changed(tabbed_browser) + backforward_widget.on_tab_cur_url_changed(tabs) assert backforward_widget.text() == expected_text assert backforward_widget.isVisible() == bool(expected_text) - # Check that the widget stays hidden if not in the statusbar - backforward_widget.enabled = False - backforward_widget.hide() - backforward_widget.on_tab_cur_url_changed(tabbed_browser) - assert backforward_widget.isHidden() - # Check that the widget gets reset if empty. - if can_go_back and can_go_forward: - tab = fake_web_tab(can_go_back=False, can_go_forward=False) - tabbed_browser.widget.tabs = [tab] - backforward_widget.enabled = True - backforward_widget.on_tab_cur_url_changed(tabbed_browser) - assert backforward_widget.text() == '' - assert not backforward_widget.isVisible() +def test_state_changes_on_tab_change(backforward_widget, tabs, fake_web_tab): + """Test we go invisible when switching to a tab without history.""" + tab_with_history = fake_web_tab(can_go_back=True, can_go_forward=True) + tab_without_history = fake_web_tab(can_go_back=False, can_go_forward=False) + tabs.widget.tabs = [tab_with_history] + backforward_widget.enabled = True + + backforward_widget.on_tab_cur_url_changed(tabs) + assert backforward_widget.isVisible() + + tabs.widget.tabs = [tab_without_history] + backforward_widget.on_tab_cur_url_changed(tabs) + assert backforward_widget.text() == '' + assert not backforward_widget.isVisible() -def test_none_tab(backforward_widget, tabbed_browser_stubs, fake_web_tab): +def test_none_tab(backforward_widget, tabs, fake_web_tab): """Make sure nothing crashes when passing None as tab.""" tab = fake_web_tab(can_go_back=True, can_go_forward=True) - tabbed_browser = tabbed_browser_stubs[0] - tabbed_browser.widget.current_index = 1 - tabbed_browser.widget.tabs = [tab] + tabs.widget.tabs = [tab] backforward_widget.enabled = True - backforward_widget.on_tab_cur_url_changed(tabbed_browser) + backforward_widget.on_tab_cur_url_changed(tabs) assert backforward_widget.text() == '[<>]' assert backforward_widget.isVisible() - tabbed_browser.widget.current_index = -1 - backforward_widget.on_tab_cur_url_changed(tabbed_browser) + tabs.widget.current_index = -1 + backforward_widget.on_tab_cur_url_changed(tabs) assert backforward_widget.text() == '' assert not backforward_widget.isVisible() + + +def test_not_shown_when_disabled(backforward_widget, tabs, fake_web_tab): + """The widget shouldn't get shown on an event when it's disabled.""" + tab = fake_web_tab(can_go_back=True, can_go_forward=True) + tabs.widget.tabs = [tab] + + backforward_widget.enabled = False + backforward_widget.on_tab_cur_url_changed(tabs) + assert not backforward_widget.isVisible() + + backforward_widget.on_tab_changed(tab) + assert not backforward_widget.isVisible() diff --git a/tests/unit/mainwindow/statusbar/test_progress.py b/tests/unit/mainwindow/statusbar/test_progress.py index 888ed5943..1cc3bf9af 100644 --- a/tests/unit/mainwindow/statusbar/test_progress.py +++ b/tests/unit/mainwindow/statusbar/test_progress.py @@ -69,6 +69,14 @@ def test_tab_changed(fake_web_tab, progress_widget, progress, load_status, assert actual == expected +def test_not_shown_when_disabled(progress_widget, fake_web_tab): + """The widget shouldn't get shown on an event when it's disabled.""" + tab = fake_web_tab(progress=15, load_status=usertypes.LoadStatus.loading) + progress_widget.enabled = False + progress_widget.on_tab_changed(tab) + assert not progress_widget.isVisible() + + def test_progress_affecting_statusbar_height(config_stub, fake_statusbar, progress_widget): """Make sure the statusbar stays the same height when progress is shown. -- cgit v1.2.3-54-g00ecf From ecd7565aff904fa857d10abb2dc3d0485a45fd03 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Sep 2022 10:51:27 +0200 Subject: requirements: Work around limitations for macOS-specific deps Also see #3526 --- misc/requirements/requirements-qutebrowser.txt-raw | 11 +++++++---- requirements.txt | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/misc/requirements/requirements-qutebrowser.txt-raw b/misc/requirements/requirements-qutebrowser.txt-raw index c628f528a..ab18a7caa 100644 --- a/misc/requirements/requirements-qutebrowser.txt-raw +++ b/misc/requirements/requirements-qutebrowser.txt-raw @@ -2,8 +2,13 @@ Jinja2 PyYAML ## Only used on macOS to make borderless windows resizable -pyobjc-core -pyobjc-framework-Cocoa +## our recompile_requirements.py can't really deal with +## platform-specific dependencies unfortunately... +# pyobjc-core +# pyobjc-framework-Cocoa +#@ add: # Unpinned due to recompile_requirements.py limitations +#@ add: pyobjc-core ; sys_platform=="darwin" +#@ add: pyobjc-framework-Cocoa ; sys_platform=="darwin" ## stdlib backports importlib-resources @@ -20,5 +25,3 @@ typing_extensions # from importlib-metadata #@ markers: importlib-resources python_version=="3.7.*" or python_version=="3.8.*" #@ markers: importlib-metadata python_version=="3.7.*" #@ markers: typing_extensions python_version<"3.8" -#@ markers: pyobjc-core sys_platform=="darwin" -#@ markers: pyobjc-framework-Cocoa sys_platform=="darwin" diff --git a/requirements.txt b/requirements.txt index fe6001ae4..e0ea72e0d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,8 +7,9 @@ importlib-resources==5.9.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 MarkupSafe==2.1.1 Pygments==2.13.0 -pyobjc-core==8.5 ; sys_platform=="darwin" -pyobjc-framework-Cocoa==8.5 ; sys_platform=="darwin" PyYAML==6.0 typing_extensions==4.3.0 ; python_version<"3.8" zipp==3.8.1 +# Unpinned due to recompile_requirements.py limitations +pyobjc-core ; sys_platform=="darwin" +pyobjc-framework-Cocoa ; sys_platform=="darwin" -- cgit v1.2.3-54-g00ecf From 2f9ba78852f7bdc8c30c595d5fadc3444f28868d Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 19 Sep 2022 09:03:18 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 19 +++++++++++-------- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 4 ++-- misc/requirements/requirements-pylint.txt | 15 ++++++++------- misc/requirements/requirements-pyroma.txt | 6 +++--- misc/requirements/requirements-sphinx.txt | 6 +++--- misc/requirements/requirements-tests.txt | 18 +++++++++--------- misc/requirements/requirements-tox.txt | 10 +++++----- misc/requirements/requirements-vulture.txt | 2 +- misc/requirements/requirements-yamllint.txt | 4 ++-- 10 files changed, 45 insertions(+), 41 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 777c78796..d864d28d4 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -3,31 +3,33 @@ bleach==5.0.1 build==0.8.0 bump2version==1.0.1 -certifi==2022.6.15 +certifi==2022.9.14 cffi==1.15.1 charset-normalizer==2.1.1 commonmark==0.9.1 -cryptography==37.0.4 +cryptography==38.0.1 docutils==0.19 github3.py==3.2.0 -hunter==3.4.3 -idna==3.3 +hunter==3.5.0 +idna==3.4 importlib-metadata==4.12.0 +jaraco.classes==3.2.2 jeepney==0.8.0 -keyring==23.8.2 +keyring==23.9.3 manhole==1.8.0 +more-itertools==8.14.0 packaging==21.3 pep517==0.13.0 pkginfo==1.8.3 ply==3.11 pycparser==2.21 Pygments==2.13.0 -PyJWT==2.4.0 +PyJWT==2.5.0 Pympler==1.0.1 pyparsing==3.0.9 PyQt-builder==1.13.0 python-dateutil==2.8.2 -readme-renderer==37.0 +readme-renderer==37.1 requests==2.28.1 requests-toolbelt==0.9.1 rfc3986==2.0.0 @@ -38,8 +40,9 @@ six==1.16.0 toml==0.10.2 tomli==2.0.1 twine==4.0.1 +types-cryptography==3.3.23 typing_extensions==4.3.0 uritemplate==4.1.1 -# urllib3==1.26.11 +# urllib3==1.26.12 webencodings==0.5.1 zipp==3.8.1 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 78660a405..d1f671612 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,7 +2,7 @@ attrs==22.1.0 flake8==5.0.4 -flake8-bugbear==22.7.1 +flake8-bugbear==22.9.11 flake8-builtins==1.5.3 flake8-comprehensions==3.10.0 flake8-copyright==0.2.3 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 3db372d82..4a5ac9359 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.2 -pyinstaller==5.3 -pyinstaller-hooks-contrib==2022.8 +pyinstaller==5.4.1 +pyinstaller-hooks-contrib==2022.10 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index acc335c55..e017e6ba6 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,22 +1,22 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==2.11.7 -certifi==2022.6.15 +astroid==2.12.10 +certifi==2022.9.14 cffi==1.15.1 charset-normalizer==2.1.1 -cryptography==37.0.4 +cryptography==38.0.1 dill==0.3.5.1 future==0.18.2 github3.py==3.2.0 -idna==3.3 +idna==3.4 isort==5.10.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 pefile==2022.5.30 platformdirs==2.5.2 pycparser==2.21 -PyJWT==2.4.0 -pylint==2.14.5 +PyJWT==2.5.0 +pylint==2.15.2 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 @@ -24,7 +24,8 @@ six==1.16.0 tomli==2.0.1 tomlkit==0.11.4 typed-ast==1.5.4 ; python_version<"3.8" +types-cryptography==3.3.23 typing_extensions==4.3.0 uritemplate==4.1.1 -# urllib3==1.26.11 +# urllib3==1.26.12 wrapt==1.14.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index f7f97fba1..97addae15 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,10 +1,10 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py build==0.8.0 -certifi==2022.6.15 +certifi==2022.9.14 charset-normalizer==2.1.1 docutils==0.19 -idna==3.3 +idna==3.4 packaging==21.3 pep517==0.13.0 Pygments==2.13.0 @@ -12,4 +12,4 @@ pyparsing==3.0.9 pyroma==4.0 requests==2.28.1 tomli==2.0.1 -urllib3==1.26.11 +urllib3==1.26.12 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 50c892cf0..72c43f952 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -2,10 +2,10 @@ alabaster==0.7.12 Babel==2.10.3 -certifi==2022.6.15 +certifi==2022.9.14 charset-normalizer==2.1.1 docutils==0.19 -idna==3.3 +idna==3.4 imagesize==1.4.1 importlib-metadata==4.12.0 Jinja2==3.1.2 @@ -23,5 +23,5 @@ sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.11 +urllib3==1.26.12 zipp==3.8.1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index a7e55e32d..ce09a7f67 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -2,25 +2,25 @@ attrs==22.1.0 beautifulsoup4==4.11.1 -certifi==2022.6.15 +certifi==2022.9.14 charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 coverage==6.4.4 -exceptiongroup==1.0.0rc8 +exceptiongroup==1.0.0rc9 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 glob2==0.7 -hunter==3.4.3 -hypothesis==6.54.4 -idna==3.3 +hunter==3.5.0 +hypothesis==6.54.6 +idna==3.4 importlib-metadata==4.12.0 iniconfig==1.1.1 itsdangerous==2.1.2 jaraco.functools==3.5.1 # Jinja2==3.1.2 -Mako==1.2.1 +Mako==1.2.2 manhole==1.8.0 # MarkupSafe==2.1.1 more-itertools==8.14.0 @@ -32,7 +32,7 @@ py==1.11.0 py-cpuinfo==8.0.0 Pygments==2.13.0 pyparsing==3.0.9 -pytest==7.1.2 +pytest==7.1.3 pytest-bdd==6.0.1 pytest-benchmark==3.4.1 pytest-cov==3.0.0 @@ -53,7 +53,7 @@ soupsieve==2.3.2.post1 tldextract==3.3.1 toml==0.10.2 tomli==2.0.1 -urllib3==1.26.11 -vulture==2.5 +urllib3==1.26.12 +vulture==2.6 Werkzeug==2.2.2 zipp==3.8.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index e8975efda..a7ee19364 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -distlib==0.3.5 +distlib==0.3.6 filelock==3.8.0 packaging==21.3 pip==22.2.2 @@ -8,9 +8,9 @@ platformdirs==2.5.2 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.2.0 +setuptools==65.3.0 six==1.16.0 -toml==0.10.2 -tox==3.25.1 -virtualenv==20.16.3 +tomli==2.0.1 +tox==3.26.0 +virtualenv==20.16.5 wheel==0.37.1 diff --git a/misc/requirements/requirements-vulture.txt b/misc/requirements/requirements-vulture.txt index 482a74195..7d0ef20d3 100644 --- a/misc/requirements/requirements-vulture.txt +++ b/misc/requirements/requirements-vulture.txt @@ -1,4 +1,4 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py toml==0.10.2 -vulture==2.5 +vulture==2.6 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index 78e80a261..efec35e56 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -pathspec==0.9.0 +pathspec==0.10.1 PyYAML==6.0 -yamllint==1.27.1 +yamllint==1.28.0 -- cgit v1.2.3-54-g00ecf From 3f542636af30ca932deb0ccbb5ebf4ff4281680e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Sep 2022 11:16:03 +0200 Subject: Update changelog URLs --- scripts/dev/changelog_urls.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index bcf30fc78..5ddb1b949 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -97,6 +97,7 @@ "wrapt": "https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst", "pep517": "https://github.com/pypa/pep517/blob/main/doc/changelog.rst", "cryptography": "https://cryptography.io/en/latest/changelog.html", + "types-cryptography": "https://github.com/python/typeshed/commits/master/stubs/cryptography", "toml": "https://github.com/uiri/toml/releases", "tomli": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md", "PyQt5": "https://www.riverbankcomputing.com/news", @@ -145,6 +146,7 @@ "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/CHANGES.rst", + "jaraco.classes": "https://github.com/jaraco/jaraco.classes/blob/main/CHANGES.rst", "pkginfo": "https://bazaar.launchpad.net/~tseaver/pkginfo/trunk/view/head:/CHANGES.txt", "readme-renderer": "https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst", "requests-toolbelt": "https://github.com/requests/toolbelt/blob/master/HISTORY.rst", -- cgit v1.2.3-54-g00ecf From 03e510acff238e0247f76a1f3fcc66cc6a7f5dda Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Sep 2022 11:21:11 +0200 Subject: Update pylint ignores --- qutebrowser/completion/completer.py | 1 - scripts/dev/ua_fetch.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index cf6984288..34e68fd2a 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -165,7 +165,6 @@ class Completer(QObject): # cursor is in a space between two existing words parts.insert(i, '') prefix = [x.strip() for x in parts[:i]] - # pylint: disable-next=unnecessary-list-index-lookup center = parts[i].strip() # strip trailing whitespace included as a separate token postfix = [x.strip() for x in parts[i+1:] if not x.isspace()] diff --git a/scripts/dev/ua_fetch.py b/scripts/dev/ua_fetch.py index 6e5bc66ac..743cd252e 100644 --- a/scripts/dev/ua_fetch.py +++ b/scripts/dev/ua_fetch.py @@ -42,6 +42,7 @@ def wrap(ini, sub, string): return textwrap.wrap(string, width=80, initial_indent=ini, subsequent_indent=sub) +# pylint: disable-next=missing-timeout response = requests.get('https://raw.githubusercontent.com/Kikobeats/top-user-agents/master/index.json') if response.status_code != 200: -- cgit v1.2.3-54-g00ecf From ce2fa1339833c6db80e0d8608402c1732d42ead3 Mon Sep 17 00:00:00 2001 From: toofar Date: Thu, 22 Sep 2022 07:13:52 +1200 Subject: Update changelog for #7390 --- doc/changelog.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index d16b5f999..6fc498686 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -116,6 +116,8 @@ Fixed shown, qutebrowser used to only show one message. This is now only done when the two messages are completely equivalent (text, level, etc.) instead of doing so when only the text matches. +- The `progress` and `backforward` statusbar widgets now stay removed if you + choose to remove them. Previously they would appear again on navigation. [[v2.5.3]] v2.5.3 (unreleased) -- cgit v1.2.3-54-g00ecf From 1d90b8d95b8268eea90813f3a47e9334cc9ffa17 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 26 Sep 2022 04:55:52 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-sphinx.txt | 4 ++-- misc/requirements/requirements-tests.txt | 4 ++-- misc/requirements/requirements-tox.txt | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index d864d28d4..d6172de35 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -3,7 +3,7 @@ bleach==5.0.1 build==0.8.0 bump2version==1.0.1 -certifi==2022.9.14 +certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 commonmark==0.9.1 @@ -29,7 +29,7 @@ Pympler==1.0.1 pyparsing==3.0.9 PyQt-builder==1.13.0 python-dateutil==2.8.2 -readme-renderer==37.1 +readme-renderer==37.2 requests==2.28.1 requests-toolbelt==0.9.1 rfc3986==2.0.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index d1f671612..7fcced7e8 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,7 +2,7 @@ attrs==22.1.0 flake8==5.0.4 -flake8-bugbear==22.9.11 +flake8-bugbear==22.9.23 flake8-builtins==1.5.3 flake8-comprehensions==3.10.0 flake8-copyright==0.2.3 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index d40954835..d4433e0c2 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.0.0 -diff-cover==6.5.1 +diff-cover==7.0.1 importlib-metadata==4.12.0 importlib-resources==5.9.0 Jinja2==3.1.2 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 4a5ac9359..083e628f6 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.2 +altgraph==0.17.3 pyinstaller==5.4.1 pyinstaller-hooks-contrib==2022.10 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index e017e6ba6..d338a6c3f 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.12.10 -certifi==2022.9.14 +certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 cryptography==38.0.1 @@ -16,7 +16,7 @@ pefile==2022.5.30 platformdirs==2.5.2 pycparser==2.21 PyJWT==2.5.0 -pylint==2.15.2 +pylint==2.15.3 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 97addae15..7a7669e67 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py build==0.8.0 -certifi==2022.9.14 +certifi==2022.9.24 charset-normalizer==2.1.1 docutils==0.19 idna==3.4 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 72c43f952..bb723bb49 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -2,7 +2,7 @@ alabaster==0.7.12 Babel==2.10.3 -certifi==2022.9.14 +certifi==2022.9.24 charset-normalizer==2.1.1 docutils==0.19 idna==3.4 @@ -16,7 +16,7 @@ pyparsing==3.0.9 pytz==2022.2.1 requests==2.28.1 snowballstemmer==2.2.0 -Sphinx==5.1.1 +Sphinx==5.2.1 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index ce09a7f67..035de4225 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -2,7 +2,7 @@ attrs==22.1.0 beautifulsoup4==4.11.1 -certifi==2022.9.14 +certifi==2022.9.24 charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 @@ -20,7 +20,7 @@ iniconfig==1.1.1 itsdangerous==2.1.2 jaraco.functools==3.5.1 # Jinja2==3.1.2 -Mako==1.2.2 +Mako==1.2.3 manhole==1.8.0 # MarkupSafe==2.1.1 more-itertools==8.14.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index a7ee19364..9fc89eae0 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,7 +8,7 @@ platformdirs==2.5.2 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.3.0 +setuptools==65.4.0 six==1.16.0 tomli==2.0.1 tox==3.26.0 -- cgit v1.2.3-54-g00ecf From 31878b4b7bb9cdcefe6b4c2c2a854fafb20309af Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 Sep 2022 16:06:30 +0200 Subject: Speculatively stabilize :history-clear tests See #7415, #5390. Similar to ad429d9552a9f169a1122cb5784424848d4805e2. --- tests/end2end/features/test_history_bdd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/end2end/features/test_history_bdd.py b/tests/end2end/features/test_history_bdd.py index f2e018b9f..a68c7d621 100644 --- a/tests/end2end/features/test_history_bdd.py +++ b/tests/end2end/features/test_history_bdd.py @@ -67,4 +67,5 @@ def check_history(quteproc, server, tmpdir, expected): @bdd.then("the history should be empty") def check_history_empty(quteproc, server, tmpdir): + quteproc.wait_for(message='DELETE FROM History', category='sql') check_history(quteproc, server, tmpdir, '') -- cgit v1.2.3-54-g00ecf From 63d97aa69e71a7d7fbe10cbcab34d87b3e7c929a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 Sep 2022 18:12:23 +0200 Subject: doc: Expand FAQ on email usage See https://www.reddit.com/r/qutebrowser/comments/o7stdc/comment/ipritx9/?context=3 --- doc/faq.asciidoc | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/faq.asciidoc b/doc/faq.asciidoc index 4b3596285..bc604bd24 100644 --- a/doc/faq.asciidoc +++ b/doc/faq.asciidoc @@ -158,7 +158,7 @@ It also works nicely with rapid hints: :bind ;M hint --rapid links spawn umpv {hint-url} ---- -How do I use qutebrowser with mutt?:: +How do I use qutebrowser with mutt/neomutt or other mail clients?:: For security reasons, local files without `.html` extensions aren't rendered as HTML, see https://bugs.chromium.org/p/chromium/issues/detail?id=777737[this Chromium issue] @@ -166,8 +166,29 @@ How do I use qutebrowser with mutt?:: extension: + ---- - text/html; qutebrowser %s; needsterminal; nametemplate=%s.html +text/html; qutebrowser %s; needsterminal; nametemplate=%s.html ---- ++ +Note that you might want to add additional options to qutebrowser, so that it +runs as a seperate instance configured to disable JavaScript and avoid network +requests, in order to avoid privacy leaks when reading mails. The easiest way +to do so is by specifying a non-existent proxy server, e.g.: ++ +---- +qutebrowser --temp-basedir -s content.proxy http://localhost:666 -s content.javascript.enabled false %s +---- ++ +With Qt 6, using something like: ++ +---- +qutebrowser --temp-basedir -s content.dns_prefetch false -s content.javascript.enabled false %s +---- ++ +should lead to a similar result, due to a more restrictive implementation of +the `content.local_content_can_access_remote_urls` setting (`false` by default +already). However, it's advised to use a page like +https://www.emailprivacytester.com/[Email Privacy Tester] to verify your +configuration. What is the difference between bookmarks and quickmarks?:: Bookmarks will always use the title of the website as their name, but with quickmarks -- cgit v1.2.3-54-g00ecf From f39f6bc0a95d1f2924b8db01493fe289da02c702 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 Sep 2022 18:24:10 +0200 Subject: doc: Also disable DNS prefetch for mail leak prevention via proxy Looks like it's required there as well --- doc/faq.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/faq.asciidoc b/doc/faq.asciidoc index bc604bd24..bcbd0d29a 100644 --- a/doc/faq.asciidoc +++ b/doc/faq.asciidoc @@ -175,7 +175,7 @@ requests, in order to avoid privacy leaks when reading mails. The easiest way to do so is by specifying a non-existent proxy server, e.g.: + ---- -qutebrowser --temp-basedir -s content.proxy http://localhost:666 -s content.javascript.enabled false %s +qutebrowser --temp-basedir -s content.proxy http://localhost:666 -s content.dns_prefetch false -s content.javascript.enabled false %s ---- + With Qt 6, using something like: -- cgit v1.2.3-54-g00ecf From 8c02ef69ecf6ed58f0069012311229f55040ec54 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 Sep 2022 11:01:58 +0200 Subject: Add extra logging for calling into fusion style See https://github.com/qutebrowser/qutebrowser/issues/5124 --- qutebrowser/mainwindow/tabwidget.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 604b9eebd..f5446e963 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -805,10 +805,22 @@ class TabBarStyle(QCommonStyle): 'itemPixmapRect', 'itemTextRect', 'polish', 'styleHint', 'subControlRect', 'unpolish', 'drawItemText', 'sizeFromContents', 'drawPrimitive']: - target = getattr(self._style, method) - setattr(self, method, functools.partial(target)) + setattr(self, method, functools.partial(self._fusion_call, method)) super().__init__() + def _fusion_call(self, method: str, *args: Any) -> Any: + """Wrap a call to self._style to log RuntimeErrors. + + WORKAROUND for https://github.com/qutebrowser/qutebrowser/issues/5124 + """ + target = getattr(self._style, method) + try: + return target(*args) + except RuntimeError: + info = f"self._style.{method}{args}" + log.misc.warning(f"Got RuntimeError while calling {info}") + raise + def _draw_indicator(self, layouts, opt, p): """Draw the tab indicator. -- cgit v1.2.3-54-g00ecf From fa62360357e13f464ff04759f293e2990cf4f489 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 30 Sep 2022 20:15:27 +0200 Subject: Remove unneeded str Only needed in Python 3.5 times --- scripts/asciidoc2html.py | 6 +++--- scripts/dev/misc_checks.py | 6 +++--- scripts/mkvenv.py | 2 +- tests/end2end/features/test_downloads_bdd.py | 6 +++--- tests/helpers/fixtures.py | 2 +- tests/helpers/testutils.py | 4 ++-- tests/unit/browser/test_pdfjs.py | 2 +- tests/unit/browser/webkit/network/test_filescheme.py | 2 +- tests/unit/config/test_configfiles.py | 2 +- tests/unit/misc/test_editor.py | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index ba8493247..1b904736d 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -73,7 +73,7 @@ class AsciiDoc: def cleanup(self) -> None: """Clean up the temporary home directory for asciidoc.""" if self._homedir is not None and not self._failed: - shutil.rmtree(str(self._homedir)) + shutil.rmtree(self._homedir) def build(self) -> None: """Build either the website or the docs.""" @@ -119,7 +119,7 @@ class AsciiDoc: for filename in ['cheatsheet-big.png', 'cheatsheet-small.png']: src = REPO_ROOT / 'doc' / 'img' / filename dst = dst_path / filename - shutil.copy(str(src), str(dst)) + shutil.copy(src, dst) def _build_website_file(self, root: pathlib.Path, filename: str) -> None: """Build a single website file.""" @@ -131,7 +131,7 @@ class AsciiDoc: assert self._tempdir is not None # for mypy modified_src = self._tempdir / src.name - shutil.copy(str(REPO_ROOT / 'www' / 'header.asciidoc'), modified_src) + shutil.copy(REPO_ROOT / 'www' / 'header.asciidoc', modified_src) outfp = io.StringIO() diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 908daad4d..6759fc474 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -64,7 +64,7 @@ def _get_files( continue try: - with tokenize.open(str(path)): + with tokenize.open(path): pass except SyntaxError as e: # Could not find encoding @@ -274,7 +274,7 @@ def check_spelling(args: argparse.Namespace) -> Optional[bool]: try: ok = True for path in _get_files(verbose=args.verbose, ignored=ignored): - with tokenize.open(str(path)) as f: + with tokenize.open(path) as f: if not _check_spelling_file(path, f, patterns): ok = False print() @@ -292,7 +292,7 @@ def check_vcs_conflict(args: argparse.Namespace) -> Optional[bool]: if path.suffix in {'.rst', '.asciidoc'}: # False positives continue - with tokenize.open(str(path)) as f: + with tokenize.open(path) as f: for line in f: if any(line.startswith(c * 7) for c in '<>=|'): print("Found conflict marker in {}".format(path)) diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py index 737ea145d..005c657a1 100755 --- a/scripts/mkvenv.py +++ b/scripts/mkvenv.py @@ -180,7 +180,7 @@ def delete_old_venv(venv_dir: pathlib.Path) -> None: 'remove it.'.format(venv_dir)) print_command('rm -r', venv_dir, venv=False) - shutil.rmtree(str(venv_dir)) + shutil.rmtree(venv_dir) def create_venv(venv_dir: pathlib.Path, use_virtualenv: bool = False) -> None: diff --git a/tests/end2end/features/test_downloads_bdd.py b/tests/end2end/features/test_downloads_bdd.py index 804ed40fe..95707f710 100644 --- a/tests/end2end/features/test_downloads_bdd.py +++ b/tests/end2end/features/test_downloads_bdd.py @@ -38,7 +38,7 @@ def download_dir(tmpdir): downloads.ensure(dir=True) (downloads / 'subdir').ensure(dir=True) try: - os.mkfifo(str(downloads / 'fifo')) + os.mkfifo(downloads / 'fifo') except AttributeError: pass unwritable = downloads / 'unwritable' @@ -72,7 +72,7 @@ def check_ssl(): @bdd.when("the unwritable dir is unwritable") def check_unwritable(tmpdir): unwritable = tmpdir / 'downloads' / 'unwritable' - if os.access(str(unwritable), os.W_OK): + if os.access(unwritable, os.W_OK): # Docker container or similar pytest.skip("Unwritable dir was writable") @@ -166,4 +166,4 @@ def delete_file(tmpdir, filename): def fifo_should_be_fifo(tmpdir): download_dir = tmpdir / 'downloads' assert download_dir.exists() - assert not os.path.isfile(str(download_dir / 'fifo')) + assert not os.path.isfile(download_dir / 'fifo') diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index cc362290f..c36bc98cb 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -717,7 +717,7 @@ def state_config(data_tmpdir, monkeypatch): @pytest.fixture def unwritable_tmp_path(tmp_path): tmp_path.chmod(0) - if os.access(str(tmp_path), os.W_OK): + if os.access(tmp_path, os.W_OK): # Docker container or similar pytest.skip("Directory was still writable") diff --git a/tests/helpers/testutils.py b/tests/helpers/testutils.py index c607718ab..4c6d253d7 100644 --- a/tests/helpers/testutils.py +++ b/tests/helpers/testutils.py @@ -224,11 +224,11 @@ def nop_contextmanager(): def change_cwd(path): """Use a path as current working directory.""" old_cwd = pathlib.Path.cwd() - os.chdir(str(path)) + os.chdir(path) try: yield finally: - os.chdir(str(old_cwd)) + os.chdir(old_cwd) @contextlib.contextmanager diff --git a/tests/unit/browser/test_pdfjs.py b/tests/unit/browser/test_pdfjs.py index 86b875be5..c1e8d2efe 100644 --- a/tests/unit/browser/test_pdfjs.py +++ b/tests/unit/browser/test_pdfjs.py @@ -178,7 +178,7 @@ def unreadable_file(tmpdir): unreadable_file = tmpdir / 'unreadable' unreadable_file.ensure() unreadable_file.chmod(0) - if os.access(str(unreadable_file), os.R_OK): + if os.access(unreadable_file, os.R_OK): # Docker container or similar pytest.skip("File was still readable") diff --git a/tests/unit/browser/webkit/network/test_filescheme.py b/tests/unit/browser/webkit/network/test_filescheme.py index 12cacb5a2..6d8b93fea 100644 --- a/tests/unit/browser/webkit/network/test_filescheme.py +++ b/tests/unit/browser/webkit/network/test_filescheme.py @@ -48,7 +48,7 @@ def test_get_file_list(tmpdir, create_file, create_dir, filterfunc, expected): if create_file or create_dir: path.ensure(dir=create_dir) - all_files = os.listdir(str(tmpdir)) + all_files = os.listdir(tmpdir) result = filescheme.get_file_list(str(tmpdir), all_files, filterfunc) item = {'name': 'foo', 'absname': str(path)} diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index 00bc8a806..f93986306 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -505,7 +505,7 @@ class TestYaml: def unreadable_autoconfig(self, autoconfig): autoconfig.fobj.ensure() autoconfig.fobj.chmod(0) - if os.access(str(autoconfig.fobj), os.R_OK): + if os.access(autoconfig.fobj, os.R_OK): # Docker container or similar pytest.skip("File was still readable") diff --git a/tests/unit/misc/test_editor.py b/tests/unit/misc/test_editor.py index 91bdce26b..bec775add 100644 --- a/tests/unit/misc/test_editor.py +++ b/tests/unit/misc/test_editor.py @@ -128,7 +128,7 @@ class TestFileHandling: filename = pathlib.Path(editor._filename) assert filename.exists() filename.chmod(0o277) - if os.access(str(filename), os.R_OK): + if os.access(filename, os.R_OK): # Docker container or similar pytest.skip("File was still readable") -- cgit v1.2.3-54-g00ecf From 00afbad426d32c07a6c39e7dc552fb5a53b09664 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 1 Oct 2022 10:25:56 +0200 Subject: doc: Add link to another emacs-like config --- doc/help/configuring.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/help/configuring.asciidoc b/doc/help/configuring.asciidoc index 3ecef8ecf..cab3df59a 100644 --- a/doc/help/configuring.asciidoc +++ b/doc/help/configuring.asciidoc @@ -449,6 +449,7 @@ Various emacs/conkeror-like keybinding configs exist: - https://gitlab.com/Kaligule/qutebrowser-emacs-config/blob/master/config.py[Kaligule] - https://web.archive.org/web/20210512185023/https://me0w.net/pit/1540882719[nm0i] - https://www.reddit.com/r/qutebrowser/comments/eh10i7/config_share_qute_with_emacs_keybindings/[jasonsun0310] +- https://git.sr.ht/~willvaughn/dots/tree/mjolnir/item/.config/qutebrowser/qutemacs.py[willvaughn] It's also mostly possible to get rid of modal keybindings by setting `input.insert_mode.auto_enter` to `false`, and `input.forward_unbound_keys` to -- cgit v1.2.3-54-g00ecf From ed4615eb444851df1a4521ad46b0f4388a083000 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 3 Oct 2022 04:36:58 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 8 ++++---- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-sphinx.txt | 6 +++--- misc/requirements/requirements-tests.txt | 14 +++++++------- misc/requirements/requirements-tox.txt | 2 +- requirements.txt | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index d6172de35..3af6f29c2 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -10,10 +10,10 @@ commonmark==0.9.1 cryptography==38.0.1 docutils==0.19 github3.py==3.2.0 -hunter==3.5.0 +hunter==3.5.1 idna==3.4 -importlib-metadata==4.12.0 -jaraco.classes==3.2.2 +importlib-metadata==5.0.0 +jaraco.classes==3.2.3 jeepney==0.8.0 keyring==23.9.3 manhole==1.8.0 @@ -33,7 +33,7 @@ readme-renderer==37.2 requests==2.28.1 requests-toolbelt==0.9.1 rfc3986==2.0.0 -rich==12.5.1 +rich==12.6.0 SecretStorage==3.3.3 sip==6.6.2 six==1.16.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index d4433e0c2..c0ea15680 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -2,17 +2,17 @@ chardet==5.0.0 diff-cover==7.0.1 -importlib-metadata==4.12.0 +importlib-metadata==5.0.0 importlib-resources==5.9.0 Jinja2==3.1.2 lxml==4.9.1 MarkupSafe==2.1.1 -mypy==0.971 +mypy==0.981 mypy-extensions==0.4.3 pluggy==1.0.0 Pygments==2.13.0 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-PyYAML==6.0.11 +types-PyYAML==6.0.12 typing_extensions==4.3.0 zipp==3.8.1 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index d338a6c3f..873d994ec 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -22,7 +22,7 @@ python-dateutil==2.8.2 requests==2.28.1 six==1.16.0 tomli==2.0.1 -tomlkit==0.11.4 +tomlkit==0.11.5 typed-ast==1.5.4 ; python_version<"3.8" types-cryptography==3.3.23 typing_extensions==4.3.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index bb723bb49..8348a1111 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -7,16 +7,16 @@ charset-normalizer==2.1.1 docutils==0.19 idna==3.4 imagesize==1.4.1 -importlib-metadata==4.12.0 +importlib-metadata==5.0.0 Jinja2==3.1.2 MarkupSafe==2.1.1 packaging==21.3 Pygments==2.13.0 pyparsing==3.0.9 -pytz==2022.2.1 +pytz==2022.4 requests==2.28.1 snowballstemmer==2.2.0 -Sphinx==5.2.1 +Sphinx==5.2.3 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 035de4225..575d5b0ae 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -6,19 +6,19 @@ certifi==2022.9.24 charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 -coverage==6.4.4 +coverage==6.5.0 exceptiongroup==1.0.0rc9 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 glob2==0.7 -hunter==3.5.0 -hypothesis==6.54.6 +hunter==3.5.1 +hypothesis==6.56.0 idna==3.4 -importlib-metadata==4.12.0 +importlib-metadata==5.0.0 iniconfig==1.1.1 itsdangerous==2.1.2 -jaraco.functools==3.5.1 +jaraco.functools==3.5.2 # Jinja2==3.1.2 Mako==1.2.3 manhole==1.8.0 @@ -35,10 +35,10 @@ pyparsing==3.0.9 pytest==7.1.3 pytest-bdd==6.0.1 pytest-benchmark==3.4.1 -pytest-cov==3.0.0 +pytest-cov==4.0.0 pytest-forked==1.4.0 pytest-instafail==0.4.2 -pytest-mock==3.8.2 +pytest-mock==3.9.0 pytest-qt==4.1.0 pytest-repeat==0.9.1 pytest-rerunfailures==10.2 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 9fc89eae0..263ebc095 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,7 +8,7 @@ platformdirs==2.5.2 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.4.0 +setuptools==65.4.1 six==1.16.0 tomli==2.0.1 tox==3.26.0 diff --git a/requirements.txt b/requirements.txt index e0ea72e0d..855df3163 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ adblock==0.6.0 colorama==0.4.5 -importlib-metadata==4.12.0 ; python_version=="3.7.*" +importlib-metadata==5.0.0 ; python_version=="3.7.*" importlib-resources==5.9.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 MarkupSafe==2.1.1 -- cgit v1.2.3-54-g00ecf From 645c6c6ea722dd663b5e0e209771f7e11bb14c91 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 3 Oct 2022 14:47:48 +0200 Subject: Remove now unneeded type ignore Looks like https://github.com/python/typeshed/issues/2093 was fixed --- qutebrowser/config/configfiles.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py index 556cae4e5..412f88e54 100644 --- a/qutebrowser/config/configfiles.py +++ b/qutebrowser/config/configfiles.py @@ -141,8 +141,7 @@ class StateConfig(configparser.ConfigParser): old_qutebrowser_version = self['general'].get('version', None) if old_qutebrowser_version is None: - # https://github.com/python/typeshed/issues/2093 - return # type: ignore[unreachable] + return try: old_version = utils.VersionNumber.parse(old_qutebrowser_version) -- cgit v1.2.3-54-g00ecf From 208be25da4a0752be27eb80767f93168f44fc73f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 7 Oct 2022 12:26:30 +0200 Subject: bleeding tests: Use forks of pytest-benchmark and -instafail See https://github.com/pytest-dev/pytest/pull/9118 --- misc/requirements/requirements-tests-bleeding.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/requirements/requirements-tests-bleeding.txt b/misc/requirements/requirements-tests-bleeding.txt index f1ad30158..7a34c230c 100644 --- a/misc/requirements/requirements-tests-bleeding.txt +++ b/misc/requirements/requirements-tests-bleeding.txt @@ -8,8 +8,10 @@ git+https://github.com/pallets/werkzeug.git # transitive dep, but needed to wor git+https://github.com/HypothesisWorks/hypothesis.git#subdirectory=hypothesis-python git+https://github.com/pytest-dev/pytest.git git+https://github.com/pytest-dev/pytest-bdd.git -git+https://github.com/ionelmc/pytest-benchmark.git -git+https://github.com/pytest-dev/pytest-instafail.git +# WORKAROUND for those projects using deprectated pytest functionality +# See https://github.com/pytest-dev/pytest/pull/9118 +git+https://github.com/The-Compiler/pytest-benchmark.git@new-hook-decorators +git+https://github.com/The-Compiler/pytest-instafail.git@new-hookimpl git+https://github.com/pytest-dev/pytest-mock.git git+https://github.com/pytest-dev/pytest-qt.git git+https://github.com/pytest-dev/pytest-rerunfailures.git -- cgit v1.2.3-54-g00ecf From 5a880944352da582bd2e1bb3fcbbcc8999e9799e Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Sat, 8 Oct 2022 12:44:01 +1100 Subject: Send source URL to Breadability Used to construct fully-qualified URLs from relative links. Without it you get broken images and links. --- misc/userscripts/readability | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/userscripts/readability b/misc/userscripts/readability index 19b687939..07095a5b8 100755 --- a/misc/userscripts/readability +++ b/misc/userscripts/readability @@ -47,7 +47,7 @@ with codecs.open(os.environ['QUTE_HTML'], 'r', 'utf-8') as source: try: from breadability.readable import Article as reader - doc = reader(data) + doc = reader(data, os.environ['QUTE_URL']) title = doc._original_document.title content = HEADER % title + doc.readable + "" except ImportError: -- cgit v1.2.3-54-g00ecf From c596dae600e997962d7fdae53cfbcd8a36861200 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 9 Oct 2022 10:57:47 +0200 Subject: bleeding tests: Switch back to pytest-benchmark master https://github.com/ionelmc/pytest-benchmark/pull/224 was merged --- misc/requirements/requirements-tests-bleeding.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/requirements/requirements-tests-bleeding.txt b/misc/requirements/requirements-tests-bleeding.txt index 7a34c230c..d249a7e7e 100644 --- a/misc/requirements/requirements-tests-bleeding.txt +++ b/misc/requirements/requirements-tests-bleeding.txt @@ -8,9 +8,9 @@ git+https://github.com/pallets/werkzeug.git # transitive dep, but needed to wor git+https://github.com/HypothesisWorks/hypothesis.git#subdirectory=hypothesis-python git+https://github.com/pytest-dev/pytest.git git+https://github.com/pytest-dev/pytest-bdd.git -# WORKAROUND for those projects using deprectated pytest functionality -# See https://github.com/pytest-dev/pytest/pull/9118 -git+https://github.com/The-Compiler/pytest-benchmark.git@new-hook-decorators +git+https://github.com/ionelmc/pytest-benchmark.git +# WORKAROUND for pytest-instafail using deprectated pytest functionality +# See https://github.com/pytest-dev/pytest-instafail/pull/26 git+https://github.com/The-Compiler/pytest-instafail.git@new-hookimpl git+https://github.com/pytest-dev/pytest-mock.git git+https://github.com/pytest-dev/pytest-qt.git -- cgit v1.2.3-54-g00ecf From a7c2a690e4633e1ca713347b5c52618a4e84398a Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 10 Oct 2022 04:51:44 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 10 +++++----- misc/requirements/requirements-flake8.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 8 ++++---- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 8 ++++---- requirements.txt | 6 +++--- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 3af6f29c2..aab6db5b5 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -27,22 +27,22 @@ Pygments==2.13.0 PyJWT==2.5.0 Pympler==1.0.1 pyparsing==3.0.9 -PyQt-builder==1.13.0 +PyQt-builder==1.14.0 python-dateutil==2.8.2 readme-renderer==37.2 requests==2.28.1 -requests-toolbelt==0.9.1 +requests-toolbelt==0.10.0 rfc3986==2.0.0 rich==12.6.0 SecretStorage==3.3.3 -sip==6.6.2 +sip==6.7.1 six==1.16.0 toml==0.10.2 tomli==2.0.1 twine==4.0.1 types-cryptography==3.3.23 -typing_extensions==4.3.0 +typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 webencodings==0.5.1 -zipp==3.8.1 +zipp==3.9.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 7fcced7e8..3af8f5af7 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,11 +3,11 @@ attrs==22.1.0 flake8==5.0.4 flake8-bugbear==22.9.23 -flake8-builtins==1.5.3 +flake8-builtins==2.0.0 flake8-comprehensions==3.10.0 flake8-copyright==0.2.3 flake8-debugger==4.1.2 -flake8-deprecated==1.3 +flake8-deprecated==2.0.0 flake8-docstrings==1.6.0 flake8-future-import==0.4.7 flake8-plugin-utils==1.3.2 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index c0ea15680..668d1a118 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -3,16 +3,16 @@ chardet==5.0.0 diff-cover==7.0.1 importlib-metadata==5.0.0 -importlib-resources==5.9.0 +importlib-resources==5.10.0 Jinja2==3.1.2 lxml==4.9.1 MarkupSafe==2.1.1 -mypy==0.981 +mypy==0.982 mypy-extensions==0.4.3 pluggy==1.0.0 Pygments==2.13.0 PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-PyYAML==6.0.12 -typing_extensions==4.3.0 -zipp==3.8.1 +typing_extensions==4.4.0 +zipp==3.9.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 083e628f6..4b7ec8e45 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.3 -pyinstaller==5.4.1 +pyinstaller==5.5 pyinstaller-hooks-contrib==2022.10 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 873d994ec..955925a39 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -25,7 +25,7 @@ tomli==2.0.1 tomlkit==0.11.5 typed-ast==1.5.4 ; python_version<"3.8" types-cryptography==3.3.23 -typing_extensions==4.3.0 +typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 wrapt==1.14.1 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 8348a1111..631d9ac2a 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -24,4 +24,4 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 urllib3==1.26.12 -zipp==3.8.1 +zipp==3.9.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 575d5b0ae..d31ddd94c 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ filelock==3.8.0 Flask==2.2.2 glob2==0.7 hunter==3.5.1 -hypothesis==6.56.0 +hypothesis==6.56.1 idna==3.4 importlib-metadata==5.0.0 iniconfig==1.1.1 @@ -38,7 +38,7 @@ pytest-benchmark==3.4.1 pytest-cov==4.0.0 pytest-forked==1.4.0 pytest-instafail==0.4.2 -pytest-mock==3.9.0 +pytest-mock==3.10.0 pytest-qt==4.1.0 pytest-repeat==0.9.1 pytest-rerunfailures==10.2 @@ -50,10 +50,10 @@ requests-file==1.5.1 six==1.16.0 sortedcontainers==2.4.0 soupsieve==2.3.2.post1 -tldextract==3.3.1 +tldextract==3.4.0 toml==0.10.2 tomli==2.0.1 urllib3==1.26.12 vulture==2.6 Werkzeug==2.2.2 -zipp==3.8.1 +zipp==3.9.0 diff --git a/requirements.txt b/requirements.txt index 855df3163..84a48195a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,13 +3,13 @@ adblock==0.6.0 colorama==0.4.5 importlib-metadata==5.0.0 ; python_version=="3.7.*" -importlib-resources==5.9.0 ; python_version=="3.7.*" or python_version=="3.8.*" +importlib-resources==5.10.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 MarkupSafe==2.1.1 Pygments==2.13.0 PyYAML==6.0 -typing_extensions==4.3.0 ; python_version<"3.8" -zipp==3.8.1 +typing_extensions==4.4.0 ; python_version<"3.8" +zipp==3.9.0 # Unpinned due to recompile_requirements.py limitations pyobjc-core ; sys_platform=="darwin" pyobjc-framework-Cocoa ; sys_platform=="darwin" -- cgit v1.2.3-54-g00ecf From 661b3e0ab534820471603e6da0b8055b10e54f2c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 10 Oct 2022 09:41:48 +0200 Subject: requirements: Skip flake8-deprecated 2.0.0 See https://github.com/gforcada/flake8-deprecated/issues/19 --- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-flake8.txt-raw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 3af8f5af7..d68b1ee9f 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -7,7 +7,7 @@ flake8-builtins==2.0.0 flake8-comprehensions==3.10.0 flake8-copyright==0.2.3 flake8-debugger==4.1.2 -flake8-deprecated==2.0.0 +flake8-deprecated==1.3 flake8-docstrings==1.6.0 flake8-future-import==0.4.7 flake8-plugin-utils==1.3.2 diff --git a/misc/requirements/requirements-flake8.txt-raw b/misc/requirements/requirements-flake8.txt-raw index de6bb733a..f5ecb7c8d 100644 --- a/misc/requirements/requirements-flake8.txt-raw +++ b/misc/requirements/requirements-flake8.txt-raw @@ -3,7 +3,7 @@ flake8-bugbear flake8-builtins flake8-comprehensions flake8-debugger -flake8-deprecated +flake8-deprecated!=2.0.0 flake8-docstrings flake8-copyright flake8-future-import -- cgit v1.2.3-54-g00ecf From f6d5f79197228f4e76da795933d3281998ed40b6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 10 Oct 2022 09:51:13 +0200 Subject: Update changelog --- doc/changelog.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 6fc498686..b9c4e7a15 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -137,6 +137,8 @@ Fixed - Wrong type handling when using `:config-{dict,list}-*` commands with a config option with non-string values. The only affected option is `bindings.commands`, which is probably rarely used with those commands. +- The `readability` userscript now correctly passes the source URL to + Breadability, to make relative links work. - Minor documentation fixes [[v2.5.2]] -- cgit v1.2.3-54-g00ecf From 5a10c62554acea3434bfd3e623a0c570936b51a8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 15 Oct 2022 18:29:53 +0200 Subject: doc: Mention fileselect.foler.command in fileselect.handler --- doc/help/settings.asciidoc | 4 ++-- qutebrowser/config/configdata.yml | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 110a24cad..36ad243a7 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -217,7 +217,7 @@ |<>|Encoding to use for the editor. |<>|Delete the temporary file upon closing the editor. |<>|Command (and arguments) to use for selecting a single folder in forms. The command should write the selected folder path to the specified file or stdout. -|<>|Handler for selecting file(s) in forms. If `external`, then the commands specified by `fileselect.single_file.command` and `fileselect.multiple_files.command` are used to select one or multiple files respectively. +|<>|Handler for selecting file(s) in forms. If `external`, then the commands specified by `fileselect.single_file.command`, `fileselect.multiple_files.command` and `fileselect.folder.command` are used to select one file, multiple files, and folders, respectively. |<>|Command (and arguments) to use for selecting multiple files in forms. The command should write the selected file paths to the specified file or to stdout, separated by newlines. |<>|Command (and arguments) to use for selecting a single file in forms. The command should write the selected file path to the specified file or stdout. |<>|Font used in the completion categories. @@ -3013,7 +3013,7 @@ Default: [[fileselect.handler]] === fileselect.handler -Handler for selecting file(s) in forms. If `external`, then the commands specified by `fileselect.single_file.command` and `fileselect.multiple_files.command` are used to select one or multiple files respectively. +Handler for selecting file(s) in forms. If `external`, then the commands specified by `fileselect.single_file.command`, `fileselect.multiple_files.command` and `fileselect.folder.command` are used to select one file, multiple files, and folders, respectively. Type: <> diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 3e94fc4ed..4b9b6da8e 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1521,11 +1521,10 @@ fileselect.handler: - default: "Use the default file selector." - external: "Use an external command." desc: >- - Handler for selecting file(s) in forms. - If `external`, then the commands specified by - `fileselect.single_file.command` and - `fileselect.multiple_files.command` are used to select one or - multiple files respectively. + Handler for selecting file(s) in forms. If `external`, then the commands + specified by `fileselect.single_file.command`, + `fileselect.multiple_files.command` and `fileselect.folder.command` are + used to select one file, multiple files, and folders, respectively. fileselect.single_file.command: type: -- cgit v1.2.3-54-g00ecf From a8d7f7540e33045b7afdcace7e1fa4e61b3935fc Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 17 Oct 2022 04:58:45 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-pylint.txt | 6 +++--- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 2 +- misc/requirements/requirements-tox.txt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index aab6db5b5..d5e1a1a5a 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -35,12 +35,12 @@ requests-toolbelt==0.10.0 rfc3986==2.0.0 rich==12.6.0 SecretStorage==3.3.3 -sip==6.7.1 +sip==6.7.2 six==1.16.0 toml==0.10.2 tomli==2.0.1 twine==4.0.1 -types-cryptography==3.3.23 +types-cryptography==3.3.23.1 typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index d68b1ee9f..b9473294a 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -7,7 +7,7 @@ flake8-builtins==2.0.0 flake8-comprehensions==3.10.0 flake8-copyright==0.2.3 flake8-debugger==4.1.2 -flake8-deprecated==1.3 +flake8-deprecated==2.0.1 flake8-docstrings==1.6.0 flake8-future-import==0.4.7 flake8-plugin-utils==1.3.2 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 955925a39..45ab609f6 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==2.12.10 +astroid==2.12.11 certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 @@ -16,7 +16,7 @@ pefile==2022.5.30 platformdirs==2.5.2 pycparser==2.21 PyJWT==2.5.0 -pylint==2.15.3 +pylint==2.15.4 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 @@ -24,7 +24,7 @@ six==1.16.0 tomli==2.0.1 tomlkit==0.11.5 typed-ast==1.5.4 ; python_version<"3.8" -types-cryptography==3.3.23 +types-cryptography==3.3.23.1 typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 631d9ac2a..e8a9eba69 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -16,7 +16,7 @@ pyparsing==3.0.9 pytz==2022.4 requests==2.28.1 snowballstemmer==2.2.0 -Sphinx==5.2.3 +Sphinx==5.3.0 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index d31ddd94c..f5a54ef69 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ filelock==3.8.0 Flask==2.2.2 glob2==0.7 hunter==3.5.1 -hypothesis==6.56.1 +hypothesis==6.56.2 idna==3.4 importlib-metadata==5.0.0 iniconfig==1.1.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 263ebc095..2c100cc65 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -3,12 +3,12 @@ distlib==0.3.6 filelock==3.8.0 packaging==21.3 -pip==22.2.2 +pip==22.3 platformdirs==2.5.2 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.4.1 +setuptools==65.5.0 six==1.16.0 tomli==2.0.1 tox==3.26.0 -- cgit v1.2.3-54-g00ecf From fc933ae1d346d591c177b40693541d593b8f9a70 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 17 Oct 2022 07:29:02 +0200 Subject: Disallow setting input.mode_override via autoconfig.yml Closes #7436 --- doc/help/settings.asciidoc | 2 ++ qutebrowser/config/configdata.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 36ad243a7..a52fed5ff 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -3648,6 +3648,8 @@ Mode to change to when focusing on a tab/URL changes. This setting supports link:configuring{outfilesuffix}#patterns[URL patterns]. +This setting can only be set in config.py. + Type: <> Valid values: diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 4b9b6da8e..62dfcb7ef 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1930,6 +1930,7 @@ input.mode_override: - insert - passthrough supports_pattern: true + no_autoconfig: true # doesn't make sense with no URL pattern desc: Mode to change to when focusing on a tab/URL changes. ## keyhint -- cgit v1.2.3-54-g00ecf From e62d34c5aaa310542d6578fece06144b73722e6e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 17 Oct 2022 07:59:23 +0200 Subject: Revert "Disallow setting input.mode_override via autoconfig.yml" Breaks tests... This reverts commit fc933ae1d346d591c177b40693541d593b8f9a70. --- doc/help/settings.asciidoc | 2 -- qutebrowser/config/configdata.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index a52fed5ff..36ad243a7 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -3648,8 +3648,6 @@ Mode to change to when focusing on a tab/URL changes. This setting supports link:configuring{outfilesuffix}#patterns[URL patterns]. -This setting can only be set in config.py. - Type: <> Valid values: diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 62dfcb7ef..4b9b6da8e 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1930,7 +1930,6 @@ input.mode_override: - insert - passthrough supports_pattern: true - no_autoconfig: true # doesn't make sense with no URL pattern desc: Mode to change to when focusing on a tab/URL changes. ## keyhint -- cgit v1.2.3-54-g00ecf From 93b81f2e2ecdc8b0bd7f9345033694384279b50a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 21 Oct 2022 10:19:30 +0200 Subject: Fix crashe with no current tab in _run_userscript Not sure why this was a FIXME instead of handling it properly in the first place... --- doc/changelog.asciidoc | 1 + qutebrowser/browser/commands.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index b9c4e7a15..79641c7cb 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -118,6 +118,7 @@ Fixed when only the text matches. - The `progress` and `backforward` statusbar widgets now stay removed if you choose to remove them. Previously they would appear again on navigation. +- Rare crash when running userscripts with crashed renderer processes. [[v2.5.3]] v2.5.3 (unreleased) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index b537b05f4..6cbfc169c 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1191,8 +1191,9 @@ class CommandDispatcher: env['QUTE_TAB_INDEX'] = str(idx + 1) env['QUTE_TITLE'] = self._tabbed_browser.widget.page_title(idx) - # FIXME:qtwebengine: If tab is None, run_async will fail! tab = self._tabbed_browser.widget.currentWidget() + if tab is None: + raise cmdutils.CommandError("No current tab!") try: url = self._tabbed_browser.current_url() -- cgit v1.2.3-54-g00ecf From b4283be06c7663f02b985dd4006d725a9e374d4d Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 24 Oct 2022 04:59:10 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 7 +++---- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pylint.txt | 9 ++++----- misc/requirements/requirements-sphinx.txt | 4 ++-- misc/requirements/requirements-tests.txt | 6 +++--- requirements.txt | 2 +- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index d5e1a1a5a..f12a91320 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -17,14 +17,14 @@ jaraco.classes==3.2.3 jeepney==0.8.0 keyring==23.9.3 manhole==1.8.0 -more-itertools==8.14.0 +more-itertools==9.0.0 packaging==21.3 pep517==0.13.0 pkginfo==1.8.3 ply==3.11 pycparser==2.21 Pygments==2.13.0 -PyJWT==2.5.0 +PyJWT==2.6.0 Pympler==1.0.1 pyparsing==3.0.9 PyQt-builder==1.14.0 @@ -40,9 +40,8 @@ six==1.16.0 toml==0.10.2 tomli==2.0.1 twine==4.0.1 -types-cryptography==3.3.23.1 typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 webencodings==0.5.1 -zipp==3.9.0 +zipp==3.10.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 668d1a118..db2cbf57b 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -15,4 +15,4 @@ PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-PyYAML==6.0.12 typing_extensions==4.4.0 -zipp==3.9.0 +zipp==3.10.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 45ab609f6..2eda04a68 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,11 +1,11 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==2.12.11 +astroid==2.12.12 certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 cryptography==38.0.1 -dill==0.3.5.1 +dill==0.3.6 future==0.18.2 github3.py==3.2.0 idna==3.4 @@ -15,8 +15,8 @@ mccabe==0.7.0 pefile==2022.5.30 platformdirs==2.5.2 pycparser==2.21 -PyJWT==2.5.0 -pylint==2.15.4 +PyJWT==2.6.0 +pylint==2.15.5 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 @@ -24,7 +24,6 @@ six==1.16.0 tomli==2.0.1 tomlkit==0.11.5 typed-ast==1.5.4 ; python_version<"3.8" -types-cryptography==3.3.23.1 typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.12 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index e8a9eba69..625aa2b17 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -13,7 +13,7 @@ MarkupSafe==2.1.1 packaging==21.3 Pygments==2.13.0 pyparsing==3.0.9 -pytz==2022.4 +pytz==2022.5 requests==2.28.1 snowballstemmer==2.2.0 Sphinx==5.3.0 @@ -24,4 +24,4 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 urllib3==1.26.12 -zipp==3.9.0 +zipp==3.10.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index f5a54ef69..fdcbf7d28 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ filelock==3.8.0 Flask==2.2.2 glob2==0.7 hunter==3.5.1 -hypothesis==6.56.2 +hypothesis==6.56.3 idna==3.4 importlib-metadata==5.0.0 iniconfig==1.1.1 @@ -23,7 +23,7 @@ jaraco.functools==3.5.2 Mako==1.2.3 manhole==1.8.0 # MarkupSafe==2.1.1 -more-itertools==8.14.0 +more-itertools==9.0.0 packaging==21.3 parse==1.19.0 parse-type==0.6.0 @@ -56,4 +56,4 @@ tomli==2.0.1 urllib3==1.26.12 vulture==2.6 Werkzeug==2.2.2 -zipp==3.9.0 +zipp==3.10.0 diff --git a/requirements.txt b/requirements.txt index 84a48195a..305b586ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ MarkupSafe==2.1.1 Pygments==2.13.0 PyYAML==6.0 typing_extensions==4.4.0 ; python_version<"3.8" -zipp==3.9.0 +zipp==3.10.0 # Unpinned due to recompile_requirements.py limitations pyobjc-core ; sys_platform=="darwin" pyobjc-framework-Cocoa ; sys_platform=="darwin" -- cgit v1.2.3-54-g00ecf From c6105798858564b80b5b94d14807b3ac89cd373c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 24 Oct 2022 09:29:44 +0200 Subject: scripts: Remove changelog URL for types-cryptography --- scripts/dev/changelog_urls.json | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 5ddb1b949..b65db1ba1 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -97,7 +97,6 @@ "wrapt": "https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst", "pep517": "https://github.com/pypa/pep517/blob/main/doc/changelog.rst", "cryptography": "https://cryptography.io/en/latest/changelog.html", - "types-cryptography": "https://github.com/python/typeshed/commits/master/stubs/cryptography", "toml": "https://github.com/uiri/toml/releases", "tomli": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md", "PyQt5": "https://www.riverbankcomputing.com/news", -- cgit v1.2.3-54-g00ecf From c2f56a753b62a190ddb23cd330c257b9cf560d12 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 24 Oct 2022 17:13:11 +0200 Subject: doc: Add mister_monster userscripts --- misc/userscripts/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/userscripts/README.md b/misc/userscripts/README.md index 7e247f4ba..cab77dd36 100644 --- a/misc/userscripts/README.md +++ b/misc/userscripts/README.md @@ -100,6 +100,12 @@ The following userscripts can be found on their own repositories. - [qute-containers](https://github.com/s-praveen-kumar/qute-containers): A simple interface to manage browser containers by manipulating the basedir parameter. +- [qutebrowser-metascript](https://codeberg.org/mister_monster/qutebrowser-metascript): + A user configurable arbitrary sequential command running userscript for qutebrowser +- [tab-manager](https://codeberg.org/mister_monster/tab-manager): + More powerfully manage single window sessions +- [qutebrowser-url-mutator](https://codeberg.org/mister_monster/qutebrowser-url-mutator): + automatically mutates input URLs based on configurable rules [Zotero]: https://www.zotero.org/ [Pocket]: https://getpocket.com/ -- cgit v1.2.3-54-g00ecf From dbcc0e251412330f485dd7f17d67dfa27f4975fd Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 26 Oct 2022 22:38:08 +0200 Subject: userscripts: Fix scammy link See #6516 --- misc/userscripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/userscripts/README.md b/misc/userscripts/README.md index cab77dd36..4c08e0c31 100644 --- a/misc/userscripts/README.md +++ b/misc/userscripts/README.md @@ -80,7 +80,7 @@ The following userscripts can be found on their own repositories. - [1password](https://github.com/tomoakley/dotfiles/blob/master/qutebrowser/userscripts/1password): Integration with 1password on macOS. - [localhost](https://github.com/SidharthArya/.qutebrowser/blob/master/userscripts/localhost): - Quickly navigate to localhost:port. For reference: [A quicker way to reach localhost with qutebrowser](https://sidhartharya.me/a-quicker-way-to-reach-localhost-with-qutebrowser/) + Quickly navigate to localhost:port. For reference: [A quicker way to reach localhost with qutebrowser](https://blog.sidhartharya.com/a-quicker-way-to-reach-localhost-with-qutebrowser/) - [untrack-url](https://github.com/qutebrowser/qutebrowser/discussions/6555), convert various URLs (YouTube/Reddit/Twitter/Instagram/Google Maps) to other services (Invidious, Teddit, Nitter, Bibliogram, OpenStreetMap). -- cgit v1.2.3-54-g00ecf From 1dc5b97547ea7c4f73c0e33adbdae3d7554201bc Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 31 Oct 2022 04:37:38 +0000 Subject: Update dependencies --- misc/requirements/requirements-check-manifest.txt | 2 +- misc/requirements/requirements-dev.txt | 6 +++--- misc/requirements/requirements-flake8.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 4 ++-- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-tests.txt | 15 +++++++-------- misc/requirements/requirements-tox.txt | 4 ++-- requirements.txt | 2 +- 10 files changed, 22 insertions(+), 23 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 1eee9b06c..2e804cbeb 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==0.8.0 +build==0.9.0 check-manifest==0.48 packaging==21.3 pep517==0.13.0 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index f12a91320..d50614d7a 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 bleach==5.0.1 -build==0.8.0 +build==0.9.0 bump2version==1.0.1 certifi==2022.9.24 cffi==1.15.1 @@ -31,11 +31,11 @@ PyQt-builder==1.14.0 python-dateutil==2.8.2 readme-renderer==37.2 requests==2.28.1 -requests-toolbelt==0.10.0 +requests-toolbelt==0.10.1 rfc3986==2.0.0 rich==12.6.0 SecretStorage==3.3.3 -sip==6.7.2 +sip==6.7.3 six==1.16.0 toml==0.10.2 tomli==2.0.1 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index b9473294a..4bd654553 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,9 +2,9 @@ attrs==22.1.0 flake8==5.0.4 -flake8-bugbear==22.9.23 +flake8-bugbear==22.10.27 flake8-builtins==2.0.0 -flake8-comprehensions==3.10.0 +flake8-comprehensions==3.10.1 flake8-copyright==0.2.3 flake8-debugger==4.1.2 flake8-deprecated==2.0.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index db2cbf57b..ed4a575d0 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -13,6 +13,6 @@ pluggy==1.0.0 Pygments==2.13.0 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-PyYAML==6.0.12 +types-PyYAML==6.0.12.1 typing_extensions==4.4.0 zipp==3.10.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 4b7ec8e45..d634782db 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.3 -pyinstaller==5.5 -pyinstaller-hooks-contrib==2022.10 +pyinstaller==5.6.1 +pyinstaller-hooks-contrib==2022.11 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 2eda04a68..d40ae4d17 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -10,7 +10,7 @@ future==0.18.2 github3.py==3.2.0 idna==3.4 isort==5.10.1 -lazy-object-proxy==1.7.1 +lazy-object-proxy==1.8.0 mccabe==0.7.0 pefile==2022.5.30 platformdirs==2.5.2 @@ -22,7 +22,7 @@ python-dateutil==2.8.2 requests==2.28.1 six==1.16.0 tomli==2.0.1 -tomlkit==0.11.5 +tomlkit==0.11.6 typed-ast==1.5.4 ; python_version<"3.8" typing_extensions==4.4.0 uritemplate==4.1.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 7a7669e67..5ca054ae8 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==0.8.0 +build==0.9.0 certifi==2022.9.24 charset-normalizer==2.1.1 docutils==0.19 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index fdcbf7d28..3d8d0a781 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,13 +7,13 @@ charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 coverage==6.5.0 -exceptiongroup==1.0.0rc9 +exceptiongroup==1.0.0 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 glob2==0.7 hunter==3.5.1 -hypothesis==6.56.3 +hypothesis==6.56.4 idna==3.4 importlib-metadata==5.0.0 iniconfig==1.1.1 @@ -29,20 +29,19 @@ parse==1.19.0 parse-type==0.6.0 pluggy==1.0.0 py==1.11.0 -py-cpuinfo==8.0.0 +py-cpuinfo==9.0.0 Pygments==2.13.0 pyparsing==3.0.9 -pytest==7.1.3 +pytest==7.2.0 pytest-bdd==6.0.1 -pytest-benchmark==3.4.1 +pytest-benchmark==4.0.0 pytest-cov==4.0.0 -pytest-forked==1.4.0 pytest-instafail==0.4.2 pytest-mock==3.10.0 -pytest-qt==4.1.0 +pytest-qt==4.2.0 pytest-repeat==0.9.1 pytest-rerunfailures==10.2 -pytest-xdist==2.5.0 +pytest-xdist==3.0.2 pytest-xvfb==2.0.0 PyVirtualDisplay==3.0 requests==2.28.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 2c100cc65..c366dfce6 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -11,6 +11,6 @@ pyparsing==3.0.9 setuptools==65.5.0 six==1.16.0 tomli==2.0.1 -tox==3.26.0 -virtualenv==20.16.5 +tox==3.27.0 +virtualenv==20.16.6 wheel==0.37.1 diff --git a/requirements.txt b/requirements.txt index 305b586ca..cc254cf60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py adblock==0.6.0 -colorama==0.4.5 +colorama==0.4.6 importlib-metadata==5.0.0 ; python_version=="3.7.*" importlib-resources==5.10.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 -- cgit v1.2.3-54-g00ecf From bc225557a5d7f266a4783c13cb3cd0aad09219bf Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 31 Oct 2022 08:19:25 +0100 Subject: Adjust warnings and changelog URLs for new pytest --- pytest.ini | 4 ++++ scripts/dev/changelog_urls.json | 1 - scripts/dev/misc_checks.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index d32746281..50682a2cc 100644 --- a/pytest.ini +++ b/pytest.ini @@ -91,4 +91,8 @@ filterwarnings = # https://github.com/HypothesisWorks/hypothesis/issues/3309 ignore:module 'sre_constants' is deprecated:DeprecationWarning ignore:module 'sre_parse' is deprecated:DeprecationWarning + # https://github.com/pytest-dev/pytest-bdd/issues/568 + ignore:The hookimpl pytest_.* uses old-style configuration options:pytest.PytestDeprecationWarning:pytest_bdd\.plugin + # https://github.com/pytest-dev/pytest-instafail/pull/26 + ignore:The hookimpl pytest_.* uses old-style configuration options:pytest.PytestDeprecationWarning:pytest_instafail faulthandler_timeout = 90 diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index b65db1ba1..5af1229ef 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -8,7 +8,6 @@ "mccabe": "https://github.com/PyCQA/mccabe#changes", "pytest-cov": "https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst", "pytest-xdist": "https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst", - "pytest-forked": "https://github.com/pytest-dev/pytest-forked/blob/master/CHANGELOG.rst", "pytest-xvfb": "https://github.com/The-Compiler/pytest-xvfb/blob/master/CHANGELOG.rst", "PyVirtualDisplay": "https://github.com/ponty/PyVirtualDisplay/commits/master", "execnet": "https://execnet.readthedocs.io/en/latest/changelog.html", diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 6759fc474..487672ea3 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -38,7 +38,7 @@ from scripts import utils from scripts.dev import recompile_requirements BINARY_EXTS = {'.png', '.icns', '.ico', '.bmp', '.gz', '.bin', '.pdf', - '.sqlite', '.woff2', '.whl'} + '.sqlite', '.woff2', '.whl', '.egg'} def _get_files( -- cgit v1.2.3-54-g00ecf From 0ff0eaa703ad5e72d3c167f63ff8e498ad40ee9b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 3 Nov 2022 11:53:28 +0100 Subject: ci: Get rid of set-output Fixes #7439 --- .github/workflows/nightly.yml | 4 ++-- scripts/dev/recompile_requirements.py | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 073f2c69c..5aaafb666 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -97,8 +97,8 @@ jobs: - name: Gather info id: info run: | - echo "::set-output name=date::$(date +'%Y-%m-%d')" - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" + echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - name: Upload artifacts uses: actions/upload-artifact@v3 with: diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index 365f9a51e..ceb978a74 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -335,16 +335,15 @@ def print_changed_files(): print(changes_text) if utils.ON_CI: - print() - print('::set-output name=changed::' + - files_text.replace('\n', '%0A')) - table_header = [ - '| File | Requirement | old | new |', - '|------|-------------|-----|-----|', - ] - diff_table = '%0A'.join(table_header + - [change.table_str() for change in changes]) - print('::set-output name=diff::' + diff_table) + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f: + f.write('changed=' + files_text.replace('\n', '%0A')) + table_header = [ + '| File | Requirement | old | new |', + '|------|-------------|-----|-----|', + ] + diff_table = '%0A'.join( + table_header + [change.table_str() for change in changes]) + f.write(f'diff={diff_table}') def get_host_python(name): -- cgit v1.2.3-54-g00ecf From 39f817d57b8173f06e1df7bae8d27800f2edbcb4 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Thu, 3 Nov 2022 11:04:19 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-sphinx.txt | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index d50614d7a..27f803bb3 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -7,7 +7,7 @@ certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 commonmark==0.9.1 -cryptography==38.0.1 +cryptography==38.0.3 docutils==0.19 github3.py==3.2.0 hunter==3.5.1 @@ -29,7 +29,7 @@ Pympler==1.0.1 pyparsing==3.0.9 PyQt-builder==1.14.0 python-dateutil==2.8.2 -readme-renderer==37.2 +readme-renderer==37.3 requests==2.28.1 requests-toolbelt==0.10.1 rfc3986==2.0.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 4bd654553..413c5be78 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,7 +3,7 @@ attrs==22.1.0 flake8==5.0.4 flake8-bugbear==22.10.27 -flake8-builtins==2.0.0 +flake8-builtins==2.0.1 flake8-comprehensions==3.10.1 flake8-copyright==0.2.3 flake8-debugger==4.1.2 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index d634782db..19818244f 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.3 -pyinstaller==5.6.1 +pyinstaller==5.6.2 pyinstaller-hooks-contrib==2022.11 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index d40ae4d17..5aa28d783 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -4,7 +4,7 @@ astroid==2.12.12 certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 -cryptography==38.0.1 +cryptography==38.0.3 dill==0.3.6 future==0.18.2 github3.py==3.2.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 625aa2b17..f04f2d829 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py alabaster==0.7.12 -Babel==2.10.3 +Babel==2.11.0 certifi==2022.9.24 charset-normalizer==2.1.1 docutils==0.19 @@ -13,7 +13,7 @@ MarkupSafe==2.1.1 packaging==21.3 Pygments==2.13.0 pyparsing==3.0.9 -pytz==2022.5 +pytz==2022.6 requests==2.28.1 snowballstemmer==2.2.0 Sphinx==5.3.0 -- cgit v1.2.3-54-g00ecf From 80cf0c5bddf977caa82edf0aaca8a473da01f278 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 3 Nov 2022 14:58:27 +0100 Subject: Revert to recompile_requirements.py with set-output Newlines don't work anymore, see #7459 Partially reverts 0ff0eaa, see #7439 --- scripts/dev/recompile_requirements.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index ceb978a74..365f9a51e 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -335,15 +335,16 @@ def print_changed_files(): print(changes_text) if utils.ON_CI: - with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f: - f.write('changed=' + files_text.replace('\n', '%0A')) - table_header = [ - '| File | Requirement | old | new |', - '|------|-------------|-----|-----|', - ] - diff_table = '%0A'.join( - table_header + [change.table_str() for change in changes]) - f.write(f'diff={diff_table}') + print() + print('::set-output name=changed::' + + files_text.replace('\n', '%0A')) + table_header = [ + '| File | Requirement | old | new |', + '|------|-------------|-----|-----|', + ] + diff_table = '%0A'.join(table_header + + [change.table_str() for change in changes]) + print('::set-output name=diff::' + diff_table) def get_host_python(name): -- cgit v1.2.3-54-g00ecf From 7e7eaaee7c0209680f496a32b4ba755a1bb52fcc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 4 Nov 2022 19:11:22 +0100 Subject: Retry dependabot for GitHub Actions See 78709ce2b9537f710f24edba15243aef1d732891 and fa5e04fdaf8af9230c4cd9c386c5d8e0307655ca Hoping this will work better nowadays? Tenatively closes #7299 --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" -- cgit v1.2.3-54-g00ecf From e8179d455feb63c6382d26bca379aa7c72f7eca4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Nov 2022 18:13:23 +0000 Subject: build(deps): bump peter-evans/create-pull-request from 3 to 4 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/recompile-requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/recompile-requirements.yml b/.github/workflows/recompile-requirements.yml index 3c7442a61..c7d9702a7 100644 --- a/.github/workflows/recompile-requirements.yml +++ b/.github/workflows/recompile-requirements.yml @@ -45,7 +45,7 @@ jobs: - name: Run qutebrowser smoke test run: "xvfb-run .venv/bin/python3 -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ':later 500 quit'" - name: Create pull request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: committer: qutebrowser bot author: qutebrowser bot -- cgit v1.2.3-54-g00ecf From 28d9ae821c57f036494af1aefcd51fdd7e06bef6 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 7 Nov 2022 04:33:30 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-tests.txt | 7 +++---- misc/requirements/requirements-tox.txt | 8 ++++---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 27f803bb3..b3dafe27c 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -15,7 +15,7 @@ idna==3.4 importlib-metadata==5.0.0 jaraco.classes==3.2.3 jeepney==0.8.0 -keyring==23.9.3 +keyring==23.11.0 manhole==1.8.0 more-itertools==9.0.0 packaging==21.3 @@ -35,7 +35,7 @@ requests-toolbelt==0.10.1 rfc3986==2.0.0 rich==12.6.0 SecretStorage==3.3.3 -sip==6.7.3 +sip==6.7.4 six==1.16.0 toml==0.10.2 tomli==2.0.1 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 19818244f..45789a1f8 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -2,4 +2,4 @@ altgraph==0.17.3 pyinstaller==5.6.2 -pyinstaller-hooks-contrib==2022.11 +pyinstaller-hooks-contrib==2022.12 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 5aa28d783..0f203f061 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -13,7 +13,7 @@ isort==5.10.1 lazy-object-proxy==1.8.0 mccabe==0.7.0 pefile==2022.5.30 -platformdirs==2.5.2 +platformdirs==2.5.3 pycparser==2.21 PyJWT==2.6.0 pylint==2.15.5 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 3d8d0a781..f1b33caa5 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,11 +7,10 @@ charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 coverage==6.5.0 -exceptiongroup==1.0.0 +exceptiongroup==1.0.1 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 -glob2==0.7 hunter==3.5.1 hypothesis==6.56.4 idna==3.4 @@ -28,12 +27,11 @@ packaging==21.3 parse==1.19.0 parse-type==0.6.0 pluggy==1.0.0 -py==1.11.0 py-cpuinfo==9.0.0 Pygments==2.13.0 pyparsing==3.0.9 pytest==7.2.0 -pytest-bdd==6.0.1 +pytest-bdd==6.1.0 pytest-benchmark==4.0.0 pytest-cov==4.0.0 pytest-instafail==0.4.2 @@ -52,6 +50,7 @@ soupsieve==2.3.2.post1 tldextract==3.4.0 toml==0.10.2 tomli==2.0.1 +typing_extensions==4.4.0 urllib3==1.26.12 vulture==2.6 Werkzeug==2.2.2 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index c366dfce6..f94f80970 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -3,14 +3,14 @@ distlib==0.3.6 filelock==3.8.0 packaging==21.3 -pip==22.3 -platformdirs==2.5.2 +pip==22.3.1 +platformdirs==2.5.3 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.5.0 +setuptools==65.5.1 six==1.16.0 tomli==2.0.1 tox==3.27.0 virtualenv==20.16.6 -wheel==0.37.1 +wheel==0.38.2 -- cgit v1.2.3-54-g00ecf From 756e23f57bcefc8624478cac81742359e2fafa4e Mon Sep 17 00:00:00 2001 From: toofar Date: Mon, 7 Nov 2022 18:10:50 +1300 Subject: remove glob2 from changelog urls Got dropped from pytest-bdd: https://github.com/pytest-dev/pytest-bdd/pull/570 --- scripts/dev/changelog_urls.json | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 5af1229ef..6cbf518af 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -23,7 +23,6 @@ "soupsieve": "https://facelessuser.github.io/soupsieve/about/changelog/", "Flask": "https://flask.palletsprojects.com/en/latest/changes/", "Mako": "https://docs.makotemplates.org/en/latest/changelog.html", - "glob2": "https://github.com/miracle2k/python-glob2/blob/master/CHANGES", "hypothesis": "https://hypothesis.readthedocs.io/en/latest/changes.html", "exceptiongroup": "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst", "mypy": "https://mypy-lang.blogspot.com/", -- cgit v1.2.3-54-g00ecf From 1387c999fa81af670f192b22e5186509dc769206 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 16:17:31 +0100 Subject: Skip problematic QtWebKit tests with OpenSSL 3 See https://github.com/cherrypy/cheroot/issues/517 and #7467 --- pytest.ini | 1 + tests/conftest.py | 5 +++++ tests/end2end/features/prompts.feature | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/pytest.ini b/pytest.ini index 50682a2cc..abe55bc6e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -37,6 +37,7 @@ markers = unicode_locale: Tests which need a unicode locale to work js_headers: Sets JS headers dynamically on QtWebEngine (unsupported on some versions) qtwebkit_pdf_imageformat_skip: Broken on QtWebKit with PDF image format plugin installed + qtwebkit_openssl3_skip: Broken due to cheroot bug with OpenSSL 3 on QtWebKit windows_skip: Tests which should be skipped on Windows qt_log_level_fail = WARNING qt_log_ignore = diff --git a/tests/conftest.py b/tests/conftest.py index f7e685f4e..65f76aacc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,6 +22,7 @@ import os import pathlib import sys +import ssl import pytest import hypothesis @@ -111,6 +112,10 @@ def _apply_platform_markers(config, item): pytest.mark.skipif, sys.getfilesystemencoding() == 'ascii', "Skipped because of ASCII locale"), + ('qtwebkit_openssl3_skip', + pytest.mark.skipif, + not config.webengine and ssl.OPENSSL_VERSION_INFO[0] == 3, + "Failing due to cheroot: https://github.com/cherrypy/cheroot/issues/346"), ] for searched_marker, new_marker_kind, condition, default_reason in markers: diff --git a/tests/end2end/features/prompts.feature b/tests/end2end/features/prompts.feature index 028f1a7b9..3ef4b9567 100644 --- a/tests/end2end/features/prompts.feature +++ b/tests/end2end/features/prompts.feature @@ -171,6 +171,7 @@ Feature: Prompts Then the error "Certificate error: *" should be shown And the page should contain the plaintext "Hello World via SSL!" + @qtwebkit_openssl3_skip Scenario: SSL error with content.tls.certificate_errors = block When I clear SSL errors And I set content.tls.certificate_errors to block @@ -186,6 +187,7 @@ Feature: Prompts And I wait until the SSL page finished loading Then the page should contain the plaintext "Hello World via SSL!" + @qtwebkit_openssl3_skip Scenario: SSL error with content.tls.certificate_errors = ask -> no When I clear SSL errors And I set content.tls.certificate_errors to ask @@ -194,6 +196,7 @@ Feature: Prompts And I run :prompt-accept no Then a SSL error page should be shown + @qtwebkit_openssl3_skip Scenario: SSL error with content.tls.certificate_errors = ask -> abort When I clear SSL errors And I set content.tls.certificate_errors to ask @@ -221,6 +224,7 @@ Feature: Prompts Then the javascript message "Script loaded" should be logged And the page should contain the plaintext "Script loaded" + @qtwebkit_openssl3_skip Scenario: SSL resource error with content.tls.certificate_errors = ask -> no When I clear SSL errors And I set content.tls.certificate_errors to ask @@ -231,6 +235,7 @@ Feature: Prompts Then the javascript message "Script loaded" should not be logged And the page should contain the plaintext "Script not loaded" + @qtwebkit_openssl3_skip Scenario: SSL resource error with content.tls.certificate_errors = ask-block-thirdparty When I clear SSL errors And I set content.tls.certificate_errors to ask-block-thirdparty -- cgit v1.2.3-54-g00ecf From 1f5ad8abfbfdcab6683d77bbc81b20d3cb668793 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 14:24:00 +0100 Subject: Remove pytest-bdd deprecation ignore --- pytest.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index abe55bc6e..05e5e3d76 100644 --- a/pytest.ini +++ b/pytest.ini @@ -92,8 +92,6 @@ filterwarnings = # https://github.com/HypothesisWorks/hypothesis/issues/3309 ignore:module 'sre_constants' is deprecated:DeprecationWarning ignore:module 'sre_parse' is deprecated:DeprecationWarning - # https://github.com/pytest-dev/pytest-bdd/issues/568 - ignore:The hookimpl pytest_.* uses old-style configuration options:pytest.PytestDeprecationWarning:pytest_bdd\.plugin # https://github.com/pytest-dev/pytest-instafail/pull/26 ignore:The hookimpl pytest_.* uses old-style configuration options:pytest.PytestDeprecationWarning:pytest_instafail faulthandler_timeout = 90 -- cgit v1.2.3-54-g00ecf From 2b86f66e483b12d666f4829126d3bf20da7b13a6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 18:02:57 +0100 Subject: tests: Try to fix Windows flakiness in userscript runner test --- tests/unit/commands/test_userscripts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/commands/test_userscripts.py b/tests/unit/commands/test_userscripts.py index 436e9e2a7..f7b6aa466 100644 --- a/tests/unit/commands/test_userscripts.py +++ b/tests/unit/commands/test_userscripts.py @@ -201,6 +201,10 @@ def test_killed_command(qtbot, tmp_path, py_proc, runner, caplog): runner.store_text('Hello World') runner.store_html('') + # For some reason, this tends to be flaky on Windows, and we got the + # directoryChanged signal *without* the file existing (wut?)... + qtbot.waitUntil(data_file.exists) + # Make sure the PID was written to the file, not just the file created time.sleep(0.5) -- cgit v1.2.3-54-g00ecf From 6e54962fe47a5b262e9fd19db4c328dbbf215b1b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 17:02:30 +0100 Subject: pylint: Remove now-unneeded suppressions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent pytest 7.2 upgrade leads pylint to complain: ************* Module unit.browser.test_qutescheme tests/unit/browser/test_qutescheme.py:26:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/unit/browser/test_qutescheme.py:226:0: I0021: Useless suppression of 'no-member' (useless-suppression) ************* Module helpers.fixtures tests/helpers/fixtures.py:39:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/helpers/fixtures.py:639:0: I0021: Useless suppression of 'no-member' (useless-suppression) possibly due to it not being able to infer 'py' anymore with the weird shenanigans pytest does now? Also, what weird glitch in the matrix is it that those just happen to be on lines [2]26 and [6]39 for *both* files? 🤯 --- tests/helpers/fixtures.py | 4 ++-- tests/unit/browser/test_qutescheme.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index c36bc98cb..7a8931eac 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -36,7 +36,7 @@ import os.path import dataclasses import pytest -import py.path # pylint: disable=no-name-in-module +import py.path from PyQt5.QtCore import QSize, Qt from PyQt5.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout from PyQt5.QtNetwork import QNetworkCookieJar @@ -636,7 +636,7 @@ def redirect_webengine_data(data_tmpdir, monkeypatch): def short_tmpdir(): """A short temporary directory for a XDG_RUNTIME_DIR.""" with tempfile.TemporaryDirectory() as tdir: - yield py.path.local(tdir) # pylint: disable=no-member + yield py.path.local(tdir) class ModelValidator: diff --git a/tests/unit/browser/test_qutescheme.py b/tests/unit/browser/test_qutescheme.py index 45474102d..e4aa51243 100644 --- a/tests/unit/browser/test_qutescheme.py +++ b/tests/unit/browser/test_qutescheme.py @@ -23,7 +23,7 @@ import os import time import logging -import py.path # pylint: disable=no-name-in-module +import py.path from PyQt5.QtCore import QUrl, QUrlQuery import pytest @@ -223,7 +223,7 @@ class TestPDFJSHandler: @pytest.fixture def download_tmpdir(self): tdir = downloads.temp_download_manager.get_tmpdir() - yield py.path.local(tdir.name) # pylint: disable=no-member + yield py.path.local(tdir.name) tdir.cleanup() def test_existing_resource(self): -- cgit v1.2.3-54-g00ecf From 4e39f9a8ce8c2fc13f1f95e08fd8e71a7b35accb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 18:27:39 +0100 Subject: tests: Use snake-case wait_until --- tests/unit/commands/test_userscripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/commands/test_userscripts.py b/tests/unit/commands/test_userscripts.py index f7b6aa466..7cf8f233c 100644 --- a/tests/unit/commands/test_userscripts.py +++ b/tests/unit/commands/test_userscripts.py @@ -203,7 +203,7 @@ def test_killed_command(qtbot, tmp_path, py_proc, runner, caplog): # For some reason, this tends to be flaky on Windows, and we got the # directoryChanged signal *without* the file existing (wut?)... - qtbot.waitUntil(data_file.exists) + qtbot.wait_until(data_file.exists) # Make sure the PID was written to the file, not just the file created time.sleep(0.5) -- cgit v1.2.3-54-g00ecf From 7bf1b4af5d8882a8576787dbf98c7013061a2714 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 14 Nov 2022 04:28:37 +0000 Subject: Update dependencies --- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-tests.txt | 4 ++-- misc/requirements/requirements-tox.txt | 6 +++--- misc/requirements/requirements-yamllint.txt | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index ed4a575d0..1cd283d8a 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,18 +1,18 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.0.0 -diff-cover==7.0.1 +diff-cover==7.0.2 importlib-metadata==5.0.0 importlib-resources==5.10.0 Jinja2==3.1.2 lxml==4.9.1 MarkupSafe==2.1.1 -mypy==0.982 +mypy==0.990 mypy-extensions==0.4.3 pluggy==1.0.0 Pygments==2.13.0 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-PyYAML==6.0.12.1 +types-PyYAML==6.0.12.2 typing_extensions==4.4.0 zipp==3.10.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 45789a1f8..5c938bea0 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -2,4 +2,4 @@ altgraph==0.17.3 pyinstaller==5.6.2 -pyinstaller-hooks-contrib==2022.12 +pyinstaller-hooks-contrib==2022.13 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 0f203f061..52211c92c 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -13,7 +13,7 @@ isort==5.10.1 lazy-object-proxy==1.8.0 mccabe==0.7.0 pefile==2022.5.30 -platformdirs==2.5.3 +platformdirs==2.5.4 pycparser==2.21 PyJWT==2.6.0 pylint==2.15.5 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index f1b33caa5..daa7f1dd8 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,7 +7,7 @@ charset-normalizer==2.1.1 cheroot==8.6.0 click==8.1.3 coverage==6.5.0 -exceptiongroup==1.0.1 +exceptiongroup==1.0.2 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 @@ -31,7 +31,7 @@ py-cpuinfo==9.0.0 Pygments==2.13.0 pyparsing==3.0.9 pytest==7.2.0 -pytest-bdd==6.1.0 +pytest-bdd==6.1.1 pytest-benchmark==4.0.0 pytest-cov==4.0.0 pytest-instafail==0.4.2 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index f94f80970..520b410b1 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -4,7 +4,7 @@ distlib==0.3.6 filelock==3.8.0 packaging==21.3 pip==22.3.1 -platformdirs==2.5.3 +platformdirs==2.5.4 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 @@ -12,5 +12,5 @@ setuptools==65.5.1 six==1.16.0 tomli==2.0.1 tox==3.27.0 -virtualenv==20.16.6 -wheel==0.38.2 +virtualenv==20.16.7 +wheel==0.38.4 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index efec35e56..2dccc1085 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -pathspec==0.10.1 +pathspec==0.10.2 PyYAML==6.0 yamllint==1.28.0 -- cgit v1.2.3-54-g00ecf From b8ddaef967700fb581e6150b72ec990edb9abafa Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 14 Nov 2022 21:21:01 +0100 Subject: Adjust ignores/settings after mypy upgrade See #7478, #7098 --- .mypy.ini | 4 +++- qutebrowser/api/cmdutils.py | 2 +- qutebrowser/misc/checkpyver.py | 4 +++- qutebrowser/utils/objreg.py | 2 +- qutebrowser/utils/utils.py | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.mypy.ini b/.mypy.ini index 820b2f966..56124b5c3 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -10,7 +10,6 @@ disallow_subclassing_any = True disallow_incomplete_defs = True check_untyped_defs = True disallow_untyped_decorators = True -# no_implicit_optional = True warn_redundant_casts = True warn_unused_ignores = True # warn_return_any = True @@ -27,6 +26,9 @@ show_error_codes = True show_error_context = True pretty = True +### FIXME:qt6 get rid of this for v3 +no_implicit_optional = False + [mypy-colorama] # https://github.com/tartley/colorama/issues/206 ignore_missing_imports = True diff --git a/qutebrowser/api/cmdutils.py b/qutebrowser/api/cmdutils.py index 73c6a1bc5..3e1bc9432 100644 --- a/qutebrowser/api/cmdutils.py +++ b/qutebrowser/api/cmdutils.py @@ -233,7 +233,7 @@ class argument: # noqa: N801,N806 pylint: disable=invalid-name self._argname)) if not hasattr(func, 'qute_args'): func.qute_args = {} # type: ignore[attr-defined] - elif func.qute_args is None: # type: ignore[attr-defined] + elif func.qute_args is None: raise ValueError("@cmdutils.argument got called above (after) " "@cmdutils.register for {}!".format(funcname)) diff --git a/qutebrowser/misc/checkpyver.py b/qutebrowser/misc/checkpyver.py index 7d6a524c3..82fe3d70f 100644 --- a/qutebrowser/misc/checkpyver.py +++ b/qutebrowser/misc/checkpyver.py @@ -49,7 +49,9 @@ def check_python_version(): version_str = '.'.join(map(str, sys.version_info[:3])) text = ("At least Python 3.7 is required to run qutebrowser, but " + "it's running with " + version_str + ".\n") - if Tk and '--no-err-windows' not in sys.argv: # pragma: no cover + + show_errors = '--no-err-windows' not in sys.argv + if Tk and show_errors: # type: ignore[truthy-function] # pragma: no cover root = Tk() root.withdraw() messagebox.showerror("qutebrowser: Fatal error!", text) diff --git a/qutebrowser/utils/objreg.py b/qutebrowser/utils/objreg.py index c3cdb1071..78d862ab4 100644 --- a/qutebrowser/utils/objreg.py +++ b/qutebrowser/utils/objreg.py @@ -170,7 +170,7 @@ def _get_tab_registry(win_id: _WindowTab, window: Optional[QWidget] = QApplication.activeWindow() if window is None or not hasattr(window, 'win_id'): raise RegistryUnavailableError('tab') - win_id = window.win_id # type: ignore[attr-defined] + win_id = window.win_id elif win_id is None: raise TypeError("window is None with scope tab!") diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 704fcdb75..0c5074e3e 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -55,7 +55,7 @@ try: CSafeDumper as YamlDumper) YAML_C_EXT = True except ImportError: # pragma: no cover - from yaml import (SafeLoader as YamlLoader, # type: ignore[misc] + from yaml import (SafeLoader as YamlLoader, # type: ignore[assignment] SafeDumper as YamlDumper) YAML_C_EXT = False -- cgit v1.2.3-54-g00ecf From 00ee3fad34cdabdab3e3b631191bafa0e5199e9f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 14 Nov 2022 21:24:03 +0100 Subject: ci: Drop QtWebKit See #7478, #4039 --- .github/workflows/ci.yml | 2 -- scripts/dev/ci/docker/Dockerfile.j2 | 3 ++- scripts/dev/ci/docker/generate.py | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bebcfbc4..800d08111 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,13 +83,11 @@ jobs: fail-fast: false matrix: image: - - archlinux-webkit - archlinux-webengine # - archlinux-webengine-unstable container: image: "qutebrowser/ci:${{ matrix.image }}" env: - QUTE_BDD_WEBENGINE: "${{ matrix.image != 'archlinux-webkit' }}" DOCKER: "${{ matrix.image }}" CI: true PYTEST_ADDOPTS: "--color=yes" diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index c30141216..d98443b07 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -9,7 +9,8 @@ RUN pacman -Suyy --noconfirm \ python-distlib \ qt5-base \ qt5-declarative \ - {% if webengine %}qt5-webengine python-pyqtwebengine{% else %}qt5-webkit{% endif %} \ + qt5-webengine \ + python-pyqtwebengine \ python-pyqt5 \ xorg-xinit \ xorg-server-xvfb \ diff --git a/scripts/dev/ci/docker/generate.py b/scripts/dev/ci/docker/generate.py index 2ab25f325..0d197a7e0 100644 --- a/scripts/dev/ci/docker/generate.py +++ b/scripts/dev/ci/docker/generate.py @@ -31,9 +31,8 @@ def main(): image = sys.argv[1] config = { - 'archlinux-webkit': {'webengine': False, 'unstable': False}, - 'archlinux-webengine': {'webengine': True, 'unstable': False}, - 'archlinux-webengine-unstable': {'webengine': True, 'unstable': True}, + 'archlinux-webengine': {'unstable': False}, + 'archlinux-webengine-unstable': {'unstable': True}, }[image] with open('Dockerfile', 'w') as f: -- cgit v1.2.3-54-g00ecf From d4397b6b631effbdb04d732c5ae942495b18e427 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Nov 2022 09:10:16 +0100 Subject: Update changelog URL --- scripts/dev/changelog_urls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 6cbf518af..b4e7d4a7a 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -26,7 +26,7 @@ "hypothesis": "https://hypothesis.readthedocs.io/en/latest/changes.html", "exceptiongroup": "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst", "mypy": "https://mypy-lang.blogspot.com/", - "types-PyYAML": "https://github.com/python/typeshed/commits/master/stubs/PyYAML", + "types-PyYAML": "https://github.com/python/typeshed/commits/main/stubs/PyYAML", "pytest": "https://docs.pytest.org/en/latest/changelog.html", "iniconfig": "https://github.com/pytest-dev/iniconfig/blob/master/CHANGELOG", "tox": "https://tox.readthedocs.io/en/latest/changelog.html", -- cgit v1.2.3-54-g00ecf From 0cd682afbdbc6d9f21ca2d8c19641b32009fc6b5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Nov 2022 09:10:42 +0100 Subject: Revert "ci: Drop QtWebKit" This reverts commit 00ee3fad34cdabdab3e3b631191bafa0e5199e9f. --- .github/workflows/ci.yml | 2 ++ scripts/dev/ci/docker/Dockerfile.j2 | 3 +-- scripts/dev/ci/docker/generate.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 800d08111..3bebcfbc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,11 +83,13 @@ jobs: fail-fast: false matrix: image: + - archlinux-webkit - archlinux-webengine # - archlinux-webengine-unstable container: image: "qutebrowser/ci:${{ matrix.image }}" env: + QUTE_BDD_WEBENGINE: "${{ matrix.image != 'archlinux-webkit' }}" DOCKER: "${{ matrix.image }}" CI: true PYTEST_ADDOPTS: "--color=yes" diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index d98443b07..c30141216 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -9,8 +9,7 @@ RUN pacman -Suyy --noconfirm \ python-distlib \ qt5-base \ qt5-declarative \ - qt5-webengine \ - python-pyqtwebengine \ + {% if webengine %}qt5-webengine python-pyqtwebengine{% else %}qt5-webkit{% endif %} \ python-pyqt5 \ xorg-xinit \ xorg-server-xvfb \ diff --git a/scripts/dev/ci/docker/generate.py b/scripts/dev/ci/docker/generate.py index 0d197a7e0..2ab25f325 100644 --- a/scripts/dev/ci/docker/generate.py +++ b/scripts/dev/ci/docker/generate.py @@ -31,8 +31,9 @@ def main(): image = sys.argv[1] config = { - 'archlinux-webengine': {'unstable': False}, - 'archlinux-webengine-unstable': {'unstable': True}, + 'archlinux-webkit': {'webengine': False, 'unstable': False}, + 'archlinux-webengine': {'webengine': True, 'unstable': False}, + 'archlinux-webengine-unstable': {'webengine': True, 'unstable': True}, }[image] with open('Dockerfile', 'w') as f: -- cgit v1.2.3-54-g00ecf From f0489cb6a5df8e9ccbf675d8c5d37fbcaca4d844 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Nov 2022 09:28:38 +0100 Subject: ci: Keep QtWebKit on live support a bit longer See #7478, #4039 --- scripts/dev/ci/docker/Dockerfile.j2 | 7 ++++++- scripts/dev/ci/docker/generate.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index c30141216..5c8aa4404 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -9,8 +9,13 @@ RUN pacman -Suyy --noconfirm \ python-distlib \ qt5-base \ qt5-declarative \ - {% if webengine %}qt5-webengine python-pyqtwebengine{% else %}qt5-webkit{% endif %} \ + {% if webengine %} + qt5-webengine python-pyqtwebengine \ python-pyqt5 \ + {% else %} + https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst \ + {% endif %} xorg-xinit \ xorg-server-xvfb \ ttf-bitstream-vera \ diff --git a/scripts/dev/ci/docker/generate.py b/scripts/dev/ci/docker/generate.py index 2ab25f325..34619a668 100644 --- a/scripts/dev/ci/docker/generate.py +++ b/scripts/dev/ci/docker/generate.py @@ -27,7 +27,7 @@ import jinja2 def main(): with open('Dockerfile.j2') as f: - template = jinja2.Template(f.read()) + template = jinja2.Template(f.read(), trim_blocks=True, lstrip_blocks=True) image = sys.argv[1] config = { -- cgit v1.2.3-54-g00ecf From a03109dad22bdd0d6bba1e49a18cfcb429bf22a8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Nov 2022 09:42:19 +0100 Subject: ci: Fix docker build and add sanity check --- scripts/dev/ci/docker/Dockerfile.j2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index 5c8aa4404..9aef5e16e 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -12,9 +12,6 @@ RUN pacman -Suyy --noconfirm \ {% if webengine %} qt5-webengine python-pyqtwebengine \ python-pyqt5 \ - {% else %} - https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ - https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst \ {% endif %} xorg-xinit \ xorg-server-xvfb \ @@ -23,6 +20,18 @@ RUN pacman -Suyy --noconfirm \ libyaml \ xorg-xdpyinfo +{% if not webengine %} +RUN pacman -U --noconfirm \ + https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst +{% endif %} + +{% if webengine %} +RUN python3 -c "from PyQt5 import QtWebEngineCore, QtWebEngineWidgets" +{% else %} +RUN python3 -c "from PyQt5 import QtWebKit, QtWebKitWidgets" +{% endif %} + RUN useradd user -u 1001 && \ mkdir /home/user && \ chown user:users /home/user -- cgit v1.2.3-54-g00ecf From f277876ce0817f7d05ca94b05beb644482027f85 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 19 Nov 2022 16:00:15 +0100 Subject: dictcli: Switch from master to main Fixes #7481 --- scripts/dictcli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dictcli.py b/scripts/dictcli.py index a937fd31d..0b14bb831 100755 --- a/scripts/dictcli.py +++ b/scripts/dictcli.py @@ -40,7 +40,7 @@ from qutebrowser.config import configdata from qutebrowser.utils import standarddir -API_URL = 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries.git/+/master/' +API_URL = 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries.git/+/main/' class InvalidLanguageError(Exception): -- cgit v1.2.3-54-g00ecf From 1417ffa519a7c43197edafde76dd49fc348784f7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 19 Nov 2022 16:01:12 +0100 Subject: Update changelog --- doc/changelog.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 79641c7cb..2dc5019c2 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -140,6 +140,7 @@ Fixed which is probably rarely used with those commands. - The `readability` userscript now correctly passes the source URL to Breadability, to make relative links work. +- Update `dictcli.py` to use the `main` branch, fixing a 404 error. - Minor documentation fixes [[v2.5.2]] -- cgit v1.2.3-54-g00ecf